Hello,
Has anyone ever found a trick or built an object to use the value closest to zero like [min~] does for lowest and [max~] for highest? Something like (for two signalvalues (f and g)):
if (f > 0, g > 0) use [min~] if (f < 0, g < 0) use [max~] else set signal to 0, or value = (f + g) / 2, or some better idea one could think of..
I was trying to shape waves out of combined functions (in this case tangent en cotangent (http://en.wikipedia.org/wiki/File:Trigonometric_functions.svg)). Infinity doesn't sound so nice ;-).
mfg,
Funs
On Sun, 1 Aug 2010, Funs Seelen wrote:
if (f > 0, g > 0) use [min~] if (f < 0, g < 0) use [max~]
[expr if(abs($f1)<abs($f2), $f1, $f2)]
else set signal to 0, or value = (f + g) / 2, or some better idea one could think of..
[expr if(abs($f1)==abs($f2),0,if(abs($f1)<abs($f2), $f1, $f2))]
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
hello, you should be able to do this with expr~ c
Le 01/08/2010 21:51, Funs Seelen a écrit :
Hello,
Has anyone ever found a trick or built an object to use the value closest to zero like [min~] does for lowest and [max~] for highest? Something like (for two signalvalues (f and g)):
if (f > 0, g > 0) use [min~] if (f < 0, g < 0) use [max~] else set signal to 0, or value = (f + g) / 2, or some better idea one could think of..
I was trying to shape waves out of combined functions (in this case tangent en cotangent (http://en.wikipedia.org/wiki/File:Trigonometric_functions.svg)). Infinity doesn't sound so nice ;-).
mfg,
Funs
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Sun, 1 Aug 2010, Funs Seelen wrote:
Thank you Mathieu & Cyrille!
Oops, I said it with [expr] and $f1 and $f2, but you want it with [expr~] and $v1 and $v2. Just search and replace.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801