Counting bangs...

fresh's icon

Hi all, my first post here :)

Right, I know it probably sounds really simple, but i just cant get my head around it.

I have 25 outputs producing 25 separate bangs... i need to know how many bangs are being triggered at any given time.

I tried adding a toggle after each bang and then used a delay to reset the toggle to zero - but this resulted in stack overflows.

Any help or suggestions would be greatly appreciated because this is making my brain hurt.

Chris Muir's icon

On Mar 17, 2008, at 12:27 AM, Barrie wrote:

> I have 25 outputs producing 25 separate bangs... i need to know how
> many bangs are being triggered at any given time.

Without seeing your patch it's a little hard to offer advice that's
too concrete.

Perhaps using something like a counter that receives the bangs, and
gets reset at whatever period you want to observe.

Chris Muir
cbm@well.com    
http://www.xfade.com

Chris Muir's icon

On Mar 17, 2008, at 1:33 AM, Chris Muir wrote:

> Perhaps using something like a counter that receives the bangs, and
> gets reset at whatever period you want to observe.

Oops, forgot to paste the patch:

Max Patch
Copy patch and select New From Clipboard in Max.

Chris Muir
cbm@well.com    
http://www.xfade.com

Stefan Tiedje's icon

Barrie schrieb:
> I have 25 outputs producing 25 separate bangs... i need to know how
> many bangs are being triggered at any given time.
>
> I tried adding a toggle after each bang and then used a delay to
> reset the toggle to zero - but this resulted in stack overflows.

counter counts bangs and what has a toggle to do with counting?
Seems the tutorials are still waiting?
The solution for 99.9% of all stack overflows is the same by the way,
its called [prepend set]....

Stefan

--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com

fresh's icon

Thanks for the replies guys :)

Quote: Chris Muir wrote on Mon, 17 March 2008 02:33
----------------------------------------------------
>
> On Mar 17, 2008, at 12:27 AM, Barrie wrote:
>
> > I have 25 outputs producing 25 separate bangs... i need to know how
> > many bangs are being triggered at any given time.
>
>
> Without seeing your patch it's a little hard to offer advice that's
> too concrete.
>
> Perhaps using something like a counter that receives the bangs, and
> gets reset at whatever period you want to observe.
>
> Chris Muir
> cbm@well.com    
> http://www.xfade.com
>
>
>
>
>
>
>
----------------------------------------------------

Thanks a lot for the patch Chris, it definately seems to do what i wanted, i hadn't quite got my head around triggers until now... most of the examples ive seen have been in jitter patches - and confused the hell out of me!

Quote: Stefan Tiedje wrote on Mon, 17 March 2008 03:27
----------------------------------------------------
> Barrie schrieb:
> > I have 25 outputs producing 25 separate bangs... i need to know how
> > many bangs are being triggered at any given time.
> >
> > I tried adding a toggle after each bang and then used a delay to
> > reset the toggle to zero - but this resulted in stack overflows.
>
> counter counts bangs and what has a toggle to do with counting?
> Seems the tutorials are still waiting?
> The solution for 99.9% of all stack overflows is the same by the way,
> its called [prepend set]....
>
> Stefan
>
> --
> Stefan Tiedje------------x-------
> --_____-----------|--------------
> --(_|_ ----|-----|-----()-------
> -- _|_)----|-----()--------------
> ----------()--------www.ccmix.com
>
>
>
----------------------------------------------------

Hi stefan, i originally tried to do it with toggles because they are essentially little, simple 0/1 counters - i figured that would make things slightly simpler for me... i was wrong obviously lol. :)

Peter McCulloch's icon

This may or may not be the solution that you're looking for. Here, it
groups the bangs into a list using thresh.

Nice thing:
You find out which bangs were sent as well as how many of them.

Potentially bad thing:
There is a minimum time threshold and you might have problems with
overlap. You could set this really short, which, depending on the way
your patch works, might be just fine. If this turns out to be a huge
problem, check out zl group and use the "zlclear" message to clear it
when needed.

Max Patch
Copy patch and select New From Clipboard in Max.