General

Pads value

Started by nitefish on .

Sign in or create an account to join the conversation.

15 posts

Topic starter
Bonsoir.
I have a 16 pads object.When I monitor his values,I get an array like this :
{0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0},if I hit the fourth pad.
Is there a way to get a result as:
{row number,column number,boolean} ?

I'm sure it has been discussed but I cannot find the thread...
Thank you.
I don't find a way...
The abMatriz module shows the right value {x,y},but this is a bit too "abstract art" for my actual scripting skill.(AB. Rulez!).
In the guide,Pads,Switches and leds are described as "two dimensional arrays" and I was sure this would be easy to find a solution.
Softcore,you help me a lot.Thank you!
To be more precise.I need to build osc messages like this for SuperCollider
/Pads/row/column/value(0 or 1).
You are right,pressing more than one pad will be a problem :D ...
transposing this with non-radio switches too.

I' m just doing basic things with the Lemur since last summer .But now I want more,I want problems.
lol hear ya!

Ok so, the final question is...how often do you want the /Pads/row/column/value(0 or 1) to be sent? Im guessing, you want to "monitor" the value so you want a constant transmission? If so, you will be needing a onframe script which will send custom OSC messages constructed based on the logic already existent in my above example (to get rows and columns).

edit to add: well the logic needs some modfication to take into consideration of more than one pad pressed - obviously nonull and geting the size of the nonnull array will be needed
bonsoir,
So,I can monitor in SuperCollider this address/message:
msg[/address/address,row value,column value]
but I cannot find how to monitor the boolean value (0,1).
The SC program is waiting for a message on this form:
msg[/address/address/row value/row column/boolean]
I think I can work on this on the SuperCollider side,but can we build osc addresses with variables in Lemur?
Bonsoir,
I have tried with the x yesterday. SuperCollider prints the whole array of xs.
The message I need for a link "out of the box" between the lemur's pads and the GUI in SuperCollider is exactly this one:
/Pads/r/c,boolean value(just one,not the whole array)
I need the slashes for r and c.Is there a way to construct such messages with Lemur ?
I'm revisionning things around "getnext","nonnull",etc on the forum to be able to add the boolean with a script.
Bonjour.
Softcore,a great thank for the interest and the replies.
Now I'm sure that the way Lemur sends the message [/address,(all of the 16 values with 0 and 1)] is the best way :D .
It just will be more simple to manage multipads or multiswitches.
It's more logical (more elegant) to have the same array on the SuperCollider's GUI side.
So,back to the SC Help...