Bang on the first time, not on the second.

Feb 23, 2011 at 9:07pm

Bang on the first time, not on the second.

Hello,
I’m looking for an object or abstraction that will sequentially receive integers and produce a bang only at the first occurrence of that value. Repeated values should not produce a bang. I first thought this would be possible using zl or change, but I couldn’t figure it out.

The idea is to track the first occurrences of numbers 1 to 44 and ignore any repetitions.

thanks for any help,
sincerely,
marC

#55142
Feb 23, 2011 at 9:22pm

I wonder could you put the numbers in a coll and then remove them when they are seen. Don’t know really but I guess I’d try that.

#198486
Feb 23, 2011 at 9:25pm

Hi, did you check the “change” object? It seems that the object provides what you need.

Best,

Mehmet Can

#198487
Feb 23, 2011 at 11:56pm
– Pasted Max Patch, click to expand. –
#198488
Feb 24, 2011 at 5:43am

have a look at the “histo” object as well.

#198489
Feb 24, 2011 at 7:05am

Hello,

a way with [offer] …

– Pasted Max Patch, click to expand. –

oops, should have test MIB suggestion first ;-)

– Pasted Max Patch, click to expand. –
#198490
Feb 24, 2011 at 7:40am

I have a similar question. I basically need a change object that will output a bang if the numbers DO match, so my patcher can try again with a new number.
I’m kinda surprised the change object doesn’t do that.

this is not so elegant, clumsily depending upon R->L

– Pasted Max Patch, click to expand. –
#198491
Feb 24, 2011 at 8:13am

– Pasted Max Patch, click to expand. –

or

– Pasted Max Patch, click to expand. –

or…there are many ways to skin this cat.

#198492
Feb 24, 2011 at 8:54am

Thank you for all your great suggestions. I went with Vanille and MIT’s suggestion to use histo. Works like a dream and very simple.

best,
marC

#198493
Feb 24, 2011 at 4:44pm

Thanks David.
I like skinning a cat with an if…then statement.
If the cat is skinned randomly while nobody is watching then the cat is both skinned and unskinned at the same time.
There are no objects for that.

#198494

You must be logged in to reply to this topic.