According to the paper, it should be rock steady. The main question in my mind is how does it compare to the waveguide oscillator which is only one multiply per sample, or two if you need the quadrature output to be normalized as is automatic in QuadOsc. Both are amplitude-stable over long durations, but QuadOsc may earn its extra multiplies by performing better numerically at low frequencies.
- Julius On Mon, Jun 17, 2019 at 4:13 PM Dario Sanfilippo <sanfilippo.da...@gmail.com> wrote: > > Hi, Julius. > > Thanks for adding the code. > > I remember that I implemented the algorithm in Lua a couple of months ago and > I let it go for maybe half an hour with the frequency changing randomly at > each sample with values from 0 to Nyquist and it was still stable after that. > The test was double-precision. I'll see if I can more tests including the > other oscillators. > > Cheers, > Dario > On Mon, 17 Jun 2019 at 23:21, Julius Smith <j...@ccrma.stanford.edu> wrote: >> >> Hi Dario, >> >> Ok, this looks promising. I have added the below to oscillators.lib. >> Let me know if you'd like to see any changes. Test results welcome, >> especially comparisons to the other oscillators, e.g., >> >> f = 1000; >> oscs = (os.quadosc(f), os.oscrq(f), os.oscs(f), os.oscq(f)); >> process = oscs; >> // study classic corner cases such as those mentioned in >> https://vicanek.de/articles/QuadOsc.pdf >> >> Thanks, >> - Julius >> >> //-----------------`(os.)quadosc`-------------------- >> // Sinusoidal oscillator based on QuadOsc by Martin Vicanek >> // >> // #### Usage >> // >> // ``` >> // quadosc(freq) : _ >> // ``` >> // >> // where >> // >> // * `freq`: frequency in Hz >> // >> // #### Reference >> // * <https://vicanek.de/articles/QuadOsc.pdf> >> //------------------------------------------------------------ >> // Author: Dario Sanfilippo <sanfilippo.da...@gmail.com> (jos ed.) >> quadosc(f) = tick ~ (_ , _) >> with { >> init = 1-1'; >> w = 2*ma.PI*f/ma.SR; >> k1 = tan(.5*w); >> k2 = 2*k1/(1+k1*k1); >> tick(u, v) = omega-k1*(v+k2*omega) , v+k2*omega >> with { >> omega = (u+init)-k1*v; >> }; >> }; >> >> On Mon, Jun 17, 2019 at 11:50 AM Dario Sanfilippo >> <sanfilippo.da...@gmail.com> wrote: >> > >> > Hi, Julius. >> > >> > I haven't experienced a particular case where this oscillator would be >> > better than others yet but according to table1 in the aforementioned paper >> > it does seem to be the best design, doesn't it? I'm not sure it is >> > computationally heavier than the others. >> > >> > Though I have a work which is a self-oscillating FDN with frequency >> > shifters in the loops that shift the signals of a very small fraction of >> > Hz. For that, I'd need a very low frequency quadrature oscillator and, >> > according to the table, Biquad, DWG and QSU would not be accurate for that. >> > >> > Cheers, >> > Dario >> > >> > >> > >> > On Mon, 17 Jun 2019 at 20:39, Julius Smith <j...@ccrma.stanford.edu> wrote: >> >> >> >> Hi Dario, >> >> >> >> I don't see its unique advantage(s). Can you make a case for it over >> >> the oscillators already in oscillators.lib? >> >> >> >> Thanks, >> >> - Julius >> >> >> >> On Sat, Jun 15, 2019 at 5:04 AM Dario Sanfilippo >> >> <sanfilippo.da...@gmail.com> wrote: >> >> > >> >> > Described in this paper: https://vicanek.de/articles/QuadOsc.pdf. >> >> > >> >> > If I'm not wrong, it's not in the oscillators library yet so it could >> >> > be a good addition. >> >> > >> >> > Cheers, >> >> > Dario >> >> > >> >> > import("stdfaust.lib"); >> >> > quad_osc(f) = tick ~ (_ , _) >> >> > with { >> >> > init = 1-1'; >> >> > w = 2*ma.PI*f/ma.SR; >> >> > k1 = tan(.5*w); >> >> > k2 = 2*k1/(1+k1*k1); >> >> > tick(u, v) = omega-k1*(v+k2*omega) , v+k2*omega >> >> > with { >> >> > omega = (u+init)-k1*v; >> >> > }; >> >> > }; >> >> > process = quad_osc(1000); >> >> > _______________________________________________ >> >> > Faudiostream-users mailing list >> >> > Faudiostream-users@lists.sourceforge.net >> >> > https://lists.sourceforge.net/lists/listinfo/faudiostream-users >> >> >> >> >> >> >> >> -- >> >> >> >> Julius O. Smith III <j...@ccrma.stanford.edu> >> >> Professor of Music and, by courtesy, Electrical Engineering >> >> CCRMA, Stanford University >> >> http://ccrma.stanford.edu/~jos/ >> >> >> >> -- >> >> Julius O. Smith III <j...@ccrma.stanford.edu> >> Professor of Music and, by courtesy, Electrical Engineering >> CCRMA, Stanford University >> http://ccrma.stanford.edu/~jos/ -- Julius O. Smith III <j...@ccrma.stanford.edu> Professor of Music and, by courtesy, Electrical Engineering CCRMA, Stanford University http://ccrma.stanford.edu/~jos/ _______________________________________________ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users