diff options
author | Florian Jung <flo@thinkpad.(none)> | 2011-01-08 19:35:27 +0100 |
---|---|---|
committer | Florian Jung <flo@thinkpad.(none)> | 2011-01-09 13:14:48 +0100 |
commit | 918f4c99f37b9ca2ae2bbd6c906b7e0f994af014 (patch) | |
tree | b7ff7f1dd45bb9328c8bae128c6511b16327d3c5 /synth/envelope.h | |
parent | 5ae35443bfaa8e321365d549a812d853e0734b89 (diff) |
Envelope::get_level() gets called rarely now
Also, changed .gitignore to ignore gmon.out
Diffstat (limited to 'synth/envelope.h')
-rw-r--r-- | synth/envelope.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/synth/envelope.h b/synth/envelope.h index e0d3502..65ea723 100644 --- a/synth/envelope.h +++ b/synth/envelope.h @@ -6,12 +6,16 @@ #include "programs.h" #include "fixed.h" +// when frames is given, this tells the envelope that get_level() is +// only called every (frames) frames. 1 means "every time", 2 means +// "every second time" and so on. +// the caller must manage to call get_level() to the appropriate times class Envelope { public: - Envelope(jack_nframes_t a, jack_nframes_t d, fixed_t s, jack_nframes_t r, bool h); - Envelope(env_settings_t s); + Envelope(jack_nframes_t a, jack_nframes_t d, fixed_t s, jack_nframes_t r, bool h, int frames=1); + Envelope(env_settings_t s, int frames=1); void release_key(); void reattack(); fixed_t get_level(); @@ -52,6 +56,8 @@ class Envelope jack_nframes_t t; fixed_t ratefactor; + int nth_frame; + enum { ATTACK, |