blob: 0f740ddeafc06ee368aca162654f4971d57a7f85 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#ifndef ADSR_H
#define ADSR_H
typedef struct adsr_t {
float a;
float peak;
float d;
float s;
float r;
unsigned long long elapsed;
} adsr_t;
float adsr_amplitude(adsr_t *adsr, float noteOn, float noteOff, unsigned long long elapsed);
float fix_adsr(adsr_t *adsr, float noteOn, float noteOff, unsigned long long elapsed, unsigned long long noteOffSample);
#endif /* ADSR_H */
|