Skip to content

adediego/simpleavrsynth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple AVR synthesizer

A wavetable-based polyphonic synthesizer (sawtooth) on an Atmega328P. Note-on and note-off MIDI events can be received over the Atmega's USART module. The sound is generated by driving an external 8-bit DAC (MCP4901) over the SPI module. Finally, the output of the DAC is put through an RC bandpass filter to remove DC offset and frequencies above 8kHz.

Features

  • 16kHz sample rate
  • 6 independent voices
  • audio signal in 8 bit fixed point precision
  • sawtooth signal is stored in low-pass filtered wavetables to avoid aliasing. Tables with different filter cutoffs are generated in Python before compilation. At runtime, the appropriate table index for specific notes is selected when they are played.

Circuit diagram

Sound example

synth.mp4

Notes

The CKDIV8 bit in the low fuse byte (FLB) needs to be unprogrammed (set to 1) to set the clock frequency to 8 MHz. With the other bits left to default, this results in a value of 0xE2 for FLB.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published