Hi, I am looking for a way to easily clip the accumulator at a maximum value (e.g. if(accum > .5){accum = .5}; kind of thing). The MAXX instruction does this nicely for clipping the accumulator to a minimum value, but there is not an accompanying MINX instruction (would have been nice!).
I'd imagine people have found the fastest way to do this by this point, so I wanted to ask for y'all's solutions to the problem. Trying to keep the instruction count required to accomplish this as low as possible.
Thanks!
Easy Hard Clip (Max Value) of Accumulator
Moderator: frank
If 0.5 is the actual desired clip value and the value is in ACC then try something like:
sof -2.0,0
sof -0.5,0
sof -2.0,0
sof -0.5,0
Frank Thomson
Experimental Noize
Experimental Noize