gstbtenvelopeadsr

gstbtenvelopeadsr — attack-decay-sustain-release envelope generator

Synopsis

struct              GstBtEnvelopeADSR;
GstBtEnvelopeADSR * gstbt_envelope_adsr_new             (void);
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);

Object Hierarchy

  GObject
   +----GstBtEnvelope
         +----GstBtEnvelopeADSR

Description

Classic attack-decay-sustain-release envelope.

Details

struct GstBtEnvelopeADSR

struct GstBtEnvelopeADSR;

Class instance data.


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.

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)