help with Pad arrays

Discuss Lemur and share techniques.
Post Reply
whatisvalis
Regular
Posts: 153
Joined: 31 Dec 2011 17:12

help with Pad arrays

Post by whatisvalis »

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
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: help with Pad arrays

Post by Softcore »

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.
whatisvalis
Regular
Posts: 153
Joined: 31 Dec 2011 17:12

Re: help with Pad arrays

Post by whatisvalis »

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?
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: help with Pad arrays

Post by Softcore »

Ok, let me understand! Do you use lots of Pad objects or only one with many rows/columns?
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: help with Pad arrays

Post by Softcore »

Here's an example with one Pads object with 16 pads.... ;)
Attachments
anything_can_be_an_expression.jzml
(4.79 KiB) Downloaded 159 times
whatisvalis
Regular
Posts: 153
Joined: 31 Dec 2011 17:12

Re: help with Pad arrays

Post by whatisvalis »

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.
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: help with Pad arrays

Post by Softcore »

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 119 times
whatisvalis
Regular
Posts: 153
Joined: 31 Dec 2011 17:12

Re: help with Pad arrays

Post by whatisvalis »

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
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: help with Pad arrays

Post by Softcore »

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)



;)
Last edited by Softcore on 07 Jun 2013 13:54, edited 3 times in total.
whatisvalis
Regular
Posts: 153
Joined: 31 Dec 2011 17:12

Re: help with Pad arrays

Post by whatisvalis »

ah, cheers!
Post Reply