public void SendNoteOff(Channel channel, Pitch pitch, int velocity)
        {
            var cmd = (int)ShortMsg.EncodeNoteOff(channel, pitch, velocity);

            Debug.LogFormat("EncodeNoteOff:{0},{1},{2}={3}", channel, pitch, velocity, cmd);
            m_jc.CallStatic("SendMsg", cmd);
        }
 /// <summary>
 /// Send a MIDI note-off message.
 /// </summary>
 /// <param name="channel">MIDI channel.</param>
 /// <param name="noteId">Note ID / pitch.</param>
 /// <param name="velocity">Note velocity.</param>
 /// <exception cref="ArgumentOutOfRangeException">Channel, pitch, or velocity is out-of-range.</exception>
 /// <exception cref="InvalidOperationException">The device is not open.</exception>
 /// <exception cref="DeviceException">The message cannot be sent.</exception>
 public void SendNoteOff(Channel channel, int noteId, int velocity)
 {
     lock (_lockObj)
     {
         CheckOpen();
         CheckReturnCode(Win32API.midiOutShortMsg(_handle, ShortMsg.EncodeNoteOff(channel, noteId, velocity)));
     }
 }