Filtering out a certain number from a group.

May 14, 2013 at 6:57am

Filtering out a certain number from a group.

Hi, I have a much more complicated problem with interpreting parsed data further down in the forum, but this is a simpler problem I’ve encountered whilst playing around trying to solve the more complicated problem myself.

I need to filter out all values returned as a 32 integer coming out of a zl.group object before it goes into the unpack object?

I have a stream of serial data, that is being converted to ascii, then grouped, then converted back to integer before going to an unpack object. It is returning allot of 32′s, which I’m assuming is the commas between the packets of ascii data… so I want to ignore or filter out the 32′s before the unpack object.

Sorry I’m new to max, I’m sure there is a simple object that gets rid of certain numbers.

 

Thank you very much for any help you can provide

 

 

#249236
May 14, 2013 at 7:07am

[sel 32]

Use the second outlet to find all numbers that aren’t 32.

 

#249240
May 14, 2013 at 5:26pm

zl.filter can also do it.

 

32 is spacebar btw. You can use the [key] object to find out what everything is.

#249322
May 17, 2013 at 9:31pm

great! Thank you both very much for your help!!

#249735
May 18, 2013 at 11:32am

depending on what the patch is like it could be useful to use the number 32 to chop the stream, in fact. Have that [sel 32] bang the zl group, for instance.

#249784

You must be logged in to reply to this topic.