sowbug / groove

A digital audio workstation (DAW) engine.
Other
20 stars 0 forks source link

LFO on oscillator frequency must cause horrible transients #53

Closed sowbug closed 1 year ago

sowbug commented 1 year ago

I haven't looked at this, but the oscillators use a simple algorithm to calculate the current amplitude from a period with phase starting at time zero. This is fine if the frequency never changes, but if it does (for example if an LFO is controlling the oscillator frequency), it'll often cause abrupt changes because FA(t) and FB(t) could be arbitrarily different from each other.

Every solution I've brainstormed has edge cases or requires the maintenance of a bunch of weird state. I could probably just look at what Serum does in Audacity, and model the same behavior.

sowbug commented 1 year ago

I think this was fixed a while ago, perhaps when I got synced oscillators (didgeridoo) working. We calculate the next frame value as a delta from the prior frame, rather than using f(time, frequency). So the right thing happens.

Reopen if not.