PaulStoffregen / Audio

Teensy Audio Library
http://www.pjrc.com/teensy/td_libs_Audio.html
1.08k stars 401 forks source link

Fix discontinuity in frequency stepping in tonesweep #359

Closed MarkTillotson closed 4 years ago

MarkTillotson commented 4 years ago

The frequency adjustment per sample wasn't being applied to the phase on every sample, only per block, so the sweep frequency was stepped and thus spectrally compromised.

See: https://forum.pjrc.com/threads/61855-A-subharmonic-synthesiser-and-polymetric-sequencer-with-Teensy-4-and-audio-library#8

This change should be low-impact to existing code, simply improving tone sweep quality.

Also removed unnecessary/incorrect masking of phase top bits which are dont-care.