Re: [music-dsp] Efficiently modulate filter coefficients without artifacts?
On 2/1/15 6:32 AM, Ross Bencina wrote: Hello Alan, On 1/02/2015 4:51 AM, Alan O Cinneide wrote: > Dear List, > > While filtering an audio stream, I'd like to change the filter's > characteristics. You didn't say what kind of filter, so I'll assume a bi-quad section. > In order to do this without audible artifacts, I've been filtering a > concurrent audio buffer (long enough so that the initial transient > behaviour peeters out) and then crossfading. > > I can't believe that this is the most efficient design. Can someone > explain to me a better implementation or give me a reference which > discusses such? Cross-fading is not entirely unreasonable. Another option is to band-limit (smooth) the parameter change. For that you need a filter that is stable for audio-rate time-varying parameter change (not many are). Giulio's suggestions are good ones. Here's a recent paper that surveys a range of approaches: Wishnick, A. (2014) “Time-Varying Filters for Musical Applications” Proc. of the 17th Int. Conference on Digital Audio Effects (DAFx-14), Erlangen, Germany, September 1-5, 2014. Available here: http://www.dafx14.fau.de/papers/dafx14_aaron_wishnick_time_varying_filters_for_.pdf Here is a practical implementation of a time-variant stable filter: http://www.cytomic.com/files/dsp/SvfLinearTrapezoidalSin.pdf see also: http://www.cytomic.com/technical-papers also, i might add to the list, the good old-fashioned lattice (or ladder) filters. the coefficients from a simple DF1 biquad can be mapped to lattice pretty directly. and be mindful of the "cosine problem" when the resonant frequency is very low. to fix the cosine problem, make use of this trig identity: cos(w0) = 1 - 2*(sin(w0/2))^2 replace all cos(w0) with the above and work out the lattice difference equations with cos() replaced. that "1" will result in a "wire" in the structure, but the sin(w0/2) term will work well, even with single-precision floating point. but cos(w0) does *not* work well with single-precision floats. not when w0 is in the bottom couple of octaves. -- r b-j r...@audioimagination.com "Imagination is more important than knowledge." -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp
[music-dsp] [admin] music-dsp FAQ
Hi, Just a reminder that if you are new to the list you should read the music-dsp FAQ. It contains answers to both technical _and_ adminstrative questions that often come up on the list. If your question appears in the FAQ it is safe to assume that it has been discussed on the list many times in the past, and you should probably have a look through the list archives before posting your question to the list. http://music.columbia.edu/cmc/music-dsp/musicdspFAQ.html Also of interest to new and not-so-new list members: The music-dsp list archives http://music.columbia.edu/cmc/music-dsp/musicdsparchives.html The music-dsp source code archive http://www.musicdsp.org music-dsp books and reviews http://music.columbia.edu/cmc/music-dsp/dspbooks.html All this and more at: http://music.columbia.edu/cmc/music-dsp Hasta la pasta, douglas (this is an automated message sent out on the 1st and 15th of each month) -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] Efficiently modulate filter coefficients without artifacts?
Hello Alan, On 1/02/2015 4:51 AM, Alan O Cinneide wrote: > Dear List, > > While filtering an audio stream, I'd like to change the filter's > characteristics. You didn't say what kind of filter, so I'll assume a bi-quad section. > In order to do this without audible artifacts, I've been filtering a > concurrent audio buffer (long enough so that the initial transient > behaviour peeters out) and then crossfading. > > I can't believe that this is the most efficient design. Can someone > explain to me a better implementation or give me a reference which > discusses such? Cross-fading is not entirely unreasonable. Another option is to band-limit (smooth) the parameter change. For that you need a filter that is stable for audio-rate time-varying parameter change (not many are). Giulio's suggestions are good ones. Here's a recent paper that surveys a range of approaches: Wishnick, A. (2014) “Time-Varying Filters for Musical Applications” Proc. of the 17th Int. Conference on Digital Audio Effects (DAFx-14), Erlangen, Germany, September 1-5, 2014. Available here: http://www.dafx14.fau.de/papers/dafx14_aaron_wishnick_time_varying_filters_for_.pdf Here is a practical implementation of a time-variant stable filter: http://www.cytomic.com/files/dsp/SvfLinearTrapezoidalSin.pdf see also: http://www.cytomic.com/technical-papers Hope that helps, Ross. -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp