Package io.github.dkaukov.afsk.dsp
Class DdsOscillator
java.lang.Object
io.github.dkaukov.afsk.dsp.DdsOscillator
Direct Digital Synthesis (DDS) oscillator for generating sine and cosine waveforms.
This class uses a precomputed sine table to efficiently generate samples at a specified frequency.
The oscillator can be reset and advances its phase on each call to `next()`.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DdsOscillator
public DdsOscillator(float sampleRate, float freq)
-
-
Method Details
-
reset
public void reset() -
next
public void next()Advance the oscillator. -
sin
public float sin() -
cos
public float cos()
-