General
Pads value
Started by nitefish on .
Sign in or create an account to join the conversation.
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 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.
Not sure really but what if you use subarray function to create subarrays according to your columns - rows?
thanks for the interest,Softcore.I was thinking about manipulating arrays.
I found the Thread I was looking for:
http://forum.liine.net/viewtopic.php?f=25&t=1299&p=4987&hilit=abRadioMatriz#p4987
It seems to give the right output,but I need to understand how it works before using it...
I found the Thread I was looking for:
http://forum.liine.net/viewtopic.php?f=25&t=1299&p=4987&hilit=abRadioMatriz#p4987
It seems to give the right output,but I need to understand how it works before using it...
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.
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.
Im still buffled as to what you are trying to achieve....meaning {row number,column number,boolean} is too abstract to begin with....what if more than one pad is pressed?
Also, how are your 16 pads arranged? how many rows - columns?
Also, how are your 16 pads arranged? how many rows - columns?
Im quite sure this is NOT what you asked, but it might help you get some ideas....
The monitor displays the row and column of the last pressed pad.....if you prefer Lemur logic (where the first row is 0 and not 1) then just delete the +1 in the declared expressions (Im sure you will understand once you see it)
rowsandcolumns.jzml
The monitor displays the row and column of the last pressed pad.....if you prefer Lemur logic (where the first row is 0 and not 1) then just delete the +1 in the declared expressions (Im sure you will understand once you see it)
rowsandcolumns.jzml
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
...
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.
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
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
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?
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?
This should be very easy to accomplish by using the script above to set individual expressions for row, column and value and then the oscout(target, adress, args[]) function.
Unfortunately, I haven't worked with this function that much and Im not really sure how to implement it. I can't even get the correct syntax to make a testing template work.
Unfortunately, I haven't worked with this function that much and Im not really sure how to implement it. I can't even get the correct syntax to make a testing template work.
Try this one if you got a chance - still works only for one pad pressed at a time, but that will be an easy thing to change....does it send osc messages in a format you could use though?
rowsandcolumns-oscout.jzml
rowsandcolumns-oscout.jzml
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.
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.
Silly me! Had forgotten about the x.....As I said this will be easy to do...not sure how to construct the slashes though...
BRB...
BRB...
Ok I am really not sure if we can use custom variables inside custom adresses so Im stuck......
This should work as you want by the way but I really really reeeeeaaaally find it ugly and inelegant
I-really-dont-like-this.jzml
This should work as you want by the way but I really really reeeeeaaaally find it ugly and inelegant
I-really-dont-like-this.jzml
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
.
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...
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
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...