コード例 #1
0
        public virtual void NoteOff(int noteNum)
        {
            switch (outputMode)
            {
            case OutputMode.OSC:
                MidiCommand com = MidiCommandHelper.NoteOffCommand(midiChannelOut, noteNum);
                OscOutput(com);
                break;


            case OutputMode.MIDI:
                MidiOut.SendNoteOff(MidiChannel.Ch1, noteNum);
                break;

            default:
                break;
            }
        }
コード例 #2
0
        public virtual void NoteOn(int noteNum, int velocity = 127)
        {
            switch (outputMode)
            {
            case OutputMode.OSC:

                MidiCommand com = MidiCommandHelper.NoteOnCommand(midiChannelOut, noteNum, velocity);
                OscOutput(com);

                break;


            case OutputMode.MIDI:

                MidiOut.SendNoteOn((MidiChannel)midiChannelOut, noteNum, velocity / 127.0f);
                break;

            default:
                break;
            }
        }