public void SendNrpn(Channel channel, int parameter, int value) { lock (this) { CheckOpen(); var parameter14 = new Int14(parameter); var value14 = new Int14(value); // Parameter, MSB CheckReturnCode(Win32API.midiOutShortMsg(_handle, ShortMsg.EncodeControlChange( channel, Control.NonRegisteredParameterMSB, parameter14.MSB))); // Parameter, LSB CheckReturnCode(Win32API.midiOutShortMsg(_handle, ShortMsg.EncodeControlChange( channel, Control.NonRegisteredParameterLSB, parameter14.LSB))); // Value, MSB CheckReturnCode(Win32API.midiOutShortMsg(_handle, ShortMsg.EncodeControlChange( channel, Control.DataEntryMSB, value14.MSB))); // Value, LSB CheckReturnCode(Win32API.midiOutShortMsg(_handle, ShortMsg.EncodeControlChange( channel, Control.DataEntryLSB, value14.LSB))); } }
public void SendControlChange(Channel channel, Control control, int value) { lock (this) { CheckOpen(); CheckReturnCode(Win32API.midiOutShortMsg(_handle, ShortMsg.EncodeControlChange( channel, control, value))); } }