[SCM] calf/master: + Framework: get XML GUI definitions out of the .cpp files, move the rest of metadata to modules.cpp

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


The following commit has been merged in the master branch:
commit ab2953732498b51ac3f7373344f16119a2efed5e
Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Thu Nov 6 21:35:15 2008 +0000

    + Framework: get XML GUI definitions out of the .cpp files, move the rest of metadata to modules.cpp

diff --git a/gui/gui-monosynth.xml b/gui/gui-monosynth.xml
new file mode 100644
index 0000000..21cd075
--- /dev/null
+++ b/gui/gui-monosynth.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0"?>
+<vbox border="10">
+  <hbox spacing="10">
+    <frame label="Oscillators">
+      <vbox border="10" spacing="10">
+        <table rows="2" cols="2">
+          <label attach-x="0" attach-y="0" param="o1_wave"/>
+          <label attach-x="1" attach-y="0" param="o2_wave"/>
+          <combo attach-x="0" attach-y="1" param="o1_wave"/>
+          <combo attach-x="1" attach-y="1" param="o2_wave"/>
+        </table>
+        <hbox>
+          <line-graph param="o1_wave"/>
+          <vbox>
+            <label param="o12_mix"/>
+            <hscale param="o12_mix" position="bottom"/>
+          </vbox>
+          <line-graph param="o2_wave"/>
+        </hbox>
+        <hbox>
+          <vbox>
+            <label param="o12_detune"/>
+            <knob param="o12_detune" expand="0" fill="0"/>
+            <value param="o12_detune"/>
+          </vbox>
+          <align>
+            <vbox>
+              <label param="phase_mode"/>
+              <combo param="phase_mode"/>
+            </vbox>
+          </align>
+          <vbox>
+            <label param="o2_xpose"/>
+            <knob type="1" param="o2_xpose"/>
+            <value param="o2_xpose"/>
+          </vbox>
+        </hbox>
+      </vbox>
+    </frame>
+    <frame label="Filter">
+      <vbox border="10">
+        <align>
+          <hbox>
+            <label param="filter"/>
+            <combo param="filter"/>
+            <if cond="directlink">
+              <line-graph param="filter" refresh="1" width="80" height="60"/>
+            </if>
+          </hbox>
+        </align>
+        <hbox>
+          <vbox>
+            <label param="cutoff"/>
+            <knob param="cutoff"/>
+            <value param="cutoff"/>
+          </vbox>
+          <vbox>
+            <label param="res"/>
+            <knob param="res"/>
+            <value param="res"/>
+          </vbox>
+          <vbox>
+            <label param="filter_sep"/>
+            <knob type="1" param="filter_sep"/>
+            <value param="filter_sep"/>
+          </vbox>
+        </hbox>
+      </vbox>
+    </frame>
+  </hbox>
+  <hbox spacing="10">
+    <frame label="Envelope">
+      <vbox border="10" spacing="10">
+        <hbox>
+          <vbox>
+            <label param="adsr_a"/>
+            <knob param="adsr_a"/>
+            <value param="adsr_a"/>
+          </vbox>
+          <vbox>
+            <label param="adsr_d"/>
+            <knob param="adsr_d"/>
+            <value param="adsr_d"/>
+          </vbox>
+          <vbox>
+            <label param="adsr_s"/>
+            <knob param="adsr_s"/>
+            <value param="adsr_s"/>
+          </vbox>
+          <vbox>
+            <label param="adsr_r"/>
+            <knob param="adsr_r"/>
+            <value param="adsr_r"/>
+          </vbox>
+        </hbox>
+        <hbox>
+          <vbox>
+            <label param="env2cutoff"/>
+            <knob type="1" param="env2cutoff"/>
+            <value param="env2cutoff"/>
+          </vbox>
+          <vbox>
+            <label param="env2res"/>
+            <knob param="env2res"/>
+            <value param="env2res"/>
+          </vbox>
+          <vbox>
+            <label param="env2amp"/>
+            <knob param="env2amp"/>
+            <value param="env2amp"/>
+          </vbox>
+        </hbox>
+      </vbox>
+    </frame>
+    <frame label="Settings">
+      <vbox border="10" spacing="10">
+        <hbox>
+          <vbox>
+            <label param="key_follow"/>
+            <knob param="key_follow"/>
+            <value param="key_follow"/>
+          </vbox>
+          <vbox>
+            <label param="legato" expand="0"/>
+            <combo param="legato" expand="0" fill="0"/>
+          </vbox>
+          <vbox>
+            <label param="master"/>
+            <knob param="master"/>
+            <value param="master"/>
+          </vbox>
+        </hbox>
+        <hbox>
+          <vbox>
+            <label param="portamento"/>
+            <knob param="portamento"/>
+            <value param="portamento"/>
+          </vbox>
+          <vbox>
+            <label param="vel2filter"/>
+            <knob param="vel2filter"/>
+            <value param="vel2filter"/>
+          </vbox>
+          <vbox>
+            <label param="vel2amp"/>
+            <knob param="vel2amp"/>
+            <value param="vel2amp"/>
+          </vbox>
+        </hbox>
+      </vbox>
+    </frame>
+  </hbox>
+</vbox>
diff --git a/gui/gui-organ.xml b/gui/gui-organ.xml
new file mode 100644
index 0000000..4042361
--- /dev/null
+++ b/gui/gui-organ.xml
@@ -0,0 +1,551 @@
+<?xml version="1.0"?>
+<vbox border="10">
+  <hbox>
+    <if cond="directlink">
+      <align scale-x="0.0" scale-y="1.0" align-x="0" align-y="0">
+        <line-graph param="master" refresh="1" width="120" height="40" expand="0" fill="0"/>
+      </align>
+    </if>
+    <align scale-x="0.0" scale-y="0.0" align-x="1.0" align-y="0.5">
+      <vbox>
+        <label param="master"/>
+        <knob param="master"/>
+        <value param="master"/>
+      </vbox>
+    </align>
+  </hbox>
+  <notebook>
+    <vbox page="Tone generator">
+      <table rows="12" cols="9">
+        <label attach-x="0" attach-y="1" text="Level"/>
+        <label attach-x="0" attach-y="3" text="Harmonic"/>
+        <label attach-x="0" attach-y="5" text="Wave"/>
+        <label attach-x="0" attach-y="6" text="Detune"/>
+        <label attach-x="0" attach-y="8" text="Phase"/>
+        <label attach-x="0" attach-y="10" text="Pan"/>
+        <label attach-x="0" attach-y="12" text="Send to"/>
+        <label attach-x="1" attach-y="0" param="l1"/>
+        <vscale attach-x="1" attach-y="1" param="l1"/>
+        <value attach-x="1" attach-y="2" param="l1"/>
+        <knob attach-x="1" attach-y="3" param="f1"/>
+        <value attach-x="1" attach-y="4" param="f1"/>
+        <combo attach-x="1" attach-y="5" param="w1"/>
+        <knob attach-x="1" attach-y="6" param="detune1" type="1"/>
+        <value attach-x="1" attach-y="7" param="detune1"/>
+        <knob attach-x="1" attach-y="8" param="phase1" type="3"/>
+        <value attach-x="1" attach-y="9" param="phase1"/>
+        <knob attach-x="1" attach-y="10" param="pan1" type="1"/>
+        <value attach-x="1" attach-y="11" param="pan1"/>
+        <combo attach-x="1" attach-y="12" param="routing1"/>
+        <label attach-x="2" attach-y="0" param="l2"/>
+        <vscale attach-x="2" attach-y="1" param="l2"/>
+        <value attach-x="2" attach-y="2" param="l2"/>
+        <knob attach-x="2" attach-y="3" param="f2"/>
+        <value attach-x="2" attach-y="4" param="f2"/>
+        <combo attach-x="2" attach-y="5" param="w2"/>
+        <knob attach-x="2" attach-y="6" param="detune2" type="1"/>
+        <value attach-x="2" attach-y="7" param="detune2"/>
+        <knob attach-x="2" attach-y="8" param="phase2" type="3"/>
+        <value attach-x="2" attach-y="9" param="phase2"/>
+        <knob attach-x="2" attach-y="10" param="pan2" type="1"/>
+        <value attach-x="2" attach-y="11" param="pan2"/>
+        <combo attach-x="2" attach-y="12" param="routing2"/>
+        <label attach-x="3" attach-y="0" param="l3"/>
+        <vscale attach-x="3" attach-y="1" param="l3"/>
+        <value attach-x="3" attach-y="2" param="l3"/>
+        <knob attach-x="3" attach-y="3" param="f3"/>
+        <value attach-x="3" attach-y="4" param="f3"/>
+        <combo attach-x="3" attach-y="5" param="w3"/>
+        <knob attach-x="3" attach-y="6" param="detune3" type="1"/>
+        <value attach-x="3" attach-y="7" param="detune3"/>
+        <knob attach-x="3" attach-y="8" param="phase3" type="3"/>
+        <value attach-x="3" attach-y="9" param="phase3"/>
+        <knob attach-x="3" attach-y="10" param="pan3" type="1"/>
+        <value attach-x="3" attach-y="11" param="pan3"/>
+        <combo attach-x="3" attach-y="12" param="routing3"/>
+        <label attach-x="4" attach-y="0" param="l4"/>
+        <vscale attach-x="4" attach-y="1" param="l4"/>
+        <value attach-x="4" attach-y="2" param="l4"/>
+        <knob attach-x="4" attach-y="3" param="f4"/>
+        <value attach-x="4" attach-y="4" param="f4"/>
+        <combo attach-x="4" attach-y="5" param="w4"/>
+        <knob attach-x="4" attach-y="6" param="detune4" type="1"/>
+        <value attach-x="4" attach-y="7" param="detune4"/>
+        <knob attach-x="4" attach-y="8" param="phase4" type="3"/>
+        <value attach-x="4" attach-y="9" param="phase4"/>
+        <knob attach-x="4" attach-y="10" param="pan4" type="1"/>
+        <value attach-x="4" attach-y="11" param="pan4"/>
+        <combo attach-x="4" attach-y="12" param="routing4"/>
+        <label attach-x="5" attach-y="0" param="l5"/>
+        <vscale attach-x="5" attach-y="1" param="l5"/>
+        <value attach-x="5" attach-y="2" param="l5"/>
+        <knob attach-x="5" attach-y="3" param="f5"/>
+        <value attach-x="5" attach-y="4" param="f5"/>
+        <combo attach-x="5" attach-y="5" param="w5"/>
+        <knob attach-x="5" attach-y="6" param="detune5" type="1"/>
+        <value attach-x="5" attach-y="7" param="detune5"/>
+        <knob attach-x="5" attach-y="8" param="phase5" type="3"/>
+        <value attach-x="5" attach-y="9" param="phase5"/>
+        <knob attach-x="5" attach-y="10" param="pan5" type="1"/>
+        <value attach-x="5" attach-y="11" param="pan5"/>
+        <combo attach-x="5" attach-y="12" param="routing5"/>
+        <label attach-x="6" attach-y="0" param="l6"/>
+        <vscale attach-x="6" attach-y="1" param="l6"/>
+        <value attach-x="6" attach-y="2" param="l6"/>
+        <knob attach-x="6" attach-y="3" param="f6"/>
+        <value attach-x="6" attach-y="4" param="f6"/>
+        <combo attach-x="6" attach-y="5" param="w6"/>
+        <knob attach-x="6" attach-y="6" param="detune6" type="1"/>
+        <value attach-x="6" attach-y="7" param="detune6"/>
+        <knob attach-x="6" attach-y="8" param="phase6" type="3"/>
+        <value attach-x="6" attach-y="9" param="phase6"/>
+        <knob attach-x="6" attach-y="10" param="pan6" type="1"/>
+        <value attach-x="6" attach-y="11" param="pan6"/>
+        <combo attach-x="6" attach-y="12" param="routing6"/>
+        <label attach-x="7" attach-y="0" param="l7"/>
+        <vscale attach-x="7" attach-y="1" param="l7"/>
+        <value attach-x="7" attach-y="2" param="l7"/>
+        <knob attach-x="7" attach-y="3" param="f7"/>
+        <value attach-x="7" attach-y="4" param="f7"/>
+        <combo attach-x="7" attach-y="5" param="w7"/>
+        <knob attach-x="7" attach-y="6" param="detune7" type="1"/>
+        <value attach-x="7" attach-y="7" param="detune7"/>
+        <knob attach-x="7" attach-y="8" param="phase7" type="3"/>
+        <value attach-x="7" attach-y="9" param="phase7"/>
+        <knob attach-x="7" attach-y="10" param="pan7" type="1"/>
+        <value attach-x="7" attach-y="11" param="pan7"/>
+        <combo attach-x="7" attach-y="12" param="routing7"/>
+        <label attach-x="8" attach-y="0" param="l8"/>
+        <vscale attach-x="8" attach-y="1" param="l8"/>
+        <value attach-x="8" attach-y="2" param="l8"/>
+        <knob attach-x="8" attach-y="3" param="f8"/>
+        <value attach-x="8" attach-y="4" param="f8"/>
+        <combo attach-x="8" attach-y="5" param="w8"/>
+        <knob attach-x="8" attach-y="6" param="detune8" type="1"/>
+        <value attach-x="8" attach-y="7" param="detune8"/>
+        <knob attach-x="8" attach-y="8" param="phase8" type="3"/>
+        <value attach-x="8" attach-y="9" param="phase8"/>
+        <knob attach-x="8" attach-y="10" param="pan8" type="1"/>
+        <value attach-x="8" attach-y="11" param="pan8"/>
+        <combo attach-x="8" attach-y="12" param="routing8"/>
+        <label attach-x="9" attach-y="0" param="l9"/>
+        <vscale attach-x="9" attach-y="1" param="l9"/>
+        <value attach-x="9" attach-y="2" param="l9"/>
+        <knob attach-x="9" attach-y="3" param="f9"/>
+        <value attach-x="9" attach-y="4" param="f9"/>
+        <combo attach-x="9" attach-y="5" param="w9"/>
+        <knob attach-x="9" attach-y="6" param="detune9" type="1"/>
+        <value attach-x="9" attach-y="7" param="detune9"/>
+        <knob attach-x="9" attach-y="8" param="phase9" type="3"/>
+        <value attach-x="9" attach-y="9" param="phase9"/>
+        <knob attach-x="9" attach-y="10" param="pan9" type="1"/>
+        <value attach-x="9" attach-y="11" param="pan9"/>
+        <combo attach-x="9" attach-y="12" param="routing9"/>
+      </table>
+    </vbox>
+    <hbox page="Sound processor">
+      <vbox>
+        <frame label="Filter 1">
+          <vbox>
+            <hbox>
+              <vbox>
+                <label param="f1_cutoff"/>
+                <align>
+                  <knob param="f1_cutoff" expand="0" fill="0"/>
+                </align>
+                <value param="f1_cutoff"/>
+              </vbox>
+              <vbox>
+                <label param="f1_res"/>
+                <align>
+                  <knob param="f1_res" expand="0" fill="0"/>
+                </align>
+                <value param="f1_res"/>
+              </vbox>
+              <vbox>
+                <label param="f1_keyf"/>
+                <align>
+                  <knob param="f1_keyf" expand="0" fill="0"/>
+                </align>
+                <value param="f1_keyf"/>
+              </vbox>
+            </hbox>
+            <hbox>
+              <vbox>
+                <label param="f1_env1"/>
+                <align>
+                  <knob param="f1_env1" expand="0" fill="0" type="1"/>
+                </align>
+                <value param="f1_env1"/>
+              </vbox>
+              <vbox>
+                <label param="f1_env2"/>
+                <align>
+                  <knob param="f1_env2" expand="0" fill="0" type="1"/>
+                </align>
+                <value param="f1_env2"/>
+              </vbox>
+              <vbox>
+                <label param="f1_env3"/>
+                <align>
+                  <knob param="f1_env3" expand="0" fill="0" type="1"/>
+                </align>
+                <value param="f1_env3"/>
+              </vbox>
+            </hbox>
+            <align>
+              <hbox>
+                <toggle expand="0" fill="0" param="filter_chain"/>
+                <label param="filter_chain"/>
+              </hbox>
+            </align>
+          </vbox>
+        </frame>
+        <frame label="Filter 2">
+          <vbox>
+            <hbox>
+              <vbox>
+                <label param="f2_cutoff"/>
+                <align>
+                  <knob param="f2_cutoff" expand="0" fill="0"/>
+                </align>
+                <value param="f2_cutoff"/>
+              </vbox>
+              <vbox>
+                <label param="f2_res"/>
+                <align>
+                  <knob param="f2_res" expand="0" fill="0"/>
+                </align>
+                <value param="f2_res"/>
+              </vbox>
+              <vbox>
+                <label param="f2_keyf"/>
+                <align>
+                  <knob param="f2_keyf" expand="0" fill="0"/>
+                </align>
+                <value param="f2_keyf"/>
+              </vbox>
+            </hbox>
+            <hbox>
+              <vbox>
+                <label param="f2_env1"/>
+                <align>
+                  <knob param="f2_env1" expand="0" fill="0" type="1"/>
+                </align>
+                <value param="f2_env1"/>
+              </vbox>
+              <vbox>
+                <label param="f2_env2"/>
+                <align>
+                  <knob param="f2_env2" expand="0" fill="0" type="1"/>
+                </align>
+                <value param="f2_env2"/>
+              </vbox>
+              <vbox>
+                <label param="f2_env3"/>
+                <align>
+                  <knob param="f2_env3" expand="0" fill="0" type="1"/>
+                </align>
+                <value param="f2_env3"/>
+              </vbox>
+            </hbox>
+          </vbox>
+        </frame>
+        <frame label="Amplifier">
+          <vbox>
+            <hbox>
+              <label param="eg1_amp_ctl"/>
+              <combo param="eg1_amp_ctl"/>
+            </hbox>
+            <hbox>
+              <label param="eg2_amp_ctl"/>
+              <combo param="eg2_amp_ctl"/>
+            </hbox>
+            <hbox>
+              <label param="eg3_amp_ctl"/>
+              <combo param="eg3_amp_ctl"/>
+            </hbox>
+          </vbox>
+        </frame>
+      </vbox>
+      <vbox>
+        <frame label="EG 1">
+          <vbox>
+            <hbox>
+              <vbox>
+                <label param="adsr_a"/>
+                <align>
+                  <knob param="adsr_a" expand="0" fill="0"/>
+                </align>
+                <value param="adsr_a"/>
+              </vbox>
+              <vbox>
+                <label param="adsr_d"/>
+                <align>
+                  <knob param="adsr_d" expand="0" fill="0"/>
+                </align>
+                <value param="adsr_d"/>
+              </vbox>
+              <vbox>
+                <label param="adsr_s"/>
+                <align>
+                  <knob param="adsr_s" expand="0" fill="0"/>
+                </align>
+                <value param="adsr_s"/>
+              </vbox>
+              <vbox>
+                <label param="adsr_r"/>
+                <align>
+                  <knob param="adsr_r" expand="0" fill="0"/>
+                </align>
+                <value param="adsr_r"/>
+              </vbox>
+              <vbox>
+                <label param="adsr_v"/>
+                <align>
+                  <knob param="adsr_v" expand="0" fill="0"/>
+                </align>
+                <value param="adsr_v"/>
+              </vbox>
+            </hbox>
+          </vbox>
+        </frame>
+        <frame label="EG 2">
+          <vbox>
+            <hbox>
+              <vbox>
+                <label param="adsr2_a"/>
+                <align>
+                  <knob param="adsr2_a" expand="0" fill="0"/>
+                </align>
+                <value param="adsr2_a"/>
+              </vbox>
+              <vbox>
+                <label param="adsr2_d"/>
+                <align>
+                  <knob param="adsr2_d" expand="0" fill="0"/>
+                </align>
+                <value param="adsr2_d"/>
+              </vbox>
+              <vbox>
+                <label param="adsr2_s"/>
+                <align>
+                  <knob param="adsr2_s" expand="0" fill="0"/>
+                </align>
+                <value param="adsr2_s"/>
+              </vbox>
+              <vbox>
+                <label param="adsr2_r"/>
+                <align>
+                  <knob param="adsr2_r" expand="0" fill="0"/>
+                </align>
+                <value param="adsr2_r"/>
+              </vbox>
+              <vbox>
+                <label param="adsr2_v"/>
+                <align>
+                  <knob param="adsr2_v" expand="0" fill="0"/>
+                </align>
+                <value param="adsr2_v"/>
+              </vbox>
+            </hbox>
+          </vbox>
+        </frame>
+        <frame label="EG 3">
+          <vbox>
+            <hbox>
+              <vbox>
+                <label param="adsr3_a"/>
+                <align>
+                  <knob param="adsr3_a" expand="0" fill="0"/>
+                </align>
+                <value param="adsr3_a"/>
+              </vbox>
+              <vbox>
+                <label param="adsr3_d"/>
+                <align>
+                  <knob param="adsr3_d" expand="0" fill="0"/>
+                </align>
+                <value param="adsr3_d"/>
+              </vbox>
+              <vbox>
+                <label param="adsr3_s"/>
+                <align>
+                  <knob param="adsr3_s" expand="0" fill="0"/>
+                </align>
+                <value param="adsr3_s"/>
+              </vbox>
+              <vbox>
+                <label param="adsr3_r"/>
+                <align>
+                  <knob param="adsr3_r" expand="0" fill="0"/>
+                </align>
+                <value param="adsr3_r"/>
+              </vbox>
+              <vbox>
+                <label param="adsr3_v"/>
+                <align>
+                  <knob param="adsr3_v" expand="0" fill="0"/>
+                </align>
+                <value param="adsr3_v"/>
+              </vbox>
+            </hbox>
+          </vbox>
+        </frame>
+      </vbox>
+    </hbox>
+    <vbox page="Advanced">
+      <align scale-x="1.0" scale-y="0.3">
+        <frame label="Percussive section">
+          <vbox>
+            <align scale-x="0.0" scale-y="1.0">
+              <vbox>
+                <keyboard octaves="10"/>
+                <curve key="map_curve" maxpoints="4"/>
+              </vbox>
+            </align>
+            <hbox>
+              <table rows="2" cols="5">
+                <vbox attach-x="0" attach-y="0">
+                  <label param="perc_waveform"/>
+                  <align>
+                    <combo param="perc_waveform"/>
+                  </align>
+                </vbox>
+                <vbox attach-x="1" attach-y="0">
+                  <label param="perc_harmonic"/>
+                  <knob param="perc_harmonic" expand="0" fill="0"/>
+                  <value param="perc_harmonic"/>
+                </vbox>
+                <vbox attach-x="2" attach-y="0">
+                  <label param="perc_level"/>
+                  <knob param="perc_level" expand="0" fill="0"/>
+                  <value param="perc_level"/>
+                </vbox>
+                <vbox attach-x="3" attach-y="0">
+                  <label param="perc_decay"/>
+                  <knob param="perc_decay" expand="0" fill="0"/>
+                  <value param="perc_decay"/>
+                </vbox>
+                <vbox attach-x="4" attach-y="0">
+                  <label param="perc_vel2amp"/>
+                  <knob param="perc_vel2amp" expand="0" fill="0"/>
+                  <value param="perc_vel2amp"/>
+                </vbox>
+                <vbox attach-x="0" attach-y="1">
+                  <label param="perc_fm_waveform"/>
+                  <align>
+                    <combo param="perc_fm_waveform"/>
+                  </align>
+                </vbox>
+                <vbox attach-x="1" attach-y="1">
+                  <label param="perc_fm_harmonic"/>
+                  <knob param="perc_fm_harmonic" expand="0" fill="0"/>
+                  <value param="perc_fm_harmonic"/>
+                </vbox>
+                <vbox attach-x="2" attach-y="1">
+                  <label param="perc_fm_depth"/>
+                  <knob param="perc_fm_depth" expand="0" fill="0"/>
+                  <value param="perc_fm_depth"/>
+                </vbox>
+                <vbox attach-x="3" attach-y="1">
+                  <label param="perc_fm_decay"/>
+                  <knob param="perc_fm_decay" expand="0" fill="0"/>
+                  <value param="perc_fm_decay"/>
+                </vbox>
+                <vbox attach-x="4" attach-y="1">
+                  <label param="perc_vel2fm"/>
+                  <knob param="perc_vel2fm" expand="0" fill="0"/>
+                  <value param="perc_vel2fm"/>
+                </vbox>
+              </table>
+              <vbox>
+                <hbox>
+                  <align>
+                    <vbox>
+                      <label param="perc_stereo"/>
+                      <knob param="perc_stereo" expand="0" fill="0" type="3"/>
+                      <value param="perc_stereo"/>
+                    </vbox>
+                  </align>
+                  <align>
+                    <vbox>
+                      <label param="perc_trigger"/>
+                      <align>
+                        <combo param="perc_trigger"/>
+                      </align>
+                    </vbox>
+                  </align>
+                </hbox>
+              </vbox>
+            </hbox>
+          </vbox>
+        </frame>
+      </align>
+      <frame label="Vibrato">
+        <hbox>
+          <vbox expand="0" fill="0">
+            <label param="vib_rate"/>
+            <align>
+              <knob param="vib_rate" expand="0" fill="0"/>
+            </align>
+            <value param="vib_rate"/>
+          </vbox>
+          <vbox expand="0" fill="0">
+            <label param="vib_amt"/>
+            <align>
+              <knob param="vib_amt" expand="0" fill="0"/>
+            </align>
+            <value param="vib_amt"/>
+          </vbox>
+          <vbox expand="0" fill="0">
+            <label param="vib_wet"/>
+            <align>
+              <knob param="vib_wet" expand="0" fill="0"/>
+            </align>
+            <value param="vib_wet"/>
+          </vbox>
+          <vbox expand="0" fill="0">
+            <label param="vib_phase"/>
+            <align>
+              <knob param="vib_phase" expand="0" fill="0" type="3"/>
+            </align>
+            <value param="vib_phase"/>
+          </vbox>
+          <vbox expand="0" fill="0">
+            <label param="vib_mode"/>
+            <align>
+              <combo param="vib_mode" expand="0" fill="0"/>
+            </align>
+          </vbox>
+        </hbox>
+      </frame>
+      <frame label="Additional settings">
+        <hbox>
+          <vbox>
+            <label param="transpose"/>
+            <align>
+              <knob param="transpose" type="1"/>
+            </align>
+            <value param="transpose"/>
+          </vbox>
+          <vbox>
+            <label param="detune"/>
+            <align>
+              <knob param="detune" type="1"/>
+            </align>
+            <value param="detune"/>
+          </vbox>
+          <vbox>
+            <label param="foldnote"/>
+            <align>
+              <knob param="foldnote"/>
+            </align>
+            <value param="foldnote"/>
+          </vbox>
+        </hbox>
+      </frame>
+      <vbox/>
+    </vbox>
+  </notebook>
+</vbox>
diff --git a/src/Makefile.am b/src/Makefile.am
index a6e8f3f..4eaf39a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -58,7 +58,7 @@ calf_la_LDFLAGS = -rpath $(ladspadir) -avoid-version -module -lexpat -disable-st
 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
