Skip to content

Instantly share code, notes, and snippets.

@Dr4g0
Created July 16, 2013 07:37
Show Gist options
  • Save Dr4g0/6006616 to your computer and use it in GitHub Desktop.
Save Dr4g0/6006616 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NotesPopcorn
{
class Program
{
static void Main(string[] args)
{
decimal noteC=130.81m;
decimal noteDb = 138.59m;
decimal noteD = 146.83m;
decimal noteEb = 155.56m;
decimal noteE = 164.81m;
decimal noteF = 174.61m;
decimal noteGb = 175.00m;
decimal noteG = 196.00m;
decimal noteAb = 207.65m;
decimal noteA = 220.00m;
decimal noteBb = 233.08m;
decimal noteB = 246.94m;
string popcornsNotes = "AGAECEAAGAECEAABCBCCADADDGAAGAAGAECEAAGAECEAABCBCCADADDGAAGABCEDECACGEDECACGEGbGGbEE";
for (int i = 0; i < popcornsNotes.Length; i++)
{
switch (popcornsNotes[i])
{
case 'A': Console.Beep((int)noteA, 500); break;
case 'B': Console.Beep((int)noteB, 500); break;
case 'C': Console.Beep((int)noteC, 500); break;
case 'D': Console.Beep((int)noteD, 500); break;
case 'E': Console.Beep((int)noteE, 500); break;
case 'F': Console.Beep((int)noteF, 500); break;
case 'G': Console.Beep((int)noteG, 500); break;
default:
break;
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment