Exemple #1
0
        private void PlayFromInput(NoteEvent noteEvent)
        {
            if (noteEvent.Velocity > 0)
            {
                SetInputKey(noteEvent);
            }

            if (!ChordMode)
            {
                S1Value = noteEvent.NoteNumber;
                MidiLogic.PlayNote(_mOut, SelectedChannel, noteEvent.NoteNumber, noteEvent.Velocity);
            }
            else
            {
                var chord = Triad.InputChordGen(noteEvent.NoteNumber, TriadShapeEnum.Major);
                if (noteEvent.Velocity > 0)
                {
                    SetNotes(chord.Notes);
                }

                MidiLogic.PlayChord(_mOut, SelectedChannel, noteEvent.Velocity, chord.Notes.ToArray());
            }
        }