Forums > MaxMSP

simple phrase detection

February 2, 2011 | 3:06 pm

Hi, I wonder if any of you have done phrase detection?

In a list of on/off patterns (0s and 1s), I would like to divide the list into sublists, if there has been a period of more than 20 0s in a row. How do i do this?

I have made an attempt here:

– Pasted Max Patch, click to expand. –

Thanks a lot for your help!

ana


February 2, 2011 | 4:45 pm

How about this:
(when average of last twenty values is 0 (assuming only 0,1 input), you’re good.)
zl stream 20
|
mean
|
== 0
|
change
|
sel 0 1


February 7, 2011 | 7:57 am

Hi and thank you for all this nice help.

Now I’m getting more curious: … what if I want to look at more than just 0s and 1s – for example 0 1 and 2?

I am new to max, and I don’t quite think that I can get around the t b b object …

Please see my question in context:

– Pasted Max Patch, click to expand. –

February 7, 2011 | 9:06 am

Ah, got it!

This is how I wanted to solve the problem (see below pasted patch). Thanks for all of your help!

– Pasted Max Patch, click to expand. –

Viewing 4 posts - 1 through 4 (of 4 total)