summaryrefslogtreecommitdiff
path: root/synth/note.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'synth/note.cpp')
-rw-r--r--synth/note.cpp8
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++)