MIDI Xilophone (over serial) to Ableton

well, i think you are right. Maybe it is smarter to have a way to send also value 0.
I played around with the ClickButton library and manage to make to buttons work so that 1 click sends 127 and Click+Hold sends value 0.
i didn't manage to make it into an array yet, but i'll still give it another go.
putting the "ClickButton button1(buttonPin1, LOW, CLICK_PULLUP);" from the beginning into the arrays is confusing me, but there is no hurry, the "firmware" can always be updated when i know enough coding to do it! :wink:

So, let me recall what is working so far:
the 8 piezos,
the 4 assignable buttons (with click and click+hold),
the 4 potenciometers;

But now i have one other question for a 5th button.
There is a defined array of notes for the piezos

unsigned char PadMajor[8] = {60,62,64,65,67,69,71,72};

what i would like to do, would be to have 3 Scales (or modes) that i can chose with a button.
To have a major scale, a minor scale, and maybe a Pentatonic Scale or a Prhygian Mode.
It would start with Scale1 (major). Each button click would make it to the next scale. Each button Hold would change it into the previous scale.

Finding the midi note numbers is no problem. (maybe not so easy to decide which mode i want to have!!! 8) )

i imagine it could work like this:
i make a new button than can control a "mode" variable.
when mode is equal to 1 the scale to be played is PadMajor. mode 2 = PadMinor and mode 3 = PadPentatonic.

But now imagining it and doing it are very different things...
Is an array "loopable"?
Let's say
for (int mode=0; mode<3; mode++) - when mode is equal to 3 if i would use something like "mode++) would it go back to 1 or would it continue to 4?

How can i connect two separate parts of the code, the one with the button defining the "mode" with the one that is telling which notes to play?

Ahhhh... :~ i think i am at a stage now where i can understand some of the concepts involved with programing, but i cannot use them yet. i can understand for instance that with variables we can connect things, but then when i try to use them everything get's mixed up along the way...
well, i guess i cannot ask to learn it all in two weeks! With time i'll get there.
Until then, i am lucky to have this form to push me in the right directions! Thanks!
=)

Let's get this last button working... then it's time to start building everything! =)
And PLAY!!! =)