-
/* \clip_scale Creates an UMap for scaling a value to another range, with clipping and wrapping functionality. input: the value upon which the scaling is applied (this can be another UMap as well) fromRange: the used range of the input valu ...
-
/* \clip_scale Creates an UMap for scaling a value to another range, with clipping and wrapping functionality. input: the value upon which the scaling is applied (this can be another UMap as well) fromRange: the used range of the input valu ...
-
... ks.do { |tr| tr[\points] = tr[\points].collect { |pt| [(pt[0] / dur.max(0.001)).clip(0.0, 1.0), pt[1], pt[2], pt[3]] }; }; ("SPEAR frame txt import parsed: partials=" ++ partialsCount ++ " frames=" ++ frameCount ++ " dur=" ++ dur).postln; r ...
-
... range bending + SimpleNumber { unibi { |noise = 0.0| ^(this + noise.bilinrand).clip(0,1) * 2 - 1 } biuni { |noise = 0.0| ^(this + 1 * 0.5 + noise.bilinrand).clip(0,1) } bipow { |exp = 1| ^this.abs ** exp * this.sign } } + Collection { unib ...
-
/* clip to an integer range and ensure integer type */ IntegerClip { var <minval,<maxval, <default; *new { |minval, maxval, default| ^super.newCopyArgs( minval,maxval,default ).init; } init { if ( default.isNil ){ default = minval }; } map ...
-
... range will be mapped invert: (boolean) if true the angle range will be inverted clipMode: when the angle is outside the fromRange, the clipMode decides what happens. The angle is "unwrapped" internally, so if the point would for example spi ...
-
... be calculated toRange: the value range to which the speed range will be mapped clipMode: when the speed is outside the fromRange, the clipMode decides what happens 0 - 'clip' (default): clip inside the value range 1 - 'fold': fold/mirror i ...
-
... range will be mapped invert: (boolean) if true the angle range will be inverted clipMode: when the angle is outside the fromRange, the clipMode decides what happens. The angle is "unwrapped" internally, so if the point would for example spi ...
-
... = thisIsMin * (this.dual - other.dual) + other.dual; ^this.class.new(r, d) } amclip { |other| ^this * max(other, 0) } scaleneg { |other| ^this * (this.real.sign.linlin(-1, 1, other, 1)) } clip2 { |other| ^max(min(this, other.neg), other) } ...
-
... top + height; height = height.neg; }; } linlin { |inMin, inMax, outMin, outMax, clip| ^Rect.fromPoints( this.leftTop.linlin( inMin, inMax, outMin, outMax ), this.rightBottom.linlin( inMin, inMax, outMin, outMax ) ); } clip { |rect| var curr ...