10:14 pm

August 29, 2014

Hi,

I have noticed that the improved version of the Direct-Form Oscillator (§ 9.2.5 in the FX book) can easily get locked into a non-oscillating state (constant DC output of 1s) after trying changing the oscillating frequency a few times (especially when one tries moving the slider up and down quickly). This is because of the arcsine function giving a NaN result ("-1.#IND000") for values m_f_z1 > 1.0 in cookFrequency(), resulting into NaN values in the output (I assume that the NaN values are then converted into 1s by RackAFX).

Although I have not done any rigorous experimentation, it appears that if I turn on the oscillator and keep the frequency as is, the absolute maximum signal values seem to be sliding slowly above 1.0 after a while.

This is also the case for the original Direct Oscillator design, although in this case it never gets locked into a DC output because both m_f_z1 and m_f_z2 are explicitly updated with new sine values based on f_wT.

My question is: is it expected that the absolute maximum output values > 1.0 for this design? As far as I can tell, the design does not theoretically allow for this. So does this effect have to do with signal quantisation effects/truncation errors?

Thanks.

8:11 pm

January 28, 2017

Hi

I have not noticed stability issues with the Direct Form oscillator, but I did not generally yank the slider control around.

The sinusoidal oscillator in RackAFX is the same Direct Form algorithm. In the latest release of RackAFX (v6.6), I used parameter smoothing to disallow rapid jumps in the controls for the frequency and amplitude sliders. See the post by Alexirae here:

http://www.willpirkle.com/foru.....per-noise/

His solution is elegant and simple. The MMA recommends using ramp-smoothing (see the DLS Level 1 and 2 specs) but I've found the LPF solution is simpler to implement.

The Direct Form oscillator works by placing poles directly on the unit circle. Any rounding/truncation errors in the calculation of the coefficients will affect the ultimate location of these poles, either just barely inside or outside the unit circle. This will have a long-term effect of gradually increasing, or decreasing of the signal amplitude, though it generally takes quite a while for this to occur.

You can get more oscillator algorithms (and great references) here:

https://ccrma.stanford.edu/~dattorro/EffectDesignPart3.pdf

All the best,

Will

2:38 am

August 29, 2014

Thanks for this. I had read the Datorro paper - indeed one with very useful references. In fact, my explanation for the instability that I noticed was based on this text. Regarding the Direct-Form oscillator, the paper says that "[a]ny instability in the sinusoidal waveform can only be attributed to signal quantization effects, primarily in the form of truncation error in this recursive topology."

Thanks also for pointing me to the zipper noise code.

Most Users Ever Online: 55

Currently Online:

12 Guest(s)

Currently Browsing this Page:

1 Guest(s)

Top Posters:

Skyler: 48

Derek: 46

Peter: 41

Frodson: 40

clau_ste: 39

Gwen: 32

JimmyM: 30

TheSmile: 28

EZB: 24

lppier: 23

Member Stats:

Guest Posters: 1

Members: 525

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 31

Topics: 550

Posts: 2158

Newest Members:

LamebrainEddy, SteveThackery, rawbirdtoe, Bill, hill william, NAUN_SONAR, sufy, Diane, Richard, drvenkmanModerators: W Pirkle: 259

Administrators: Tom: 67, JD Young: 80, Will Pirkle: 0, W Pirkle: 259