zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 403992961dc109dab15840275c3d6461ebcd4b46
parent 6de7be1e8cce0c1a599e95e0a95370602478dc07
Author: fundamental <[email protected]>
Date:   Mon,  3 Aug 2015 17:06:40 -0400

UI: Fix Filter Graph Rebase Bug

Fixes Bug #81

Diffstat:
Msrc/UI/EnvelopeFreeEdit.cpp | 10++++++++++
Msrc/UI/EnvelopeFreeEdit.h | 9+++++----
Msrc/UI/Fl_OscilSpectrum.h | 2+-
Msrc/UI/Fl_PADnoteOvertonePosition.h | 2+-
Msrc/UI/FormantFilterGraph.H | 2+-
5 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/src/UI/EnvelopeFreeEdit.cpp b/src/UI/EnvelopeFreeEdit.cpp @@ -223,3 +223,13 @@ void EnvelopeFreeEdit::update(void) oscWrite("Penvval"); oscWrite("Penvsustain"); } + +void EnvelopeFreeEdit::rebase(std::string new_base) +{ + osc->renameLink(loc+"Penvpoints", new_base+"Penvpoints", this); + osc->renameLink(loc+"Penvdt", new_base+"Penvdt", this); + osc->renameLink(loc+"Penvval", new_base+"Penvval", this); + osc->renameLink(loc+"Penvsustain", new_base+"Penvsustain", this); + loc = new_base; + update(); +} diff --git a/src/UI/EnvelopeFreeEdit.h b/src/UI/EnvelopeFreeEdit.h @@ -13,17 +13,18 @@ #define ENV_ADSR_FILTER 4 #define ENV_ADSR_BW 5 -class EnvelopeFreeEdit : public Fl_Box, Fl_Osc_Widget +class EnvelopeFreeEdit : public Fl_Box, public Fl_Osc_Widget { public: EnvelopeFreeEdit(int x,int y, int w, int h, const char *label=0); void init(void); void setpair(Fl_Box *pair_); - int handle(int event); + int handle(int event) override; - void draw(void); + void draw(void) override; void OSC_raw(const char *msg) override; - void update(void); + void update(void) override; + void rebase(std::string new_base) override; int lastpoint; diff --git a/src/UI/Fl_OscilSpectrum.h b/src/UI/Fl_OscilSpectrum.h @@ -4,7 +4,7 @@ #include "Fl_Osc_Widget.H" //consider merging with Fl_Oscilloscope -class Fl_OscilSpectrum : public Fl_Box, Fl_Osc_Widget +class Fl_OscilSpectrum : public Fl_Box, public Fl_Osc_Widget { public: Fl_OscilSpectrum(int x,int y, int w, int h, const char *label=0) diff --git a/src/UI/Fl_PADnoteOvertonePosition.h b/src/UI/Fl_PADnoteOvertonePosition.h @@ -6,7 +6,7 @@ #include "Fl_Osc_Widget.H" #include "Fl_Osc_Interface.h" -class PADnoteOvertonePosition: public Fl_Box, Fl_Osc_Widget +class PADnoteOvertonePosition: public Fl_Box, public Fl_Osc_Widget { public: PADnoteOvertonePosition(int x,int y, int w, int h, const char *label=0) diff --git a/src/UI/FormantFilterGraph.H b/src/UI/FormantFilterGraph.H @@ -13,7 +13,7 @@ class FilterParams; -class FormantFilterGraph : public Fl_Box, Fl_Osc_Widget { +class FormantFilterGraph : public Fl_Box, public Fl_Osc_Widget { public: FormantFilterGraph(int x,int y, int w, int h, const char *label=0); void init(int *nvowel_, int *nformant_);