diff options
author | Florian Jung <flo@thinkpad.(none)> | 2011-01-09 13:06:58 +0100 |
---|---|---|
committer | Florian Jung <flo@thinkpad.(none)> | 2011-01-09 13:22:20 +0100 |
commit | 65fe359eb034d8e4a4a7f4d673af6f473ef27ff8 (patch) | |
tree | 97c71e37ff314cd1a244b85c914809ae544e2fd8 /synth/note.cpp | |
parent | 918f4c99f37b9ca2ae2bbd6c906b7e0f994af014 (diff) |
envelope_update_frames can now be set via CLI and config file
Diffstat (limited to 'synth/note.cpp')
-rw-r--r-- | synth/note.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/synth/note.cpp b/synth/note.cpp index b8028bc..a9a5a42 100644 --- a/synth/note.cpp +++ b/synth/note.cpp @@ -1,5 +1,3 @@ -#define ENV_NTH_FRAME 50 - #include <string> #include <cmath> @@ -39,7 +37,7 @@ Note::Note(int n, float v, program_t &prg, jack_nframes_t pf, fixed_t pb, int pr envelope=new Envelope*[n_oscillators]; for (int i=0;i<n_oscillators;i++) - envelope[i]=new Envelope(prg.env_settings[i], ENV_NTH_FRAME); + envelope[i]=new Envelope(prg.env_settings[i], envelope_update_frames); oscillator=new oscillator_t[n_oscillators]; orig.oscillator=new oscillator_t[n_oscillators]; @@ -85,7 +83,7 @@ Note::Note(int n, float v, program_t &prg, jack_nframes_t pf, fixed_t pb, int pr filter_update_counter=filter_update_frames; } - env_frame_counter=ENV_NTH_FRAME; //force update in first frame + env_frame_counter=envelope_update_frames; //force update in first frame sync_factor=prg.sync_factor; @@ -385,7 +383,7 @@ fixed_t Note::get_sample() env_frame_counter++; - if (env_frame_counter>=ENV_NTH_FRAME) + if (env_frame_counter>=envelope_update_frames) { env_frame_counter=0; for (i=0;i<n_oscillators;i++) |