Use brf_2p for 1p and disable the all-pass 1 pole filter
Can't really make it stable, I'll try to swap a delay-less version later on
This commit is contained in:
parent
f122469f07
commit
4358131a72
3 changed files with 6 additions and 7 deletions
|
|
@ -38,14 +38,13 @@ void sfz::FilterHolder::setup(const Region& region, unsigned filterId, int noteN
|
|||
}
|
||||
const auto keytrack = description->keytrack * float(noteNumber - description->keycenter);
|
||||
baseCutoff *= centsFactor(keytrack);
|
||||
auto veltrack = description->veltrack;
|
||||
|
||||
auto veltrack = description->veltrack;
|
||||
for (const auto& mod : description->veltrackCC) {
|
||||
const auto& curve = resources.getCurves().getCurve(mod.data.curve);
|
||||
const float value = resources.getMidiState().getCCValue(mod.cc);
|
||||
veltrack += curve.evalNormalized(value) * mod.data.modifier;
|
||||
}
|
||||
|
||||
baseCutoff *= centsFactor(veltrack * velocity);
|
||||
baseCutoff = Default::filterCutoff.bounds.clamp(baseCutoff);
|
||||
|
||||
|
|
|
|||
|
|
@ -414,8 +414,8 @@ absl::optional<FilterType> Opcode::readOptional(OpcodeSpec<FilterType>, absl::st
|
|||
case hash("bpf_2p"): return kFilterBpf2p;
|
||||
case hash("brf_2p"): return kFilterBrf2p;
|
||||
case hash("bpf_1p"): return kFilterBpf1p;
|
||||
case hash("brf_1p"): return kFilterBrf1p;
|
||||
case hash("apf_1p"): return kFilterApf1p;
|
||||
case hash("brf_1p"): return kFilterBrf2p; // Sforzando does this
|
||||
// case hash("apf_1p"): return kFilterApf1p; // TODO: replace with the delay-less version later
|
||||
case hash("lpf_2p_sv"): return kFilterLpf2pSv;
|
||||
case hash("hpf_2p_sv"): return kFilterHpf2pSv;
|
||||
case hash("bpf_2p_sv"): return kFilterBpf2pSv;
|
||||
|
|
@ -432,7 +432,7 @@ absl::optional<FilterType> Opcode::readOptional(OpcodeSpec<FilterType>, absl::st
|
|||
case hash("peq"): return kFilterPeq;
|
||||
}
|
||||
|
||||
DBG("Unknown filter type: " << value);
|
||||
DBG("Unknown/unsupported filter type: " << value);
|
||||
return absl::nullopt;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3090,8 +3090,8 @@ TEST_CASE("[Values] Filter types")
|
|||
"/region4/filter0/type,s : { bpf_2p }",
|
||||
"/region5/filter0/type,s : { brf_2p }",
|
||||
"/region6/filter0/type,s : { bpf_1p }",
|
||||
"/region7/filter0/type,s : { brf_1p }",
|
||||
"/region8/filter0/type,s : { apf_1p }",
|
||||
"/region7/filter0/type,s : { brf_2p }", // If we have a 1-pole brf at one point, change it back
|
||||
"/region8/filter0/type,s : { none }", // If the apf 1-pole works, change it back
|
||||
"/region9/filter0/type,s : { lpf_2p_sv }",
|
||||
"/region10/filter0/type,s : { hpf_2p_sv }",
|
||||
"/region11/filter0/type,s : { bpf_2p_sv }",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue