SynthMaker

Another filter..

Archive · 2005 11 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

platinumears ·

Anal Filter

A tweaked (ie: gain compensated) version of the 'analogue filter' that comes with TobyBear's Filter Explorer.

Coefficients:

polyin freq; polyin res; polyout a1; polyout b1; polyout b2; float cut; float t0; float t1; float t2; float r; cut=max(freq,0.0002); cut=min(cut,0.5); r=res*res*10; t0=0.6*(0.86*cut); t1=cos1(t0); t2=sin1(t0)/(2.3*(r+0.5)); a1=0.08*(2.5-res)*(2.5-res)*(1-t1)/(1.0+t2); b1=(-2.0*t1)/(1.0+t2); b2=(1.0-t2)/(1.0+t2);

Kernel:

polyin in; polyin a1; polyin b1; polyin b2; polyout out; float in1; float in2; float out1; float out2; out=((in+in1*2.0+in2)*a1)-(out1*b1)-(out2*b2); in2=in1; in1=in; out2=out1; out1=out;

Any suggestions or improvements would be welcome of course.. 😉

Dan 🙂

Shifrin ·

Thanks for this Dan, I've had a look at the FilterExplorer filters before with the view of porting them to SM - you saved me some work and added gain compensation 🙂

Cheers,

Shif.

Nu Audio Science ·

@Dan How hard was it to port a filter from explorer, I know it puts out C++ syntax but not what it is like ?

I keep looking at explorer every now and again and just cant make my mind up if i will be able to use it 🙁

Shifrin ·

Porting something from Filter Explorer isn't too hard.

Load up one of the example filters, you'll notice some variables t0,t1,.. control values c0,c1,.. and the filter coeffecients a0,a1,a2,.. b1,b2,..

Bascially the control values correspond to filter cutoff, resonance and whatnot. Some temporary variables are then calculated using these control values. And finally the temporary variables are stuck into the filter coefficient calculations 🙂

So if we used 'c0' to be cutoff we could then do (as an example) :-

t0 = c0 t1 = -1.0*(1.0 - c0)

And then for the filter coeffecients :-

a0 = t0 b1 = t1;

This gives a simple low-pass filter.

To translate it into the code component we'd get :-

polyin in; polyin cutoff; polyout out;

float t0,t1,a0,a1;

t0 = cutoff; t1 = -1.0*(1.0 - cutoff)

a0 = t0; b1 = t1;

out = a0*in - b1*out;

This can be simplified, you don't need to use the t0,t1 they're just extra variables/steps.

Shif.

platinumears ·

Well, I ported this to a Synthedit module originally (which I found quite hard, mainly because my c++ is self-taught and very basic) so I actually ported this version from my c++ source.. the demo version of filter explorer will let you design this type of filter anyway, so there's probably no need to actually buy it till you get past the basics (I bought it so I could run it as a vst, and to show some support)

Dan 🙂

Nu Audio Science ·

Yeah thats the part that interest me, Running as a vst and designing the filters in my host.

Nu Audio Science ·

Cheers Shif 🙂

Tom7777 ·

Any suggestions or improvements would be welcome of course.. 😉

Nice filter 🙂 there seems to be blips of overdrive when moving the knobs fast and when moving the knobs slow the sound seems slightly quantized, i think that the quantized movement could be to do with the Pitch - Frequency module maybe though.

I think the overdrive is because you have made the reso higher than 1 but if you lower it you loose the filters sound so im not sure. But this is when you put the ADSRs gain up to it's max value though anyway.

Shifrin ·

Tom7777 wrote: and when moving the knobs slow the sound seems slightly quantized, i think that the quantized movement could be to do with the Pitch - Frequency module maybe though.

I could be wrong (it's often the case 😉 ) but the stepping you hear form the moving the knobs slow could have something to do with the fact the knob is running linearly from 0..1 where you might want it to run exponentially from 0..1, so you have finer resolution at lower values - just an idea.

Shif.

platinumears ·

Shifrin wrote: I could be wrong (it's often the case 😉 ) but the stepping you hear form the moving the knobs slow could have something to do with the fact the knob is running linearly from 0..1 where you might want it to run exponentially from 0..1, so you have finer resolution at lower values - just an idea.

Shif.

I think the Pitch 2 Frequency module is converting to a log scale..?

Tom777 wrote: Nice filter there seems to be blips of overdrive when moving the knobs fast and when moving the knobs slow the sound seems slightly quantized, i think that the quantized movement could be to do with the Pitch - Frequency module maybe though.

I suspect this may be down to knob resolution: try this one which has a slow envelope sweep.. sounds smooth to me! I haven't tried audio rate modulation yet.. I seem to remember the SE version of the Tarrabia filter became unstable if modulated too fast (so I had to code in 1pole lowpass filters for the modulation inputs) but I was never sure if that was down to the algorithm or just some mistake in my code!

Tom7777 ·

I think the Pitch 2 Frequency module is converting to a log scale..?

yeah i think that the convertion might be something like this.

I suspect this may be down to knob resolution: try this one which has a slow envelope sweep.. sounds smooth to me! I haven't tried audio rate modulation yet.. I seem to remember the SE version of the Tarrabia filter became unstable if modulated too fast (so I had to code in 1pole lowpass filters for the modulation inputs) but I was never sure if that was down to the algorithm or just some mistake in my code!

Thanks platinumears, sounds more smooth now 🙂

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.