+calflv2gui_la_SOURCES = gui.cpp ctl_curve.cpp ctl_keyboard.cpp ctl_led.cpp custom_ctl.cpp modules.cpp giface.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) -disable-static
 else
@@ -81,6 +81,7 @@ install-data-hook:
 	install -d -m 755 $(DESTDIR)$(pkglibdir)    
 	install -c -m 644 $(top_srcdir)/presets.xml $(DESTDIR)$(pkglibdir)
 	install -c -m 644 $(top_srcdir)/knob.png $(DESTDIR)$(pkglibdir)
+	install -c -m 644 $(top_srcdir)/gui/gui-*.xml $(DESTDIR)$(pkglibdir)
 if USE_JACK
 	install -c -m 644 $(top_srcdir)/calf.glade $(DESTDIR)$(pkglibdir)
 endif
diff --git a/src/calf/giface.h b/src/calf/giface.h
index 25bf912..18172f5 100644
--- a/src/calf/giface.h
+++ b/src/calf/giface.h
@@ -265,19 +265,12 @@ struct plugin_ctl_iface: public virtual plugin_metadata_iface
 
 struct plugin_list_info_iface;
 
+/// Get a list of all "large" (effect/synthesizer) plugins
 extern void get_all_plugins(std::vector<plugin_metadata_iface *> &plugins);
