psychos.sound.Envelope#

class psychos.sound.Envelope[source]#

Bases: object

Base class for SynthesisSource amplitude envelopes.

Custom Envelopes need only provide a single get_generator method that takes the sample rate, and duration as arguments.

__init__()#

Methods

__init__()

get_generator(sample_rate, duration)

Get a generator instance.

get_generator(sample_rate: float, duration: float) 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.