diff options
Diffstat (limited to 'synth/note.cpp')
-rw-r--r-- | synth/note.cpp | 64 |
1 files changed, 1 insertions, 63 deletions
diff --git a/synth/note.cpp b/synth/note.cpp index 87f1806..6b73fbf 100644 --- a/synth/note.cpp +++ b/synth/note.cpp @@ -16,9 +16,8 @@ inline fixed_t init_custom_osc_phase(int len, fixed_t sr) Note::Note(int n, float v, program_t &prg, jack_nframes_t pf, fixed_t pb, int prg_no) + : NoteSkel(n,v,prg,pf,pb,prg_no) { - curr_prg=&prg; - n_oscillators=prg.n_osc; @@ -61,17 +60,8 @@ Note::Note(int n, float v, program_t &prg, jack_nframes_t pf, fixed_t pb, int pr } - portamento_frames=0; - set_portamento_frames(pf); - - set_note(n); - freq=dest_freq; - set_vel(v); do_ksl(); - pitchbend=pb; - - program=prg_no; filter_params=prg.filter_settings; orig.filter_params=prg.filter_settings; @@ -260,52 +250,6 @@ void Note::reattack() envelope[i]->reattack(); } -void Note::set_pitchbend(fixed_t pb) -{ - pitchbend=pb; -} - -void Note::set_freq(float f) -{ - old_freq=freq; - dest_freq=f*ONE; - portamento_t=0; - - do_ksr(); -} - -void Note::set_freq(float f, bool do_port) -{ - set_freq(f); - - if (!do_port) - old_freq=dest_freq; -} - -void Note::set_note(int n) -{ - note=n; - set_freq(440.0*pow(2.0,(float)(n-69)/12.0)); -} - -void Note::set_note(int n, bool do_port) -{ - note=n; - set_freq(440.0*pow(2.0,(float)(n-69)/12.0), do_port); -} - -int Note::get_note() -{ - return note; -} - -void Note::set_vel(float v) -{ - vel=v*ONE; - - recalc_factors(); - apply_pfactor(); -} void Note::do_ksl() { //osc.ksl is in Bel/octave (i.e. dB/10) @@ -326,12 +270,6 @@ void Note::do_ksr() envelope[i]->set_ratefactor(1.0 / pow(freq>>SCALE, oscillator[i].ksr)); } -void Note::set_portamento_frames(jack_nframes_t t) -{ - portamento_frames=t; - portamento_t=0; -} - fixed_t Note::get_sample() { if (freq!=dest_freq) |