You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
464 B
21 lines
464 B
|
|
struct envelope_t
|
|
{
|
|
/* 'Real world' AHDSR values */
|
|
double attack;
|
|
double attack_hold;
|
|
double decay;
|
|
double sustain;
|
|
double release;
|
|
|
|
/* AHDR values in samples */
|
|
double attack_s;
|
|
double attack_hold_s;
|
|
double decay_s;
|
|
double release_s;
|
|
};
|
|
|
|
void env_init(struct envelope_t *env, double attack, double attack_hold, double decay, double sustain, double release);
|
|
double env_getamplitude(const struct envelope_t *env, uint32_t sample, uint32_t released);
|
|
|