Page 1 of 1
Arbitrary Program Change from Pad/Button
Posted: 30 Aug 2012 20:14
by ForestCat
This is a profoundly basic question, but:
A. The phrase "program change" occurs exactly twice in the manual, and one of them is a typo.
B. The forum rejects the search +program +change as too common.
So... how do I create a group of pads or buttons to send the program changes of my choice ( not sequential 1-10, etc) without attaching a custom MIDI to each button? When I change the message type to Program Change, the value is set to x, it's grayed out, and I can't change it. This is one of the most fundamental things to do, setting up a page of program change buttons for a specific song, etc. I hope I'm missing something obvious...
Re: Arbitrary Program Change from Pad/Button
Posted: 30 Aug 2012 22:06
by Phil999
create one Switches object with a couple of rows and columns. Enable 'Radio' and 'Numbers'. Disable its 'x' expression. Then create an expression inside the Switches object with the line
and set it to Program Change.
That's about the simplest way of doing it I think. The firstof(x) gives a single number from the Switches array, and the expression outputs that number as program change command.
Re: Arbitrary Program Change from Pad/Button
Posted: 30 Aug 2012 22:13
by ForestCat
Thanks, Phil
But say you have 10 buttons, and you want to transmit 49, 63, 82, 23, 11, 54, 32, 110, 29, 77 from those buttons. How could you do that with your method? Where are you actually specifying those values? I think I'm missing something important/obvious...
Re: Arbitrary Program Change from Pad/Button
Posted: 30 Aug 2012 23:37
by Phil999
first of all, I edited my post above because I did mix up "Custom MIDI" and "expression". Sorry about that. I often confuse those things you can create inside.
The value of the program change number is specified with the number of the Switches.
Switch 0 (in the Switches object array) -> firstof(x) = 0
Switch 1 (in the Switches object array) -> firstof(x) = 1
Switch 2 (in the Switches object array) -> firstof(x) = 2
etc.
...which leads to program change number 0, 1, 2, etc. because we have set the output expression to firstof(x).
Now your new example is different, we cannot do it that simply. But just for the sake of understanding (for me as well), I'll post a template to make it more clear. Will take a couple of minutes.
Re: Arbitrary Program Change from Pad/Button
Posted: 31 Aug 2012 00:38
by Phil999
more elegant solution for Switches3. Couldn't find a way to use Switches3.array for the labels.
Re: Arbitrary Program Change from Pad/Button
Posted: 01 Sep 2012 01:45
by ForestCat
Phil, I just wanted to thank you for taking the time to post these examples. I really appreciate it. I'm going to try to adapt some of this into my template.