+/// Get a list of all "small" (module) plugins
 extern void get_all_small_plugins(plugin_list_info_iface *plii);
-
-
-struct audio_exception: public std::exception
-{
-    const char *text;
-    std::string container;
-public:
-    audio_exception(const std::string &t) : container(t) { text = container.c_str(); }
-    virtual const char *what() const throw () { return text; }
-    virtual ~audio_exception() throw () {}
-};
+/// Load and strdup a text file with GUI definition
+extern const char *load_gui_xml(const std::string &plugin_id);
 
 /// Empty implementations for plugin functions. Note, that functions aren't virtual, because they're called via the particular
 /// subclass (flanger_audio_module etc) via template wrappers (ladspa_wrapper<> etc), not via base class pointer/reference
@@ -339,7 +332,7 @@ public:
     bool is_rt_capable() { return Metadata::rt_capable; }
     line_graph_iface *get_line_graph_iface() { return dynamic_cast<line_graph_iface *>(this); }    
     int get_param_port_offset()  { return Metadata::in_count + Metadata::out_count; }
-    const char *get_gui_xml() { return NULL; }
+    const char *get_gui_xml() { static const char *data_ptr = calf_plugins::load_gui_xml(get_id()); return data_ptr; }
     plugin_command_info *get_commands() { return NULL; }
     parameter_properties *get_param_props(int param_no) { return &param_props[param_no]; }
     const char **get_port_names() { return port_names; }
diff --git a/src/calf/jackhost.h b/src/calf/jackhost.h
index 7ec7a3a..1b08d55 100644
--- a/src/calf/jackhost.h
+++ b/src/calf/jackhost.h
@@ -70,7 +70,7 @@ public:
         jack_status_t status;
         client = jack_client_open(client_name, JackNullOption, &status);
         if (!client)
-            throw audio_exception("Could not initialize JACK subsystem");
+            throw calf_utils::text_exception("Could not initialize JACK subsystem");
         sample_rate = jack_get_sample_rate(client);
         jack_set_process_callback(client, do_jack_process, this);
         jack_set_buffer_size_callback(client, do_jack_bufsize, this);
@@ -96,7 +96,7 @@ public:
     void connect(const std::string &p1, const std::string &p2)
     {
         if (jack_connect(client, p1.c_str(), p2.c_str()) != 0)
-            throw audio_exception("Could not connect JACK ports "+p1+" and "+p2);
+            throw calf_utils::text_exception("Could not connect JACK ports "+p1+" and "+p2);
     }
     
     void close()
@@ -144,63 +144,11 @@ public:
         changed = true;
     }
     
-    void open(jack_client *_client)
-    {
-        client = _client; //jack_client_open(client_name, JackNullOption, &status);
-        
-        create_ports();
-        
-        cache_ports();
-        
-        init_module();
-        changed = false;
-    }
+    void open(jack_client *_client);
     
-    virtual void create_ports() {
-        char buf[32];
-        port *inputs = get_inputs();
-        port *outputs = get_outputs();
-        int in_count = get_input_count(), out_count = get_output_count();
-        for (int i=0; i<in_count; i++) {
-            sprintf(buf, client->input_name.c_str(), client->input_nr++);
-            inputs[i].name = buf;
-            inputs[i].handle = jack_port_register(client->client, buf, JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput , 0);
-            inputs[i].data = NULL;
-            if (!inputs[i].handle)
-                throw audio_exception("Could not create JACK input port");
-        }
-        for (int i=0; i<out_count; i++) {
-            sprintf(buf, client->output_name.c_str(), client->output_nr++);
-            outputs[i].name = buf;
-            outputs[i].handle = jack_port_register(client->client, buf, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput , 0);
-            outputs[i].data = NULL;
-            if (!outputs[i].handle)
-                throw audio_exception("Could not create JACK output port");
-        }
-        if (get_midi()) {
-            sprintf(buf, client->midi_name.c_str(), client->midi_nr++);
-            midi_port.name = buf;
-            midi_port.handle = jack_port_register(client->client, buf, JACK_DEFAULT_MIDI_TYPE, JackPortIsInput, 0);
-            if (!midi_port.handle)
-                throw audio_exception("Could not create JACK MIDI port");
-        }
-    }
+    virtual void create_ports();
     
-    void close() {
-        port *inputs = get_inputs(), *outputs = get_outputs();
-        int input_count = get_input_count(), output_count = get_output_count();
-        for (int i = 0; i < input_count; i++) {
-            jack_port_unregister(client->client, inputs[i].handle);
-            inputs[i].data = NULL;
-        }
-        for (int i = 0; i < output_count; i++) {
-            jack_port_unregister(client->client, outputs[i].handle);
-            outputs[i].data = NULL;
-        }
-        if (get_midi())
-            jack_port_unregister(client->client, midi_port.handle);
-        client = NULL;
-    }
+    void close();
 
     virtual ~jack_host_base() {
     }
diff --git a/src/calf/metadata.h b/src/calf/metadata.h
index 31dcee1..d0ce0c4 100644
--- a/src/calf/metadata.h
+++ b/src/calf/metadata.h
@@ -91,7 +91,6 @@ struct monosynth_metadata: public plugin_metadata<monosynth_metadata>
     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();
 };
     
 /// Thor's compressor - metadata
@@ -180,7 +179,6 @@ struct organ_metadata: public organ_enums, public plugin_metadata<organ_metadata
     PLUGIN_NAME_ID_LABEL("organ", "organ", "Organ")
     plugin_command_info *get_commands();
     const char **get_default_configure_vars();
-    const char *get_gui_xml();
 };
 
 };
diff --git a/src/calf/utils.h b/src/calf/utils.h
index a70cf2c..7c2fc40 100644
--- a/src/calf/utils.h
+++ b/src/calf/utils.h
@@ -21,6 +21,7 @@
 #ifndef __CALF_UTILS_H
 #define __CALF_UTILS_H
 
+#include <errno.h>
 #include <pthread.h>
 #include <map>
 #include <string>
@@ -108,6 +109,27 @@ public:
     }
 };
 
+struct text_exception: public std::exception
+{
+    const char *text;
+    std::string container;
+public:
+    text_exception(const std::string &t) : container(t) { text = container.c_str(); }
+    virtual const char *what() const throw () { return text; }
+    virtual ~text_exception() throw () {}
+};
+
+struct file_exception: public std::exception
+{
+    const char *text;
+    std::string message, filename, container;
+public:
+    file_exception(const std::string &f) : message(strerror(errno)), filename(f), container(filename + ":" + message) { text = container.c_str(); }
+    file_exception(const std::string &f, const std::string &t) : message(t), filename(f), container(filename + ":" + message) { text = container.c_str(); }
+    virtual const char *what() const throw () { return text; }
+    virtual ~file_exception() throw () {}
+};
+
 /// String-to-string mapping
 typedef std::map<std::string, std::string> dictionary;
 
@@ -125,6 +147,9 @@ extern std::string f2s(double value);
 /// Escape a string to be used in XML file
 std::string xml_escape(const std::string &src);
 
+/// Load file from disk into a std::string blob, or throw file_exception
+std::string load_file(const std::string &src);
+
 };
 
 #endif
diff --git a/src/giface.cpp b/src/giface.cpp
index d51c961..8079f3e 100644
--- a/src/giface.cpp
+++ b/src/giface.cpp
@@ -197,3 +197,14 @@ void calf_plugins::plugin_ctl_iface::clear_preset() {
             configure(p[0], p[1]);
     }
 }
+
+const char *calf_plugins::load_gui_xml(const std::string &plugin_id)
+{
+    try {
+        return strdup(calf_utils::load_file((std::string(PKGLIBDIR) + "/gui-" + plugin_id + ".xml").c_str()).c_str());
+    }
+    catch(file_exception e)
+    {
+        return NULL;
+    }
+}
diff --git a/src/jackhost.cpp b/src/jackhost.cpp
index 4815293..e330d07 100644
--- a/src/jackhost.cpp
+++ b/src/jackhost.cpp
@@ -54,6 +54,64 @@ jack_host_base *calf_plugins::create_jack_host(const char *effect_name)
     return NULL;
 }
 
