Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /src/xsynth_synth.h [d93969] .. [579e0f] Maximize Restore

  Switch to side-by-side view

--- a/src/xsynth_synth.h
+++ b/src/xsynth_synth.h
@@ -40,6 +40,10 @@
 #define XSYNTH_MONO_MODE_BOTH 3
 
 #define XSYNTH_GLIDE_MODE_LEGATO   0
+#define XSYNTH_GLIDE_MODE_INITIAL  1
+#define XSYNTH_GLIDE_MODE_ALWAYS   2
+#define XSYNTH_GLIDE_MODE_LEFTOVER 3
+#define XSYNTH_GLIDE_MODE_OFF      4
 
 /*
  * xsynth_synth_t
@@ -48,6 +52,7 @@
     /* output */
     LADSPA_Data    *output;
     unsigned long   sample_rate;
+    float           deltat;            /* 1 / sample_rate */
     unsigned long   nugget_remains;
 
     /* voice tracking and data */
@@ -65,11 +70,9 @@
     xsynth_voice_t *voice[XSYNTH_MAX_POLYPHONY];
 
     pthread_mutex_t patches_mutex;
-    unsigned int    patch_count;
     xsynth_patch_t *patches;
     int             pending_program_change;
     int             current_program;
-    char           *project_dir;
 
     /* current non-LADSPA-port-mapped controller values */
     unsigned char   key_pressure[128];
@@ -81,6 +84,7 @@
     /* translated controller values */
     float           mod_wheel;                /* filter cutoff multiplier, off = 1.0, full on = 0.0 */
     float           pitch_bend;               /* frequency multiplier, product of wheel setting and sensitivity, center = 1.0 */
+    float           cc_volume;                /* volume multiplier, 0.0 to 1.0 */
 
     /* LADSPA ports / Xsynth patch parameters */
     LADSPA_Data    *osc1_pitch;
@@ -139,12 +143,12 @@
                                           DSSI_Program_Descriptor *pd,
                                           unsigned long bank,
                                           unsigned long program);
-char *xsynth_synth_handle_load(xsynth_synth_t *synth, const char *value);
+char *xsynth_synth_handle_patches(xsynth_synth_t *synth, const char *key,
+                                  const char *value);
 char *xsynth_synth_handle_polyphony(xsynth_synth_t *synth, const char *value);
 char *xsynth_synth_handle_monophonic(xsynth_synth_t *synth, const char *value);
 char *xsynth_synth_handle_glide(xsynth_synth_t *synth, const char *value);
 char *xsynth_synth_handle_bendrange(xsynth_synth_t *synth, const char *value);
-char *xsynth_synth_handle_project_dir(xsynth_synth_t *synth, const char *value);
 void  xsynth_synth_render_voices(xsynth_synth_t *synth, LADSPA_Data *out,
                                  unsigned long sample_count,
                                  int do_control_update);
@@ -156,6 +160,13 @@
 
 /* these come right out of alsa/asoundef.h */
 #define MIDI_CTL_MSB_MODWHEEL           0x01    /**< Modulation */
+#define MIDI_CTL_MSB_PORTAMENTO_TIME    0x05    /**< Portamento time */
+#define MIDI_CTL_MSB_MAIN_VOLUME        0x07    /**< Main volume */
+#define MIDI_CTL_MSB_BALANCE            0x08    /**< Balance */
+#define MIDI_CTL_LSB_MODWHEEL           0x21    /**< Modulation */
+#define MIDI_CTL_LSB_PORTAMENTO_TIME    0x25    /**< Portamento time */
+#define MIDI_CTL_LSB_MAIN_VOLUME        0x27    /**< Main volume */
+#define MIDI_CTL_LSB_BALANCE            0x28    /**< Balance */
 #define MIDI_CTL_SUSTAIN                0x40    /**< Sustain pedal */
 #define MIDI_CTL_ALL_SOUNDS_OFF         0x78    /**< All sounds off */
 #define MIDI_CTL_RESET_CONTROLLERS      0x79    /**< Reset Controllers */