Hello. You can use the function aa.clip, which has three inputs, respectively, lower limit, upper limit, and input.
You can easily implement a clipping function by cascading a max and min primitives such as clip(minimum, maximum, x) = max(minimum, min(maximum, x)); which you can test with: process = clip(-.5, .5, os.osc(1000)); Ciao, Dr Dario Sanfilippo http://dariosanfilippo.com On Wed, 26 Jan 2022 at 22:29, Autumn Cheney via Faudiostream-users < faudiostream-users@lists.sourceforge.net> wrote: > what i'm looking to do is "clip" a value (like a signal or hslider value) > to a certain range > > for example, if the range is set to 1-0, and the input value goes above 1, > the output value should stay at 1. likewise, if the input goes below 0, the > output should stay at 0. and of course, if the input is between 0 and 1, it > should output that value > > i'm sure i could figure out how to do this using other functions (probably > not lol) but i was wondering if faust already has a function like this > > thanks in advance, > > a cheney > > _______________________________________________ > Faudiostream-users mailing list > Faudiostream-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/faudiostream-users >
_______________________________________________ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users