Hallo, Anton H?rnquist hat gesagt: // Anton H?rnquist wrote:
Frank - that was fast! Thanks!
I haven't had time to try it out yet but will report back when I get home. The csound opcode I've used myself is a modification of the original with signal input for cutoff (please find it attached). Signal input for both cutoff and resonance would of course be awesome.
I now made a version where cutoff and resonance are signals. This version is a bit more CPU intensive now, as some computations had to move into the DSP loop to react to the changes in center frequency.
I played a bit with a rational tanh approximation from the music-dsp list but it didn't sound good anymore. If someone wants to play with other approximations e.g. table lookup: Just change the function "mytanh".
The filter response gets nasty and loud if the center frequency is near or above the sampling rate. Maybe it should be restricted as well. But then, resonance at 1 will make everyone jump, too...
The updated code is at http://footils.org/pkg/moogladder-0.2.tgz
Frank