help with Pad arrays
-
- Regular
- Posts: 153
- Joined: 31 Dec 2011 17:12
help with Pad arrays
Hi,
Wondering if the following concept is possible or if there is another way you guys can help me achieve this:
I have a number of Pad arrays that send CC msgs (to change articulations for different libraries).
What i want to do is when you press the transport record button (via lemur) it also sends out the CC of the currently selected pad array. Since there are a number of different arrays could I use a monitor for each array that shows the selected CC, and then have the record button get the value of the active array and send it as a CC msg?
cheers,
JD
Wondering if the following concept is possible or if there is another way you guys can help me achieve this:
I have a number of Pad arrays that send CC msgs (to change articulations for different libraries).
What i want to do is when you press the transport record button (via lemur) it also sends out the CC of the currently selected pad array. Since there are a number of different arrays could I use a monitor for each array that shows the selected CC, and then have the record button get the value of the active array and send it as a CC msg?
cheers,
JD
Re: help with Pad arrays
You can "store" the currently selected pad (CC) in a global expression.
Then, upon tapping the record button, you can set up a scripted output or custom expression that will re-send that stored expression value.
Then, upon tapping the record button, you can set up a scripted output or custom expression that will re-send that stored expression value.
-
- Regular
- Posts: 153
- Joined: 31 Dec 2011 17:12
Re: help with Pad arrays
Thanks for the input, that's the set-up I was trying to imagine, but what expression would i use to store the last CC sent?
Re: help with Pad arrays
Ok, let me understand! Do you use lots of Pad objects or only one with many rows/columns?
Re: help with Pad arrays
Here's an example with one Pads object with 16 pads....
- Attachments
-
- anything_can_be_an_expression.jzml
- (4.79 KiB) Downloaded 157 times
-
- Regular
- Posts: 153
- Joined: 31 Dec 2011 17:12
Re: help with Pad arrays
Thanks Softcore, that's super useful to know. I love examples like this.
i might come back to this once my template is finished, it's a concept I need to test to see if it makes any sense adding.
i might come back to this once my template is finished, it's a concept I need to test to see if it makes any sense adding.
Re: help with Pad arrays
By the way, for the purpose of learning and studying, here's a different approach - the expression is defined locally (therefore there is no need for a script in the Pads object) although I really cant tell which approach is more memory-cpu efficient.
- Attachments
-
- anything_can_be_an_expression-noscript.jzml
- (4.57 KiB) Downloaded 118 times
-
- Regular
- Posts: 153
- Joined: 31 Dec 2011 17:12
Re: help with Pad arrays
Do you just add the :lastCC to close the statement since <16 will always be true?
firstof(Pads.x)<16?firstof(Pads.x)+21:lastCC
firstof(Pads.x)<16?firstof(Pads.x)+21:lastCC
Re: help with Pad arrays
Its not always true!
You see, when no pad is pressed, the firstof(x) returns the size of the x array so when you release your finger off the pads, lastCC would become 16 (size of Pads.x) + 21.
The reason this was not required in the initial script (my first approach) was because it was set to execute on x rising from zero (so it wouldnt be executing when a pad was released).
So in essense the above statement says
firstof(Pads.x)<16?firstof(Pads.x)+21
if firstof(Pads.x)<16 (if ANY pad is pressed) then lastCC = firstof(Pads.x)+21
:lastCC
else (if no pad is pressed) lastCC = lastCC (it retains its current value)
You see, when no pad is pressed, the firstof(x) returns the size of the x array so when you release your finger off the pads, lastCC would become 16 (size of Pads.x) + 21.
The reason this was not required in the initial script (my first approach) was because it was set to execute on x rising from zero (so it wouldnt be executing when a pad was released).
So in essense the above statement says
firstof(Pads.x)<16?firstof(Pads.x)+21
if firstof(Pads.x)<16 (if ANY pad is pressed) then lastCC = firstof(Pads.x)+21
:lastCC
else (if no pad is pressed) lastCC = lastCC (it retains its current value)
Last edited by Softcore on 07 Jun 2013 13:54, edited 3 times in total.