envelopes

class Envelope(amplitudes=(0, 1, 0), durations=(1, 1), curves=('linear', 'linear'), release_node=None, loop_node=None, offset=None)

Bases: supriya.system.SupriyaValueObject

An envelope.

>>> envelope = supriya.synthdefs.Envelope()
>>> envelope
Envelope()
>>> envelope.serialize()
[0.0, 2.0, -99.0, -99.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0]
classmethod adsr(attack_time=0.01, decay_time=0.3, sustain=0.5, release_time=1.0, peak=1.0, curve=- 4.0, bias=0.0)
property amplitudes
classmethod asr(attack_time=0.01, sustain=1.0, release_time=1.0, curve=- 4.0)
property curves
property duration
property durations
property envelope_segments
classmethod from_segments(initial_amplitude=0, segments=None, release_node=None, loop_node=None, offset=None)
property initial_amplitude
classmethod linen(attack_time=0.01, sustain_time=1.0, release_time=1.0, level=1.0, curve=1)
property loop_node
property offset
classmethod percussive(attack_time=0.01, release_time=1.0, amplitude=1.0, curve=- 4.0)

Make a percussion envelope.

>>> import supriya.synthdefs
>>> envelope = supriya.synthdefs.Envelope.percussive()
>>> envelope
Envelope(
    curves=(-4.0, -4.0),
    durations=(0.01, 1.0),
)
>>> envelope.serialize()
[0.0, 2.0, -99.0, -99.0, 1.0, 0.01, 5.0, -4.0, 0.0, 1.0, 5.0, -4.0]
property release_node
serialize(for_interpolation=False)
classmethod triangle(duration=1.0, amplitude=1.0)

Make a triangle envelope.

>>> import supriya.synthdefs
>>> envelope = supriya.synthdefs.Envelope.triangle()
>>> envelope
Envelope(
    durations=(0.5, 0.5),
)
>>> envelope.serialize()
[0.0, 2.0, -99.0, -99.0, 1.0, 0.5, 1.0, 0.0, 0.0, 0.5, 1.0, 0.0]