Close

Sinusoid generation

A project log for PolySynth: Minimal 8-Bit Synthesizer

Using low-cost components and a modular design, PolySynth aims at becoming your next audio engine for your upcoming project.

nathan-petersenNathan Petersen 10/08/2018 at 14:510 Comments

PolySynth comes to life! We can finally generate simple sinusoidal waveforms out of the DAC at arbitrary frequency!

Channel 0 above pulses once per period, so the frequency of that pulse indicates the sine waves' frequency. The above example shows a ~1 kHz sine wave output. The lines DIN, CLK, and CS are the serial interface from the MCU to the DAC. They are toggling much faster than 1kHz (approximately 1 MHz).

To do this, we store sine wave samples in a lookup table and simply iterate through them, streaming them out over SPI at a set frequency.

Now that the hardware drivers are in place, all that is left is to build a firmware stack on top of this to generate multiple frequencies via Additive Sinusoidal Synthesis.

Discussions