+void jack_host_base::open(jack_client *_client)
+{
+    client = _client; //jack_client_open(client_name, JackNullOption, &status);
+    
+    create_ports();
+    
+    cache_ports();
+    
+    init_module();
+    changed = false;
+}
+
+void jack_host_base::create_ports() {
+    char buf[32];
+    port *inputs = get_inputs();
+    port *outputs = get_outputs();
+    int in_count = get_input_count(), out_count = get_output_count();
+    for (int i=0; i<in_count; i++) {
+        sprintf(buf, client->input_name.c_str(), client->input_nr++);
+        inputs[i].name = buf;
+        inputs[i].handle = jack_port_register(client->client, buf, JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput , 0);
+        inputs[i].data = NULL;
+        if (!inputs[i].handle)
+            throw text_exception("Could not create JACK input port");
+    }
+    for (int i=0; i<out_count; i++) {
+        sprintf(buf, client->output_name.c_str(), client->output_nr++);
+        outputs[i].name = buf;
+        outputs[i].handle = jack_port_register(client->client, buf, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput , 0);
+        outputs[i].data = NULL;
+        if (!outputs[i].handle)
+            throw text_exception("Could not create JACK output port");
+    }
+    if (get_midi()) {
+        sprintf(buf, client->midi_name.c_str(), client->midi_nr++);
+        midi_port.name = buf;
+        midi_port.handle = jack_port_register(client->client, buf, JACK_DEFAULT_MIDI_TYPE, JackPortIsInput, 0);
+        if (!midi_port.handle)
+            throw text_exception("Could not create JACK MIDI port");
+    }
+}
+
+void jack_host_base::close() {
+    port *inputs = get_inputs(), *outputs = get_outputs();
+    int input_count = get_input_count(), output_count = get_output_count();
+    for (int i = 0; i < input_count; i++) {
+        jack_port_unregister(client->client, inputs[i].handle);
+        inputs[i].data = NULL;
+    }
+    for (int i = 0; i < output_count; i++) {
+        jack_port_unregister(client->client, outputs[i].handle);
+        outputs[i].data = NULL;
+    }
+    if (get_midi())
+        jack_port_unregister(client->client, midi_port.handle);
+    client = NULL;
+}
+
 void destroy(GtkWindow *window, gpointer data)
 {
     gtk_main_quit();
@@ -175,7 +233,13 @@ void host_session::add_plugin(string name, string preset)
 #ifdef ENABLE_EXPERIMENTAL
 #else
 #endif
-        throw audio_exception("Unknown plugin name; allowed are: reverb, flanger, filter, vintagedelay, monosynth, organ, rotaryspeaker, phaser\n");
+        string s = 
+        #define PER_MODULE_ITEM(name, isSynth, jackname) jackname ", "
+        #include <calf/modulelist.h>
+        ;
+        if (!s.empty())
+            s = s.substr(0, s.length() - 2);
+        throw text_exception("Unknown plugin name; allowed are: " + s);
     }
     jh->open(&client);
     
