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 amplitude discontinuity when you change C and
S. However, it's not stable as is, so you periodically have to make an
adjustment to make sure that a^2 + b^2 = 1.

-Ethan


On Wed, Feb 20, 2019 at 12:26 PM Ian Esten <i...@ianesten.com> wrote:

> 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?elib=18490
> - Every time you modify the filter coefficients, modify the state of the
> filter so that it will produce the output you are expecting. Easy to do.
>
> I will also add that some filter structures are less prone to problems
> like this. I used a lattice filter structure to allow audio rate modulation
> of a biquad without any amplitude problems. I have no idea how it would
> work for using the filter as an oscillator.
>
> Best,
> Ian
>
> On Wed, Feb 20, 2019 at 9:07 AM Dario Sanfilippo <
> sanfilippo.da...@gmail.com> wrote:
>
>> 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
>> _______________________________________________
>> dupswapdrop: music-dsp mailing list
>> music-dsp@music.columbia.edu
>> https://lists.columbia.edu/mailman/listinfo/music-dsp
>
> _______________________________________________
> dupswapdrop: music-dsp mailing list
> music-dsp@music.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/music-dsp
_______________________________________________
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Reply via email to