简体   繁体   English

如何发送控制更改消息 MSB 和 LSB 到选择库?

[英]How to send Control Change Messages MSB and LSB to select bank?

I am using UWP Midi in my application to control my Yamaha MOX8 keyboard.我在我的应用程序中使用 UWP Midi 来控制我的 Yamaha MOX8 键盘。 I am able to send ProgramChangeMessages to change the patches on my keyboard.我可以发送 ProgramChangeMes​​sages 来更改键盘上的补丁。 I am able to change the first 128 patches with a simple Program Change Message.我可以使用简单的程序更改消息更改前 128 个补丁。 However, there are several banks that have patches I'd like to switch to.但是,有几家银行有我想切换到的补丁。 According to the Yamaha documentation the first bank, or default bank is labeled PRE1 (MSB=63, LSB=0) and that I need to send a Control Change to change the bank before sending the Program Change.根据 Yamaha 文档,第一个库或默认库被标记为 PRE1(MSB=63,LSB=0),并且我需要在发送程序更改之前发送控制更改来更改库。

The next bank is PRE2 (MSB=63, LSB=1).下一个库是 PRE2(MSB=63,LSB=1)。 PRE3 (MSB=64,LSB=2), PRE4 (MSB=63,LSB=3), PRE5 (MSB=63,LSB=4) all the way through USR3 (MSB=63,LSB=10). PRE3 (MSB=64,LSB=2), PRE4 (MSB=63,LSB=3), PRE5 (MSB=63,LSB=4) 一直到 USR3 (MSB=63,LSB=10)。 There is one more bank for GM (MSB=0,LSB=0) and one for DRUMS (MSB=63,LSB=32) GM (MSB=0,LSB=0) 和 DRUMS (MSB=63,LSB=32) 多出一组

    // How do MSB, LSB value translate into the Control Change Message api below?         
    var ccMessage = new MidiControlChangeMessage(Byte Channel, Byte Control, Byte ControlValue);
    midiOutPort.SendMessage(ccMessage);

    // This message works for changing the program patch:
    IMidiMessage midiMessateToSend = new MidiProgramChangeMessage(0, 73);
    midiOutPort.SendMessage(midiMessateToSend);

What values should be placed into the Control and ControlValue parameters of the MidiControlChangeMessage? MidiControlChangeMes​​sage 的 Control 和 ControlValue 参数中应该放置哪些值?

As shown in the MIDI specficiation , or this reference table , or page 120 of the Data List manual, the bank select controller has numbers 0/32.MIDI 规范此参考表或数据列表手册的第 120 页所示,库选择控制器的编号为 0/32。 For example, to select "Trojan" (instrument 74 in PRE5) on the first channel:例如,要在第一个通道上选择“Trojan”(PRE5 中的乐器 74):

... new MidiControlChangeMessage(0,  0, 63);
... new MidiControlChangeMessage(0, 32,  4);
... new MidiProgramChangeMessage(0,     73);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM