commit 389545877bb46a91fdce8b871ca1c412f93f5413
parent 84530babf7999efd53852138c9f187373bf7ad1f
Author: fundamental <mark.d.mccurry@gmail.com>
Date: Sat, 7 Nov 2015 13:25:51 -0500
Fix SysEfx Volume Routing
Resolves https://sourceforge.net/p/zynaddsubfx/bugs/99/
Diffstat:
2 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/src/Misc/Master.cpp b/src/Misc/Master.cpp
@@ -73,10 +73,11 @@ static const Ports sysefxPort =
int ind2 = atoi(m);
Master &mast = *(Master*)d.obj;
- if(rtosc_narguments(m))
+ if(rtosc_narguments(m)) {
mast.setPsysefxvol(ind2, ind1, rtosc_argument(m,0).i);
- else
- d.reply(d.loc, "i", mast.Psysefxvol[ind2][ind1]);
+ d.broadcast(d.loc, "i", mast.Psysefxvol[ind1][ind2]);
+ } else
+ d.reply(d.loc, "i", mast.Psysefxvol[ind1][ind2]);
}}
};
diff --git a/src/UI/PartUI.fl b/src/UI/PartUI.fl
@@ -61,7 +61,7 @@ class PartSysEffSend {open : {public Fl_Group}
private xywh {604 244 100 100} type Double box NO_BOX
class Fl_Group visible
} {
- Fl_Dial {} {
+ Fl_Dial widget {
label 01
xywh {0 0 25 25} box ROUND_UP_BOX labelfont 1 labelsize 10 align 130 maximum 127 step 1
code0 {o->size(25,25);}
@@ -83,6 +83,19 @@ make_window();
syseffsend->show();
end();} {}
}
+ Function {rebase(int part)} {} {
+ code {
+ auto *osc = widget->osc;
+ std::string old = "Psysefxvol"+to_s(neff)+"/part"+to_s(npart);
+ std::string next = "Psysefxvol"+to_s(neff)+"/part"+to_s(part);
+ widget->ext = next;
+ osc->renameLink("/"+old, "/"+next, widget);
+ osc->requestValue("/"+next);
+ printf("changing <%s> -> <%s>\\n", old.c_str(), next.c_str());
+ npart = part;
+ } {}
+ }
+
Function {~PartSysEffSend()} {} {
code {syseffsend->hide();
//delete(syseffsend);} {}
@@ -1186,6 +1199,12 @@ partfx->rebase(new_loc);
instrumentkitlist->rebase(new_loc);
instrumenteditwindow->rebase(new_loc);
partenablebutton->rebase(new_loc);
+int next_part = 0;
+const char *tmp = new_loc.c_str();
+while(*tmp && !isdigit(*tmp)) tmp++;
+next_part = atoi(tmp);
+for (int i=0;i<NUM_SYS_EFX;i++)
+ psyef[i]->rebase(next_part);
} {selected
}
}