GstBtEnvelopeASDR

GstBtEnvelopeASDR — attack-decay-sustain-release envelope generator

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GstBtEnvelope
        ╰── GstBtEnvelopeADSR

Includes

#include <libgstbuzztrax/envelope-adsr.h>

Description

Classic attack-decay-sustain-release envelope.

Functions

gstbt_envelope_adsr_new ()

GstBtEnvelopeADSR *
gstbt_envelope_adsr_new (void);

Create a new instance

Returns

the new instance or NULL in case of an error


gstbt_envelope_adsr_setup ()

void
gstbt_envelope_adsr_setup (GstBtEnvelopeADSR *self,
                           gint samplerate,
                           gdouble attack_time,
                           gdouble decay_time,
                           gdouble note_time,
                           gdouble release_time,
                           gdouble peak_level,
                           gdouble sustain_level);

Initialize the envelope for a new cycle. note_time is the length of the note. attack_time + decay_time must be < note_time otherwise they get scaled down.

Parameters

self

the envelope

 

samplerate

the audio sampling rate

 

attack_time

the attack time in sec

 

decay_time

the decay time in sec

 

note_time

the duration of the note in sec

 

release_time

the decay time in sec

 

peak_level

peak volume level (0.0 -> 1.0)

 

sustain_level

sustain volume level (0.0 -> 1.0)

 

Types and Values

struct GstBtEnvelopeADSR

struct GstBtEnvelopeADSR;

Class instance data.