Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Threading;
- namespace Song_of_Time
- {
- class Program
- {
- static void Main(string[] args)
- {
- // C# Song of Time
- // These are to print the ASCII arts
- var aButton = new[]
- {
- @" `NNhhyyyyyyyhmmNN` ",
- @" -ssssoosyhddhyyyyhhhd: ",
- @" /oooooosyhNNNNNNhsyyyddhy+ ",
- @" oosssoooohdmMMMMMMmhhyyhhddhoo ",
- @" NNsoooooodNNMMNNMMNddyyhhhhdNN ",
- @" ddsooooyymNNNNddMMNNmyyhhhhdmm ",
- @" hhsooooddNMNmdyyNMMMNhhhhhhdmm ",
- @" yyyyyyyNNMMMNNNNMMMMNmmhhhhddd ",
- @" ddyyyhhMMMMMMMMMMMMMMNNhhhhdmm ",
- @" mmhyhdmMMNNmddddddNMMMMddhhdmm ",
- @" MMdhdmmMMNmdhhhhhhmNNMMddhhdNN ",
- @" sshddmmmmdddhhhhhhddmmmdddmhoo ",
- @" +yhmmdddhhhhhhhhhhhddddhy+ ",
- @" :ddmmdddddddddhhhdddd: ",
- @" `MMNNNmmmmmmmNNNN` "
- };
- var downButton = new[]
- {
- @" `mmo++/////+shdNN` ",
- @" .//::::-----::///++yy- ",
- @" :+/::---------:////++ssss+ ",
- @" oo+//::oosssoosssyyyyyyssyyyoo ",
- @" dd+--:/ddmNmmmNNNNNNNNNyysoymm ",
- @" ss/--::ddNMMMMMMMMMMMmmsssoydd ",
- @" ++:---:oomNMMMMMMMMMNhhoooosdd ",
- @" ++/:::://hmNMMMMMMMNmoooooosyy ",
- @" yy+//////sydMMMMMMmhy++ooooshh ",
- @" ddo++++++ooymmMMNNhoo++oooosdd ",
- @" NNyoo++++oosddMMdds++//ooosymm ",
- @" ssyyyoooooosyhmmyyo++++ooyhyoo ",
- @" +syhhsssssssyysooooooyyyy+ ",
- @" :ddddyyyyysssssosyyhh: ",
- @" `MMmmdddhhdddmmmm` ",
- };
- var rightButton = new[]
- {
- @" `mmo++/////+shdNN` ",
- @" .//::::-----::///++yh: ",
- @" :+/::--//:----::::://ssss+ ",
- @" oo+/:----sysso//::::///oosyyoo ",
- @" dd+----::hmmNmhhso+++++ooooymm ",
- @" ss/----::hmNMMMMmmdhyooooosydd ",
- @" ++:----::dmNMMMMMMMMNmmhyysydd ",
- @" ++/:::://dmNMMMMMMMMMMMNNdyyyy ",
- @" yy+//::++dmNMMMMMMMMMNNhhysyyy ",
- @" ddo++/+oomNMMMMMNNdhhssooooshh ",
- @" NNyoo++oomNNMNddhysoo++++osymm ",
- @" ssyyyoooohddddyyooo++++ooyhyoo ",
- @" +syhhssyyyysoooooooooyyyy+ ",
- @" :ddhhyyssssssssosyyhh: ",
- @" `MMmmdddhhdddmmmm` ",
- };
- // Now, i create a array with note frequencies
- int[] fq = { 261, 277, 293, 311, 329, 349, 370, 392, 415, 440, 466, 493, 522, 554, 586, 622, 658 };
- // C C# D D# E F F# G G# A A# B C2 C2# D2 D2# E2
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- // Then i put it in action
- // Foreach is to store the arrays in the string "line" and Console.WriteLine to print the string
- Console.Beep(fq[9],500);
- foreach(string line in rightButton)
- Console.WriteLine(line);
- // Thread.Sleep to make a delay
- Thread.Sleep(100);
- // Console.Clear to change the ASCII Art
- Console.Clear();
- foreach (string line in aButton)
- Console.WriteLine(line);
- Console.Beep(fq[2],870);
- Console.Clear();
- foreach (string line in downButton)
- Console.WriteLine(line);
- Console.Beep(fq[5],580);
- Console.Clear();
- foreach (string line in rightButton)
- Console.WriteLine(line);
- Console.Beep(fq[9],500);
- Console.Clear();
- foreach (string line in aButton)
- Console.WriteLine(line);
- Thread.Sleep(80);
- Console.Beep(fq[2],870);
- Console.Clear();
- foreach (string line in downButton)
- Console.WriteLine(line);
- Console.Beep(fq[5],550);
- Console.Beep(fq[9], 330);
- Console.Beep(fq[12], 320);
- Console.Beep(fq[11], 340);
- Thread.Sleep(200);
- Console.Beep(fq[7], 320);
- Console.Beep(fq[5], 420);
- Console.Beep(fq[7], 450);
- Console.Beep(fq[9], 330);
- Thread.Sleep(200);
- Console.Beep(fq[2], 400);
- Thread.Sleep(90);
- Console.Beep(fq[0], 400);
- Thread.Sleep(90);
- Console.Beep(fq[4], 400);
- Console.Beep(fq[2], 1000);
- // And that's it, thanks for copying and pasting my code :)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement