Skip to content

Commit

Permalink
ParamDefs: Relabel "Response" as "Pole Count" with range 1..4
Browse files Browse the repository at this point in the history
1..4 corresponds to old 0..1 .
  • Loading branch information
Ricard Wanderlof committed Mar 29, 2024
1 parent 52cd4ea commit ccb31ea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions plugins/mimid/Engine/Filter.h
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion plugins/mimid/Engine/ParamDefs.h
Expand Up @@ -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)

Expand Down
3 changes: 2 additions & 1 deletion plugins/mimid/Engine/SynthEngine.h
Expand Up @@ -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)
{
Expand Down

0 comments on commit ccb31ea

Please sign in to comment.