[music-dsp] Time-variant 2nd-order sinusoidal resonator

2019-02-20 Thread Dario Sanfilippo
Hello, list. I'm currently working with digital resonators for sinusoidal oscillators and I was wondering if you have worked with some design which allows for frequency variations without discontinuities in phase or amplitude. Thank you so much for your help. Dario __

Re: [music-dsp] Time-variant 2nd-order sinusoidal resonator

2019-02-20 Thread Ian Esten
The problem you are experiencing is caused by the fact that after changing the filter coefficients, the state of the filter produces something different to the current output. There are several ways to solve the problem: - The time varying bilinear transform: http://www.aes.org/e-lib/browse.cfm?eli

Re: [music-dsp] Time-variant 2nd-order sinusoidal resonator

2019-02-20 Thread Ethan Fenn
A very simple oscillator recipe is: a(t+1) = C*a(t) - S*b(t) b(t+1) = S*a(t) + C*b(t) Where C=cos(w), S=sin(w), w being the angular frequency. a and b are your two state variables that are updated every sample clock, either of which you can use as your output. There won't be any phase or amplitu

Re: [music-dsp] Time-variant 2nd-order sinusoidal resonator

2019-02-20 Thread Evan Balster
Hello — The method Ethan recommends is sometimes known as a Variable Phasor , and I'm quite fond of these! I like to visualize them as the hand of a clock. The update function is effectively a complex product (which works like a rotation) and you can use a f

Re: [music-dsp] Time-variant 2nd-order sinusoidal resonator

2019-02-20 Thread robert bristow-johnson
On Wed, February 20, 2019 9:10 pm, "Ethan Fenn" wrote: > > A very simple oscillator recipe is: > > a(t+1) = C*a(t) - S*b(t) > b(t+1) = S*a(t) + C*b(t) > > Where C=cos(w), S=sin(w), w being the angular frequency. a and b are your > two state variables that are updated every sample cl

Re: [music-dsp] Time-variant 2nd-order sinusoidal resonator

2019-02-20 Thread robert bristow-johnson
i did that wrong.  i meant to say:      x[n] = a[n] + j*b[n] = g[n-1]*exp(j*w[n]) * x[n-1]   this is the same as     a[n] = g[n-1]*cos(w[n])*a[n-1] - g[n-1]*sin(w[n])*b[n-1]  

Re: [music-dsp] Time-variant 2nd-order sinusoidal resonator

2019-02-20 Thread Andrew Simper
This looks pretty good to me, and I like the amplitude adjustment g[n] term :) Depending on the situation you may want to modulate the frequency of the oscillator pretty fast, so it can help to use a tan approximation function and then a division and a few other operations to get your cos (w) and