public static void Main(string[] args) { Console.WriteLine("Welcome to Swin-Ochestra!"); //Composition Composer myBeethowen = new Composer(); StaffSheet composition = myBeethowen.Compose(TimeSignature.b44, 0); //Conductor Conductor myConductor = new Conductor(); //Fomation Drummer bassDrummer = new Drummer(new Drum()); Trumpeter myTrumpeter = new Trumpeter(new Trumpet()); myConductor.Equip(composition); bassDrummer.Read(composition); myTrumpeter.Read(composition); bassDrummer.ListenTo(myConductor); myTrumpeter.ListenTo(myConductor); myConductor.Start(); }
public StaffSheet Compose(TimeSignature toCompose, int seed) { StaffSheet toReturn = new StaffSheet(TimeSignature.b44); Random rnd = new Random(seed); List <Note> notes = new List <Note>() { Note.C, Note.Db, Note.D, Note.Eb, Note.E, Note.F, Note.Gb, Note.G, Note.Ab, Note.A, Note.Bb, Note.B }; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { toReturn.Tabs[i].Add(notes[rnd.Next(0, notes.Count)]); } } return(toReturn); }
public void Equip(StaffSheet toPlay) { currentlyPlaying = toPlay; }
public void Read(StaffSheet ss) { Staff = ss; }