mixer¶
- class Atten(node, gain=1.0, offset=0.0)¶
Bases:
object
- Parameters
node – The node that will be attenuated
gain (float) – The linear gain applied to the node
- get_sample(time)¶
- Parameters
time (float) – The time in seconds of which the sample should be gotten
- Returns
A PCM value for the node at the given time
- Return type
float
- class LinToExp(node, curve_gain=1.0, curvect=None)¶
Bases:
object
- Parameters
node – The node whos output should be transformed
curve_gain (float) – A value between -1.0 and 1.0 that determines the ammount of transform. -1.0 is logarithmic, 1.0 is exponential, and 0.0 is linear.
curvect – A node that will directly control curve_gain
- curve_gain_to(value)¶
- Parameters
value (float) – A value between -1.0 and 1.0 that will control curve_gain
- get_sample(time)¶
- Parameters
time (float) – The time in seconds of which the sample should be gotten
- Returns
A PCM value for the node at the given time
- Return type
float
- class Mixer(nodes, gain=1.0, gainct=None)¶
Bases:
object
- Parameters
nodes – An array of nodes that should be mixed together. All nodes should have a get_sample method that, given a value of time, should return a PCM value
gain (float) – An ammount of gain, from 0.0 to 1.0 to apply to the output of the mixer
gainct – A node, with a get_sample method that, given a value of time, should return a PCM value. The get_sample output value will control the gain of the mixer on a sample by sample basis
- get_sample(time)¶
- Parameters
time (float) – The time in seconds of which the sample should be gotten
- Returns
A PCM value for the node at the given time
- Return type
float
- class Panner(node, pos=1.0, posct=None)¶
Bases:
object
- Parameters
node – A node that will be panned
pos (float) – A value between 0.0 and 1.0 that determines the possition betwen left and right channels
posct – A node that will control the position on a sample by sample basis
- Variables
lch – A node that will output the left channel
rch – A node that will output the right channel
- get_sample(time)¶
- Parameters
time (float) – The time in seconds of which the sample should be gotten
- Returns
A PCM value for the node at the given time
- Return type
float