TrigXnoise(input, dist=0, x1=0.50, x2=0.50, mul=1, add=0)
Triggered X-class pseudo-random generator.
Xnoise implements a few of the most common noise distributions. A new value is generated each time the object receive a trigger in input. Each distribution generates values in the range 0 and 1.
Parent class : PyoObject
Notes:
Available distributions are: - uniform - linear minimum - linear maximum - triangular - exponential minimum - exponential maximum - double (bi)exponential - cauchy - weibull - gaussian - poisson - walker (drunk) - loopseg (drunk with looped segments) Depending on the distribution, `x1` and `x2` parameters are applied as follow (names as string, or associated number can be used as `dist` parameter): 0 - uniform no parameter 1 - linear_min no parameter 2 - linear_max no parameter 3 - triangle no parameter 4 - expon_min x1 : slope {0 = no slope -> 10 = sharp slope} 5 - expon_max x1 : slope {0 = no slope -> 10 = sharp slope} 6 - biexpon x1 : bandwidth {0 = huge bandwidth -> 10 = narrow bandwidth} 7 - cauchy x1 : bandwidth {0 = narrow bandwidth -> 10 = huge bandwidth} 8 - weibull x1 : mean location {0 -> 1} x2 : shape {0.5 = linear min, 1.5 = expon min, 3.5 = gaussian} 9 - gaussian x1 : mean location {0 -> 1} x2 : bandwidth {0 = narrow bandwidth -> 10 = huge bandwidth} 10 - poisson x1 : gravity center {0 = low values -> 10 = high values} x2 : compress/expand range {0.1 = full compress -> 4 full expand} 11 - walker x1 : maximum value {0.1 -> 1} x2 - maximum step {0.1 -> 1} 12 - loopseg x1 : maximum value {0.1 -> 1} x2 - maximum step {0.1 -> 1}
Parameters:
input : PyoObject Audio signal sending triggers. dist : string of int, optional Distribution type. Defaults to 0. x1 : float or PyoObject, optional First parameter. Defaults to 0.5. x2 : float or PyoObject, optional Second parameter. Defaults to 0.5.
Methods:
setInput(x, fadetime) : Replace the `input` attribute. setDist(x) : Replace the `dist` attribute. setX1(x) : Replace the `x1` attribute. setX2(x) : Replace the `x2` attribute.
Attributes:
input : PyoObject. Audio trigger signal. dist : string or int. Distribution type. x1 : float or PyoObject. First parameter. x2 : float or PyoObject. Second parameter.
Examples:
>>> s = Server().boot() >>> s.start() >>> wav = SquareTable() >>> env = CosTable([(0,0), (100,1), (500,.3), (8191,0)]) >>> met = Metro(.125, 12).play() >>> amp = TrigEnv(met, table=env, mul=.1) >>> pit = TrigXnoise(met, dist=4, x1=10, mul=500, add=300) >>> a = Osc(table=wav, freq=pit, mul=amp).out()
Methods details:
TrigXnoise.setInput(x, fadetime=0.05): Replace the `input` attribute. Parameters: x : PyoObject New signal to process. fadetime : float, optional Crossfade time between old and new input. Defaults to 0.05. TrigXnoise.setDist(x): Replace the `dist` attribute. Parameters: x : int new `dist` attribute. TrigXnoise.setX1(x): Replace the `x1` attribute. Parameters: x : float or PyoObject new `x1` attribute. TrigXnoise.setX2(x): Replace the `x2` attribute. Parameters: x : float or PyoObject new `x2` attribute.