diff --git a/src/modules.cpp b/src/modules.cpp
index 05c785c..e7a66e7 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -199,6 +199,242 @@ CALF_PLUGIN_INFO(compressor) = { 0x8502, "Compressor", "Calf Compressor", "Thor
 
 ////////////////////////////////////////////////////////////////////////////
 
+CALF_PORT_NAMES(monosynth) = {
+    "Out L", "Out R", 
+};
+
+const char *monosynth_waveform_names[] = { "Sawtooth", "Square", "Pulse", "Sine", "Triangle", "Varistep", "Skewed Saw", "Skewed Square", 
+    "Smooth Brass", "Bass", "Dark FM", "Multiwave", "Bell FM", "Dark Pad", "DCO Saw", "DCO Maze" };
+const char *monosynth_mode_names[] = { "0 : 0", "0 : 180", "0 : 90", "90 : 90", "90 : 270", "Random" };
+const char *monosynth_legato_names[] = { "Retrig", "Legato", "Fng Retrig", "Fng Legato" };
+
+const char *monosynth_filter_choices[] = {
+    "12dB/oct Lowpass",
+    "24dB/oct Lowpass",
+    "2x12dB/oct Lowpass",
+    "12dB/oct Highpass",
+    "Lowpass+Notch",
+    "Highpass+Notch",
+    "6dB/oct Bandpass",
+    "2x6dB/oct Bandpass",
+};
+
+CALF_PLUGIN_INFO(monosynth) = { 0x8480, "Monosynth", "Calf Monosynth", "Krzysztof Foltman", calf_plugins::calf_copyright_info, "SynthesizerPlugin" };
+
+CALF_PORT_PROPS(monosynth) = {
+    { monosynth_metadata::wave_saw,         0, monosynth_metadata::wave_count - 1, 1, PF_ENUM | PF_CTL_COMBO, monosynth_waveform_names, "o1_wave", "Osc1 Wave" },
+    { monosynth_metadata::wave_sqr,         0, monosynth_metadata::wave_count - 1, 1, PF_ENUM | PF_CTL_COMBO, monosynth_waveform_names, "o2_wave", "Osc2 Wave" },
+    { 10,         0,  100,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "o12_detune", "O1<>2 Detune" },
+    { 12,       -24,   24,    0, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_SEMITONES, NULL, "o2_xpose", "Osc 2 transpose" },
+    { 0,          0,    5,    0, PF_ENUM | PF_CTL_COMBO, monosynth_mode_names, "phase_mode", "Phase mode" },
+    { 0.5,        0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "o12_mix", "O1<>2 Mix" },
+    { 1,          0,    7,    0, PF_ENUM | PF_CTL_COMBO, monosynth_filter_choices, "filter", "Filter" },
+    { 33,        10,16000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_HZ, NULL, "cutoff", "Cutoff" },
+    { 2,        0.7,    8,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB, NULL, "res", "Resonance" },
+    { 0,      -2400, 2400,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "filter_sep", "Separation" },
+    { 8000,  -10800,10800,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "env2cutoff", "Env->Cutoff" },
+    { 1,          0,    1,    0, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "env2res", "Env->Res" },
+    { 1,          0,    1,    0, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "env2amp", "Env->Amp" },
+    
+    { 1,          1,20000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr_a", "Attack" },
+    { 350,       10,20000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr_d", "Decay" },
+    { 0.5,        0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "adsr_s", "Sustain" },
+    { 50,       10,20000,     0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr_r", "Release" },
+    
+    { 0,          0,    2,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "key_follow", "Key Follow" },
+    { 0,          0,    3,    0, PF_ENUM | PF_CTL_COMBO, monosynth_legato_names, "legato", "Legato Mode" },
+    { 1,          1, 2000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "portamento", "Portamento" },
+    
+    { 0.5,        0,    1,  0.1, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "vel2filter", "Vel->Filter" },
+    { 0,          0,    1,  0.1, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "vel2amp", "Vel->Amp" },
+
+    { 0.5,         0,   1, 100, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_PROP_OUTPUT_GAIN, NULL, "master", "Volume" },
+};
+
+////////////////////////////////////////////////////////////////////////////
+
+CALF_PLUGIN_INFO(organ) = { 0x8481, "Organ", "Calf Organ", "Krzysztof Foltman", calf_plugins::calf_copyright_info, "SynthesizerPlugin" };
+
+const char **organ_metadata::get_default_configure_vars()
+{
+    static const char *data[] = { "map_curve", "2\n0 1\n1 1\n", NULL };
+    return data;
+}
+
+plugin_command_info *organ_metadata::get_commands()
+{
+    static plugin_command_info cmds[] = {
+        { "cmd_panic", "Panic!", "Stop all sounds and reset all controllers" },
+        { NULL }
+    };
+    return cmds;
+}
+
+CALF_PORT_NAMES(organ) = {"Out L", "Out R"};
+
+const char *organ_percussion_trigger_names[] = { "First note", "Each note", "Each, no retrig", "Polyphonic" };
+
+const char *organ_wave_names[] = { 
+    "Sin", 
+    "S0", "S00", "S000", 
+    "SSaw", "SSqr", "SPls", 
+    "Saw", "Sqr", "Pls", 
+    "S(", "Sq(", "S+", "Clvg", 
+    "Bell", "Bell2", 
+    "W1", "W2", "W3", "W4", "W5", "W6", "W7", "W8", "W9",
+    "DSaw", "DSqr", "DPls",
+    "P:SynStr","P:WideStr","P:Sine","P:Bell","P:Space","P:Voice","P:Hiss","P:Chant",
+};
+
+const char *organ_routing_names[] = { "Out", "Flt 1", "Flt 2"  };
+
+const char *organ_ampctl_names[] = { "None", "Direct", "Flt 1", "Flt 2", "All"  };
+
+const char *organ_vibrato_mode_names[] = { "None", "Direct", "Flt 1", "Flt 2", "Voice", "Global"  };
+
+CALF_PORT_PROPS(organ) = {
+    { 8,       0,  8, 80, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "l1", "16'" },
+    { 8,       0,  8, 80, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "l2", "5 1/3'" },
+    { 8,       0,  8, 80, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "l3", "8'" },
+    { 0,       0,  8, 80, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "l4", "4'" },
+    { 0,       0,  8, 80, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "l5", "2 2/3'" },
+    { 0,       0,  8, 80, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "l6", "2'" },
+    { 0,       0,  8, 80, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "l7", "1 3/5'" },
+    { 0,       0,  8, 80, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "l8", "1 1/3'" },
+    { 8,       0,  8, 80, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "l9", "1'" },
+
+    { 1,       1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "f1", "Freq 1" },
+    { 3,       1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "f2", "Freq 2" },
+    { 2,       1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "f3", "Freq 3" },
+    { 4,       1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "f4", "Freq 4" },
+    { 6,       1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "f5", "Freq 5" },
+    { 8,       1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "f6", "Freq 6" },
+    { 10,      1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "f7", "Freq 7" },
+    { 12,      1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "f8", "Freq 8" },
+    { 16,      1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "f9", "Freq 9" },
+
+    { 0,       0,  organ_enums::wave_count - 1, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_wave_names, "w1", "Wave 1" },
+    { 0,       0,  organ_enums::wave_count - 1, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_wave_names, "w2", "Wave 2" },
+    { 0,       0,  organ_enums::wave_count - 1, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_wave_names, "w3", "Wave 3" },
+    { 0,       0,  organ_enums::wave_count - 1, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_wave_names, "w4", "Wave 4" },
+    { 0,       0,  organ_enums::wave_count - 1, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_wave_names, "w5", "Wave 5" },
+    { 0,       0,  organ_enums::wave_count - 1, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_wave_names, "w6", "Wave 6" },
+    { 0,       0,  organ_enums::wave_count - 1, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_wave_names, "w7", "Wave 7" },
+    { 0,       0,  organ_enums::wave_count - 1, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_wave_names, "w8", "Wave 8" },
+    { 0,       0,  organ_enums::wave_count - 1, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_wave_names, "w9", "Wave 9" },
+
+    { 0,    -100,100, 401, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune1", "Detune 1" },
+    { 0,    -100,100, 401, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune2", "Detune 2" },
+    { 0,    -100,100, 401, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune3", "Detune 3" },
+    { 0,    -100,100, 401, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune4", "Detune 4" },
+    { 0,    -100,100, 401, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune5", "Detune 5" },
+    { 0,    -100,100, 401, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune6", "Detune 6" },
+    { 0,    -100,100, 401, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune7", "Detune 7" },
+    { 0,    -100,100, 401, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune8", "Detune 8" },
+    { 0,    -100,100, 401, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune9", "Detune 9" },
+
+    { 0,       0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "phase1", "Phase 1" },
+    { 0,       0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "phase2", "Phase 2" },
+    { 0,       0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "phase3", "Phase 3" },
+    { 0,       0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "phase4", "Phase 4" },
+    { 0,       0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "phase5", "Phase 5" },
+    { 0,       0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "phase6", "Phase 6" },
+    { 0,       0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "phase7", "Phase 7" },
+    { 0,       0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "phase8", "Phase 8" },
+    { 0,       0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "phase9", "Phase 9" },
+
+    { 0,      -1,  1, 201, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "pan1", "Pan 1" },
+    { 0,      -1,  1, 201, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "pan2", "Pan 2" },
+    { 0,      -1,  1, 201, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "pan3", "Pan 3" },
+    { 0,      -1,  1, 201, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "pan4", "Pan 4" },
+    { 0,      -1,  1, 201, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "pan5", "Pan 5" },
+    { 0,      -1,  1, 201, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "pan6", "Pan 6" },
+    { 0,      -1,  1, 201, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "pan7", "Pan 7" },
+    { 0,      -1,  1, 201, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "pan8", "Pan 8" },
+    { 0,      -1,  1, 201, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "pan9", "Pan 9" },
+
+    { 0,       0,  2, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_routing_names, "routing1", "Routing 1" },
+    { 0,       0,  2, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_routing_names, "routing2", "Routing 2" },
+    { 0,       0,  2, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_routing_names, "routing3", "Routing 3" },
+    { 0,       0,  2, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_routing_names, "routing4", "Routing 4" },
+    { 0,       0,  2, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_routing_names, "routing5", "Routing 5" },
+    { 0,       0,  2, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_routing_names, "routing6", "Routing 6" },
+    { 0,       0,  2, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_routing_names, "routing7", "Routing 7" },
+    { 0,       0,  2, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_routing_names, "routing8", "Routing 8" },
+    { 0,       0,  2, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_routing_names, "routing9", "Routing 9" },
+
+    { 96,      0,  127, 128, PF_INT | PF_CTL_KNOB | PF_UNIT_NOTE, NULL, "foldnote", "Foldover" },
+    
+    { 200,         10,  3000, 100, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "perc_decay", "P: Carrier Decay" },
+    { 0.25,      0,  1, 100, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB, NULL, "perc_level", "P: Level" },
+    { 0,         0,  organ_enums::wave_count_small - 1, 1, PF_ENUM | PF_CTL_COMBO, organ_wave_names, "perc_waveform", "P: Carrier Wave" },
+    { 6,      1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "perc_harmonic", "P: Carrier Frq" },
+    { 0,          0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "perc_vel2amp", "P: Vel->Amp" },
+    
+    { 200,         10,  3000, 100, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "perc_fm_decay", "P: Modulator Decay" },
+    { 0,          0,    4,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "perc_fm_depth", "P: FM Depth" },
+    { 0,         0,  organ_enums::wave_count_small - 1, 1, PF_ENUM | PF_CTL_COMBO, organ_wave_names, "perc_fm_waveform", "P: Modulator Wave" },
+    { 6,      1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "perc_fm_harmonic", "P: Modulator Frq" },
+    { 0,          0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "perc_vel2fm", "P: Vel->FM" },
+    
+    { 0,         0,  organ_enums::perctrig_count - 1, 0, PF_ENUM | PF_CTL_COMBO, organ_percussion_trigger_names, "perc_trigger", "P: Trigger" },
+    { 90,      0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "perc_stereo", "P: Stereo Phase" },
+
+    { 0,         0,  1, 0, PF_BOOL | PF_CTL_TOGGLE, NULL, "filter_chain", "Filter 1 To 2" },
+    { 0.1,         0,  1, 100, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_PROP_OUTPUT_GAIN, NULL, "master", "Volume" },
+    
+    { 2000,   20, 20000, 100, PF_FLOAT | PF_SCALE_LOG | PF_UNIT_HZ | PF_CTL_KNOB, NULL, "f1_cutoff", "F1 Cutoff" },
+    { 2,        0.7,    8,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB, NULL, "f1_res", "F1 Res" },
+    { 8000,  -10800,10800,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "f1_env1", "F1 Env1" },
+    { 0,     -10800,10800,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "f1_env2", "F1 Env2" },
+    { 0,     -10800,10800,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "f1_env3", "F1 Env3" },
+    { 0,          0,    2,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "f1_keyf", "F1 KeyFollow" },
+
+    { 2000,   20, 20000, 100, PF_FLOAT | PF_SCALE_LOG | PF_UNIT_HZ | PF_CTL_KNOB, NULL, "f2_cutoff", "F2 Cutoff" },
+    { 2,        0.7,    8,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB, NULL, "f2_res", "F2 Res" },
+    { 0,     -10800,10800,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "f2_env1", "F2 Env1" },
+    { 8000,  -10800,10800,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "f2_env2", "F2 Env2" },
+    { 0,     -10800,10800,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "f2_env3", "F2 Env3" },
+    { 0,          0,    2,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "f2_keyf", "F2 KeyFollow" },
+
+    { 1,          1,20000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr_a", "EG1 Attack" },
+    { 350,       10,20000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr_d", "EG1 Decay" },
+    { 0.5,        0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "adsr_s", "EG1 Sustain" },
+    { 50,       10,20000,     0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr_r", "EG1 Release" },
+    { 0,          0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "adsr_v", "EG1 VelMod" },
+    { 0,  0, organ_enums::ampctl_count - 1,
+                              0, PF_INT | PF_CTL_COMBO, organ_ampctl_names, "eg1_amp_ctl", "EG1 To Amp"},
+
+    { 1,          1,20000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr2_a", "EG2 Attack" },
+    { 350,       10,20000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr2_d", "EG2 Decay" },
+    { 0.5,        0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "adsr2_s", "EG2 Sustain" },
+    { 50,       10,20000,     0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr2_r", "EG2 Release" },
+    { 0,          0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "adsr2_v", "EG2 VelMod" },
+    { 0,  0, organ_enums::ampctl_count - 1,
+                              0, PF_INT | PF_CTL_COMBO, organ_ampctl_names, "eg2_amp_ctl", "EG2 To Amp"},
+
+    { 1,          1,20000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr3_a", "EG3 Attack" },
+    { 350,       10,20000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr3_d", "EG3 Decay" },
+    { 0.5,        0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "adsr3_s", "EG3 Sustain" },
+    { 50,       10,20000,     0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr3_r", "EG3 Release" },
+    { 0,          0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "adsr3_v", "EG3 VelMod" },
+    { 0,  0, organ_enums::ampctl_count - 1,
+                              0, PF_INT | PF_CTL_COMBO, organ_ampctl_names, "eg3_amp_ctl", "EG3 To Amp"},
+
+    { 6.6,     0.01,   80,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_HZ, NULL, "vib_rate", "Vib Rate" },
+    { 0.5,        0,    1,    0, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB , NULL, "vib_amt", "Vib Mod Amt" },
+    { 0.5,        0,    1,    0, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB , NULL, "vib_wet", "Vib Wet" },
+    { 180,        0,  360,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "vib_phase", "Vib Stereo" },
+    { organ_enums::lfomode_global,        0,  organ_enums::lfomode_count - 1,    0, PF_ENUM | PF_CTL_COMBO, organ_vibrato_mode_names, "vib_mode", "Vib Mode" },
+//    { 0,  0, organ_enums::ampctl_count - 1,
+//                              0, PF_INT | PF_CTL_COMBO, organ_ampctl_names, "vel_amp_ctl", "Vel To Amp"},
+
+    { -12,        -24, 24,   49, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_SEMITONES, NULL, "transpose", "Transpose" },
+    { 0,       -100,  100,  201, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune", "Detune" },
+};
+
+////////////////////////////////////////////////////////////////////////////
+
 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);
diff --git a/src/monosynth.cpp b/src/monosynth.cpp
index 9e0ad08..6bb83e0 100644
--- a/src/monosynth.cpp
+++ b/src/monosynth.cpp
@@ -32,204 +32,8 @@ using namespace dsp;
 using namespace calf_plugins;
 using namespace std;
 
-CALF_PORT_NAMES(monosynth) = {
-    "Out L", "Out R", 
-};
-
-const char *monosynth_waveform_names[] = { "Sawtooth", "Square", "Pulse", "Sine", "Triangle", "Varistep", "Skewed Saw", "Skewed Square", 
-    "Smooth Brass", "Bass", "Dark FM", "Multiwave", "Bell FM", "Dark Pad", "DCO Saw", "DCO Maze" };
-const char *monosynth_mode_names[] = { "0 : 0", "0 : 180", "0 : 90", "90 : 90", "90 : 270", "Random" };
-const char *monosynth_legato_names[] = { "Retrig", "Legato", "Fng Retrig", "Fng Legato" };
-
-const char *monosynth_filter_choices[] = {
-    "12dB/oct Lowpass",
-    "24dB/oct Lowpass",
-    "2x12dB/oct Lowpass",
-    "12dB/oct Highpass",
-    "Lowpass+Notch",
-    "Highpass+Notch",
-    "6dB/oct Bandpass",
-    "2x6dB/oct Bandpass",
-};
-
-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\">"
-        "<hbox spacing=\"10\">"
-            "<frame label=\"Oscillators\">"
-                "<vbox border=\"10\" spacing=\"10\">"
-                    "<table rows=\"2\" cols=\"2\">"
-                        "<label attach-x=\"0\" attach-y=\"0\" param=\"o1_wave\" />"
-                        "<label attach-x=\"1\" attach-y=\"0\" param=\"o2_wave\" />"
-                        "<combo attach-x=\"0\" attach-y=\"1\" param=\"o1_wave\" />"
-                        "<combo attach-x=\"1\" attach-y=\"1\" param=\"o2_wave\" />"
-                    "</table>"
-//                    "<line-graph param=\"o1_wave\"/>"
-                    "<hbox>"
-                        "<line-graph param=\"o1_wave\"/>"
-                        "<vbox>"
-                            "<label param=\"o12_mix\"/>"
-                            "<hscale param=\"o12_mix\" position=\"bottom\"/>"
-                        "</vbox>"
-                        "<line-graph param=\"o2_wave\"/>"
-                    "</hbox>"
-                    "<hbox>"
-                        "<vbox>"
-                        "  <label param=\"o12_detune\" />"
-                        "  <knob param=\"o12_detune\" expand=\"0\" fill=\"0\"/><value param=\"o12_detune\"/>"
-                        "</vbox>"
-                        "<align>"
-                        "  <vbox>"
-                        "    <label param=\"phase_mode\" />"
-                        "    <combo param=\"phase_mode\"/>"
-                        "  </vbox>"
-                        "</align>" 
-                        "<vbox>"
-                        "  <label param=\"o2_xpose\" />"
-                        "  <knob type=\"1\" param=\"o2_xpose\" /><value param=\"o2_xpose\"/>"
-                        "</vbox>"
-                    "</hbox>"
-                "</vbox>"
-            "</frame>"
-            "<frame label=\"Filter\">"
-                "<vbox border=\"10\">"
-                    "<align>"
-                        "<hbox>"
-                            "<label param=\"filter\" /><combo param=\"filter\" />"
-                            "<if cond=\"directlink\">"
-                                "<line-graph param=\"filter\" refresh=\"1\" width=\"80\" height=\"60\"/>"
-                            "</if>"
-                        "</hbox>"
-                    "</align>"
-                    "<hbox>"
-                        "<vbox>"
-                        "  <label param=\"cutoff\" />"
-                        "  <knob param=\"cutoff\" /><value param=\"cutoff\"/>"
-                        "</vbox>"
-                        "<vbox>"
-                        "  <label param=\"res\" />"
-                        "  <knob param=\"res\" /><value param=\"res\"/>"
-                        "</vbox>"
-                        "<vbox>"
-                        "  <label param=\"filter_sep\" />"
-                        "  <knob type=\"1\" param=\"filter_sep\" /><value param=\"filter_sep\"/>"
-                        "</vbox>"
-                    "</hbox>"
-                "</vbox>"
-            "</frame>"
-        "</hbox>"
-        "<hbox spacing=\"10\">"
-            "<frame label=\"Envelope\">"
-                "<vbox border=\"10\" spacing=\"10\">"
-                    "<hbox>"
-                        "<vbox>"
-                        "  <label param=\"adsr_a\" />"
-                        "  <knob param=\"adsr_a\" /><value param=\"adsr_a\"/>"
-                        "</vbox>"
-                        "<vbox>"
-                        "  <label param=\"adsr_d\" />"
-                        "  <knob param=\"adsr_d\" /><value param=\"adsr_d\"/>"
-                        "</vbox>"
-                        "<vbox>"
-                        "  <label param=\"adsr_s\" />"
-                        "  <knob param=\"adsr_s\" /><value param=\"adsr_s\"/>"
-                        "</vbox>"
-                        "<vbox>"
-                        "  <label param=\"adsr_r\" />"
-                        "  <knob param=\"adsr_r\" /><value param=\"adsr_r\"/>"
-                        "</vbox>"
-                    "</hbox>"
-                    "<hbox>"
-                        "<vbox>"
-                        "  <label param=\"env2cutoff\" />"
-                        "  <knob type=\"1\" param=\"env2cutoff\" /><value param=\"env2cutoff\"/>"
-                        "</vbox>"
-                        "<vbox>"
-                        "  <label param=\"env2res\" />"
-                        "  <knob param=\"env2res\" /><value param=\"env2res\"/>"
-                        "</vbox>"
-                        "<vbox>"
-                        "  <label param=\"env2amp\" />"
-                        "  <knob param=\"env2amp\" /><value param=\"env2amp\"/>"
-                        "</vbox>"
-                    "</hbox>"
-                "</vbox>"
-            "</frame>"
-            "<frame label=\"Settings\">"
-                "<vbox border=\"10\" spacing=\"10\">"
-                    "<hbox>"
-                        "<vbox>"
-                            "<label param=\"key_follow\" />"
-                            "<knob param=\"key_follow\" />"
-                            "<value param=\"key_follow\" />"
-                        "</vbox>"
-                        "<vbox>"
-                            "<label param=\"legato\"  expand=\"0\"/>"
-                            "<combo param=\"legato\" expand=\"0\" fill=\"0\"/>"
-                        "</vbox>"
-                        "<vbox>"
-                            "<label param=\"master\" />"
-                            "<knob param=\"master\" />"
-                            "<value param=\"master\" />"
-                        "</vbox>"
-                    "</hbox>"
-                    "<hbox>"
-                        "<vbox>"
-                        "  <label param=\"portamento\" />"
-                        "  <knob param=\"portamento\" /><value param=\"portamento\"/>"
-                        "</vbox>"
-                        "<vbox>"
-                        "  <label param=\"vel2filter\" />"
-                        "  <knob param=\"vel2filter\" /><value param=\"vel2filter\"/>"
-                        "</vbox>"
-                        "<vbox>"
-                        "  <label param=\"vel2amp\" />"
-                        "  <knob param=\"vel2amp\" /><value param=\"vel2amp\"/>"
-                        "</vbox>"
-                    "</hbox>"
-                "</vbox>"
-            "</frame>"
-        "</hbox>"
-    "</vbox>";
-
-CALF_PORT_PROPS(monosynth) = {
-    { monosynth_metadata::wave_saw,         0, monosynth_metadata::wave_count - 1, 1, PF_ENUM | PF_CTL_COMBO, monosynth_waveform_names, "o1_wave", "Osc1 Wave" },
-    { monosynth_metadata::wave_sqr,         0, monosynth_metadata::wave_count - 1, 1, PF_ENUM | PF_CTL_COMBO, monosynth_waveform_names, "o2_wave", "Osc2 Wave" },
-    { 10,         0,  100,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "o12_detune", "O1<>2 Detune" },
-    { 12,       -24,   24,    0, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_SEMITONES, NULL, "o2_xpose", "Osc 2 transpose" },
-    { 0,          0,    5,    0, PF_ENUM | PF_CTL_COMBO, monosynth_mode_names, "phase_mode", "Phase mode" },
-    { 0.5,        0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "o12_mix", "O1<>2 Mix" },
-    { 1,          0,    7,    0, PF_ENUM | PF_CTL_COMBO, monosynth_filter_choices, "filter", "Filter" },
-    { 33,        10,16000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_HZ, NULL, "cutoff", "Cutoff" },
-    { 2,        0.7,    8,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB, NULL, "res", "Resonance" },
-    { 0,      -2400, 2400,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "filter_sep", "Separation" },
-    { 8000,  -10800,10800,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "env2cutoff", "Env->Cutoff" },
-    { 1,          0,    1,    0, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "env2res", "Env->Res" },
-    { 1,          0,    1,    0, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "env2amp", "Env->Amp" },
-    
-    { 1,          1,20000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr_a", "Attack" },
-    { 350,       10,20000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr_d", "Decay" },
-    { 0.5,        0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "adsr_s", "Sustain" },
-    { 50,       10,20000,     0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr_r", "Release" },
-    
-    { 0,          0,    2,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "key_follow", "Key Follow" },
-    { 0,          0,    3,    0, PF_ENUM | PF_CTL_COMBO, monosynth_legato_names, "legato", "Legato Mode" },
-    { 1,          1, 2000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "portamento", "Portamento" },
-    
-    { 0.5,        0,    1,  0.1, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "vel2filter", "Vel->Filter" },
-    { 0,          0,    1,  0.1, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "vel2amp", "Vel->Amp" },
-
-    { 0.5,         0,   1, 100, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_PROP_OUTPUT_GAIN, NULL, "master", "Volume" },
-};
-
 float silence[4097];
 
-const char *monosynth_metadata::get_gui_xml()
-{
-    return monosynth_gui_xml;
-}
-
 void monosynth_audio_module::activate() {
     monosynth_audio_module::generate_waves();
     running = false;
diff --git a/src/organ.cpp b/src/organ.cpp
index 239e6f0..dee9b74 100644
--- a/src/organ.cpp
+++ b/src/organ.cpp
@@ -34,369 +34,6 @@ using namespace std;
 using namespace dsp;
 using namespace calf_plugins;
 
-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 "\"/>" \
-            "<vscale attach-x=\"" no "\" attach-y=\"1\" param=\"l" no "\"/>" \
-            "<value  attach-x=\"" no "\" attach-y=\"2\" param=\"l" no "\"/>" \
-            "<knob   attach-x=\"" no "\" attach-y=\"3\" param=\"f" no "\"/>" \
-            "<value  attach-x=\"" no "\" attach-y=\"4\" param=\"f" no "\"/>" \
-            "<combo  attach-x=\"" no "\" attach-y=\"5\" param=\"w" no "\"/>" \
-            "<knob   attach-x=\"" no "\" attach-y=\"6\" param=\"detune" no "\" type=\"1\"/>" \
-            "<value  attach-x=\"" no "\" attach-y=\"7\" param=\"detune" no "\"/>" \
-            "<knob   attach-x=\"" no "\" attach-y=\"8\" param=\"phase" no "\" type=\"3\"/>" \
-            "<value  attach-x=\"" no "\" attach-y=\"9\" param=\"phase" no "\"/>" \
-            "<knob   attach-x=\"" no "\" attach-y=\"10\" param=\"pan" no "\" type=\"1\"/>" \
-            "<value  attach-x=\"" no "\" attach-y=\"11\" param=\"pan" no "\"/>" \
-            "<combo  attach-x=\"" no "\" attach-y=\"12\" param=\"routing" no "\"/>" 
-
-const char *organ_metadata::get_gui_xml()
-{
-    return 
-    "<vbox border=\"10\">"
-        "<hbox>"
-            "<if cond=\"directlink\">"
-                "<align scale-x=\"0.0\" scale-y=\"1.0\" align-x=\"0\" align-y=\"0\">"
-                    "<line-graph param=\"master\" refresh=\"1\" width=\"120\" height=\"40\" expand=\"0\" fill=\"0\"/>"
-                "</align>"
-            "</if>"
-            "<align scale-x=\"0.0\" scale-y=\"0.0\" align-x=\"1.0\" align-y=\"0.5\">"
-                "<vbox>"
-                    "<label param=\"master\"/>"
-                    "<knob param=\"master\"/>"
-                    "<value param=\"master\"/>"
-                "</vbox>"
-            "</align>"
-        "</hbox>"
-        "<notebook>"
-            "<vbox page=\"Tone generator\">"
-                "<table rows=\"12\" cols=\"9\">"
-                    "<label  attach-x=\"0\" attach-y=\"1\" text=\"Level\"/>"
-                    "<label  attach-x=\"0\" attach-y=\"3\" text=\"Harmonic\"/>"
-                    "<label  attach-x=\"0\" attach-y=\"5\" text=\"Wave\"/>"
-                    "<label  attach-x=\"0\" attach-y=\"6\" text=\"Detune\"/>"
-                    "<label  attach-x=\"0\" attach-y=\"8\" text=\"Phase\"/>"
-                    "<label  attach-x=\"0\" attach-y=\"10\" text=\"Pan\"/>"
-                    "<label  attach-x=\"0\" attach-y=\"12\" text=\"Send to\"/>"
-
-                    DRAWBAR_UI("1")
-                    DRAWBAR_UI("2")
-                    DRAWBAR_UI("3")
-                    DRAWBAR_UI("4")
-                    DRAWBAR_UI("5")
-                    DRAWBAR_UI("6")
-                    DRAWBAR_UI("7")
-                    DRAWBAR_UI("8")
-                    DRAWBAR_UI("9")
-                "</table>"
-            "</vbox>"
-            "<hbox page=\"Sound processor\">"
-                "<vbox>"
-                    "<frame label=\"Filter 1\">"
-                        "<vbox>"
-                            "<hbox>"
-                                "<vbox>"
-                                    "<label param=\"f1_cutoff\" />"
-                                    "<align><knob param=\"f1_cutoff\" expand=\"0\" fill=\"0\"/></align><value param=\"f1_cutoff\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"f1_res\" />"
-                                    "<align><knob param=\"f1_res\" expand=\"0\" fill=\"0\"/></align><value param=\"f1_res\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"f1_keyf\" />"
-                                    "<align><knob param=\"f1_keyf\" expand=\"0\" fill=\"0\"/></align><value param=\"f1_keyf\"/>"
-                                "</vbox>"
-                            "</hbox>"
-                            "<hbox>"
-                                "<vbox>"
-                                    "<label param=\"f1_env1\" />"
-                                    "<align><knob param=\"f1_env1\" expand=\"0\" fill=\"0\" type=\"1\"/></align><value param=\"f1_env1\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"f1_env2\" />"
-                                    "<align><knob param=\"f1_env2\" expand=\"0\" fill=\"0\" type=\"1\"/></align><value param=\"f1_env2\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"f1_env3\" />"
-                                    "<align><knob param=\"f1_env3\" expand=\"0\" fill=\"0\" type=\"1\"/></align><value param=\"f1_env3\"/>"
-                                "</vbox>"
-                            "</hbox>"
-                            "<align>"
-                                "<hbox>"
-                                    "<toggle expand=\"0\" fill=\"0\" param=\"filter_chain\" />"
-                                    "<label param=\"filter_chain\" />"
-                                "</hbox>"
-                            "</align>"
-                        "</vbox>"
-                    "</frame>"
-                    "<frame label=\"Filter 2\">"
-                        "<vbox>"
-                            "<hbox>"
-                                "<vbox>"
-                                    "<label param=\"f2_cutoff\" />"
-                                    "<align><knob param=\"f2_cutoff\" expand=\"0\" fill=\"0\"/></align><value param=\"f2_cutoff\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"f2_res\" />"
-                                    "<align><knob param=\"f2_res\" expand=\"0\" fill=\"0\"/></align><value param=\"f2_res\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"f2_keyf\" />"
-                                    "<align><knob param=\"f2_keyf\" expand=\"0\" fill=\"0\"/></align><value param=\"f2_keyf\"/>"
-                                "</vbox>"
-                            "</hbox>"
-                            "<hbox>"
-                                "<vbox>"
-                                    "<label param=\"f2_env1\" />"
-                                    "<align><knob param=\"f2_env1\" expand=\"0\" fill=\"0\" type=\"1\"/></align><value param=\"f2_env1\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"f2_env2\" />"
-                                    "<align><knob param=\"f2_env2\" expand=\"0\" fill=\"0\" type=\"1\"/></align><value param=\"f2_env2\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"f2_env3\" />"
-                                    "<align><knob param=\"f2_env3\" expand=\"0\" fill=\"0\" type=\"1\"/></align><value param=\"f2_env3\"/>"
-                                "</vbox>"
-                            "</hbox>"
-                        "</vbox>"
-                    "</frame>"
-                    "<frame label=\"Amplifier\">"
-                        "<vbox>"
-                            "<hbox><label param=\"eg1_amp_ctl\"/><combo param=\"eg1_amp_ctl\"/></hbox>"
-                            "<hbox><label param=\"eg2_amp_ctl\"/><combo param=\"eg2_amp_ctl\"/></hbox>"
-                            "<hbox><label param=\"eg3_amp_ctl\"/><combo param=\"eg3_amp_ctl\"/></hbox>"
-                        "</vbox>"
-                    "</frame>"
-                "</vbox>"
-                "<vbox>"
-                    "<frame label=\"EG 1\">"
-                        "<vbox>"
-                            "<hbox>"
-                                "<vbox>"
-                                    "<label param=\"adsr_a\" />"
-                                    "<align><knob param=\"adsr_a\" expand=\"0\" fill=\"0\"/></align><value param=\"adsr_a\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"adsr_d\" />"
-                                    "<align><knob param=\"adsr_d\" expand=\"0\" fill=\"0\"/></align><value param=\"adsr_d\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"adsr_s\" />"
-                                    "<align><knob param=\"adsr_s\" expand=\"0\" fill=\"0\"/></align><value param=\"adsr_s\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"adsr_r\" />"
-                                    "<align><knob param=\"adsr_r\" expand=\"0\" fill=\"0\"/></align><value param=\"adsr_r\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"adsr_v\" />"
-                                    "<align><knob param=\"adsr_v\" expand=\"0\" fill=\"0\"/></align><value param=\"adsr_v\"/>"
-                                "</vbox>"
-                            "</hbox>"
-                        "</vbox>"
-                    "</frame>"
-                    "<frame label=\"EG 2\">"
-                        "<vbox>"
-                            "<hbox>"
-                                "<vbox>"
-                                    "<label param=\"adsr2_a\" />"
-                                    "<align><knob param=\"adsr2_a\" expand=\"0\" fill=\"0\"/></align><value param=\"adsr2_a\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"adsr2_d\" />"
-                                    "<align><knob param=\"adsr2_d\" expand=\"0\" fill=\"0\"/></align><value param=\"adsr2_d\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"adsr2_s\" />"
-                                    "<align><knob param=\"adsr2_s\" expand=\"0\" fill=\"0\"/></align><value param=\"adsr2_s\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"adsr2_r\" />"
-                                    "<align><knob param=\"adsr2_r\" expand=\"0\" fill=\"0\"/></align><value param=\"adsr2_r\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"adsr2_v\" />"
-                                    "<align><knob param=\"adsr2_v\" expand=\"0\" fill=\"0\"/></align><value param=\"adsr2_v\"/>"
-                                "</vbox>"
-                            "</hbox>"
-                        "</vbox>"
-                    "</frame>"
-                    "<frame label=\"EG 3\">"
-                        "<vbox>"
-                            "<hbox>"
-                                "<vbox>"
-                                    "<label param=\"adsr3_a\" />"
-                                    "<align><knob param=\"adsr3_a\" expand=\"0\" fill=\"0\"/></align><value param=\"adsr3_a\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"adsr3_d\" />"
-                                    "<align><knob param=\"adsr3_d\" expand=\"0\" fill=\"0\"/></align><value param=\"adsr3_d\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"adsr3_s\" />"
-                                    "<align><knob param=\"adsr3_s\" expand=\"0\" fill=\"0\"/></align><value param=\"adsr3_s\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"adsr3_r\" />"
-                                    "<align><knob param=\"adsr3_r\" expand=\"0\" fill=\"0\"/></align><value param=\"adsr3_r\"/>"
-                                "</vbox>"
-                                "<vbox>"
-                                    "<label param=\"adsr3_v\" />"
-                                    "<align><knob param=\"adsr3_v\" expand=\"0\" fill=\"0\"/></align><value param=\"adsr3_v\"/>"
-                                "</vbox>"
-                            "</hbox>"
-                        "</vbox>"
-                    "</frame>"
-                "</vbox>"
-            "</hbox>"
-            "<vbox page=\"Advanced\">"
-                "<align scale-x=\"1.0\" scale-y=\"0.3\">"
-                    "<frame label=\"Percussive section\">"
-                        "<vbox>"
-                            "<align scale-x=\"0.0\" scale-y=\"1.0\"><vbox><keyboard octaves=\"10\"/><curve key=\"map_curve\" maxpoints=\"4\"/></vbox></align>"
-                            "<hbox>"
-                                "<table rows=\"2\" cols=\"5\">"
-                                    "<vbox attach-x=\"0\" attach-y=\"0\">"
-                                        "<label param=\"perc_waveform\"/>"
-                                        "<align><combo param=\"perc_waveform\"/></align>"
-                                    "</vbox>"        
-                                    "<vbox attach-x=\"1\" attach-y=\"0\">"
-                                        "<label param=\"perc_harmonic\"/>"
-                                        "<knob param=\"perc_harmonic\" expand=\"0\" fill=\"0\"/>"
-                                        "<value param=\"perc_harmonic\"/>"
-                                    "</vbox>"        
-                                    "<vbox attach-x=\"2\" attach-y=\"0\">"
-                                        "<label param=\"perc_level\"/>"
-                                        "<knob param=\"perc_level\" expand=\"0\" fill=\"0\"/>"
-                                        "<value param=\"perc_level\"/>"
-                                    "</vbox>"        
-                                    "<vbox attach-x=\"3\" attach-y=\"0\">"
-                                        "<label param=\"perc_decay\"/>"
-                                        "<knob param=\"perc_decay\" expand=\"0\" fill=\"0\"/>"
-                                        "<value param=\"perc_decay\"/>"
-                                    "</vbox>"
-                                    "<vbox attach-x=\"4\" attach-y=\"0\">"
-                                        "<label param=\"perc_vel2amp\"/>"
-                                        "<knob param=\"perc_vel2amp\" expand=\"0\" fill=\"0\"/>"
-                                        "<value param=\"perc_vel2amp\"/>"
-                                    "</vbox>"        
-                                    "<vbox attach-x=\"0\" attach-y=\"1\">"
-                                        "<label param=\"perc_fm_waveform\"/>"
-                                        "<align><combo param=\"perc_fm_waveform\"/></align>"
-                                    "</vbox>"        
-                                    "<vbox attach-x=\"1\" attach-y=\"1\">"
-                                        "<label param=\"perc_fm_harmonic\"/>"
-                                        "<knob param=\"perc_fm_harmonic\" expand=\"0\" fill=\"0\"/>"
-                                        "<value param=\"perc_fm_harmonic\"/>"
-                                    "</vbox>"        
-                                    "<vbox attach-x=\"2\" attach-y=\"1\">"
-                                        "<label param=\"perc_fm_depth\"/>"
-                                        "<knob param=\"perc_fm_depth\" expand=\"0\" fill=\"0\"/>"
-                                        "<value param=\"perc_fm_depth\"/>"
-                                    "</vbox>"        
-                                    "<vbox attach-x=\"3\" attach-y=\"1\">"
-                                        "<label param=\"perc_fm_decay\"/>"
-                                        "<knob param=\"perc_fm_decay\" expand=\"0\" fill=\"0\"/>"
-                                        "<value param=\"perc_fm_decay\"/>"
-                                    "</vbox>"
-                                    "<vbox attach-x=\"4\" attach-y=\"1\">"
-                                        "<label param=\"perc_vel2fm\"/>"
-                                        "<knob param=\"perc_vel2fm\" expand=\"0\" fill=\"0\"/>"
-                                        "<value param=\"perc_vel2fm\"/>"
-                                    "</vbox>"        
-                                "</table>"
-                                "<vbox>"
-                                    "<hbox>"
-                                        "<align>"
-                                            "<vbox>"
-                                                "<label param=\"perc_stereo\"/>"
-                                                "<knob param=\"perc_stereo\" expand=\"0\" fill=\"0\" type=\"3\"/>"
-                                                "<value param=\"perc_stereo\"/>"
-                                            "</vbox>"
-                                        "</align>"
-                                        "<align>"
-                                            "<vbox>"
-                                                "<label param=\"perc_trigger\"/>"
-                                                "<align>"
-                                                    "<combo param=\"perc_trigger\"/>"
-                                                "</align>"
-                                            "</vbox>"        
-                                        "</align>"
-                                    "</hbox>"
-                                "</vbox>"
-                            "</hbox>"
-                        "</vbox>"
-                    "</frame>"
-                "</align>"
-                "<frame label=\"Vibrato\">"
-                    "<hbox>"
-                        "<vbox expand=\"0\" fill=\"0\">"
-                            "<label param=\"vib_rate\" />"
-                            "<align><knob param=\"vib_rate\" expand=\"0\" fill=\"0\"/></align><value param=\"vib_rate\"/>"
-                        "</vbox>"
-                        "<vbox expand=\"0\" fill=\"0\">"
-                            "<label param=\"vib_amt\" />"
-                            "<align><knob param=\"vib_amt\" expand=\"0\" fill=\"0\"/></align><value param=\"vib_amt\"/>"
-                        "</vbox>"
-                        "<vbox expand=\"0\" fill=\"0\">"
-                            "<label param=\"vib_wet\" />"
-                            "<align><knob param=\"vib_wet\" expand=\"0\" fill=\"0\"/></align><value param=\"vib_wet\"/>"
-                        "</vbox>"
-                        "<vbox expand=\"0\" fill=\"0\">"
-                            "<label param=\"vib_phase\" />"
-                            "<align><knob param=\"vib_phase\" expand=\"0\" fill=\"0\" type=\"3\"/></align><value param=\"vib_phase\"/>"
-                        "</vbox>"
-                        "<vbox expand=\"0\" fill=\"0\">"
-                            "<label param=\"vib_mode\" />"
-                            "<align><combo param=\"vib_mode\" expand=\"0\" fill=\"0\"/></align>"
-                        "</vbox>"
-                    "</hbox>"
-                "</frame>"
-                "<frame label=\"Additional settings\">"
-                    "<hbox>"
-                        "<vbox>"
-                            "<label param=\"transpose\"/>"
-                            "<align><knob param=\"transpose\" type=\"1\"/></align>"
-                            "<value param=\"transpose\"/>"
-                        "</vbox>"
-                        "<vbox>"
-                            "<label param=\"detune\"/>"
-                            "<align><knob param=\"detune\" type=\"1\"/></align>"
-                            "<value param=\"detune\"/>"
-                        "</vbox>"
-                        "<vbox>"
-                            "<label param=\"foldnote\"/>"
-                            "<align><knob param=\"foldnote\"/></align>"
-                            "<value param=\"foldnote\"/>"
-                        "</vbox>"
-                    "</hbox>"
-                "</frame>"
-                "<vbox>"
-                "</vbox>"
-            "</vbox>"
-        "</notebook>"
-    "</vbox>"
-    ;
-}
-
-const char **organ_metadata::get_default_configure_vars()
-{
-    static const char *data[] = { "map_curve", "2\n0 1\n1 1\n", NULL };
-    return data;
-}
-
-plugin_command_info *organ_metadata::get_commands()
-{
-    static plugin_command_info cmds[] = {
-        { "cmd_panic", "Panic!", "Stop all sounds and reset all controllers" },
-        { NULL }
-    };
-    return cmds;
-}
-
 //////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 bool organ_audio_module::get_graph(int index, int subindex, float *data, int points, cairo_t *context)
@@ -438,169 +75,6 @@ bool organ_audio_module::get_graph(int index, int subindex, float *data, int poi
     return false;
 }
 
-CALF_PORT_NAMES(organ) = {"Out L", "Out R"};
-
-const char *organ_percussion_trigger_names[] = { "First note", "Each note", "Each, no retrig", "Polyphonic" };
-
-const char *organ_wave_names[] = { 
-    "Sin", 
-    "S0", "S00", "S000", 
-    "SSaw", "SSqr", "SPls", 
-    "Saw", "Sqr", "Pls", 
-    "S(", "Sq(", "S+", "Clvg", 
-    "Bell", "Bell2", 
-    "W1", "W2", "W3", "W4", "W5", "W6", "W7", "W8", "W9",
-    "DSaw", "DSqr", "DPls",
-    "P:SynStr","P:WideStr","P:Sine","P:Bell","P:Space","P:Voice","P:Hiss","P:Chant",
-};
-
-const char *organ_routing_names[] = { "Out", "Flt 1", "Flt 2"  };
-
-const char *organ_ampctl_names[] = { "None", "Direct", "Flt 1", "Flt 2", "All"  };
-
-const char *organ_vibrato_mode_names[] = { "None", "Direct", "Flt 1", "Flt 2", "Voice", "Global"  };
-
-CALF_PORT_PROPS(organ) = {
-    { 8,       0,  8, 80, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "l1", "16'" },
-    { 8,       0,  8, 80, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "l2", "5 1/3'" },
-    { 8,       0,  8, 80, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "l3", "8'" },
-    { 0,       0,  8, 80, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "l4", "4'" },
-    { 0,       0,  8, 80, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "l5", "2 2/3'" },
-    { 0,       0,  8, 80, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "l6", "2'" },
-    { 0,       0,  8, 80, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "l7", "1 3/5'" },
-    { 0,       0,  8, 80, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "l8", "1 1/3'" },
-    { 8,       0,  8, 80, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "l9", "1'" },
-
-    { 1,       1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "f1", "Freq 1" },
-    { 3,       1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "f2", "Freq 2" },
-    { 2,       1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "f3", "Freq 3" },
-    { 4,       1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "f4", "Freq 4" },
-    { 6,       1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "f5", "Freq 5" },
-    { 8,       1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "f6", "Freq 6" },
-    { 10,      1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "f7", "Freq 7" },
-    { 12,      1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "f8", "Freq 8" },
-    { 16,      1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "f9", "Freq 9" },
-
-    { 0,       0,  organ_voice_base::wave_count - 1, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_wave_names, "w1", "Wave 1" },
-    { 0,       0,  organ_voice_base::wave_count - 1, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_wave_names, "w2", "Wave 2" },
-    { 0,       0,  organ_voice_base::wave_count - 1, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_wave_names, "w3", "Wave 3" },
-    { 0,       0,  organ_voice_base::wave_count - 1, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_wave_names, "w4", "Wave 4" },
-    { 0,       0,  organ_voice_base::wave_count - 1, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_wave_names, "w5", "Wave 5" },
-    { 0,       0,  organ_voice_base::wave_count - 1, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_wave_names, "w6", "Wave 6" },
-    { 0,       0,  organ_voice_base::wave_count - 1, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_wave_names, "w7", "Wave 7" },
-    { 0,       0,  organ_voice_base::wave_count - 1, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_wave_names, "w8", "Wave 8" },
-    { 0,       0,  organ_voice_base::wave_count - 1, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_wave_names, "w9", "Wave 9" },
-
-    { 0,    -100,100, 401, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune1", "Detune 1" },
-    { 0,    -100,100, 401, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune2", "Detune 2" },
-    { 0,    -100,100, 401, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune3", "Detune 3" },
-    { 0,    -100,100, 401, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune4", "Detune 4" },
-    { 0,    -100,100, 401, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune5", "Detune 5" },
-    { 0,    -100,100, 401, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune6", "Detune 6" },
-    { 0,    -100,100, 401, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune7", "Detune 7" },
-    { 0,    -100,100, 401, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune8", "Detune 8" },
-    { 0,    -100,100, 401, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune9", "Detune 9" },
-
-    { 0,       0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "phase1", "Phase 1" },
-    { 0,       0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "phase2", "Phase 2" },
-    { 0,       0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "phase3", "Phase 3" },
-    { 0,       0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "phase4", "Phase 4" },
-    { 0,       0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "phase5", "Phase 5" },
-    { 0,       0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "phase6", "Phase 6" },
-    { 0,       0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "phase7", "Phase 7" },
-    { 0,       0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "phase8", "Phase 8" },
-    { 0,       0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "phase9", "Phase 9" },
-
-    { 0,      -1,  1, 201, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "pan1", "Pan 1" },
-    { 0,      -1,  1, 201, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "pan2", "Pan 2" },
-    { 0,      -1,  1, 201, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "pan3", "Pan 3" },
-    { 0,      -1,  1, 201, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "pan4", "Pan 4" },
-    { 0,      -1,  1, 201, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "pan5", "Pan 5" },
-    { 0,      -1,  1, 201, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "pan6", "Pan 6" },
-    { 0,      -1,  1, 201, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "pan7", "Pan 7" },
-    { 0,      -1,  1, 201, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "pan8", "Pan 8" },
-    { 0,      -1,  1, 201, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL, "pan9", "Pan 9" },
-
-    { 0,       0,  2, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_routing_names, "routing1", "Routing 1" },
-    { 0,       0,  2, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_routing_names, "routing2", "Routing 2" },
-    { 0,       0,  2, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_routing_names, "routing3", "Routing 3" },
-    { 0,       0,  2, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_routing_names, "routing4", "Routing 4" },
-    { 0,       0,  2, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_routing_names, "routing5", "Routing 5" },
-    { 0,       0,  2, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_routing_names, "routing6", "Routing 6" },
-    { 0,       0,  2, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_routing_names, "routing7", "Routing 7" },
-    { 0,       0,  2, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_routing_names, "routing8", "Routing 8" },
-    { 0,       0,  2, 0, PF_ENUM | PF_SCALE_LINEAR | PF_CTL_COMBO, organ_routing_names, "routing9", "Routing 9" },
-
-    { 96,      0,  127, 128, PF_INT | PF_CTL_KNOB | PF_UNIT_NOTE, NULL, "foldnote", "Foldover" },
-    
-    { 200,         10,  3000, 100, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "perc_decay", "P: Carrier Decay" },
-    { 0.25,      0,  1, 100, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB, NULL, "perc_level", "P: Level" },
-    { 0,         0,  organ_voice_base::wave_count_small - 1, 1, PF_ENUM | PF_CTL_COMBO, organ_wave_names, "perc_waveform", "P: Carrier Wave" },
-    { 6,      1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "perc_harmonic", "P: Carrier Frq" },
-    { 0,          0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "perc_vel2amp", "P: Vel->Amp" },
-    
-    { 200,         10,  3000, 100, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "perc_fm_decay", "P: Modulator Decay" },
-    { 0,          0,    4,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "perc_fm_depth", "P: FM Depth" },
-    { 0,         0,  organ_voice_base::wave_count_small - 1, 1, PF_ENUM | PF_CTL_COMBO, organ_wave_names, "perc_fm_waveform", "P: Modulator Wave" },
-    { 6,      1, 32, 32, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL, "perc_fm_harmonic", "P: Modulator Frq" },
-    { 0,          0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "perc_vel2fm", "P: Vel->FM" },
-    
-    { 0,         0,  organ_voice_base::perctrig_count - 1, 0, PF_ENUM | PF_CTL_COMBO, organ_percussion_trigger_names, "perc_trigger", "P: Trigger" },
-    { 90,      0,360, 361, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "perc_stereo", "P: Stereo Phase" },
-
-    { 0,         0,  1, 0, PF_BOOL | PF_CTL_TOGGLE, NULL, "filter_chain", "Filter 1 To 2" },
-    { 0.1,         0,  1, 100, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_PROP_OUTPUT_GAIN, NULL, "master", "Volume" },
-    
-    { 2000,   20, 20000, 100, PF_FLOAT | PF_SCALE_LOG | PF_UNIT_HZ | PF_CTL_KNOB, NULL, "f1_cutoff", "F1 Cutoff" },
-    { 2,        0.7,    8,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB, NULL, "f1_res", "F1 Res" },
-    { 8000,  -10800,10800,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "f1_env1", "F1 Env1" },
-    { 0,     -10800,10800,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "f1_env2", "F1 Env2" },
-    { 0,     -10800,10800,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "f1_env3", "F1 Env3" },
-    { 0,          0,    2,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "f1_keyf", "F1 KeyFollow" },
-
-    { 2000,   20, 20000, 100, PF_FLOAT | PF_SCALE_LOG | PF_UNIT_HZ | PF_CTL_KNOB, NULL, "f2_cutoff", "F2 Cutoff" },
-    { 2,        0.7,    8,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB, NULL, "f2_res", "F2 Res" },
-    { 0,     -10800,10800,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "f2_env1", "F2 Env1" },
-    { 8000,  -10800,10800,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "f2_env2", "F2 Env2" },
-    { 0,     -10800,10800,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "f2_env3", "F2 Env3" },
-    { 0,          0,    2,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "f2_keyf", "F2 KeyFollow" },
-
-    { 1,          1,20000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr_a", "EG1 Attack" },
-    { 350,       10,20000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr_d", "EG1 Decay" },
-    { 0.5,        0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "adsr_s", "EG1 Sustain" },
-    { 50,       10,20000,     0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr_r", "EG1 Release" },
-    { 0,          0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "adsr_v", "EG1 VelMod" },
-    { 0,  0, organ_voice_base::ampctl_count - 1,
-                              0, PF_INT | PF_CTL_COMBO, organ_ampctl_names, "eg1_amp_ctl", "EG1 To Amp"},
-
-    { 1,          1,20000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr2_a", "EG2 Attack" },
-    { 350,       10,20000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr2_d", "EG2 Decay" },
-    { 0.5,        0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "adsr2_s", "EG2 Sustain" },
-    { 50,       10,20000,     0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr2_r", "EG2 Release" },
-    { 0,          0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "adsr2_v", "EG2 VelMod" },
-    { 0,  0, organ_voice_base::ampctl_count - 1,
-                              0, PF_INT | PF_CTL_COMBO, organ_ampctl_names, "eg2_amp_ctl", "EG2 To Amp"},
-
-    { 1,          1,20000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr3_a", "EG3 Attack" },
-    { 350,       10,20000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr3_d", "EG3 Decay" },
-    { 0.5,        0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "adsr3_s", "EG3 Sustain" },
-    { 50,       10,20000,     0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "adsr3_r", "EG3 Release" },
-    { 0,          0,    1,    0, PF_FLOAT | PF_SCALE_PERC, NULL, "adsr3_v", "EG3 VelMod" },
-    { 0,  0, organ_voice_base::ampctl_count - 1,
-                              0, PF_INT | PF_CTL_COMBO, organ_ampctl_names, "eg3_amp_ctl", "EG3 To Amp"},
-
-    { 6.6,     0.01,   80,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_HZ, NULL, "vib_rate", "Vib Rate" },
-    { 0.5,        0,    1,    0, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB , NULL, "vib_amt", "Vib Mod Amt" },
-    { 0.5,        0,    1,    0, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB , NULL, "vib_wet", "Vib Wet" },
-    { 180,        0,  360,    0, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "vib_phase", "Vib Stereo" },
-    { organ_voice_base::lfomode_global,        0,  organ_voice_base::lfomode_count - 1,    0, PF_ENUM | PF_CTL_COMBO, organ_vibrato_mode_names, "vib_mode", "Vib Mode" },
-//    { 0,  0, organ_voice_base::ampctl_count - 1,
-//                              0, PF_INT | PF_CTL_COMBO, organ_ampctl_names, "vel_amp_ctl", "Vel To Amp"},
-
-    { -12,        -24, 24,   49, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_SEMITONES, NULL, "transpose", "Transpose" },
-    { 0,       -100,  100,  201, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune", "Detune" },
-};
-
 ////////////////////////////////////////////////////////////////////////////
 
 organ_voice_base::small_wave_family (*organ_voice_base::waves)[organ_voice_base::wave_count_small];
diff --git a/src/utils.cpp b/src/utils.cpp
index 68799a1..bd48553 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -69,6 +69,22 @@ std::string xml_escape(const std::string &src)
     return dest;
 }
 
+std::string load_file(const std::string &src)
+{
+    std::string str;
+    FILE *f = fopen(src.c_str(), "rb");
+    if (!f)
+        throw file_exception(src);
+    while(!feof(f))
+    {
+        char buffer[1024];
+        int len = fread(buffer, 1, sizeof(buffer), f);
+        if (len < 0)
+            throw file_exception(src);
+        str += string(buffer, len);
+    }
+    return str;
+}
 
 std::string i2s(int value)
 {

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list