Esempio n. 1
0
        private void PercussionNoteOn(int channel, int key, int velocity)
        {
            var tone = ToneItems.FirstOrDefault(t =>
                                                t.ProgramNumberAssigned && t.ProgramNumber == programNumbers[channel] &&
                                                t.PercussionNumberAssigned && t.PercussionNumber == key) ?? new ToneItem();

            SetPercussionProgram(channel, tone.ProgramNumber, tone);
            SendNoteOn(channel, tone.PercussionNoteNumber, velocity);
            noteOnKeys[channel] = key;
        }
Esempio n. 2
0
        private void ProgramChange(int channel, int program)
        {
            var tone = ToneItems.FirstOrDefault(t => t.ProgramNumberAssigned && t.ProgramNumber == program) ?? new ToneItem();

            SetProgram(channel, program, tone);
        }