TrigRandInt(input, max=100.00, mul=1, add=0)
Pseudo-random integer generator.
TrigRandInt generates a pseudo-random number integer number between 0 and `max` values each time it receives a trigger in its `input` parameter. The value is kept until the next trigger.
Parent class : PyoObject
Parameters:
input : PyoObject Audio signal sending triggers. max : float or PyoObject, optional Maximum value for the random generation. Defaults to 100.
Methods:
setInput(x, fadetime) : Replace the `input` attribute. setMax(x) : Replace the `max` attribute.
Attributes:
input : PyoObject. Audio trigger signal. max : float or PyoObject. Maximum value.
Notes:
The out() method is bypassed. TrigRandInt's signal can not be sent to audio outs.
Examples:
>>> s = Server().boot() >>> s.start() >>> m = Metro(.125).play() >>> tr = TrigRandInt(m, max=10, mul=100, add=200) >>> a = Sine(tr, mul=.5).out()
Methods details:
TrigRandInt.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. TrigRandInt.setMax(x): Replace the `max` attribute. Parameters: x : float or PyoObject new `max` attribute.