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:06:58 +0100 |
commit | 216f7933c5b4b65f7f45d3c459ead10f160d124b (patch) | |
tree | 7d7e0c6a7af1723a4d536bd4d12c50572db77896 /synth/note.cpp | |
parent | 8320af55e716f352f2720801fcd73913f2e7d19c (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 8479153..b6bfa22 100644 --- a/synth/note.cpp +++ b/synth/note.cpp @@ -1,5 +1,3 @@ -#define ENV_NTH_FRAME 50 - #include <cmath> #include "note.h" @@ -42,7 +40,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]; @@ -79,7 +77,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; @@ -343,7 +341,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++) |