diff --git a/plugins/mimid/Engine/Filter.h b/plugins/mimid/Engine/Filter.h index b91bafc..482ad6f 100644 --- a/plugins/mimid/Engine/Filter.h +++ b/plugins/mimid/Engine/Filter.h @@ -58,9 +58,10 @@ class Filter } void setResponse(float m) { + // m = 0..3 (4 pole down to 1 pole) mm = m; - mmch = (int)(mm * 3); - mmt = mm*3-mmch; + mmch = (int)mm; + mmt = mm - mmch; } inline void setSampleRate(float sr) { diff --git a/plugins/mimid/Engine/ParamDefs.h b/plugins/mimid/Engine/ParamDefs.h index df8daba..c58cc0a 100644 --- a/plugins/mimid/Engine/ParamDefs.h +++ b/plugins/mimid/Engine/ParamDefs.h @@ -174,7 +174,7 @@ PARAM(ENVELOPE_AMT, PG_FILTER, SP_NONE, "EnvAmount", "filterenvamount", 0.0, 1.0, 0.0, processFilterEnvelopeAmt) // Filter configuration - PARAM(RESPONSE, PG_FILTERCFG, SP_NONE, "Response", "response", 0.0, 1.0, 0.0, processResponse) + PARAM(RESPONSE, PG_FILTERCFG, SP_NONE, "Pole Count", "response", 1.0, 4.0, 4.0, processResponse) PARAM(FENV_INVERT, PG_FILTERCFG, SP_ONOFF, "Env Invert", "fenvinvert", 0.0, SP_MAX, 0.0, processInvertFenv) PARAM(FENV_LINEAR, PG_FILTERCFG, SP_ONOFF, "Linear Env", "fenvlinear", 0.0, SP_MAX, 0.0, procFenvLinear) diff --git a/plugins/mimid/Engine/SynthEngine.h b/plugins/mimid/Engine/SynthEngine.h index 0f8f56c..8b05201 100644 --- a/plugins/mimid/Engine/SynthEngine.h +++ b/plugins/mimid/Engine/SynthEngine.h @@ -522,7 +522,8 @@ class SynthEngine } void processResponse(float param) { - ForEachVoice(flt.setResponse(linsc(param,0,1))); + // Pole count 1 .. 4 (continuous) + ForEachVoice(flt.setResponse(4 - param)); } void processOversampling(float param) {