diff options
Diffstat (limited to 'src/adsr.h')
-rw-r--r-- | src/adsr.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/adsr.h b/src/adsr.h new file mode 100644 index 0000000..713c95f --- /dev/null +++ b/src/adsr.h @@ -0,0 +1,15 @@ +#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); + +#endif /* ADSR_H */ |