SynthMaker

Questions about the "state variable filter"

Archive · 2007 15 old posts

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

PaulRiedel ·

Hi! I have a couple of questions regarding the state variable filter module:

What are the edge steepnesses of the default filters (How many db/Octave)?

How does the Band Pass filter work? (I looked at the code, but I can't figure out what "bp1" is)

What is "multi"(0.33333333333333333333333333333333)?

I got the word "edge steepness" from a translator. Other possibilities for the correct way to translate "Flankensteilheit" are "rate of change" and "slew rate", in case you don't get what I'm asking for 😉

Thanks!

- Paul

OG Mike ·

I also would like to know what the attenuation slope is (dB/octave) Any idea anyone? Or SynthMaker staff...? 😀

stefan ·

It's 12dB / octave, except the bandpass, which is 6dB / octave.

The "multi" is just a precalced division by 3.0.

OG Mike ·

Cheers for the info,

What part would I have to change within the filter (state variable) to get it at a different slope?

I see the large coded part, would it be a simple case of changing a certain value in there at all?

One last thing, if it is in the code, would there be anyway to link a float or int. to the certain value, (so that it could be actively changed)?

stefan ·

OG Mike wrote: Cheers for the info,

What part would I have to change within the filter (state variable) to get it at a different slope?

I see the large coded part, would it be a simple case of changing a certain value in there at all?

You'd have to cascade several filters. That way you could get 12, 24, 36 etc dB/octave slopes. But you can't change the slope freely, you can only change it to integer multiples of the current slope.

OG Mike wrote: One last thing, if it is in the code, would there be anyway to link a float or int. to the certain value, (so that it could be actively changed)?

If it would've been possible to have a freely adjustable slope in the code for the SVF, then yes, you could've added a streamin in the code and used that. But, it isn't freely adjustable within the code.

OG Mike ·

OK then cheers.

I can multiply by integer multiples, but, where in the code is the slope part? where would I put the multiplyer?

can you give me a quick example code of how I would turn the SVF into a 24dB/octave slope?

It's a little confusing for me...

Cheers.

stefan ·

OG Mike wrote: OK then cheers.

I can multiply by integer multiples, but, where in the code is the slope part? where would I put the multiplyer?

can you give me a quick example code of how I would turn the SVF into a 24dB/octave slope?

It's a little confusing for me...

Cheers.

No, you don't use a multiplier and it's not in the code you'll make any changes. There's no "slope part" in the code. What I meant was just that by putting several state variable filters in series you could get a slope that is a multiple of 12 dB / octave.

You take two filters, connect your audio to the first filters input and the filters output to the next filters input. If you have both filters running at the same cutoff and using the same filter type, you'll get a 24dB/octave slope. If you use three instead you'll get 36dB/octave, etc.

OG Mike ·

ooohh, i see now!

Nice one, cheers...

One last thing then... where in the world does the actual slope part come from then??

stefan ·

OG Mike wrote: ooohh, i see now!

Nice one, cheers...

One last thing then... where in the world does the actual slope part come from then??

It's in the nature of the state variable filter. It can of course be derived doing some complex maths, but I think you'd find a better explanation by googling than asking me 🙂

PaulRiedel ·

stefan wrote: It's 12dB / octave, except the bandpass, which is 6dB / octave.

The "multi" is just a precalced division by 3.0.

Thanks alot Stefan!

Can you explain why the ~3.0 is used ín there? You seem to know it all, that's you're burdon 😉

Thanks!

- Paul

stefan ·

PaulRiedel wrote: stefan wrote: It's 12dB / octave, except the bandpass, which is 6dB / octave.

The "multi" is just a precalced division by 3.0.

Thanks alot Stefan!

Can you explain why the ~3.0 is used ín there? You seem to know it all, that's you're burdon 😉

Thanks!

- Paul

It's there because the average of the three calculated samples is used for the input. It's a triple-sampled filter since a single-sampled SVF isn't stable.

Burden schmurden.

PaulRiedel ·

hmm okay.. I don't quite get it yet but I believe you that it makes sense. No need to go into any more detail about that, I hope I can read about it in my books 🙂

Still back to one of my initial questions: How is the Bandwidth of the Bandpass filter defined?

Thanks!!

- Paul

stefan ·

PaulRiedel wrote: hmm okay.. I don't quite get it yet but I believe you that it makes sense. No need to go into any more detail about that, I hope I can read about it in my books 🙂

Still back to one of my initial questions: How is the Bandwidth of the Bandpass filter defined?

Thanks!!

- Paul

Hm. To be honest, I'm not sure it is. Since it's a 6dB/octave band pass filter I guess you MAYBE could consider the pass band to be 1/2 octave wide (half an octave from the cut-off frequency your signal is 3dB lower than at the cut-off), but I think that's probably not entirely true 🙂

PaulRiedel ·

Well your thoughts make sense, but do you know a way how to prove this without much doubt? (Have to do it for my thesis)

I connected Noise through the bandpass to an FFT and played with the cutoff, but the result was not very satifsying: Except for when a very low cutoff is chosen it seems like the whole bandwith is still present. As the sound is different and correct afaich(ch= can hear) I'm not sure about the FFT Analysis 🙁 You have an idea?

Thanks! - Paul

stefan ·

Ok, well, if you want to go all theoretical I guess you should derive the transfer function. You could do this either in the analog or digital domain. It's been quite a while since I dealt with such things, but in the analog domain I remember that it was fairly basic complex maths. Some DSP book should be able to provide you with the mathematical "tools" needed for defining the transfer function of any given output in a SVF, and hence also the frequency response for said function.

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.