示例#1
0
    public Note(int _midiNumber)
    {
        knmConstants = new KeyboardAndMidiConstants();

        midiNumber = _midiNumber;
        frequency  = SetFrequency();
        period     = SetPeriod();
    }
示例#2
0
    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);
        }
    }