summaryrefslogtreecommitdiff
path: root/synth/note_skel.h
diff options
context:
space:
mode:
authorFlorian Jung <flo@thinkpad.(none)>2011-01-09 19:09:05 +0100
committerFlorian Jung <flo@thinkpad.(none)>2011-01-09 19:09:05 +0100
commitdf97e0ebb7f6591c50f3a588cb2a74901d38ac4a (patch)
treeaa68ab5a73388d57636a4e5c9058b9dcc0f21e90 /synth/note_skel.h
parentaa1c06213e695be1dcb5980b638d8ce81efb4f51 (diff)
Merged branch for compiled notes
The synthesizer is now able to load and use compiled, optimized shared objects of programs. There's also a note-compiler which creates the code for such objects. TODO: - let the note-compiler automatically compile OR rename it to code-emitter
Diffstat (limited to 'synth/note_skel.h')
-rw-r--r--synth/note_skel.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/synth/note_skel.h b/synth/note_skel.h
new file mode 100644
index 0000000..6aebb8b
--- /dev/null
+++ b/synth/note_skel.h
@@ -0,0 +1,56 @@
+#ifndef __NOTE_SKEL_H__
+#define __NOTE_SKEL_H__
+
+#include <jack/jack.h>
+
+#include "programs.h"
+#include "fixed.h"
+
+class NoteSkel
+{
+ public:
+ NoteSkel();
+ virtual ~NoteSkel();
+ virtual fixed_t get_sample()=0;
+
+ int get_program();
+ int get_note();
+ void set_note(int n);
+ void set_note(int n, bool do_port);
+ void set_freq(float f);
+ void set_freq(float f, bool do_port);
+ void set_pitchbend(fixed_t pb);
+ void set_vel(float v);
+ void set_portamento_frames(jack_nframes_t f);
+
+ virtual void release_quickly(jack_nframes_t maxt)=0;
+ virtual void release()=0;
+ virtual void reattack()=0;
+ virtual bool still_active()=0;
+
+ virtual void set_param(const parameter_t &p, fixed_t v)=0;
+
+ virtual void destroy()=0;
+
+ protected:
+ virtual void do_ksl()=0;
+ virtual void do_ksr()=0;
+
+ virtual void recalc_factors()=0;
+ virtual void apply_pfactor()=0;
+
+ fixed_t freq, dest_freq, old_freq;
+ fixed_t vel;
+ jack_nframes_t portamento_t, portamento_frames;
+
+ pfactor_value_t pfactor;
+
+ int note;
+ int program;
+ program_t *curr_prg;
+
+ fixed_t pitchbend;
+};
+
+
+#endif