public void Dispose() { InputMidiDevice.StopRecording(); InputMidiDevice.Close(); InputMidiDevice.Dispose(); OutputMidiDevice.Close(); OutputMidiDevice.Dispose(); }
public void SendSysExMessage(SysExMessage msg) { var sem = new Sanford.Multimedia.Midi.SysExMessage( new[] { (byte)SysExType.Start } .Concat(SysExMessage.ManufacturerId) .Concat(SysExMessage.ProductType) .Concat(SysExMessage.DeviceId) .Concat(msg.GetMessageContent()) .Concat(new byte[] { 247 }) .ToArray()); OutputMidiDevice.Send(sem); }
public void SendControlChange(byte channel, byte controller, byte value) { var msg = new ChannelMessage(ChannelCommand.Controller, channel, controller, value); OutputMidiDevice.Send(msg); }