psychos.sound.FlatEnvelope#
- class psychos.sound.FlatEnvelope(amplitude: float = 0.5)[source]#
Bases:
EnvelopeA flat envelope, providing basic amplitude setting.
- Parameters:
amplitude – The amplitude (volume) of the wave, from 0.0 to 1.0. Values outside this range will be clamped.
Methods
__init__([amplitude])get_generator([sample_rate, duration])Get a generator instance.
- get_generator(sample_rate: float = None, duration: float = None) Generator[float][source]#
Get a generator instance.
- Parameters:
sample_rate – The sample rate of the Source this will be applied to.
duration – The duration of the Source. This is used to calculate the number of bytes for some Envelopes.