Re: [Faudiostream-users] limit a value

2021-07-19 Thread Klaus Scheuermann
thanks everyone :) On 19.07.21 15:00, Yann Orlarey wrote: > Hi Klaus and Giuseppe, > > A simple and efficient implementation can be done using the min and > max primitives: > > > limit(lo,hi) = min(hi) : max(lo); > > > Cheers > > Yann > > Le lun. 19 juil. 2021 à 11:07, Giuseppe Silvi via Faudi

Re: [Faudiostream-users] limit a value

2021-07-19 Thread Yann Orlarey
Hi Klaus and Giuseppe, A simple and efficient implementation can be done using the min and max primitives: limit(lo,hi) = min(hi) : max(lo); Cheers Yann Le lun. 19 juil. 2021 à 11:07, Giuseppe Silvi via Faudiostream-users < faudiostream-users@lists.sourceforge.net> a écrit : > Hi Klaus, > >

Re: [Faudiostream-users] limit a value

2021-07-19 Thread Giuseppe Silvi via Faudiostream-users
Hi Klaus, import("stdfaust.lib"); minn = hslider("minimum", -6, -10, 0, 0.1); maxx = hslider("maximum", +6, 0, 10, 0.1); // limit limit(minn,maxx) = _ <: ba.if( _ < minn, minn , _) <: ba.if( _ > maxx, maxx, _); process = os.osc(1000) : limit(minn,maxx); //process = os.osc(1000)*5 : limit(-3,4);

[Faudiostream-users] limit a value

2021-07-19 Thread Klaus Scheuermann
this one is probably simple, but I did not find anything in the syntax or libraries. How do I limit a value or signal with a min and a max so it never exceeds this range? Something like: min = -3; max = 4; process = _ : limit(min,max) : _ I mean, I did try to implement it, but it does not work