TrigEnv(input, table, dur=1, interp=2, mul=1, add=0)
Envelope reader generator.
TrigEnv starts reading an envelope in `dur` seconds each time it receives a trigger in its `input` parameter.
Parent class : PyoObject
Parameters:
input : PyoObject Audio signal sending triggers. table : PyoTableObject Table containing the envelope. dur : float or PyoObject, optional Duration in seconds of the envelope. Defaults to 1. interp : int, optional Choice of the interpolation method. Defaults to 2. 1 : no interpolation 2 : linear 3 : cosinus 4 : cubic
Methods:
setInput(x, fadetime) : Replace the `input` attribute. setTable(x) : Replace the `table` attribute. setDur(x) : Replace the `dur` attribute. setInterp(x) : Replace the `interp` attribute.
Attributes:
input : PyoObject. Audio trigger signal. table : PyoTableObject. Envelope table. dur : float or PyoObject. Duration in seconds. interp : int {1, 2, 3, 4}, Interpolation method.
Notes:
TrigEnv will sends a trigger signal at the end of the playback. User can retreive the trigger streams by calling obj['trig']. Useful to synchronize other processes.
Examples:
>>> s = Server().boot() >>> s.start() >>> env = HannTable() >>> m = Metro(.125).play() >>> tr = TrigRand(m, 400, 600) >>> te = TrigEnv(m, table=env, dur=.125) >>> a = Sine(tr, mul=te).out()
Methods details:
TrigEnv.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. TrigEnv.setTable(x): Replace the `table` attribute. Parameters: x : PyoTableObject new `table` attribute. TrigEnv.setDur(x): Replace the `dur` attribute. Parameters: x : float or PyoObject new `dur` attribute. TrigEnv.setInterp(x): Replace the `interp` attribute. Parameters: x : int {1, 2, 3, 4} new `interp` attribute.