surge-synthesizer / surge

Synthesizer plug-in (previously released as Vember Audio Surge)
https://surge-synthesizer.github.io/
GNU General Public License v3.0
3.09k stars 395 forks source link

COMB_SIZE sample rate dependent #7172

Closed baconpaul closed 1 year ago

baconpaul commented 1 year ago

GetQFPtrFilterUnit returns a COMB_sse<COMB_LENGHT> or <EXTENDED_COMB_LENGTH> in an if already

but that COMB_LENGTH means at 96khz sample rate your bottom comb frequency is about 93hz

so

  1. Modify sst-filters so getfqptrfu takes a same rate
  2. Fix the tests and examples
  3. Modify the 4 calling points in surge and upgrade the submodule
  4. Modify the calling point in surge-rack and upgrade the submodule
  5. Document the change so other users if they exist who pull can see the difference
baconpaul commented 1 year ago

This plan won't work

 struct
    {
        float Gain, FB, Mix1, Mix2, OutL, OutR, Out2L, Out2R, Drive, wsLPF, FBlineL, FBlineR;
        float Delay[4][sst::filters::utilities::MAX_FB_COMB +
                       sst::filters::utilities::SincTable::FIRipol_N];

that's the FBP which is allocated in a fixed array in voice which has fixed size.

So the template arg can be SR dependent but the storage which it projects onto can't

So really the only option here is: Increase MAX_FB_COMB by 2 or 4, or dont.

I vote to increase it by 2.