commit a0dedf1fc5510aef2660e8e40b0cb96878a9dd5b
parent 9b9a93239f84fb8ae08bcb1ca33eb7b10a6c0737
Author: Johannes Lorenz <johannes89@ist-einmalig.de>
Date: Tue, 11 Oct 2016 21:41:17 +0200
Correct min-/max-values in FilterParams. Recompute parameters after DynFilter paste.
Diffstat:
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/Effects/EffectMgr.cpp b/src/Effects/EffectMgr.cpp
@@ -459,6 +459,7 @@ void EffectMgr::paste(EffectMgr &e)
std::swap(filterpars, e.filterpars);
efx->filterpars = filterpars;
}
+ cleanup(); // cleanup the effect and recompute its parameters
}
void EffectMgr::add2XML(XMLwrapper& xml)
diff --git a/src/Misc/Util.h b/src/Misc/Util.h
@@ -20,6 +20,9 @@
#include <algorithm>
#include <set>
+#include <rtosc/ports.h>
+#include <rtosc/port-sugar.h>
+
using std::min;
using std::max;
diff --git a/src/Params/FilterParams.cpp b/src/Params/FilterParams.cpp
@@ -73,8 +73,8 @@ const rtosc::Ports FilterParams::ports = {
rParamZyn(Pfreqtrack, rShort("f.track"),
"Frequency Tracking amount"),
rParamZyn(Pgain, rShort("gain"), "Output Gain"),
- rParamZyn(Pnumformants, rShort("formants"),
- "Number of formants to be used"),
+ rParamI(Pnumformants, rShort("formants"),
+ rLinear(1,12), "Number of formants to be used"),
rParamZyn(Pformantslowness, rShort("slew"),
"Rate that formants change"),
rParamZyn(Pvowelclearness, rShort("clarity"),
@@ -84,12 +84,11 @@ const rtosc::Ports FilterParams::ports = {
rParamZyn(Poctavesfreq, rShort("octaves"),
"Number of octaves for formant"),
- //TODO check if FF_MAX_SEQUENCE is acutally expanded or not
- rParamZyn(Psequencesize, rShort("seq.size"), rMap(max, FF_MAX_SEQUENCE), "Length of vowel sequence"),
+ rParamI(Psequencesize, rShort("seq.size"), rLinear(0, FF_MAX_SEQUENCE), "Length of vowel sequence"),
rParamZyn(Psequencestretch, rShort("seq.str"), "How modulators stretch the sequence"),
rToggle(Psequencereversed, rShort("reverse"), "If the modulator input is inverted"),
- {"vowel_seq#" STRINGIFY(FF_MAX_SEQUENCE) "::i", "", NULL,
+ {"vowel_seq#" STRINGIFY(FF_MAX_SEQUENCE) "::i", rShort("vowel") rDoc("Vowel number of this sequence position"), NULL,
[](const char *msg, RtData &d){
FilterParams *obj = (FilterParams *) d.obj;
const char *mm = msg;