I’m trying to write the code for reading and writing MIDI data to and from my Yamaha LS9-32 using an Arduino UNO. In decimal form, I can send 176, 98, 50, 99, 12, 6, 127, 38, 127 to the mixer and successfully turn ON the main STEREO L/R Channel. Also, when I send 176, 98, 50, 99, 12, 6, 0, 38, 0 to the mixer, it turns the STEREO L/R Channel OFF. What I can’t understand is how that correlates to the NRPN parameter assignments in the LS9 manual on page 253. According to the manual, the STEREO LR ON button is hex 0633. Am I looking at something incorrectly? I think what I’m sending is 62 LSB the hex value 32 and 63 MSB the hex value 0C.
Hello and Welcome!
As you probably know, there are several different types of MIDI messages, and some can be used to control the Yamaha mixers. Personally, I like Sysex because it gives the most control.
However, Control Change (CC) messages are shorter and easier to use, if there are matching messages for what you need to do.
Since we’re talking about computers, which use Binary, it’s most helpful to learn to use HEX when talking about MIDI messages.
You are talking about the messages:
B0-62-32-63-0C-06-7F-26-7F
B0-62-32-63-0C-06-00-26-00
The info in the Manual regarding NRPN messages is:
Type | Binary | Hex | Message |
---|---|---|---|
STATUS | 1011nnnn | Bn | Control change |
DATA | 01100010 | 62 | NRPN LSB |
0vvvvvvv vv | Parameter number LSB | ||
STATUS | 1011nnnn | Bn | Control change * |
DATA | 01100011 | 63 | NRPN MSB |
0vvvvvvv vv | Parameter number MSB | ||
STATUS | 1011nnnn | Bn | Control change * |
DATA | 00000110 | 06 | Data entry MSB |
0vvvvvvv vv | Parameter data MSB | ||
STATUS | 1011nnnn | Bn | Control change * |
DATA | 00100110 | 26 | Data entry LSB |
0vvvvvvv vv | Parameter data LSB |
- The STATUS byte of the second and subsequent messages need not be added during transmission. Reception must occur correctly whether or not the status byte is omitted.
So, in your case you have:
Type | Binary | Hex | Message |
---|---|---|---|
STATUS | 10110000 | B0 | Control change (MIDI ch 1) |
DATA | 01100010 | 62 | NRPN LSB |
0vvvvvvv vv | 32 | Parameter number LSB | |
STATUS | 1011nnnn | B0 | Control change * |
DATA | 01100011 | 63 | NRPN MSB |
0vvvvvvv vv | 0C | Parameter number MSB | |
STATUS | 1011nnnn | B0 | Control change * |
DATA | 00000110 | 06 | Data entry MSB |
0vvvvvvv vv | 7F | Parameter data MSB | |
STATUS | 1011nnnn | B0 | Control change * |
DATA | 00100110 | 26 | Data entry LSB |
0vvvvvvv vv | 7F | Parameter data LSB |
The 2nd to 4th Status Messages (B0) do not need to be repeated, so they are not part of the message.
Anyway, you probably know all that, but good to review anyway…
So you’re saying that the NRNP Parameter number 0C32 is changing the Master L/R On/Off?
It should be changing the Insert of one of the Mixes or Matrices on and off. My guess would be Mix 7.
Parameter | Channel | From | To |
---|---|---|---|
INSERT ON | INPUT | 0BCC | 0BEB |
MIX, MATRIX, STEREO LR | 0C2C | 0C49 |
Is the Insert going on and off?
What happens when you send 0633 instead?
Have you tried attaching your Arduino to a MIDI monitor to see if it’s actually producing the data you think?
Thanks for helping! I really appreciate it. Yes, I attached the Arduino to PocketMIDI on my Mac and the send and receive that turns the Stereo L/R On and Off is this:
Stereo LR Turns On:
B0 62 32
B0 63 0C
B0 06 7F
BO 26 7F
Stereo LR Turns Off:
B0 62 32
B0 63 0C
B0 06 00
B0 26 00
Later this evening, I’ll see if any Mix Inserts are turning on and off then then send 0633 and see what happens.
How did you get those values in the first place if not from the Manual?
Does the LS9 have the latest firmware?
I’ll check the firmware later this evening. The decimal values I sent to the mixer came from The hex values I read from the mixer with Pocketmidi while pressing the Stereo LR ON and OFF.
Remember that the LS9 will likely only send the first B0 for the message.
What you SHOULD see is:
B0 62 33 63 06 06 7F 26 7F
and
B0 62 33 63 06 06 00 26 00
There’s also a chance that PocketMIDI doesn’t support the dropping of the B0 and is getting mixed up.
Have you actually had the Arduino send the message to the LS9 and see whether it works?
Yes, the messages I send do indeed work but they still don’t match the manual. The mixer firmware is updated to the latest. I’d like to move in a different direction, towards SysEx messages, as you mentioned previously. Yamaha sent me the latest Paramater Change List and I am able to read and send SysEx commands to the mixer with PocketMIDI. It really seems to work well. Now, I would like to read and send SysEx with my Arduino. I’ve tried these few simple commands to set fader 56 to 0db and then down to infinity and back over and over, with no success:
#include <MIDI.h>
byte onsysexArray[18] = {0xF0, 0x43, 0x10, 0x3E, 0x12, 0x01, 0x00, 0x33, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x06, 0x37, 0xF7};
byte offsysexArray[18] = {0xF0, 0x43, 0x10, 0x3E, 0x12, 0x01, 0x00, 0x33, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF7};
MIDI_CREATE_DEFAULT_INSTANCE();
void setup() {
MIDI.begin();
}
void loop() {
MIDI.sendSysEx(18, onsysexArray, true);
delay(10000);
MIDI.sendSysEx(18, offsysexArray, true);
}
I’d also like to read the positiion of the fader. What am I missing? Thanks again for the help!
You got the right Sysex.
Make sure you have the LS9 MIDI settings to “Parameter Change” RX & TX
Thanks Andy! Works like a charm!
Easy as that!
Enjoy!
-Andy.