summaryrefslogtreecommitdiff
path: root/muse2/muse
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2012-11-17 10:03:17 +0000
committerTim E. Real <termtech@rogers.com>2012-11-17 10:03:17 +0000
commit09ac0c4c9a32cdba453812c4ac1199414fcc2719 (patch)
tree88147e3b93dfd17142d0c80f2117cc3c313ac518 /muse2/muse
parent499c8bfc244f631304fe0c15449a31b442ebe0d7 (diff)
Improved: Deicsonze soft synthesizer: Fixed crash, bugs, added ladspa plugins.
TODO: No plugin control automation. Log slider/entry ranges. Add delay wet/dry?
Diffstat (limited to 'muse2/muse')
-rw-r--r--muse2/muse/plugin.cpp3
-rw-r--r--muse2/muse/plugin.h1
-rw-r--r--muse2/muse/synth.cpp37
3 files changed, 29 insertions, 12 deletions
diff --git a/muse2/muse/plugin.cpp b/muse2/muse/plugin.cpp
index f1d817c9..9dc2005e 100644
--- a/muse2/muse/plugin.cpp
+++ b/muse2/muse/plugin.cpp
@@ -719,7 +719,8 @@ Plugin::Plugin(QFileInfo* f, const LADSPA_Descriptor* d, bool isDssi, bool isDss
Plugin::~Plugin()
{
if(plugin)
- delete plugin;
+ // delete plugin;
+ printf("Plugin::~Plugin Error: plugin is not NULL\n");
}
//---------------------------------------------------------
diff --git a/muse2/muse/plugin.h b/muse2/muse/plugin.h
index 4de0de11..25d434ca 100644
--- a/muse2/muse/plugin.h
+++ b/muse2/muse/plugin.h
@@ -391,6 +391,7 @@ class PluginI : public PluginIBase {
unsigned long parameters() const { return controlPorts; }
unsigned long parametersOut() const { return controlOutPorts; }
void setParam(unsigned long i, float val);
+ void putParam(unsigned long i, float val) { controls[i].val = controls[i].tmpVal = val; }
float param(unsigned long i) const { return controls[i].val; }
float paramOut(unsigned long i) const { return controlsOut[i].val; }
float defaultValue(unsigned long param) const;
diff --git a/muse2/muse/synth.cpp b/muse2/muse/synth.cpp
index 781cab3f..840365ee 100644
--- a/muse2/muse/synth.cpp
+++ b/muse2/muse/synth.cpp
@@ -880,22 +880,37 @@ const char* MessSynthIF::getPatchName(int channel, int prog, bool drum)
void MessSynthIF::populatePatchPopup(MusEGui::PopupMenu* menu, int ch, bool)
{
+ MusEGui::PopupMenu* hbank_menu = 0;
+ MusEGui::PopupMenu* lbank_menu = 0;
menu->clear();
const MidiPatch* mp = _mess->getPatchInfo(ch, 0);
while (mp) {
- int id = ((mp->hbank & 0xff) << 16)
- + ((mp->lbank & 0xff) << 8) + mp->prog;
- /* DELETETHIS 9
- int pgid = ((mp->hbank & 0xff) << 8) | (mp->lbank & 0xff) | 0x40000000;
- int itemnum = menu->indexOf(pgid);
- if(itemnum == -1)
+ if(mp->typ == MP_TYPE_HBANK)
{
- QPopupMenu* submenu = new QPopupMenu(menu);
- itemnum =
+ lbank_menu = 0;
+ hbank_menu = new MusEGui::PopupMenu(QString(mp->name), menu, true);
+ menu->addMenu(hbank_menu);
+ }
+ else
+ if(mp->typ == MP_TYPE_LBANK)
+ {
+ lbank_menu = new MusEGui::PopupMenu(QString(mp->name), menu, true);
+ hbank_menu->addMenu(lbank_menu);
+ }
+ else
+ {
+ int id = ((mp->hbank & 0xff) << 16)
+ + ((mp->lbank & 0xff) << 8) + mp->prog;
+ MusEGui::PopupMenu* m;
+ if(lbank_menu)
+ m = lbank_menu;
+ else if(hbank_menu)
+ m = hbank_menu;
+ else
+ m = menu;
+ QAction *act = m->addAction(QString(mp->name));
+ act->setData(id);
}
- */
- QAction *act = menu->addAction(QString(mp->name));
- act->setData(id);
mp = _mess->getPatchInfo(ch, mp);
}
}