Can't figure out gen~'s accum object

Da Xu's icon

Hi folks,

I can't quite wrap my head around the accum or the plusequal objects. I setup a pretty simple patch to count the times in sample between ramps.

But accum just doesn't want to increase. I get nothing (with the audio on :).

Any help would be greatly appreciated. I am sure I am just missing something stupid.

Thank you!

gen_accum.maxpat
Max Patch

👽'tW∆s ∆lienz👽's icon

better to leave the reset(argument) free for when you want it to start the count over like this:

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

...if i'm correctly guessing what you're trying to do :)

👽'tW∆s ∆lienz👽's icon

oh wait, no this is what you meant when you wrote "count the times in sample between ramps", i'm pretty sure now... i added a 'latch' to catch the max sample count before reset:

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

either way, just need to work the 'reset' inlet of accum/+= specifically.
hope it helps 🍻

Da Xu's icon

Thank you! I just realized I was also an idiot. I had the wrong output connected to my number~.

Your solution is perfect! Thank you.

I went made a version with a max and a history. Same thing really.

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

Thanks again!

👽'tW∆s ∆lienz👽's icon

You're welcome, Happy to help :)
... i like your version better, too, it makes it so there's no delay at the reset 👍
Cheers! 🍻