Arbitrary Program Change from Pad/Button

Discuss Lemur and share techniques.
Post Reply
ForestCat
Regular
Posts: 59
Joined: 02 Mar 2012 21:00

Arbitrary Program Change from Pad/Button

Post 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...
Phil999
Regular
Posts: 919
Joined: 11 Jan 2012 01:53

Re: Arbitrary Program Change from Pad/Button

Post 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

Code: Select all

firstof(x)
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.
Last edited by Phil999 on 30 Aug 2012 23:04, edited 1 time in total.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
ForestCat
Regular
Posts: 59
Joined: 02 Mar 2012 21:00

Re: Arbitrary Program Change from Pad/Button

Post 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...
Phil999
Regular
Posts: 919
Joined: 11 Jan 2012 01:53

Re: Arbitrary Program Change from Pad/Button

Post 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.
Attachments
programchange array.jzml
(7.64 KiB) Downloaded 82 times
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
Phil999
Regular
Posts: 919
Joined: 11 Jan 2012 01:53

Re: Arbitrary Program Change from Pad/Button

Post by Phil999 »

more elegant solution for Switches3. Couldn't find a way to use Switches3.array for the labels.
Attachments
programchange array2.jzml
(5.83 KiB) Downloaded 85 times
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
ForestCat
Regular
Posts: 59
Joined: 02 Mar 2012 21:00

Re: Arbitrary Program Change from Pad/Button

Post 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.
Post Reply