Skip to content

Instantly share code, notes, and snippets.

@Crisfole
Created July 18, 2012 02:49
Show Gist options
  • Save Crisfole/3133791 to your computer and use it in GitHub Desktop.
Save Crisfole/3133791 to your computer and use it in GitHub Desktop.
Using Matrix
public static void Main()
{
Random random = new Random();
Matrix m = new Matrix(GetRandomFirstRow(random));
foreach(Note n in m.Row(0))
{
Console.Beep(n, random.Next(1, 5) * 250);
}
}
@Crisfole
Copy link
Author

This creates a random 12 tone matrix. The very first row (row zero) is played (forward) and plays each note for a duration of one of .25, .5, .75, or 1 second.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment