diff options
| author | Florian Jung <flo@thinkpad.(none)> | 2011-01-08 19:35:27 +0100 | 
|---|---|---|
| committer | Florian Jung <flo@thinkpad.(none)> | 2011-01-08 19:35:27 +0100 | 
| commit | 8320af55e716f352f2720801fcd73913f2e7d19c (patch) | |
| tree | e36f1ea85d688f8314348a22e6b863af7c6eafeb /synth/envelope.h | |
| parent | d84da6cdfb9027a67b8ab50fe2c23374acc3b245 (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, | 
