AnalogFilter: Let setfreq_and_q() update coeffs when needed (#347)
commitbf45378ec123f8f1422807b6e01adfcf402a9007
authorRicard Wanderlof <polluxsynth@butoba.net>
Sun, 13 Mar 2022 22:36:04 +0000 (13 23:36 +0100)
committerMark McCurry <mark.d.mccurry@gmail.com>
Sun, 20 Mar 2022 15:56:18 +0000 (20 11:56 -0400)
treee9d35c09bd33ef81b1546acfdab362c88bf6ee0f
parent6e25116ee8dded8d5ebd22fc5d8ef922fae11265
AnalogFilter: Let setfreq_and_q() update coeffs when needed (#347)

For the Analog filter (only), only the frequency was updated when
the setfreq_and_q() method was called. The consequence of this was
that updating the Q would only have an effect if for some reason
the frequency was being updated at the same time, for instance
because it was being swept by the envelope.

This also fixes the problem that changing MIDI CC#71 (filter Q)
would not have any effect until MIDI CC#74 (filter freq) was also
changed.

Fix by forcing recompute of the coefficients if Q was changed.
src/DSP/AnalogFilter.cpp