diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2023-04-29 14:34:48 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2023-04-29 14:34:48 +0300 |
commit | 0cceb2057e382129ae24565fdefff87e91b076ab (patch) | |
tree | 36676e98fecc6bf0a0ee80dbab21331dddc372d7 /src/adsr.h | |
parent | 402f6791150d503fc29ed75a7b8be9abfdd3867f (diff) | |
download | synth-project-0cceb2057e382129ae24565fdefff87e91b076ab.tar.gz synth-project-0cceb2057e382129ae24565fdefff87e91b076ab.tar.bz2 synth-project-0cceb2057e382129ae24565fdefff87e91b076ab.zip |
self contained adsr
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 */ |