{"id":293,"date":"2016-02-21T18:23:47","date_gmt":"2016-02-22T02:23:47","guid":{"rendered":"http:\/\/www.earlevel.com\/main\/?p=293"},"modified":"2019-11-18T23:34:13","modified_gmt":"2019-11-19T07:34:13","slug":"filters-for-synths-starting-out","status":"publish","type":"post","link":"https:\/\/www.earlevel.com\/main\/2016\/02\/21\/filters-for-synths-starting-out\/","title":{"rendered":"Filters for synths\u2013starting out"},"content":{"rendered":"<p>We haven&#8217;t developed a synth filter here yet&#8230;<\/p>\n<h3>Filters we&#8217;ve presented<\/h3>\n<p>Biquads. While they are useful for many simple cases of filtering, they are not a good choice for analog synthesizer emulation. Most notably, they are poorly suited to time-varying parameters such as smooth filter sweeps.<\/p>\n<p>Hal Chamberlin\u2019s digital state variable filter, which has the advantage of independent control of filter frequency and resonance (Q), as well as simultaneous output of lowpass, bandpass, highpass, and notch filtering. While this served in many synthesizers over the years, using oversampling to fix its most glaring problem (limited frequency control range before losing stability), more modern design approaches offer far better performance.<\/p>\n<h3>What analog&nbsp;synths use<\/h3>\n<p>It\u2019s helpful to discuss what most people are used to before getting to digital implementations.<\/p>\n<p>For analog synthesizer emulation, two basic analog designs stand out, having withstood the test of time the best. The 24 dB\/octave (\u201cfour pole\u201d) Moog style (\u201ctransistor ladder\u201d) lowpass filter, and the 12 dB\/octave (\u201ctwo pole\u201d) state variable with its multiple outputs.<\/p>\n<p>There are other designs, including the \u201cdiode ladder\u201d design by Roland, the Steiner-Parker filter (basically Sallen-Key)\u2014these are some of the ways voltage control was solved in analog filters, resulting in characteristic sounds. We&#8217;ll limit discussion to the two standouts.<\/p>\n<h3>Where to start<\/h3>\n<p>The state-variable filter is the best place to start\u2014simple and versatile.<\/p>\n<p>And my choice for your first stop, for a simple filter that\u2019s scarcely more complex than a Chamberlin svf is Andrew Simper\u2019s trapezoidally integrated svf. There is enough detail and code in his pdf for anyone to implement a useable, flexible, and good sounding synthesizer filter\u2014also useable for other filtering applications such as equalization.<\/p>\n<p><a href=\"https:\/\/www.cytomic.com\/files\/dsp\/SvfLinearTrapOptimised2.pdf\">http:\/\/www.cytomic.com\/files\/dsp\/SvfLinearTrapOptimised2.pdf<\/a><\/p>\n<p>Dig into that for a start! (And <a href=\"https:\/\/www.cytomic.com\/technical-papers\">further reading from Andy<\/a>)<\/p>\n<h3>Bonus audio sample<\/h3>\n<p>Here is the sound of two of our sawtooth wavetable oscillators, detuned, through the SVF coded directly from Andy&#8217;s paper, with frequency swept from 20 kHz down through the audio range by our ADSR; note that such a sweep would blow up the Chamberlin implementation without oversampling:<\/p>\n<p>SVF lowpass sweep from 20 kHz<br \/>\n<!--[if lt IE 9]><script>document.createElement('audio');<\/script><![endif]-->\n<audio class=\"wp-audio-shortcode\" id=\"audio-293-1\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"\/main\/wp-content\/uploads\/2016\/02\/Detuned-saws-with-svf-sweep-from-20kHz.mp3?_=1\" \/><a href=\"\/main\/wp-content\/uploads\/2016\/02\/Detuned-saws-with-svf-sweep-from-20kHz.mp3\">\/main\/wp-content\/uploads\/2016\/02\/Detuned-saws-with-svf-sweep-from-20kHz.mp3<\/a><\/audio><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We haven&#8217;t developed a synth filter here yet&#8230; Filters we&#8217;ve presented Biquads. While they are useful for many simple cases of filtering, they are not a good choice for analog synthesizer emulation. Most notably, they are poorly suited to time-varying &hellip; <a href=\"https:\/\/www.earlevel.com\/main\/2016\/02\/21\/filters-for-synths-starting-out\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,8,9,23],"tags":[],"_links":{"self":[{"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/posts\/293"}],"collection":[{"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/comments?post=293"}],"version-history":[{"count":6,"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/posts\/293\/revisions"}],"predecessor-version":[{"id":949,"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/posts\/293\/revisions\/949"}],"wp:attachment":[{"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/media?parent=293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/categories?post=293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.earlevel.com\/main\/wp-json\/wp\/v2\/tags?post=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}