diff options
| author | Mick Grierson <mickgrierson@strangebook.lan> | 2011-10-17 02:01:12 +0100 |
|---|---|---|
| committer | Mick Grierson <mickgrierson@strangebook.lan> | 2011-10-17 02:01:12 +0100 |
| commit | 9b352d42f4631a515345ed7c4992a736aab1fea2 (patch) | |
| tree | 557dc6cecc0becda49311cc6b4f139bee1076a1a /maximilian.h | |
| parent | 3a90e8344192e60f65cf9a1fe821bb080a323d34 (diff) | |
added maxiEnv - easier to use ADSR and AR envelopes for those who find ramps a bit weird
Diffstat (limited to 'maximilian.h')
| -rwxr-xr-x | maximilian.h | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/maximilian.h b/maximilian.h index 38ac3dc..b7c4e9b 100755 --- a/maximilian.h +++ b/maximilian.h @@ -318,18 +318,37 @@ class maxiDyn { public: - double gate(double input, double threshold=0.9, long hold=1, double attack=1, double release=0.9995); + double gate(double input, double threshold=0.9, long holdtime=1, double attack=1, double release=0.9995); double compress(double input, double ratio=2.0, double threshold=0.5); double input; double ratio; double threshold; double output; - long attack; - long release; + double attack; + double release; double amplitude; - long hold; + long holdtime; long holdcount; int attackphase,holdphase,releasephase; }; +class maxiEnv { + + +public: + double ar(double input, double attack=1, double release=0.9, long holdtime=1, int trigger=0); + double adsr(double input, double attack=1, double decay=0.99, double sustain=0.125, double release=0.9, long holdtime=1, int trigger=0); + double input; + double output; + double attack; + double decay; + double sustain; + double release; + double amplitude; + int trigger; + long holdtime; + long holdcount; + int attackphase,decayphase,sustainphase,holdphase,releasephase; +}; + #endif |
