SuperCollider Forum
May 22, 2013, 05:34:32 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: The SuperCollider forum is currently experiencing a rash of spambot registrations. New user requests may not be approved quickly as a result -- and if your email address looks like spam, it might not be approved at all. We are working to improve the security of the registration process, and to provide alternate means to contact the administrators to get a new account. Thanks for your patience.
 
   Home   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: FOS and SOS and Filters  (Read 5019 times)
0 Members and 1 Guest are viewing this topic.
daf
Guest
« on: March 27, 2006, 05:34:24 PM »

Anyone know how the filtergraph~ object in maxmsp works? Or could point me at docs which might help me understand this polynomial blah blah pole zero stuff so that I could maybe have a go at making something like it in SC?

Like, is it possible to make reasonably arbitrary filter shapes with SOS or FOS?
I'm thinking about blackrains Biquad classes.
Logged
blackrain
Newbie
*

Karma: 0
Posts: 14


View Profile WWW
« Reply #1 on: April 01, 2006, 08:28:06 AM »

hi daf,
this info can be found in "The Scientist and Engineer's
Guide to Digital Signal Processing" http://www.dspguide.com/
the book is free to d/l or read online (consult the license).
you may find chapter 21 contents extremely useful.

the BEQSuite is based on "Cookbook formulae for audio EQ biquad filter coefficients" by Robert Bristow-Johnson posted initially at the musicdsp mail list.

you can find lots of useful dsp info (not only about biquads) here:
http://www.dspguru.com/
or here:
http://www.musicdsp.org/archive.php

here's 2 more filters for SOS:

// 12dB/oct rolloff LPF
// Patrice Tarrabia from MusicDSP dot org
PTLPF : UGen {
   // rez amount from sqrt(2) to ~ 0.1
   *dump { arg in, cutoff=2200.0, res=1.0;
      var a1,a2,a3,b1,b2,c,csq;
      c = (tan(pi * cutoff / Server.default.sampleRate)).reciprocal;
      csq = c.squared;
      a1 = ( 1.0 + (res * c) + csq).reciprocal;
      a2 = 2 * a1;
      a3 = a1;
      b1 = 2.0 * ( 1.0 - csq) * a1;
      b2 = ( 1.0 - (res * c) + csq) * a1;
      ^[a1, a2, a3, b1.neg, b2.neg]
   }
}

// 12dB/oct rolloff LPF
// Patrice Tarrabia from MusicDSP dot org
PTHPF : UGen {
   // rez amount from sqrt(2) to ~ 0.1
   *dump { arg in, cutoff=110.0, res=1.0;
      var a1,a2,a3,b1,b2,c,csq;
        c = tan(pi * cutoff / Server.default.sampleRate);
      csq = c.squared;
      a1 = ( 1.0 + (res * c) + csq).reciprocal;
      a2 = -2*a1;
      a3 = a1;
      b1 = 2.0 * (csq - 1.0) * a1;
      b2 = ( 1.0 - (res * c) + csq) * a1;
      ^[a1, a2, a3, b1.neg, b2.neg]
   }
}

//-----------------------------------------------------------------

can change the ^[..... blah for:
 SOS.ar(in, a1......

or hook it out in your func with SOS.ar if you want to inspect the coeffs or something..

plotting...
there is some code to plot biquad coeffs response curves in the links above.

cheers,

x



Logged
daf
Jr. Member
**

Karma: 0
Posts: 57


View Profile
« Reply #2 on: April 01, 2006, 04:51:56 PM »

those are the links i was looking for... disappeared with the old scforum Sad
thankyou blackrain Smiley
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!