[SCM] calf/master: + Framework: namespace changes, start moving plugin metadata to separate file

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:38:21 UTC 2013


The following commit has been merged in the master branch:
commit d44fbaa89fe39cd99e52ccb1a491ab06c0b539b3
Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Wed Nov 5 20:13:15 2008 +0000

    + Framework: namespace changes, start moving plugin metadata to separate file

diff --git a/src/Makefile.am b/src/Makefile.am
index ac817db..a6e8f3f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -52,26 +52,26 @@ endif
 
 calf_la_SOURCES = modules.cpp modules_small.cpp giface.cpp monosynth.cpp organ.cpp osctl.cpp plugin.cpp preset.cpp synth.cpp utils.cpp
 if USE_DEBUG
-calf_la_LDFLAGS = -rpath $(ladspadir) -avoid-version -module -lexpat 
+calf_la_LDFLAGS = -rpath $(ladspadir) -avoid-version -module -lexpat -disable-static
 else
-calf_la_LDFLAGS = -rpath $(ladspadir) -avoid-version -module -lexpat -export-symbols-regex "(ladspa_|lv2_|dssi_)descriptor"
+calf_la_LDFLAGS = -rpath $(ladspadir) -avoid-version -module -lexpat -disable-static -export-symbols-regex "(ladspa_|lv2_|dssi_)descriptor"
 endif
 
 if USE_LV2_GUI
 calflv2gui_la_SOURCES = gui.cpp ctl_curve.cpp ctl_keyboard.cpp ctl_led.cpp custom_ctl.cpp modules.cpp giface.cpp monosynth.cpp organ.cpp preset.cpp synth.cpp lv2gui.cpp main_win.cpp utils.cpp
 if USE_DEBUG
-calflv2gui_la_LDFLAGS = -rpath $(lv2dir) -avoid-version -module -lexpat $(GUI_DEPS_LIBS) 
+calflv2gui_la_LDFLAGS = -rpath $(lv2dir) -avoid-version -module -lexpat $(GUI_DEPS_LIBS) -disable-static
 else
-calflv2gui_la_LDFLAGS = -rpath $(lv2dir) -avoid-version -module -lexpat -export-symbols-regex "lv2_gui_descriptor" $(GUI_DEPS_LIBS)
+calflv2gui_la_LDFLAGS = -rpath $(lv2dir) -avoid-version -module -lexpat -export-symbols-regex "lv2_gui_descriptor" $(GUI_DEPS_LIBS) -disable-static
 endif
 endif
 
 libcalfstatic_la_SOURCES = modules.cpp modules_small.cpp giface.cpp monosynth.cpp organ.cpp osctl.cpp preset.cpp synth.cpp utils.cpp
-libcalfstatic_la_LDFLAGS = -static -lexpat
+libcalfstatic_la_LDFLAGS = -static -lexpat -disable-shared
 
 if USE_GUI
 libcalfgui_la_SOURCES = gui.cpp ctl_curve.cpp ctl_keyboard.cpp ctl_led.cpp preset_gui.cpp custom_ctl.cpp osctl.cpp osctlnet.cpp main_win.cpp utils.cpp
-libcalfgui_la_LDFLAGS = -static
+libcalfgui_la_LDFLAGS = -static -disable-shared
 endif
 
 clean-local:
diff --git a/src/calf/custom_ctl.h b/src/calf/custom_ctl.h
index a8bd755..261c7f4 100644
--- a/src/calf/custom_ctl.h
+++ b/src/calf/custom_ctl.h
@@ -35,7 +35,7 @@ G_BEGIN_DECLS
 struct CalfLineGraph
 {
     GtkWidget parent;
-    synth::line_graph_iface *source;
+    calf_plugins::line_graph_iface *source;
     int source_id;
 };
 
diff --git a/src/calf/envelope.h b/src/calf/envelope.h
index 4f0c375..a570347 100644
--- a/src/calf/envelope.h
+++ b/src/calf/envelope.h
@@ -23,7 +23,7 @@
 
 #include "primitives.h"
 
