Choice(choice, freq=1.00, mul=1, add=0)
Periodically choose a new value from a user list.
Choice chooses a new value from a predefined list of floats `choice` at a frequency specified by `freq` parameter. Choice will hold choosen value until next generation.
Parent class : PyoObject
Parameters:
choice : list of floats or list of lists of floats Possible values for the random generation. freq : float or PyoObject, optional Polling frequency. Defaults to 1.
Methods:
setChoice(x) : Replace the `choice` attribute. setFreq(x) : Replace the `freq` attribute.
Attributes:
choice : list of floats or list of lists of floats. Possible choices. freq : float or PyoObject. Polling frequency.
Examples:
>>> s = Server().boot() >>> s.start() >>> rnd = Choice([200,300,400,500,600], 4) >>> a = Sine(rnd, mul=.5).out()
Methods details:
Choice.setChoice(x): Replace the `choice` attribute. Parameters: x : list of floats or list of lists of floats new `choice` attribute. Choice.setFreq(x): Replace the `freq` attribute. Parameters: x : float or PyoObject new `freq` attribute.