[ANN] - zdf_svf (zero-delay feedback state variable filter)
Date | 2016-08-13 01:10 |
From | Steven Yi |
Subject | [ANN] - zdf_svf (zero-delay feedback state variable filter) |
Hi All, I've added a zero-delay feedback state variable filter to my libsyi project at: https://github.com/kunstmusik/libsyi/blob/master/zdf_svf.udo and a test file: https://github.com/kunstmusik/libsyi/blob/master/tests/zdf_svf.csd (Example audio available at: http://www.kunstmusik.com/zdf_svf.mp3) As noted in the UDO file, this is essentially a port of Will Pirkle's C++ code, based on Vadim Zavalishin's work with trapezoidal integrators and zero-delay feedback. I also consulted Oli Larkin's Max/MSP/Gen implementation. (Links provided in the UDO file.) I'm still studying all this, but thought it worth posting as-is. My eventual goal is to implement the various filters in Pirkle's and Zavalishin's texts and create a comparable set to what is available in Reaktor. Some notes: * There is no oversampling done at this time. I'll likely revisit this filter as I continue studying all of this, but I liked the sound of it already and thought it worth posting. * The example file uses linear adjustments to the filter's cutoff and damping controls. This is not ideal, but I used Blue's automation to write the test file and need to update Blue for logarithmic control. * The example also switches between filter types (lowpass, bandpass, highpass) abruptly every 32 measures. The signals are further processed by reverb and chorus, so there's a bit of an artifact when the filter types are switched. It's a condition of the test file rather than the filter. Thanks! steven Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2016-08-13 01:23 |
From | Oeyvind Brandtsegg |
Subject | Re: [ANN] - zdf_svf (zero-delay feedback state variable filter) |
Nice! 2016-08-12 17:10 GMT-07:00 Steven Yi |
Date | 2016-08-14 02:15 |
From | Steven Yi |
Subject | Re: [ANN] - zdf_svf (zero-delay feedback state variable filter) |
Update: I've implemented the 1-pole and 2-pole ZDF filters: https://github.com/kunstmusik/libsyi/blob/master/zdf.udo https://github.com/kunstmusik/libsyi/blob/master/tests/zdf.csd These are implemented as zdf_1pole, zdf_2pole, and zdf_2pole_notch. The first filter is a 1-pole (6dB) lowpass/highpass filter that takes in a cutoff frequency. The second filter is a 2-pole (12dB) lowpass/highpass/bandpass filter that takes in a cutoff frequency and Q-value for resonance. The last filter is like the second filter but adds a notch output. These UDOs should match up with Reaktor's "HP/LP 1-pole", "Multi 2-Pole", and "Multi/Notch 2-Pole" filters. Unlike the 2nd order filters in Reaktor, the UDO variants provide a Q argument instead of an R value. The Q value was used by Pirkle in his code and it made sense to me to use Q rather than R. Also, unlike Reaktor, I did not add "FM" variants that provide an additional F argument for frequency modulation. From what I understand, the F argument sums with the P argument (the main cutoff value) and one can just do that summing in the calling code for the UDOs. I will be continuing to go through the rest of the Reaktor filter types and adding to the zdf.udo file. Once I get the basic implementations done, I will go back to add oversampling options. I am also considering to remove the zdf_svf.udo, as it is essentially the same as the zdf_2pole UDO though using R instead of Q values. Thanks! steven On Fri, Aug 12, 2016 at 8:23 PM, Oeyvind Brandtsegg |
Date | 2016-08-14 09:21 |
From | Ffanci Silvain |
Subject | Re: [ANN] - zdf_svf (zero-delay feedback state variable filter) |
Steven Yi, Aug 13 2016: ... > I've added a zero-delay feedback state variable filter to my libsyi project at: > > https://github.com/kunstmusik/libsyi/blob/master/zdf_svf.udo Steven, this is great and I am looking forward to the future filters that you will add. I love your opcodes, they are so useful for popularly musical applications. <3 Thank you for sharing them with us. ... Ta-ta, ---- Ffanci * Homepage: https://freeshell.de/~silvain * Twitter: http://twitter.com/ffanci_silvain * GitHub: https://github.com/fsilvain Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2016-08-14 17:44 |
From | Tarmo Johannes |
Subject | Re: [ANN] - zdf_svf (zero-delay feedback state variable filter) |
Thanks a lot!
Very nice new mmbers to already so rich Csound filters' family.
Especially I enjoyed playing with zdf_2pole filter (the one with Q).
I am curious to hear, if Anton, you tell about the filters - you have worked a lot with different wualities of different filters recently.
Thanks! tarmo
On Saturday, August 13, 2016 09:15:53 PM you wrote: > Update: I've implemented the 1-pole and 2-pole ZDF filters: > > https://github.com/kunstmusik/libsyi/blob/master/zdf.udo > https://github.com/kunstmusik/libsyi/blob/master/tests/zdf.csd > > These are implemented as zdf_1pole, zdf_2pole, and zdf_2pole_notch. > The first filter is a 1-pole (6dB) lowpass/highpass filter that takes > in a cutoff frequency. The second filter is a 2-pole (12dB) > lowpass/highpass/bandpass filter that takes in a cutoff frequency and > Q-value for resonance. The last filter is like the second filter but > adds a notch output. These UDOs should match up with Reaktor's "HP/LP > 1-pole", "Multi 2-Pole", and "Multi/Notch 2-Pole" filters. > > Unlike the 2nd order filters in Reaktor, the UDO variants provide a Q > argument instead of an R value. The Q value was used by Pirkle in his > code and it made sense to me to use Q rather than R. > > Also, unlike Reaktor, I did not add "FM" variants that provide an > additional F argument for frequency modulation. From what I > understand, the F argument sums with the P argument (the main cutoff > value) and one can just do that summing in the calling code for the > UDOs. > > I will be continuing to go through the rest of the Reaktor filter > types and adding to the zdf.udo file. Once I get the basic > implementations done, I will go back to add oversampling options. I > am also considering to remove the zdf_svf.udo, as it is essentially > the same as the zdf_2pole UDO though using R instead of Q values. > > Thanks! > steven > > > > On Fri, Aug 12, 2016 at 8:23 PM, Oeyvind Brandtsegg > > <oyvind.brandtsegg@ntnu.no> wrote: > > Nice! > > > > 2016-08-12 17:10 GMT-07:00 Steven Yi <stevenyi@gmail.com>: > >> Hi All, > >> > >> I've added a zero-delay feedback state variable filter to my libsyi > >> project at: > >> > >> https://github.com/kunstmusik/libsyi/blob/master/zdf_svf.udo > >> > >> and a test file: > >> > >> https://github.com/kunstmusik/libsyi/blob/master/tests/zdf_svf.csd > >> > >> (Example audio available at: http://www.kunstmusik.com/zdf_svf.mp3) > >> > >> As noted in the UDO file, this is essentially a port of Will Pirkle's > >> C++ code, based on Vadim Zavalishin's work with trapezoidal > >> integrators and zero-delay feedback. I also consulted Oli Larkin's > >> Max/MSP/Gen implementation. (Links provided in the UDO file.) > >> > >> I'm still studying all this, but thought it worth posting as-is. My > >> eventual goal is to implement the various filters in Pirkle's and > >> Zavalishin's texts and create a comparable set to what is available in > >> Reaktor. > >> > >> Some notes: > >> > >> * There is no oversampling done at this time. I'll likely revisit this > >> filter as I continue studying all of this, but I liked the sound of it > >> already and thought it worth posting. > >> * The example file uses linear adjustments to the filter's cutoff and > >> damping controls. This is not ideal, but I used Blue's automation to > >> write the test file and need to update Blue for logarithmic control. > >> * The example also switches between filter types (lowpass, bandpass, > >> highpass) abruptly every 32 measures. The signals are further > >> processed by reverb and chorus, so there's a bit of an artifact when > >> the filter types are switched. It's a condition of the test file > >> rather than the filter. > >> > >> Thanks! > >> steven > >> > >> Csound mailing list > >> Csound@listserv.heanet.ie > >> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND > >> Send bugs reports to > >> > >> https://github.com/csound/csound/issues > >> > >> Discussions of bugs and features can be posted here > > > > -- > > > > Oeyvind Brandtsegg > > Professor of Music Technology > > NTNU > > 7491 Trondheim > > Norway > > Cell: +47 92 203 205 > > > > http://www.partikkelaudio.com/ > > http://soundcloud.com/brandtsegg > > http://flyndresang.no/ > > http://soundcloud.com/t-emp > > > > Csound mailing list > > Csound@listserv.heanet.ie > > https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND > > Send bugs reports to > > > > https://github.com/csound/csound/issues > > > > Discussions of bugs and features can be posted here > > Csound mailing list > Csound@listserv.heanet.ie > https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND > Send bugs reports to > https://github.com/csound/csound/issues > Discussions of bugs and features can be posted here
|
Date | 2016-08-14 18:05 |
From | Steven Yi |
Subject | Re: [ANN] - zdf_svf (zero-delay feedback state variable filter) |
Thanks Ffanci and Tarmo! Just FYI, I've added zdf_allpass_1pole (1pole allpass filter) and zdf_ladder (moog ladder style, 4-pole 24db filter). The "Ladder Filter" in Reaktor has outputs for lp1, lp2, lp3, and lp4, which correspond to 1-, 2-, 3-, and 4-pole output. I'm not really sure how that works, if it's just tapping the values after each 1-pole filter's output, or if there's something more going on. I'm not sure how useful the lp1, lp2, and lp3 would be, so I just went with generating just the 4-pole signal. The test file has a comparison of the zdf_ladder and moogladder opcodes at time 80. (You can skip to it using "csound zdf.csd -o dac -+skip_seconds=80"), and a small test at time 70. For the ladder filters, I thought using resonance as an argument would be easier than Q. The R value is calculated as just (1 - resonance), and then R is converted to Q. This gives the range for resonance as 0-1 (well, just shy of 1, I limit it within the code to avoid exploding the filter). For the ladder code, I'm using the same calculation for k as Pirkle (i.,e, "k = 4.0*(Q - 0.707)/(25.0 - 0.707);"). I have not studied this part closely yet, so I am using it as-is. Thanks! steven On Sun, Aug 14, 2016 at 12:44 PM, Tarmo Johannes |
Date | 2016-08-20 01:05 |
From | Kevin Welsh |
Subject | Re: [ANN] - zdf_svf (zero-delay feedback state variable filter) |
The examples for this sound awesome! I can't wait to implement it into a few of my instruments to try it out for myself. Thanks for sharing it with us, Steven! On Sun, Aug 14, 2016 at 1:05 PM, Steven Yi <stevenyi@gmail.com> wrote: Thanks Ffanci and Tarmo! |
Date | 2016-08-20 08:22 |
From | Steven Yi |
Subject | Re: [ANN] - zdf_svf (zero-delay feedback state variable filter) |
Glad you're enjoying it, Kevin! I've been away the past few days but I'm looking forward to working on these again this coming week. I've also been working on some other UDOs for doing more modular-style sound programming: https://github.com/kunstmusik/libsyi/blob/master/gatesig.udo https://github.com/kunstmusik/libsyi/blob/master/seqsig.udo https://github.com/kunstmusik/libsyi/blob/master/tests/gate.csd The seqsig UDO and some of what I'm working on is close to what Gabriel Maldonado introduced in things like trigseq, but having to do more at audio-rate and using things like arrays, which I can experiment with live coding in Vim. I've been thinking off an on about differences between electronic and computer music practices and enjoying exploring the different approaches for myself. (These UDOs, like the zdf ones, should be considered not quite finished yet, and may potentially change in the short term while getting ironed out.) On Fri, Aug 19, 2016 at 5:05 PM, Kevin Welsh |
Date | 2016-08-23 10:27 |
From | Anton Kholomiov |
Subject | Re: [ANN] - zdf_svf (zero-delay feedback state variable filter) |
That's so cool Steven! Thanks for sharing. I hope to reuse them in my lib as things get settled down! I'd like to sort the csound filters out and make them defined on the same parameters (where possible) with the same ranges. Sometimes it can be tricky to memorize all the peculiarities of different filters. 2016-08-20 11:22 GMT+04:00 Steven Yi <stevenyi@gmail.com>: Glad you're enjoying it, Kevin! I've been away the past few days but |
Date | 2016-08-23 10:35 |
From | Anton Kholomiov |
Subject | Re: [ANN] - zdf_svf (zero-delay feedback state variable filter) |
The addition of the new filters to the family is really a multiplication of possibilities,Someimes I ponder the idea of parametrizing audio patches with 2016-08-23 13:27 GMT+04:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-08-25 07:20 |
From | Anton Kholomiov |
Subject | Re: [ANN] - zdf_svf (zero-delay feedback state variable filter) |
The NI guys are discussing this stuff too. They explore the ZDF filters with saturation:https://www.native-instruments.com/forum/threads/zero-delay-feedback-filters.192209/page-3 2016-08-23 13:35 GMT+04:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-08-25 16:24 |
From | Steven Yi |
Subject | Re: [ANN] - zdf_svf (zero-delay feedback state variable filter) |
Hi Anton, Hope the filters are useful! Thanks for posting those links. I had seen them before but it's worth reviewing for me at this point. I've gotten a bit sidetracked this week with implementing a modular-style sequencer (modeling somewhat on the Doepfer Schaltwerk http://www.doepfer.de/sw_e.htm) and fighting with multi-dimensional arrays. I'll be returning to the zdf stuff after that though. All best! steven On Thu, Aug 25, 2016 at 2:20 AM, Anton Kholomiov |
Date | 2016-08-26 07:25 |
From | "Dr. Richard Boulanger" |
Subject | Re: [ANN] - zdf_svf (zero-delay feedback state variable filter) |
Nice! Thanks. -dB On Fri, Aug 12, 2016 at 8:10 PM, Steven Yi <stevenyi@gmail.com> wrote: Hi All, _____________________________________________ Dr. Richard Boulanger Professor of Electronic Production and Design Professional Writing and Music Technology Division Berklee College of Music ______________________________________________ President of Boulanger Labs - http://boulangerlabs.com Author & Editor of The Csound Book - http://mitpress.mit.edu/books/csound-book Author & Editor of The Audio Programming Book - http://mitpress.mit.edu/books/audio-programming-book ______________________________________________ about: http://www.boulangerlabs.com/about/richardboulanger/ about: http://www.csounds.com/community/developers/dr-richard-boulanger/ music: http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/ ______________________________________________ email: rboulanger@berklee.edu facebook: https://www.facebook.com/richard.boulanger.58 |