DIY Arduino Ribbon Synth. How can i change the Midi Output channel?

Hello!

First post here.

I am musician and very interested in the possiblilties of

the Arduino…

I would be happy to help in regards of musical questions!!!

Here is my question:

I managed to successfully build this:

( with help from a coder , but i can not ask him now)

The problem now is, that it puts out midi data

on channels 1, 2 and 3 ( for every ribbon one channel)

I need to change this to just one.

Yesterday i literally spent the whole day trying to figure out

how to change this :’(

but with no success…

I know its maybe a simple solution but i really can not figure that out.

I would be veeeery happy, if you guys could instruct me how to solve this

problem.

the code is in the attachment.

thx in advance :grin:

guitarcalib_neuer.ino (18.4 KB)

The problem now is, that it puts out midi dataon channels 1, 2 and 3 ( for every ribbon one channel)

It is simpler if you change all three and have it output on 4, 5, 6, you only have to add two lines here:-

//note-on message
void noteOn(int cmd, int pitch, int velocity) {
  cmd += 3; // add this line
  Serial1.write(byte(cmd));
  Serial1.write(byte(pitch));
  Serial1.write(byte(velocity));
  digitalWrite(PIN_LED, HIGH);
}
//note-off message
void noteOff(int cmd, int pitch, int velocity) {
  cmd+=3;  // add this line
  Serial1.write(byte(cmd));
  Serial1.write(byte(pitch));
  Serial1.write(byte(0));
  digitalWrite(PIN_LED, LOW);
}

EDIT - This will change the note on and off messages, it will not address the controller change messages, is that what you want to change?

For controller change messages change this piece of code:-

//Sends controller change to the specified controller
void controllerChange(int controller, int value) {
  Serial1.write(byte(0xb0));
  Serial1.write(byte(controller));
  Serial1.write(byte(value));

  Serial1.write(byte(0xb1));
  Serial1.write(byte(controller));
  Serial1.write(byte(value));

  Serial1.write(byte(0xb2));
  Serial1.write(byte(controller));
  Serial1.write(byte(value));
}

The last digit in 0xb0 sends this to channel 1, to change this to channel 4 make this number 0xb3. The last digit in 0xb1 sends this to channel 2, to change this to channel 5 make this number 0xb4. The last digit in 0xb2 sends this to channel 3, to change this to channel 6 make this number 0xb5.

Hey!

Thank you very much! :)

the perfect solution would be:

all note on/off and all controller data on just one channel (for example channel 4)

Is that possible?

Thanks again!!!

all controller data on just one channel

That doesn't make any sense, you will be sending the same thing three times on the one channel.

Have you not got enough information here to do that yourself?

Hey!

Sorry, i am a real noob. :roll_eyes: The thing is, i want to control my synth ( waldorf blofeld) with one channel ( as it is usual on a normal midi keyboard).

So i could avoid to have to use the midi omni channel setting at the blofeld.

This would be very practical because the blofeld is multitimbral and so i could sequence more than one sounds at a time. ( for live use)

But i think, you gave me enough information here, so i will try it right now.

Thank you very much!! ;)

If after trying you do not get it to work then what you do is post what you have tried, say what it does and what you want it to do and we can be more specific. In that way you will become less of a noob. :)

Ok, sounds good :grinning:

less noob, more fun!

Thx

Ok, i tried your code and it works as you said.

(adding "cmd += 3;")

the midi channels are now 4,5 and 6 as prior 1, 2 and 3.

So far so good, but i cant figure out how to merge the

not on/off messages to one channel,

so it would output all note on/off data on one channel.

(for testing purposes I also tried to put all controller messages to just channel 1 (0xb0) and it works,

this exactly i would need for note on/off messages)

search in the code for noteOn( call - this is not the noteOn in the function definitions but in the body of the code - that has three numbers in the brackets seperated by ',' the first one defines the command and the MIDI channel. So when you see:-

noteOn(0x90 + i, noteFretted[i], vel);

That is saying send a 'note on' message to channel 1 plus the value in the variable i. If you don't want to send it on another channel just remove the "+ i" bit. Then the "cmd += 3" will ensure everything is sent on channel 4. You have to do the same for the noteOff calls.

for testing purposes I also tried to put all controller messages to just channel 1 (0xb0) and it works,

So if you want it to be all one channel then you only need the first of the controller sends, you can remove the other two.

It works!!!

Thank you sooooo much! :D