public Note(int _midiNumber) { knmConstants = new KeyboardAndMidiConstants(); midiNumber = _midiNumber; frequency = SetFrequency(); period = SetPeriod(); }
public Keyboard() { knmConstants = new KeyboardAndMidiConstants(); heldNotes = new List <Note>(); int noteAmount = knmConstants.noteAmount; int midiStartingPoint = knmConstants.midiStartingPoint; keyboardNotes = new Note[noteAmount]; for (int i = 0; i < noteAmount; i++) { keyboardNotes[i] = new Note(i + midiStartingPoint); } }