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

```
�
yup.� that's a good way to do it, too.� i've done this with a 5th-order
odd-symmetry polynomial (so there were only 3 non-zero coefficients) and had
harmonics suppressed down 70 dB below the fundamental.
first generate sawtooth (at your fundamental frequency) with
limits of -1 and +1 using a simple phase accumulator.
second, perform abs value (the sawtooth turns into a triangle from 0 to +1).
third, subtract 1/2 from the triangle, now the limits are from -1/2 to +1/2
lastly run that into the 5th-order (or higher odd-order, if you like)
polynomial to get something very close to a sinusoid.
i thought, years ago, we were discussing this and Olli Niemeto had optimized
coefficients for the polynomial.
r b-j

---------------------------- Original Message ----------------------------

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

From: "Phil Burk" <philb...@mobileer.com>

Date: Thu, February 21, 2019 9:25 am

To: "robert bristow-johnson" <r...@audioimagination.com>

"A discussion list for music-related DSP" <music-dsp@music.columbia.edu>

--------------------------------------------------------------------------

> Another approach is to use a Taylor Expansion. It's pretty accurate in the

> first quadrant. One advantage over the resonator is that it does not drift.

> Another advantage is that you can do FM without paying the penalty of

> recalculating the coefficients.

>

> Here is some free Java source.

>

> https://github.com/philburk/jsyn/blob/master/src/com/jsyn/unitgen/SineOscillator.java

>

> Phil Burk

>

>

> On Wed, Feb 20, 2019, 4:12 PM robert bristow-johnson <

> r...@audioimagination.com> wrote:

>

>> personally, i think that phase accumulator and wavetable lookup and

>> intersample interpolation is the best way to do a time-varying sinusoidal

>> oscillator,

>>

>
�
�
�

--

r b-j� � � � � � � � � � � � �r...@audioimagination.com

"Imagination is more important than knowledge."

�
�
�
�
```
```_______________________________________________
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp```