Get the max module improvments


I’m actually trying to improve the module GetTheMax(Value) i made.

This module analyse incoming values, extract the max (queing value each frame and compare it to the previous maximum stored). Then it map the output between 0 to 1 mapped from 0 to max value.

I want to add a reset pin which would cancel the last max value stored and start a new analysis. I’ve try to mess with it but i’m not doing it right and i lack some knowledge to fix it.

You can download an exemple Patch here, the module is included and the patch is path relative so just extract and launch the OpenFirst Patch.

Any idea of improvment is welcome.
I’m sure there could be a lot of things that
can be done in a more efficient way.

Cheers and thanks,

it’s late and i’m not sure if i’ve understood this well but anyways u can check this funky test…maybe it’ll help a bit…or not at all! :D (3.8 kB)

maybe like this?
not sure, if i got you right… (3.0 kB)

thx a lot Des and W.!!!
Both of u got me right.
Not easy as i wasn’t very clear, sorry for that.
Interesting to see the difference between both method.
Never though using OR before, what a shame.

I try to build this module to do some audio reacting patch.
I oftenly put a map (value) node before the rms one,so i decided to patch this module to automatically map the output according to change in volume (kinda like a compressor).

Any ideas of improvment is welcome !!

Thankssss again.