filtering structure

initi's picture

i need a help. i am receiving osc packet with structures including 4members ("0"=name,"1"=0/1, "2"=xpos,"3"=ypos) the structure has many names and each name has its own parameters ("1"=0/1, "2"=xpos,"3"=ypos) and i need to give a condition for example: if name = btn1, then it needs to send parametrs ahead. how can i do that, pls? thank you very much in advance!

PreviewAttachmentSize
structure.jpg
structure.jpg23.19 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

usefuldesign.au's picture
Re: filtering structure

Test the item using structure key, structure index and logic/math expression patches. Use result to switch a multiplexer being feed the relevant data on input port 1 and null on input port 0.

dimitri's picture
Re: filtering structure

Or you can do it this way. I'd be interested in seeing your composition and the message dispatch you are trying to put up.

PreviewAttachmentSize
QC_Test Gate.qtz2.74 KB

cybero's picture
Re: filtering structure

Have you tried this as a virtual macro, dimitri?

Composition totally based upon yours, dimitri, hence copyright you in the Information.plist.

Virtual Macros, great utility value.

PreviewAttachmentSize
OSC_Test Gate.qtz5.56 KB

dimitri's picture
Re: filtering structure

Sure! I was just keeping it open.

The trick is in the pulse detection mode (trailing), because the string comparison patch returns a zero if both are equals (a bit odd in my opinion, given boolean logic conventions).