monome / aleph

open source sound computer
Other
79 stars 39 forks source link

Filter enhancements required for Voder Clone #264

Closed ghost closed 7 years ago

ghost commented 7 years ago

So one of the challenges in constructing a clone of Bell labs' voder is creating a 10-band crossover.

I plan to implement this as a network of linkwitz-reiley crossovers (or maybe experiment with non-cascaded butterworths first). Started hacking together biqaud.c off on my fork (totally didn't work on first try), before realising there is already a filter_2p.c in the main dev branch, and guessing that would be biquad by any other name... Looks unfinished - @catfact did you use that code at any point? Do you think there's much value in having a go-to fixed-point biquad implementation in there as well as the svf filters?

Anyway, planning to hack on svf code a bit to make it a bit more general, then figure out the magic inverse-q number in whatever radix that gives a butterworth. Probably try to do that without changing existing functionality there, at penalty of duplicating some code and bloating things a bit...

ezrasp commented 7 years ago

Iirc, I used the 2pole high-pass in something, but never used the others so just left them as stubs

ghost commented 7 years ago

humm... Weirdly I couldn't get anything cooking with the svf code inside my jack simulator. Pretty sure it's some numerical issue with my emulation of the bfin multiply.

Anyheeeww.... I did manage to get a 8.24 bit fractional biquad thingy cooking - seems to be working ok for 8 bands, though I haven't tested on the device yet or actually listened to things yet...

Would be good to get to the bottom of the svf filter mystery - linux/jack with the old single-sample processing is gonna be a super-productive environment for the kind of 'quick & easy' modules I want to work on in near future. will start a filter_test module in order to iron out some of the remaining bugs and get that basic filter toolkit in order...

ghost commented 7 years ago

No basic filter test-module, but a monosynth work in progress & a basically functional voder-clone so plenty of filter fun going on...

Read through svf filter code at some length for the monosynth and made some 'corrections'. Not going to pull-request this stuff without running that by @ezrasp as this could potentially affect waves/lines/dsyn. But it does seem to fix some bugs with the old svf code. Have a look at this commit:

https://github.com/rick-monster/aleph/commit/e6c270843de1090ca737086a76d227809effea74

At that commit, an as-yet-unfinished 'monosynth' module hooks in[2] to out[2] via the fixed svf code - should be able to verify this is actually fixing up some svf bugs by running white noise through the filter & analysing output spectrum. I use the program jaaa for that... http://kokkinizita.linuxaudio.org/linuxaudio/downloads/index.html

ghost commented 7 years ago

I'm calling this 'done' - there are a tonne of other 'hack on the filters' type of tickets on here I'd also like to close assuming my recent svf work can be merged...