-namespace synth {
+namespace dsp {
 
 /// Rate-based ADSR envelope class. Note that if release rate is slower than decay
 /// rate, this envelope won't use release rate until output level falls below sustain level
diff --git a/src/calf/giface.h b/src/calf/giface.h
index 07b9704..e405baf 100644
--- a/src/calf/giface.h
+++ b/src/calf/giface.h
@@ -32,7 +32,7 @@ struct _cairo;
     
 typedef struct _cairo cairo_t;
     
-namespace synth {
+namespace calf_plugins {
 
 enum {
     MAX_SAMPLE_RUN = 256
@@ -312,7 +312,7 @@ class plugin_metadata: public virtual plugin_metadata_iface
 public:
     static const char *port_names[];
     static parameter_properties param_props[];
-    static synth::ladspa_plugin_info plugin_info;
+    static ladspa_plugin_info plugin_info;
 
     // These below are stock implementations based on enums and static members in Metadata class
     // they may be overridden to provide more interesting functionality
@@ -370,9 +370,9 @@ public:
     
 };
 
-#define CALF_PORT_NAMES(name) template<> const char *synth::plugin_metadata<name##_metadata>::port_names[]
+#define CALF_PORT_NAMES(name) template<> const char *::plugin_metadata<name##_metadata>::port_names[]
 #define CALF_PORT_PROPS(name) template<> parameter_properties plugin_metadata<name##_metadata>::param_props[]
-#define CALF_PLUGIN_INFO(name) template<> synth::ladspa_plugin_info plugin_metadata<name##_metadata>::plugin_info
+#define CALF_PLUGIN_INFO(name) template<> calf_plugins::ladspa_plugin_info plugin_metadata<name##_metadata>::plugin_info
 #define PLUGIN_NAME_ID_LABEL(name, id, label) \
     static const char *impl_get_name() { return name; } \
     static const char *impl_get_id() { return id; } \
diff --git a/src/calf/gui.h b/src/calf/gui.h
index aa7c64e..409f24a 100644
--- a/src/calf/gui.h
+++ b/src/calf/gui.h
@@ -31,7 +31,7 @@ struct CalfCurve;
 struct CalfKeyboard;
 struct CalfLed;
 
-namespace synth {
+namespace calf_plugins {
 
 class plugin_gui;
 
diff --git a/src/calf/jackhost.h b/src/calf/jackhost.h
index 51eb18e..7ec7a3a 100644
--- a/src/calf/jackhost.h
+++ b/src/calf/jackhost.h
@@ -29,7 +29,7 @@
 #include "utils.h"
 #include <pthread.h>
 
-namespace synth {
+namespace calf_plugins {
 
 class jack_host_base;
     
@@ -264,7 +264,7 @@ public:
         Module::params_changed();
     }
 
-    virtual synth::parameter_properties* get_param_props(int param_no) { return Module::param_props + param_no; }
+    virtual parameter_properties* get_param_props(int param_no) { return Module::param_props + param_no; }
     
     void handle_event(uint8_t *buffer, uint32_t size)
     {
diff --git a/src/calf/ladspa_wrap.h b/src/calf/ladspa_wrap.h
index a8e34c5..99acaf7 100644
--- a/src/calf/ladspa_wrap.h
+++ b/src/calf/ladspa_wrap.h
@@ -29,7 +29,7 @@
 #endif
 #include "giface.h"
 
-namespace synth {
+namespace calf_plugins {
 
 /// A template implementing plugin_ctl_iface for a given plugin
 template<class Module>
diff --git a/src/calf/lv2wrap.h b/src/calf/lv2wrap.h
index 4a815b7..10e58ec 100644
--- a/src/calf/lv2wrap.h
+++ b/src/calf/lv2wrap.h
@@ -31,7 +31,7 @@
 #include <calf/lv2_uri_map.h>
 #include <calf/lv2_contexts.h>
 
-namespace synth {
+namespace calf_plugins {
 
 template<class Module>
 struct lv2_instance: public Module, public plugin_ctl_iface
diff --git a/src/calf/main_win.h b/src/calf/main_win.h
index 450f81c..21ea9c7 100644
--- a/src/calf/main_win.h
+++ b/src/calf/main_win.h
@@ -30,7 +30,7 @@
 #include <calf/jackhost.h>
 #include "custom_ctl.h"
 
-namespace synth {
+namespace calf_plugins {
 
     class main_window: public main_window_iface
     {
diff --git a/src/calf/metadata.h b/src/calf/metadata.h
new file mode 100644
index 0000000..a6215ac
--- /dev/null
+++ b/src/calf/metadata.h
@@ -0,0 +1,168 @@
+/* Calf DSP Library
+ * Audio module (plugin) metadata - header file
+ *
+ * Copyright (C) 2007-2008 Krzysztof Foltman
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __CALF_METADATA_H
+#define __CALF_METADATA_H
+
+#include "giface.h"
+
+namespace calf_plugins {
+
+struct flanger_metadata: public plugin_metadata<flanger_metadata>
+{
+public:
+    enum { par_delay, par_depth, par_rate, par_fb, par_stereo, par_reset, par_amount, param_count };
+    enum { in_count = 2, out_count = 2, support_midi = false, require_midi = false, rt_capable = true };
+    PLUGIN_NAME_ID_LABEL("flanger", "flanger", "Flanger")
+};
+
+struct phaser_metadata: public plugin_metadata<phaser_metadata>
+{
+    enum { par_freq, par_depth, par_rate, par_fb, par_stages, par_stereo, par_reset, par_amount, param_count };
+    enum { in_count = 2, out_count = 2, support_midi = false, require_midi = false, rt_capable = true };
+    PLUGIN_NAME_ID_LABEL("phaser", "phaser", "Phaser")
+};
+
+struct filter_metadata: public plugin_metadata<filter_metadata>
+{
+    enum { par_cutoff, par_resonance, par_mode, par_inertia, param_count };
+    enum { in_count = 2, out_count = 2, rt_capable = true, require_midi = false, support_midi = false };
+    PLUGIN_NAME_ID_LABEL("filter", "filter", "Filter")
+    /// do not export mode and inertia as CVs, as those are settings and not parameters
+    bool is_cv(int param_no) { return param_no != par_mode && param_no != par_inertia; }
+};
+
+struct vintage_delay_metadata: public plugin_metadata<vintage_delay_metadata>
+{
+    enum { par_bpm, par_divide, par_time_l, par_time_r, par_feedback, par_amount, par_mixmode, par_medium, param_count };
+    enum { in_count = 2, out_count = 2, rt_capable = true, support_midi = false, require_midi = false };
+    PLUGIN_NAME_ID_LABEL("vintage_delay", "vintagedelay", "Vintage Delay")
+};
+
+struct rotary_speaker_metadata: public plugin_metadata<rotary_speaker_metadata>
+{
+public:
+    enum { par_speed, par_spacing, par_shift, par_moddepth, par_treblespeed, par_bassspeed, par_micdistance, par_reflection, param_count };
+    enum { in_count = 2, out_count = 2, support_midi = true, require_midi = false, rt_capable = true };
+    PLUGIN_NAME_ID_LABEL("rotary_speaker", "rotaryspeaker", "Rotary Speaker")
+};
+
+/// A multitap stereo chorus thing - metadata
+struct multichorus_metadata: public plugin_metadata<multichorus_metadata>
+{
+public:    
+    enum { par_delay, par_depth, par_rate, par_stereo, par_voices, par_vphase, par_amount, par_lfophase_l, par_lfophase_r, param_count };
+    enum { in_count = 2, out_count = 2, rt_capable = true, support_midi = false, require_midi = false };
+    PLUGIN_NAME_ID_LABEL("multichorus", "multichorus", "Multi Chorus")
+};
+
+struct monosynth_metadata: public plugin_metadata<monosynth_metadata>
+{
+    enum { wave_saw, wave_sqr, wave_pulse, wave_sine, wave_triangle, wave_varistep, wave_skewsaw, wave_skewsqr, wave_test1, wave_test2, wave_test3, wave_test4, wave_test5, wave_test6, wave_test7, wave_test8, wave_count };
+    enum { flt_lp12, flt_lp24, flt_2lp12, flt_hp12, flt_lpbr, flt_hpbr, flt_bp6, flt_2bp6 };
+    enum { par_wave1, par_wave2, par_detune, par_osc2xpose, par_oscmode, par_oscmix, par_filtertype, par_cutoff, par_resonance, par_cutoffsep, par_envmod, par_envtores, par_envtoamp, par_attack, par_decay, par_sustain, par_release, par_keyfollow, par_legato, par_portamento, par_vel2filter, par_vel2amp, par_master, param_count };
+    enum { in_count = 0, out_count = 2, support_midi = true, require_midi = true, rt_capable = true };
+    enum { step_size = 64 };
+    PLUGIN_NAME_ID_LABEL("monosynth", "monosynth", "Monosynth")
+    const char *get_gui_xml();
+};
+    
+struct organ_enums
+{
+    enum { 
+        par_drawbar1, par_drawbar2, par_drawbar3, par_drawbar4, par_drawbar5, par_drawbar6, par_drawbar7, par_drawbar8, par_drawbar9, 
+        par_frequency1, par_frequency2, par_frequency3, par_frequency4, par_frequency5, par_frequency6, par_frequency7, par_frequency8, par_frequency9, 
+        par_waveform1, par_waveform2, par_waveform3, par_waveform4, par_waveform5, par_waveform6, par_waveform7, par_waveform8, par_waveform9, 
+        par_detune1, par_detune2, par_detune3, par_detune4, par_detune5, par_detune6, par_detune7, par_detune8, par_detune9, 
+        par_phase1, par_phase2, par_phase3, par_phase4, par_phase5, par_phase6, par_phase7, par_phase8, par_phase9, 
+        par_pan1, par_pan2, par_pan3, par_pan4, par_pan5, par_pan6, par_pan7, par_pan8, par_pan9, 
+        par_routing1, par_routing2, par_routing3, par_routing4, par_routing5, par_routing6, par_routing7, par_routing8, par_routing9, 
+        par_foldover,
+        par_percdecay, par_perclevel, par_percwave, par_percharm, par_percvel2amp,
+        par_percfmdecay, par_percfmdepth, par_percfmwave, par_percfmharm, par_percvel2fm,
+        par_perctrigger, par_percstereo,
+        par_filterchain,
+        par_master, 
+        par_f1cutoff, par_f1res, par_f1env1, par_f1env2, par_f1env3, par_f1keyf,
+        par_f2cutoff, par_f2res, par_f2env1, par_f2env2, par_f2env3, par_f2keyf,
+        par_eg1attack, par_eg1decay, par_eg1sustain, par_eg1release, par_eg1velscl, par_eg1ampctl, 
+        par_eg2attack, par_eg2decay, par_eg2sustain, par_eg2release, par_eg2velscl, par_eg2ampctl, 
+        par_eg3attack, par_eg3decay, par_eg3sustain, par_eg3release, par_eg3velscl, par_eg3ampctl, 
+        par_lforate, par_lfoamt, par_lfowet, par_lfophase, par_lfomode,
+        par_transpose, par_detune,
+        param_count
+    };
+    enum organ_waveform { 
+        wave_sine, 
+        wave_sinepl1, wave_sinepl2, wave_sinepl3,
+        wave_ssaw, wave_ssqr, wave_spls, wave_saw, wave_sqr, wave_pulse, wave_sinepl05, wave_sqr05, wave_halfsin, wave_clvg, wave_bell, wave_bell2,
+        wave_w1, wave_w2, wave_w3, wave_w4, wave_w5, wave_w6, wave_w7, wave_w8, wave_w9,
+        wave_dsaw, wave_dsqr, wave_dpls,
+        wave_count_small,
+        wave_strings = wave_count_small,
+        wave_strings2,
+        wave_sinepad,
+        wave_bellpad,
+        wave_space,
+        wave_choir,
+        wave_choir2,
+        wave_choir3,
+        wave_count,
+        wave_count_big = wave_count - wave_count_small
+    };
+    enum {
+        ampctl_none,
+        ampctl_direct,
+        ampctl_f1,
+        ampctl_f2,
+        ampctl_all,
+        ampctl_count
+    };
+    enum { 
+        lfomode_off = 0,
+        lfomode_direct,
+        lfomode_filter1,
+        lfomode_filter2,
+        lfomode_voice,
+        lfomode_global,
+        lfomode_count
+    };
+    enum {
+        perctrig_first = 0,
+        perctrig_each,
+        perctrig_eachplus,
+        perctrig_polyphonic,
+        perctrig_count
+    };
+};
+
+struct organ_metadata: public organ_enums, public plugin_metadata<organ_metadata>
+{
+    enum { in_count = 0, out_count = 2, support_midi = true, require_midi = true, rt_capable = true };
+    PLUGIN_NAME_ID_LABEL("organ", "organ", "Organ")
+    plugin_command_info *get_commands();
+    const char **get_default_configure_vars();
+    const char *get_gui_xml();
+};
+
+};
+
+#endif
diff --git a/src/calf/modules.h b/src/calf/modules.h
index 9e60550..1dda7ae 100644
--- a/src/calf/modules.h
+++ b/src/calf/modules.h
@@ -27,8 +27,9 @@
 #include "audio_fx.h"
 #include "multichorus.h"
 #include "giface.h"
+#include "metadata.h"
 
-namespace synth {
+namespace calf_plugins {
 
 using namespace dsp;
 
@@ -58,14 +59,6 @@ public:
 };
 #endif
 
-struct flanger_metadata: public plugin_metadata<flanger_metadata>
-{
-public:
-    enum { par_delay, par_depth, par_rate, par_fb, par_stereo, par_reset, par_amount, param_count };
-    enum { in_count = 2, out_count = 2, support_midi = false, require_midi = false, rt_capable = true };
-    PLUGIN_NAME_ID_LABEL("flanger", "flanger", "Flanger")
-};
-
 class flanger_audio_module: public audio_module<flanger_metadata>
 {
 public:
@@ -131,13 +124,6 @@ public:
     }
 };
 
-struct phaser_metadata: public plugin_metadata<phaser_metadata>
-{
-    enum { par_freq, par_depth, par_rate, par_fb, par_stages, par_stereo, par_reset, par_amount, param_count };
-    enum { in_count = 2, out_count = 2, support_midi = false, require_midi = false, rt_capable = true };
-    PLUGIN_NAME_ID_LABEL("phaser", "phaser", "Phaser")
-};
-
 class phaser_audio_module: public audio_module<phaser_metadata>
 {
 public:
@@ -256,15 +242,6 @@ public:
     }
 };
 
-struct filter_metadata: public plugin_metadata<filter_metadata>
-{
-    enum { par_cutoff, par_resonance, par_mode, par_inertia, param_count };
-    enum { in_count = 2, out_count = 2, rt_capable = true, require_midi = false, support_midi = false };
-    PLUGIN_NAME_ID_LABEL("filter", "filter", "Filter")
-    /// do not export mode and inertia as CVs, as those are settings and not parameters
-    bool is_cv(int param_no) { return param_no != par_mode && param_no != par_inertia; }
-};
-
 class filter_audio_module: public audio_module<filter_metadata>
 {
 public:    
@@ -410,13 +387,6 @@ public:
     }
 };
 
-struct vintage_delay_metadata: public plugin_metadata<vintage_delay_metadata>
-{
-    enum { par_bpm, par_divide, par_time_l, par_time_r, par_feedback, par_amount, par_mixmode, par_medium, param_count };
-    enum { in_count = 2, out_count = 2, rt_capable = true, support_midi = false, require_midi = false };
-    PLUGIN_NAME_ID_LABEL("vintage_delay", "vintagedelay", "Vintage Delay")
-};
-
 class vintage_delay_audio_module: public audio_module<vintage_delay_metadata>
 {
 public:    
@@ -523,14 +493,6 @@ public:
     }
 };
 
-struct rotary_speaker_metadata: public plugin_metadata<rotary_speaker_metadata>
-{
-public:
-    enum { par_speed, par_spacing, par_shift, par_moddepth, par_treblespeed, par_bassspeed, par_micdistance, par_reflection, param_count };
-    enum { in_count = 2, out_count = 2, support_midi = true, require_midi = false, rt_capable = true };
-    PLUGIN_NAME_ID_LABEL("rotary_speaker", "rotaryspeaker", "Rotary Speaker")
-};
-
 class rotary_speaker_audio_module: public audio_module<rotary_speaker_metadata>
 {
 public:
@@ -723,15 +685,6 @@ public:
     }
 };
 
-/// A multitap stereo chorus thing - metadata
-struct multichorus_metadata: public plugin_metadata<multichorus_metadata>
-{
-public:    
-    enum { par_delay, par_depth, par_rate, par_stereo, par_voices, par_vphase, par_amount, par_lfophase_l, par_lfophase_r, param_count };
-    enum { in_count = 2, out_count = 2, rt_capable = true, support_midi = false, require_midi = false };
-    PLUGIN_NAME_ID_LABEL("multichorus", "multichorus", "Multi Chorus")
-};
-
 /// A multitap stereo chorus thing - processing
 class multichorus_audio_module: public audio_module<multichorus_metadata>
 {
diff --git a/src/calf/modules_dev.h b/src/calf/modules_dev.h
index a42d4f4..bbf8ac3 100644
--- a/src/calf/modules_dev.h
+++ b/src/calf/modules_dev.h
@@ -23,7 +23,7 @@
 
 #include "loudness.h"
 
-namespace synth {
+namespace calf_plugins {
 
 #if ENABLE_EXPERIMENTAL
 
diff --git a/src/calf/modules_synths.h b/src/calf/modules_synths.h
index 447a5bb..ca7726c 100644
--- a/src/calf/modules_synths.h
+++ b/src/calf/modules_synths.h
@@ -31,21 +31,10 @@
 #include "envelope.h"
 #include "organ.h"
 
-namespace synth {
+namespace calf_plugins {
 
 #define MONOSYNTH_WAVE_BITS 12
     
-struct monosynth_metadata: public plugin_metadata<monosynth_metadata>
-{
-    enum { wave_saw, wave_sqr, wave_pulse, wave_sine, wave_triangle, wave_varistep, wave_skewsaw, wave_skewsqr, wave_test1, wave_test2, wave_test3, wave_test4, wave_test5, wave_test6, wave_test7, wave_test8, wave_count };
-    enum { flt_lp12, flt_lp24, flt_2lp12, flt_hp12, flt_lpbr, flt_hpbr, flt_bp6, flt_2bp6 };
-    enum { par_wave1, par_wave2, par_detune, par_osc2xpose, par_oscmode, par_oscmix, par_filtertype, par_cutoff, par_resonance, par_cutoffsep, par_envmod, par_envtores, par_envtoamp, par_attack, par_decay, par_sustain, par_release, par_keyfollow, par_legato, par_portamento, par_vel2filter, par_vel2amp, par_master, param_count };
-    enum { in_count = 0, out_count = 2, support_midi = true, require_midi = true, rt_capable = true };
-    enum { step_size = 64 };
-    PLUGIN_NAME_ID_LABEL("monosynth", "monosynth", "Monosynth")
-    const char *get_gui_xml();
-};
-    
 /// Monosynth-in-making. Parameters may change at any point, so don't make songs with it!
 /// It lacks inertia for parameters, even for those that really need it.
 class monosynth_audio_module: public audio_module<monosynth_metadata>, public line_graph_iface
@@ -55,8 +44,8 @@ public:
     float *outs[out_count];
     float *params[param_count];
     uint32_t srate, crate;
-    static waveform_family<MONOSYNTH_WAVE_BITS> *waves;
-    waveform_oscillator<MONOSYNTH_WAVE_BITS> osc1, osc2;
+    static dsp::waveform_family<MONOSYNTH_WAVE_BITS> *waves;
+    dsp::waveform_oscillator<MONOSYNTH_WAVE_BITS> osc1, osc2;
     bool running, stopping, gate;
     int last_key;
     
@@ -71,8 +60,8 @@ public:
     float odcr, porta_time;
     int queue_note_on, stop_count;
     int legato;
-    synth::adsr envelope;
-    synth::keystack stack;
+    dsp::adsr envelope;
+    dsp::keystack stack;
     dsp::gain_smoothing master;
     
     static void generate_waves();
@@ -199,17 +188,7 @@ public:
     }
 };
 
-struct organ_metadata: public plugin_metadata<organ_metadata>
-{
-    enum { in_count = 0, out_count = 2, support_midi = true, require_midi = true, rt_capable = true };
-    enum { param_count = drawbar_organ::param_count };
-    PLUGIN_NAME_ID_LABEL("organ", "organ", "Organ")
-    plugin_command_info *get_commands();
-    const char **get_default_configure_vars();
-    const char *get_gui_xml();
-};
-
-struct organ_audio_module: public audio_module<organ_metadata>, public drawbar_organ
+struct organ_audio_module: public audio_module<organ_metadata>, public dsp::drawbar_organ
 {
 public:
     using drawbar_organ::note_on;
@@ -219,7 +198,7 @@ public:
     float *ins[in_count]; 
     float *outs[out_count];
     float *params[param_count];
-    organ_parameters par_values;
+    dsp::organ_parameters par_values;
     uint32_t srate;
     bool panic_flag;
     /// Value for configure variable map_curve
diff --git a/src/calf/organ.h b/src/calf/organ.h
index bb62063..998730d 100644
--- a/src/calf/organ.h
+++ b/src/calf/organ.h
@@ -24,10 +24,11 @@
 
 #include "synth.h"
 #include "envelope.h"
+#include "metadata.h"
 
 #define ORGAN_KEYTRACK_POINTS 4
 
-namespace synth 
+namespace dsp
 {
 
 struct organ_parameters {
@@ -107,51 +108,9 @@ struct organ_parameters {
 /// 2^ORGAN_BIG_WAVE_SHIFT = how many (quasi)periods per sample
 #define ORGAN_BIG_WAVE_SHIFT 5
 
-class organ_voice_base
+class organ_voice_base: public calf_plugins::organ_enums
 {
 public:
-    enum organ_waveform { 
-        wave_sine, 
-        wave_sinepl1, wave_sinepl2, wave_sinepl3,
-        wave_ssaw, wave_ssqr, wave_spls, wave_saw, wave_sqr, wave_pulse, wave_sinepl05, wave_sqr05, wave_halfsin, wave_clvg, wave_bell, wave_bell2,
-        wave_w1, wave_w2, wave_w3, wave_w4, wave_w5, wave_w6, wave_w7, wave_w8, wave_w9,
-        wave_dsaw, wave_dsqr, wave_dpls,
-        wave_count_small,
-        wave_strings = wave_count_small,
-        wave_strings2,
-        wave_sinepad,
-        wave_bellpad,
-        wave_space,
-        wave_choir,
-        wave_choir2,
-        wave_choir3,
-        wave_count,
-        wave_count_big = wave_count - wave_count_small
-    };
-    enum {
-        ampctl_none,
-        ampctl_direct,
-        ampctl_f1,
-        ampctl_f2,
-        ampctl_all,
-        ampctl_count
-    };
-    enum { 
-        lfomode_off = 0,
-        lfomode_direct,
-        lfomode_filter1,
-        lfomode_filter2,
-        lfomode_voice,
-        lfomode_global,
-        lfomode_count
-    };
-    enum {
-        perctrig_first = 0,
-        perctrig_each,
-        perctrig_eachplus,
-        perctrig_polyphonic,
-        perctrig_count
-    };
     typedef waveform_family<ORGAN_WAVE_BITS> small_wave_family;
     typedef waveform_family<ORGAN_BIG_WAVE_BITS> big_wave_family;
 public:
@@ -194,7 +153,7 @@ public:
     static void precalculate_waves();
     void update_pitch()
     {
-        float phase = synth::midi_note_to_phase(note, 100 * parameters->global_transpose + parameters->global_detune, sample_rate_ref);
+        float phase = dsp::midi_note_to_phase(note, 100 * parameters->global_transpose + parameters->global_detune, sample_rate_ref);
         dpphase.set(phase * parameters->percussion_harmonic * parameters->pitch_bend);
         moddphase.set(phase * parameters->percussion_fm_harmonic * parameters->pitch_bend);
     }
@@ -224,7 +183,7 @@ public:
     void process(organ_parameters *parameters, float (*data)[2], unsigned int len, float sample_rate);
 };
 
-class organ_voice: public synth::voice, public organ_voice_base {
+class organ_voice: public dsp::voice, public organ_voice_base {
 protected:    
     enum { Channels = 2, BlockSize = 64, EnvCount = organ_parameters::EnvCount, FilterCount = organ_parameters::FilterCount };
     union {
@@ -326,35 +285,11 @@ public:
     }
 };
 
-struct drawbar_organ: public synth::basic_synth {
+struct drawbar_organ: public dsp::basic_synth, public calf_plugins::organ_enums {
     organ_parameters *parameters;
     percussion_voice percussion;
     organ_vibrato global_vibrato;
     
-    enum { 
-        par_drawbar1, par_drawbar2, par_drawbar3, par_drawbar4, par_drawbar5, par_drawbar6, par_drawbar7, par_drawbar8, par_drawbar9, 
-        par_frequency1, par_frequency2, par_frequency3, par_frequency4, par_frequency5, par_frequency6, par_frequency7, par_frequency8, par_frequency9, 
-        par_waveform1, par_waveform2, par_waveform3, par_waveform4, par_waveform5, par_waveform6, par_waveform7, par_waveform8, par_waveform9, 
-        par_detune1, par_detune2, par_detune3, par_detune4, par_detune5, par_detune6, par_detune7, par_detune8, par_detune9, 
-        par_phase1, par_phase2, par_phase3, par_phase4, par_phase5, par_phase6, par_phase7, par_phase8, par_phase9, 
-        par_pan1, par_pan2, par_pan3, par_pan4, par_pan5, par_pan6, par_pan7, par_pan8, par_pan9, 
-        par_routing1, par_routing2, par_routing3, par_routing4, par_routing5, par_routing6, par_routing7, par_routing8, par_routing9, 
-        par_foldover,
-        par_percdecay, par_perclevel, par_percwave, par_percharm, par_percvel2amp,
-        par_percfmdecay, par_percfmdepth, par_percfmwave, par_percfmharm, par_percvel2fm,
-        par_perctrigger, par_percstereo,
-        par_filterchain,
-        par_master, 
-        par_f1cutoff, par_f1res, par_f1env1, par_f1env2, par_f1env3, par_f1keyf,
-        par_f2cutoff, par_f2res, par_f2env1, par_f2env2, par_f2env3, par_f2keyf,
-        par_eg1attack, par_eg1decay, par_eg1sustain, par_eg1release, par_eg1velscl, par_eg1ampctl, 
-        par_eg2attack, par_eg2decay, par_eg2sustain, par_eg2release, par_eg2velscl, par_eg2ampctl, 
-        par_eg3attack, par_eg3decay, par_eg3sustain, par_eg3release, par_eg3velscl, par_eg3ampctl, 
-        par_lforate, par_lfoamt, par_lfowet, par_lfophase, par_lfomode,
-        par_transpose, par_detune,
-        param_count
-    };
-
      drawbar_organ(organ_parameters *_parameters)
     : parameters(_parameters)
     , percussion(_parameters) {
@@ -378,7 +313,7 @@ struct drawbar_organ: public synth::basic_synth {
             output[1][i] = gain*buf[i][1];
         }
     }
-    synth::voice *alloc_voice() {
+    dsp::voice *alloc_voice() {
         block_voice<organ_voice> *v = new block_voice<organ_voice>();
         v->parameters = parameters;
         return v;
@@ -401,7 +336,7 @@ struct drawbar_organ: public synth::basic_synth {
         {
             parameters->cutoff = value / 64.0 - 1;
         }
-        synth::basic_synth::control_change(controller, value);
+        dsp::basic_synth::control_change(controller, value);
     }
     void pitch_bend(int amt);
     virtual bool check_percussion() { 
diff --git a/src/calf/osc.h b/src/calf/osc.h
index 467ae7a..001bd90 100644
--- a/src/calf/osc.h
+++ b/src/calf/osc.h
@@ -25,7 +25,7 @@
 #include "fft.h"
 #include <map>
 
-namespace synth
+namespace dsp
 {
 
 /** Very simple, non-bandlimited saw oscillator. Should not be used for anything
diff --git a/src/calf/plugininfo.h b/src/calf/plugininfo.h
index 0201d8d..cca95cc 100644
--- a/src/calf/plugininfo.h
+++ b/src/calf/plugininfo.h
@@ -24,7 +24,7 @@
 
 #include <string>
 
-namespace synth {
+namespace calf_plugins {
 
 /// A sink to send information about an audio port
 struct plain_port_info_iface
diff --git a/src/calf/preset.h b/src/calf/preset.h
index bae2a40..d2b1dcf 100644
--- a/src/calf/preset.h
+++ b/src/calf/preset.h
@@ -29,7 +29,7 @@
 #include <string.h>
 #include "utils.h"
 
-namespace synth {
+namespace calf_plugins {
 
 class plugin_ctl_iface;
     
diff --git a/src/calf/preset_gui.h b/src/calf/preset_gui.h
index 53a3d20..3099105 100644
--- a/src/calf/preset_gui.h
+++ b/src/calf/preset_gui.h
@@ -23,7 +23,7 @@
 #include <calf/giface.h>
 #include <calf/gui.h>
 
-namespace synth {
+namespace calf_plugins {
 
 struct activate_preset_params
 {
diff --git a/src/calf/synth.h b/src/calf/synth.h
index c2c58cc..7179998 100644
--- a/src/calf/synth.h
+++ b/src/calf/synth.h
@@ -28,7 +28,7 @@
 #include "primitives.h"
 #include "audio_fx.h"
 
-namespace synth {
+namespace dsp {
 
 /**
  * A kind of set with fast non-ordered iteration, used for storing lists of pressed keys.
@@ -189,9 +189,9 @@ protected:
     /// Sostenuto pedal state
     bool sostenuto;
     /// Voices currently playing
-    std::list<synth::voice *> active_voices;
+    std::list<dsp::voice *> active_voices;
     /// Voices allocated, but not used
-    std::stack<synth::voice *> unused_voices;
+    std::stack<dsp::voice *> unused_voices;
     /// Gate values for all 128 MIDI notes
     std::bitset<128> gate;
 
@@ -202,8 +202,8 @@ public:
         hold = false;
         sostenuto = false;
     }
-    virtual synth::voice *give_voice();
-    virtual synth::voice *alloc_voice()=0;
+    virtual dsp::voice *give_voice();
+    virtual dsp::voice *alloc_voice()=0;
     virtual void render_to(float (*output)[2], int nsamples);
     virtual void note_on(int note, int vel);
     virtual void percussion_note_on(int note, int vel) {}
diff --git a/src/dssigui.cpp b/src/dssigui.cpp
index a71e9d3..395551b 100644
--- a/src/dssigui.cpp
+++ b/src/dssigui.cpp
@@ -32,7 +32,7 @@
 
 using namespace std;
 using namespace dsp;
-using namespace synth;
+using namespace calf_plugins;
 using namespace osctl;
 
 #define debug_printf(...)
@@ -341,7 +341,7 @@ int main(int argc, char *argv[])
         get_builtin_presets().load_defaults(true);
         get_user_presets().load_defaults(false);
     }
-    catch(synth::preset_exception &e)
+    catch(calf_plugins::preset_exception &e)
     {
         fprintf(stderr, "Error while loading presets: %s\n", e.what());
         exit(1);
diff --git a/src/giface.cpp b/src/giface.cpp
index 2565507..d51c961 100644
--- a/src/giface.cpp
+++ b/src/giface.cpp
@@ -23,9 +23,9 @@
 #include <memory.h>
 #include <calf/giface.h>
 
-using namespace synth;
 using namespace std;
 using namespace calf_utils;
+using namespace calf_plugins;
 
 float parameter_properties::from_01(double value01) const
 {
@@ -185,7 +185,7 @@ std::string parameter_properties::to_string(float value) const
     return string(buf);
 }
 
-void synth::plugin_ctl_iface::clear_preset() {
+void calf_plugins::plugin_ctl_iface::clear_preset() {
     int param_count = get_param_count();
     for (int i=0; i < param_count; i++)
         set_param_value(i, get_param_props(i)->def_value);
diff --git a/src/gui.cpp b/src/gui.cpp
index 5358c51..271769e 100644
--- a/src/gui.cpp
+++ b/src/gui.cpp
@@ -31,7 +31,7 @@
 
 #include <iostream>
 
-using namespace synth;
+using namespace calf_plugins;
 using namespace std;
 
 /******************************** controls ********************************/
@@ -1217,7 +1217,7 @@ plugin_gui_window::~plugin_gui_window()
     delete gui;
 }
 
-void synth::activate_command(GtkAction *action, activate_command_params *params)
+void calf_plugins::activate_command(GtkAction *action, activate_command_params *params)
 {
     plugin_gui *gui = params->gui;
     gui->plugin->execute(params->function_idx);
diff --git a/src/jackhost.cpp b/src/jackhost.cpp
index 8cb6c94..4815293 100644
--- a/src/jackhost.cpp
+++ b/src/jackhost.cpp
@@ -38,16 +38,16 @@
 #include <calf/main_win.h>
 #include <calf/utils.h>
 
-using namespace synth;
 using namespace std;
 using namespace calf_utils;
+using namespace calf_plugins;
 
 // I don't need anyone to tell me this is stupid. I already know that :)
 plugin_gui_window *gui_win;
 
 const char *client_name = "calfhost";
 
-jack_host_base *synth::create_jack_host(const char *effect_name)
+jack_host_base *calf_plugins::create_jack_host(const char *effect_name)
 {
     #define PER_MODULE_ITEM(name, isSynth, jackname) if (!strcasecmp(effect_name, jackname)) return new jack_host<name##_audio_module>();
     #include <calf/modulelist.h>
@@ -520,7 +520,7 @@ int main(int argc, char *argv[])
         get_builtin_presets().load_defaults(true);
         get_user_presets().load_defaults(false);
     }
-    catch(synth::preset_exception &e)
+    catch(calf_plugins::preset_exception &e)
     {
         // XXXKF this exception is already handled by load_defaults, so this is redundant
         fprintf(stderr, "Error while loading presets: %s\n", e.what());
diff --git a/src/lv2gui.cpp b/src/lv2gui.cpp
index 6f9531f..70f7bd6 100644
--- a/src/lv2gui.cpp
+++ b/src/lv2gui.cpp
@@ -32,7 +32,7 @@
 
 using namespace std;
 using namespace dsp;
-using namespace synth;
+using namespace calf_plugins;
 using namespace calf_utils;
 
 struct plugin_proxy: public plugin_ctl_iface, public plugin_metadata_proxy
diff --git a/src/main_win.cpp b/src/main_win.cpp
index 43c6f21..74b4647 100644
--- a/src/main_win.cpp
+++ b/src/main_win.cpp
@@ -27,7 +27,7 @@
 #include <calf/preset_gui.h>
 #include <calf/main_win.h>
 
-using namespace synth;
+using namespace calf_plugins;
 using namespace std;
 
 static const char *ui_xml = 
@@ -290,10 +290,10 @@ std::string main_window::make_plugin_list(GtkActionGroup *actions)
 {
     string s = plugin_pre_xml;
     std::vector<plugin_metadata_iface *> plugins;
-    synth::get_all_plugins(plugins);
+    calf_plugins::get_all_plugins(plugins);
     for(unsigned int i = 0; i < plugins.size(); i++)
     {
-        synth::plugin_metadata_iface *p = plugins[i];
+        plugin_metadata_iface *p = plugins[i];
         string action_name = "Add" + string(p->get_label())+"Action";
         s += string("<menuitem action=\"") + action_name + "\" />";
         GtkActionEntry ae = { action_name.c_str(), NULL, p->get_name(), NULL, NULL, (GCallback)add_plugin_action };
diff --git a/src/makerdf.cpp b/src/makerdf.cpp
index 585d8ef..ec77cb3 100644
--- a/src/makerdf.cpp
+++ b/src/makerdf.cpp
@@ -30,8 +30,8 @@
 #endif
 
 using namespace std;
-using namespace synth;
 using namespace calf_utils;
+using namespace calf_plugins;
 
 static struct option long_options[] = {
     {"help", 0, 0, 'h'},
@@ -127,11 +127,11 @@ void make_rdf()
     
     rdf += "<rdf:RDF xmlns:rdf=\"&rdf;\" xmlns:rdfs=\"&rdfs;\" xmlns:dc=\"&dc;\" xmlns:ladspa=\"&ladspa;\">\n";
 
-    vector<synth::plugin_metadata_iface *> plugins;
-    synth::get_all_plugins(plugins);
+    vector<calf_plugins::plugin_metadata_iface *> plugins;
+    calf_plugins::get_all_plugins(plugins);
     for (unsigned int i = 0; i < plugins.size(); i++)
     {
-        synth::plugin_metadata_iface *p = plugins[i];
+        plugin_metadata_iface *p = plugins[i];
         if (!p->requires_midi()) {
             rdf += generate_ladspa_rdf(p->get_plugin_info(), p->get_param_props(0), p->get_port_names(), p->get_param_count(), p->get_param_port_offset());
         }
@@ -449,8 +449,8 @@ void make_ttl(string path_prefix)
         "\n"
     ;
     
-    vector<synth::plugin_metadata_iface *> plugins;
-    synth::get_all_plugins(plugins);
+    vector<plugin_metadata_iface *> plugins;
+    calf_plugins::get_all_plugins(plugins);
     
     map<string, string> classes;
     
@@ -488,8 +488,8 @@ void make_ttl(string path_prefix)
 #endif
     
     for (unsigned int i = 0; i < plugins.size(); i++) {
-        synth::plugin_metadata_iface *pi = plugins[i];
-        const synth::ladspa_plugin_info &lpi = pi->get_plugin_info();
+        plugin_metadata_iface *pi = plugins[i];
+        const ladspa_plugin_info &lpi = pi->get_plugin_info();
         string uri = string("<http://calf.sourceforge.net/plugins/")  + string(lpi.label) + ">";
         string ttl;
         ttl = "@prefix : " + uri + " .\n" + header + gui_header;
@@ -545,7 +545,7 @@ void make_ttl(string path_prefix)
         fclose(f);
     }
     lv2_plugin_list lpl;
-    synth::get_all_small_plugins(&lpl);
+    calf_plugins::get_all_small_plugins(&lpl);
     for (unsigned int i = 0; i < lpl.size(); i++)
     {
         lv2_plugin_info *pi = lpl[i];
@@ -597,15 +597,15 @@ void make_manifest()
         "kf:MIDIPlugin a rdfs:Class ; rdfs:label \"MIDI\" ; rdfs:subClassOf lv2:UtilityPlugin ; rdfs:comment \"\"\"Operations on MIDI streams (filters, transposers, mappers etc.)\"\"\" .\n"
     ;
     
-    vector<synth::plugin_metadata_iface *> plugins;
-    synth::get_all_plugins(plugins);
+    vector<plugin_metadata_iface *> plugins;
+    calf_plugins::get_all_plugins(plugins);
     for (unsigned int i = 0; i < plugins.size(); i++)
         ttl += string("<http://calf.sourceforge.net/plugins/") 
             + string(plugins[i]->get_plugin_info().label)
             + "> a lv2:Plugin ; lv2:binary <calf.so> ; rdfs:seeAlso <" + string(plugins[i]->get_plugin_info().label) + ".ttl> .\n";
 
     lv2_plugin_list lpl;
-    synth::get_all_small_plugins(&lpl);
+    calf_plugins::get_all_small_plugins(&lpl);
     for (unsigned int i = 0; i < lpl.size(); i++)
         ttl += string("<http://calf.sourceforge.net/small_plugins/") 
             + string(lpl[i]->id)
diff --git a/src/modules.cpp b/src/modules.cpp
index a3c2fc2..e2e887b 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -28,9 +28,10 @@
 #include <calf/modules.h>
 #include <calf/modules_dev.h>
 
-using namespace synth;
+using namespace dsp;
+using namespace calf_plugins;
 
-const char *synth::calf_copyright_info = "(C) 2001-2008 Krzysztof Foltman, license: LGPL";
+const char *calf_plugins::calf_copyright_info = "(C) 2001-2008 Krzysztof Foltman, license: LGPL";
 
 ////////////////////////////////////////////////////////////////////////////
 
@@ -46,7 +47,7 @@ CALF_PORT_PROPS(flanger) = {
     { 1,          0, 2,     0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_COEF | PF_PROP_NOBOUNDS, NULL, "amount", "Amount" },
 };
 
-CALF_PLUGIN_INFO(flanger) = { 0x847d, "Flanger", "Calf Flanger", "Krzysztof Foltman", synth::calf_copyright_info, "FlangerPlugin" };
+CALF_PLUGIN_INFO(flanger) = { 0x847d, "Flanger", "Calf Flanger", "Krzysztof Foltman", calf_plugins::calf_copyright_info, "FlangerPlugin" };
 
 ////////////////////////////////////////////////////////////////////////////
 
@@ -63,7 +64,7 @@ CALF_PORT_PROPS(phaser) = {
     { 1,          0, 2,     0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_COEF | PF_PROP_NOBOUNDS, NULL, "amount", "Amount" },
 };
 
-CALF_PLUGIN_INFO(phaser) = { 0x8484, "Phaser", "Calf Phaser", "Krzysztof Foltman", synth::calf_copyright_info, "PhaserPlugin" };
+CALF_PLUGIN_INFO(phaser) = { 0x8484, "Phaser", "Calf Phaser", "Krzysztof Foltman", calf_plugins::calf_copyright_info, "PhaserPlugin" };
 
 ////////////////////////////////////////////////////////////////////////////
 
@@ -79,7 +80,7 @@ CALF_PORT_PROPS(reverb) = {
     { 0.25,       0,    2,    0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_COEF | PF_PROP_NOBOUNDS, NULL, "amount", "Amount" },
 };
 
-CALF_PLUGIN_INFO(reverb) = { 0x847e, "Reverb", "Calf Reverb", "Krzysztof Foltman", synth::calf_copyright_info, "ReverbPlugin" };
+CALF_PLUGIN_INFO(reverb) = { 0x847e, "Reverb", "Calf Reverb", "Krzysztof Foltman", calf_plugins::calf_copyright_info, "ReverbPlugin" };
 
 ////////////////////////////////////////////////////////////////////////////
 
@@ -101,7 +102,7 @@ CALF_PORT_PROPS(filter) = {
     { 20,         5,  100,    20, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "inertia", "Inertia"},
 };
 
-CALF_PLUGIN_INFO(filter) = { 0x847f, "Filter", "Calf Filter", "Krzysztof Foltman", synth::calf_copyright_info, "FilterPlugin" };
+CALF_PLUGIN_INFO(filter) = { 0x847f, "Filter", "Calf Filter", "Krzysztof Foltman", calf_plugins::calf_copyright_info, "FilterPlugin" };
 
 ////////////////////////////////////////////////////////////////////////////
 
@@ -129,7 +130,7 @@ CALF_PORT_PROPS(vintage_delay) = {
     { 1,         0,    2,     0, PF_ENUM | PF_CTL_COMBO, vintage_delay_fbmodes, "medium", "Medium" },
 };
 
-CALF_PLUGIN_INFO(vintage_delay) = { 0x8482, "VintageDelay", "Calf Vintage Delay", "Krzysztof Foltman", synth::calf_copyright_info, "DelayPlugin" };
+CALF_PLUGIN_INFO(vintage_delay) = { 0x8482, "VintageDelay", "Calf Vintage Delay", "Krzysztof Foltman", calf_plugins::calf_copyright_info, "DelayPlugin" };
 
 ////////////////////////////////////////////////////////////////////////////
 
@@ -148,7 +149,7 @@ CALF_PORT_PROPS(rotary_speaker) = {
     { 0.3,        0,    1,  101, PF_FLOAT | PF_CTL_KNOB | PF_SCALE_PERC, NULL, "reflection", "Reflection" },
 };
 
-CALF_PLUGIN_INFO(rotary_speaker) = { 0x8483, "RotarySpeaker", "Calf Rotary Speaker", "Krzysztof Foltman", synth::calf_copyright_info, "SimulationPlugin" };
+CALF_PLUGIN_INFO(rotary_speaker) = { 0x8483, "RotarySpeaker", "Calf Rotary Speaker", "Krzysztof Foltman", calf_plugins::calf_copyright_info, "SimulationPlugin" };
 
 ////////////////////////////////////////////////////////////////////////////
 
@@ -166,7 +167,7 @@ CALF_PORT_PROPS(multichorus) = {
     { 180,        0, 360,  91, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "lfo_phase_r", "Right LFO phase" },
 };
 
-CALF_PLUGIN_INFO(multichorus) = { 0x8501, "MultiChorus", "Calf MultiChorus", "Krzysztof Foltman", synth::calf_copyright_info, "ChorusPlugin" };
+CALF_PLUGIN_INFO(multichorus) = { 0x8501, "MultiChorus", "Calf MultiChorus", "Krzysztof Foltman", calf_plugins::calf_copyright_info, "ChorusPlugin" };
 
 ////////////////////////////////////////////////////////////////////////////
 
@@ -193,13 +194,13 @@ CALF_PORT_PROPS(compressor) = {
     { 0,      0,  1,    0, PF_BOOL | PF_CTL_TOGGLE, NULL, "bypass", "Bypass" },
 };
 
-CALF_PLUGIN_INFO(compressor) = { 0x8502, "Compressor", "Calf Compressor", "Thor Harald Johansen", synth::calf_copyright_info, "CompressorPlugin" };
+CALF_PLUGIN_INFO(compressor) = { 0x8502, "Compressor", "Calf Compressor", "Thor Harald Johansen", calf_plugins::calf_copyright_info, "CompressorPlugin" };
 
 #endif
 
 ////////////////////////////////////////////////////////////////////////////
 
-void synth::get_all_plugins(std::vector<plugin_metadata_iface *> &plugins)
+void calf_plugins::get_all_plugins(std::vector<plugin_metadata_iface *> &plugins)
 {
     #define PER_MODULE_ITEM(name, isSynth, jackname) plugins.push_back(new name##_metadata);
     #define PER_SMALL_MODULE_ITEM(...)
diff --git a/src/modules_small.cpp b/src/modules_small.cpp
index 53b1065..4019597 100644
--- a/src/modules_small.cpp
+++ b/src/modules_small.cpp
@@ -35,7 +35,7 @@
 #ifdef ENABLE_EXPERIMENTAL
 
 #if USE_LV2
-#define LV2_SMALL_WRAPPER(mod, name) static synth::lv2_small_wrapper<small_plugins::mod##_audio_module> lv2_small_##mod(name);
+#define LV2_SMALL_WRAPPER(mod, name) static calf_plugins::lv2_small_wrapper<small_plugins::mod##_audio_module> lv2_small_##mod(name);
 #else
 #define LV2_SMALL_WRAPPER(...)
 #endif
@@ -44,7 +44,7 @@
 
 #if USE_LV2
 
-using namespace synth;
+using namespace calf_plugins;
 using namespace dsp;
 using namespace std;
 
@@ -1798,7 +1798,7 @@ public:
 #define PER_SMALL_MODULE_ITEM(name, id) SMALL_WRAPPERS(name, id)
 #include <calf/modulelist.h>
 
-const LV2_Descriptor *synth::lv2_small_descriptor(uint32_t index)
+const LV2_Descriptor *calf_plugins::lv2_small_descriptor(uint32_t index)
 {
     #define PER_SMALL_MODULE_ITEM(name, id) if (!(index--)) return &::lv2_small_##name.descriptor;
     #include <calf/modulelist.h>
@@ -1807,7 +1807,7 @@ const LV2_Descriptor *synth::lv2_small_descriptor(uint32_t index)
 #endif
 #endif
 
-void synth::get_all_small_plugins(plugin_list_info_iface *iface)
+void calf_plugins::get_all_small_plugins(plugin_list_info_iface *iface)
 {
     #define PER_SMALL_MODULE_ITEM(name, id) { plugin_info_iface *pii = &iface->plugin(id); small_plugins::name##_audio_module::plugin_info(pii); pii->finalize(); }
     #include <calf/modulelist.h>
diff --git a/src/monosynth.cpp b/src/monosynth.cpp
index f9a306f..9e0ad08 100644
--- a/src/monosynth.cpp
+++ b/src/monosynth.cpp
@@ -28,7 +28,8 @@
 #include <calf/giface.h>
 #include <calf/modules_synths.h>
 
-using namespace synth;
+using namespace dsp;
+using namespace calf_plugins;
 using namespace std;
 
 CALF_PORT_NAMES(monosynth) = {
@@ -51,7 +52,7 @@ const char *monosynth_filter_choices[] = {
     "2x6dB/oct Bandpass",
 };
 
-CALF_PLUGIN_INFO(monosynth) = { 0x8480, "Monosynth", "Calf Monosynth", "Krzysztof Foltman", synth::calf_copyright_info, "SynthesizerPlugin" };
+CALF_PLUGIN_INFO(monosynth) = { 0x8480, "Monosynth", "Calf Monosynth", "Krzysztof Foltman", calf_plugins::calf_copyright_info, "SynthesizerPlugin" };
 
 static const char *monosynth_gui_xml =
     "<vbox border=\"10\">"
diff --git a/src/organ.cpp b/src/organ.cpp
index 3c80aac..239e6f0 100644
--- a/src/organ.cpp
+++ b/src/organ.cpp
@@ -30,11 +30,11 @@
 #include <calf/modules_synths.h>
 #include <iostream>
 
-using namespace synth;
 using namespace std;
 using namespace dsp;
+using namespace calf_plugins;
 
-CALF_PLUGIN_INFO(organ) = { 0x8481, "Organ", "Calf Organ", "Krzysztof Foltman", synth::calf_copyright_info, "SynthesizerPlugin" };
+CALF_PLUGIN_INFO(organ) = { 0x8481, "Organ", "Calf Organ", "Krzysztof Foltman", calf_plugins::calf_copyright_info, "SynthesizerPlugin" };
 
 #define DRAWBAR_UI(no) \
             "<label  attach-x=\"" no "\" attach-y=\"0\" param=\"l" no "\"/>" \
@@ -1047,7 +1047,7 @@ void organ_vibrato::process(organ_parameters *parameters, float (*data)[2], unsi
 void organ_voice::update_pitch()
 {
     organ_voice_base::update_pitch();
-    dphase.set(synth::midi_note_to_phase(note, 100 * parameters->global_transpose + parameters->global_detune, sample_rate) * parameters->pitch_bend);
+    dphase.set(dsp::midi_note_to_phase(note, 100 * parameters->global_transpose + parameters->global_detune, sample_rate) * parameters->pitch_bend);
 }
 
 void organ_voice::render_block() {
@@ -1220,7 +1220,7 @@ void drawbar_organ::update_params()
         parameters->multiplier[i] = parameters->harmonics[i] * pow(2.0, parameters->detune[i] * (1.0 / 1200.0));
         parameters->phaseshift[i] = int(parameters->phase[i] * 65536 / 360) << 16;
     }
-    double dphase = synth::midi_note_to_phase((int)parameters->foldover, 0, sample_rate);
+    double dphase = dsp::midi_note_to_phase((int)parameters->foldover, 0, sample_rate);
     parameters->foldvalue = (int)(dphase);
 }
 
diff --git a/src/plugin.cpp b/src/plugin.cpp
index 7a881eb..bbd8c04 100644
--- a/src/plugin.cpp
+++ b/src/plugin.cpp
@@ -24,17 +24,17 @@
 #include <calf/modules.h>
 #include <calf/modules_dev.h>
 
-using namespace synth;
+using namespace calf_plugins;
 
 #if USE_LV2
 // instantiate descriptor templates
-template<class Module> LV2_Descriptor synth::lv2_wrapper<Module>::descriptor;
+template<class Module> LV2_Descriptor calf_plugins::lv2_wrapper<Module>::descriptor;
 
 extern "C" {
 
 const LV2_Descriptor *lv2_descriptor(uint32_t index)
 {
-    #define PER_MODULE_ITEM(name, isSynth, jackname) if (!(index--)) return &synth::lv2_wrapper<name##_audio_module>::get().descriptor;
+    #define PER_MODULE_ITEM(name, isSynth, jackname) if (!(index--)) return &lv2_wrapper<name##_audio_module>::get().descriptor;
     #include <calf/modulelist.h>
 #ifdef ENABLE_EXPERIMENTAL
     return lv2_small_descriptor(index);
@@ -52,7 +52,7 @@ extern "C" {
 
 const LADSPA_Descriptor *ladspa_descriptor(unsigned long Index)
 {
-    #define PER_MODULE_ITEM(name, isSynth, jackname) if (!isSynth && !(Index--)) return &synth::ladspa_wrapper<name##_audio_module>::get().descriptor;
+    #define PER_MODULE_ITEM(name, isSynth, jackname) if (!isSynth && !(Index--)) return &ladspa_wrapper<name##_audio_module>::get().descriptor;
     #include <calf/modulelist.h>
     return NULL;
 }
@@ -64,7 +64,7 @@ extern "C" {
 
 const DSSI_Descriptor *dssi_descriptor(unsigned long Index)
 {
-    #define PER_MODULE_ITEM(name, isSynth, jackname) if (!(Index--)) return &synth::ladspa_wrapper<name##_audio_module>::get().dssi_descriptor;
+    #define PER_MODULE_ITEM(name, isSynth, jackname) if (!(Index--)) return &calf_plugins::ladspa_wrapper<name##_audio_module>::get().dssi_descriptor;
     #include <calf/modulelist.h>
     return NULL;
 }
diff --git a/src/preset.cpp b/src/preset.cpp
index c4bb56e..4de051f 100644
--- a/src/preset.cpp
+++ b/src/preset.cpp
@@ -31,19 +31,19 @@
 #include <calf/giface.h>
 #include <calf/utils.h>
 
-using namespace synth;
 using namespace std;
+using namespace calf_plugins;
 using namespace calf_utils;
 
-extern synth::preset_list &synth::get_builtin_presets()
+extern calf_plugins::preset_list &calf_plugins::get_builtin_presets()
 {
-    static synth::preset_list plist;
+    static calf_plugins::preset_list plist;
     return plist;
 }
 
-extern synth::preset_list &synth::get_user_presets()
+extern calf_plugins::preset_list &calf_plugins::get_user_presets()
 {
-    static synth::preset_list plist;
+    static calf_plugins::preset_list plist;
     return plist;
 }
 
@@ -115,7 +115,7 @@ void plugin_preset::get_from(plugin_ctl_iface *plugin)
     plugin->send_configures(&tmp);
 }
     
-string synth::preset_list::get_preset_filename(bool builtin)
+string calf_plugins::preset_list::get_preset_filename(bool builtin)
 {
     if (builtin)
     {
diff --git a/src/preset_gui.cpp b/src/preset_gui.cpp
index c3d799a..44cf740 100644
--- a/src/preset_gui.cpp
+++ b/src/preset_gui.cpp
@@ -26,7 +26,7 @@
 #include <calf/preset_gui.h>
 #include <calf/main_win.h>
 
-using namespace synth;
+using namespace calf_plugins;
 using namespace std;
 
 // this way of filling presets menu is not that great
@@ -39,7 +39,7 @@ void store_preset_dlg_destroy(GtkWindow *window, gpointer data)
     store_preset_dlg = NULL;
 }
 
-void synth::store_preset(GtkWindow *toplevel, plugin_gui *gui)
+void calf_plugins::store_preset(GtkWindow *toplevel, plugin_gui *gui)
 {
     if (store_preset_dlg)
     {
@@ -105,7 +105,7 @@ void synth::store_preset(GtkWindow *toplevel, plugin_gui *gui)
     //gtk_window_set_transient_for(GTK_WINDOW(store_preset_dlg), toplevel);
 }
 
-void synth::activate_preset(GtkAction *action, activate_preset_params *params)
+void calf_plugins::activate_preset(GtkAction *action, activate_preset_params *params)
 {
     plugin_gui *gui = params->gui;
     plugin_preset &p = (params->builtin ? get_builtin_presets() : get_user_presets()).presets[params->preset];
diff --git a/src/synth.cpp b/src/synth.cpp
index 2cb770f..50b0246 100644
--- a/src/synth.cpp
+++ b/src/synth.cpp
@@ -28,12 +28,11 @@
 #include <calf/synth.h>
 
 using namespace dsp;
-using namespace synth;
 using namespace std;
 
 void basic_synth::kill_note(int note, int vel, bool just_one)
 {
-    for (list<synth::voice *>::iterator it = active_voices.begin(); it != active_voices.end(); it++) {
+    for (list<dsp::voice *>::iterator it = active_voices.begin(); it != active_voices.end(); it++) {
         // preserve sostenuto notes
         if ((*it)->get_current_note() == note && !(sostenuto && (*it)->sostenuto)) {
             (*it)->note_off(vel);
@@ -43,12 +42,12 @@ void basic_synth::kill_note(int note, int vel, bool just_one)
     }
 }
 
-synth::voice *basic_synth::give_voice()
+dsp::voice *basic_synth::give_voice()
 {
     if (unused_voices.empty())
         return alloc_voice();
     else {
-        synth::voice *v = unused_voices.top();
+        dsp::voice *v = unused_voices.top();
         unused_voices.pop();
         v->reset();
         return v;
@@ -62,7 +61,7 @@ void basic_synth::note_on(int note, int vel)
         return;
     }
     bool perc = check_percussion();
-    synth::voice *v = alloc_voice();
+    dsp::voice *v = alloc_voice();
     v->setup(sample_rate);
     v->released = false;
     v->sostenuto = false;
@@ -81,7 +80,7 @@ void basic_synth::note_off(int note, int vel)
         kill_note(note, vel, false);
 }
 
-#define for_all_voices(iter) for (std::list<synth::voice *>::iterator iter = active_voices.begin(); iter != active_voices.end(); iter++)
+#define for_all_voices(iter) for (std::list<dsp::voice *>::iterator iter = active_voices.begin(); iter != active_voices.end(); iter++)
     
 void basic_synth::on_pedal_release()
 {
@@ -158,8 +157,8 @@ void basic_synth::control_change(int ctl, int val)
 void basic_synth::render_to(float (*output)[2], int nsamples)
 {
     // render voices, eliminate ones that aren't sounding anymore
-    for (list<synth::voice *>::iterator i = active_voices.begin(); i != active_voices.end();) {
-        synth::voice *v = *i;
+    for (list<dsp::voice *>::iterator i = active_voices.begin(); i != active_voices.end();) {
+        dsp::voice *v = *i;
         v->render_to(output, nsamples);
         if (!v->get_active()) {
             i = active_voices.erase(i);

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list