Pads value
Pads value
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.
Re: Pads value
Not sure really but what if you use subarray function to create subarrays according to your columns - rows?
Re: Pads value
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= ... triz#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= ... triz#p4987
It seems to give the right output,but I need to understand how it works before using it...
Re: Pads value
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.
Re: Pads value
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?
Re: Pads value
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)
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)
Re: Pads value
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.
Re: Pads value
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
Re: Pads value
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?
Re: Pads value
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.