SynthMaker

Cutoff Algorithm

Archive · 2005 7 old posts

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

djaram ·

Could someone help me to figure out how to write a simple code for cutoff?

I looked at the State variable Filter code, but couldn't really understand the procedure.

Is there a good DSP source so I can see what should be done on the stream?

Regards,

Shifrin ·

You might want to take a look at these :-

http://www.dsptutor.freeuk.com/dfilt1.htm http://www.biochem.oulu.fi/~oniemita/dsp/dspstuff.txt http://www.dspguide.com/

Then come back with any questions 😉 (Which I'm sure someone can help answer - probably not me though I only know enough to fiddle around with filters!).

Shif.

djaram ·

TYVM for the links Shiff,

They are really useful and what I was looking for.

Regards,

djaram ·

Ok I read some part of those but still I can't figure out what really Cutoff means in samples. I mean i know what is does but i don't know how it does it.

Is it a recursive function? Could someone put a very very simple code with comments?

Regards,

skOre ·

I have still got to really understand this, but AFAIK filters are actually the same signal copied, phase shifted and added again. Due to cancellations, parts of the signal are deleted.

A simple code would look like this:

streamin in; streamin cutoff; streamout LP; float out1; LP=LP+((in-out1)*cutoff); out1=LP;

But somebody else has to explain this 😀

stefan ·

In an IIR filter it can be viewed as recursive, since it relies on it's own previous calculations.

Basicly, the above example from sk0re is a function needing itself as input: f[x] = a * x + b * f[x-1], which indeed makes it recursive.

For FIR filters this doesn't apply though.

djaram ·

Thanks a lot, Stefan and Skore.

I'm gonna do some experiments based on this issue.

Regards,

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.