public ReflectingBrownNoteGenerator( NoteRangeRestrictor nrr, Random randGen, int lowestPitchChange, int highestPitchChange, int lowestLengthStep, int highestLengthStep, PatchNames instrument = PatchNames.Acoustic_Grand) : base(nrr, lowestPitchChange, highestPitchChange, lowestLengthStep, highestLengthStep) { this.instrument = instrument; this.MaxNotes = 200; gen = randGen; }
/** * * @param nrr The restrictor to use for note generation. * @param lowPitchChange The smallest allowed step for pitch changes. * @param highPitchChange The largest allowed step for pitch changes. * @param lowLengthStep The smallest allowed step for duration changes. * @param highLengthStep The largest allowed step for duration changes. */ public BrownNoteGenerator( NoteRangeRestrictor nrr, int lowPitchChange, int highPitchChange, int lowLengthStep, int highLengthStep ) { restrictor = nrr; lowPC = lowPitchChange; highPC = highPitchChange; lowLC = lowLengthStep; highLC = highLengthStep; // Set first note to midpoint of ranges nextPitchIndex = (int) ( restrictor.GetNumPitches() / 2 ); nextLengthIndex = (int) ( restrictor.GetNumDurations() / 2 ); }