Need Help with Buttons and MIDI!

Hello everyone. I have a project that uses 7 potentiometers, each sending their own CC message. I’m trying to code a button to add, where:

The button will send a CC message.
Whe the button is pressed, it will change the CC message of all 7 of the potentiometers.

Can someone help me with this? Thank you!

Hi, @mackdavis91
Welcome to the forum.

https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum

Post your working code?
What is CC?
How is it sending the data?
How are you connecting your button?

Can you please tell us your electronics, programming, arduino, hardware experience?

Thanks.. Tom.... :smiley: :+1: :coffee: :australia:

I can't understand the logic of what you are trying to do.

A CC (Controller change message) is used to set various parameters in MIDI system, which will then get actioned if the MIDI system is paying attention to that message and implements them. A lot of these messages come in pairs, the first time they are encountered in the list it is the most significant part (or bit) of the message. The second time (32 messages later ) you get the least significant bit of the number. All CC values go from 0 to 127.

Now what is a pot going to do with this list? That's what I don't understand. Is it constantly sending CC messages to your system? If so at what rate? You are in danger of crippling your entire system by flooding it with messages.

When the button is pressed what exactly do you want to happen? You say it will change the CC message, but change it to what?

Note that CC numbers 120 to 127 are used for Channel Message Mode messages. Things like all sounds off, all notes off, reset all controllers and so on.

We still need to see your code.

I found the phrase "32 messages later" to be confusing at first — I thought it referred to later in time, meaning that there were 31 intervening MIDI messages between the two parts. It's actually referring to the controller number offset in the MIDI spec: the second part of a high-resolution (14-bit) CC message lives at controller number X + 32 — not literally 32 messages later in the data stream.

I also learned that many systems only use the first (MSB) part and ignore the LSB entirely, so the second part is often not sent at all.

Just sharing in case others found that phrasing a bit opaque — it makes sense once you know the structure, but it tripped me up at first.

a7