Based on a filter I derived from musicdsp.org several years ago iirc.
Doesn't need too much explanation:
cutoff and resonance input goes from 0.0 to 1.0, the resonance goes into self oscillation at 1.0.
Due to all the outputs you can easily put several filters in parallel or cascade them.
If you find this useful, feel free to reply and tell everybody how you used it.
Cheers!
lalo ·
amazing stephan!!!
many thanks!
lalo
stefan ·
triple-sampled version, stable up to nyquist
Tunable without any sin1() call:
Dunno if the compiler atm does stuff like translating x / 40 to x * (1/40) etc, but I doubt it. I'll probably nag at jorge and malc about it anyway 🙂
lalo ·
great stefan!
sorry if i ask again...can you do a little tutorial on the basics things that are happening math-wise...
for example ..how can you obtain the 3x oversampling?
i can't really understand it from the code....i think i lack some fundamental dsp concept about filtering
thanx
lalo
stefan ·
As you may notice, a part of the code is repeated three times. That is the oversampling part. Also I correct the cutoff frequency for a sampling frequency three times as high compared to the normal one.
Btw, change
x = 3.141592 * (cutoff / 36.0) * 2 * 3.141592;
into
x = 3.141592 * (cutoff / 38.0) * 2 * 3.141592;
for a better tuning and frequency response. I will do the correct maths later to see what actually is the exact formula.
lalo ·
..argh what a dummy am i....i see now...so the calculation is done 3 times per sample..thanx
lalo
malc ·
Thanks Stefan, great to see you trying things out.
lalo ·
hi stefan!
is the 0..1 range of cutoff linear to the 0...22050 range?
i ask you cause i'd like to have it mapped as log scale (am i right?)
in other words as our ear perceive frequency/pitch.
thanx
lalo
stefan ·
lalo wrote: hi stefan!
is the 0..1 range of cutoff linear to the 0...22050 range?
i ask you cause i'd like to have it mapped as log scale (am i right?)
in other words as our ear perceive frequency/pitch.
thanx
lalo
yes it is, I'd recommend that you for instance multiply the cutoff with 144 and then use a pitch to frequency converter to make it "linear for the ear" 🙂
Also, you can then add midi poly pitch to the cutoff (after you've multiplied the cutoff but before the conversion to frequency). It is tunable after all. Still haven't checked if the maths for the tuning is correct though, but I think they'll work just fine if you use the /38.0 version (see my earlier posts in this thread).
lalo ·
many thanx stefan 🙂
bManic ·
Just wanted to say thanks to stefan for his continued input and code!
Cheers!
bManic
stefan ·
Just give me some more days and I will have something real to show you guys 🙂 Thanks bManic 🙂
lalo ·
stefancrs wrote: Just give me some more days and I will have something real to show you guys 🙂 Thanks bManic 🙂
😀 😀
watch out guys 🙂
thank you very much stefan!!
lalo
Tom7777 ·
Thanks 🙂
Wrote something here? To have a post removed or your name hidden, write to [email protected].