using System; using System.Collections.Generic; using System.Text; namespace TechnoGen { class Program { static void Main(string[] args) { Console.Title = "Techno music generator."; int i; while (true) { i = R; } } static char R { get { int t = r.Next(10); char c = ';'; if (t <= 2) c = (char)('0' + r.Next(r.Next(255))); else if (t <= 4) c = (char)('a' + r.Next(r.Next(255))); else if (t <= 6) c = (char)('A' + r.Next(r.Next(255))); else c = (char)(r.Next(r.Next(224), 255)); int freq = (c * r.Next(20, 100)); int dur = (r.Next(10, 500)); if (freq < 37) freq = 37; if (freq > 32767) freq = 32767; Console.Beep(freq, dur); return c; } } static Random r = new Random(); } }