commit e398eb6a0b5667f2791f9c6d57928f7a042f76d3
parent fd6de50ff3542a9b4abc9eb48d6d879dbef79405
Author: Christopher A. Oliver <caowasteland@gmail.com>
Date: Sun, 18 Oct 2015 19:28:08 -0400
Add missing rebase for ADvoice formant filters
Diffstat:
3 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/UI/FilterUI.fl b/src/UI/FilterUI.fl
@@ -473,6 +473,7 @@ filterparamswindow->redraw();} {}
Function {rebase(std::string new_base)} {open
} {
code {
+ formantparswindow->rebase(new_base+"VoiceFilter/");
Fl_Osc_Group::rebase(new_base);
} {}
}
diff --git a/src/UI/FormantFilterGraph.H b/src/UI/FormantFilterGraph.H
@@ -24,6 +24,8 @@ class FormantFilterGraph : public Fl_Box, public Fl_Osc_Widget {
void OSC_value(int x, const char *) override;
void OSC_value(unsigned x, void *v) override;
+ void rebase(std::string new_base) override;
+
void updateVowel(int);
void updateFormant(int);
diff --git a/src/UI/FormantFilterGraph.cpp b/src/UI/FormantFilterGraph.cpp
@@ -83,6 +83,19 @@ void FormantFilterGraph::update(void)
oscWrite("Pq");
}
+void FormantFilterGraph::rebase(std::string new_base)
+{
+ osc->renameLink(loc+"Pvowels", new_base+"Pvowels", this);
+ osc->renameLink(loc+"Pnumformants", new_base+"Pnumformants", this);
+ osc->renameLink(loc+"Pstages", new_base+"Pstages", this);
+ osc->renameLink(loc+"Pcenterfreq", new_base+"Pcenterfreq", this);
+ osc->renameLink(loc+"Poctavesfreq", new_base+"Poctavesfreq", this);
+ osc->renameLink(loc+"Pgain", new_base+"Pgain", this);
+ osc->renameLink(loc+"Pq", new_base+"Pq", this);
+ loc = new_base;
+ update();
+}
+
//TODO A good portion of this is copy/pasta from EnvelopUI's widget
// REFACTOR!
void FormantFilterGraph::draw()