Simple MIDI synthesiser using an AVR ATmega328 (2-operator FM)

Опубликовано: 28 Сентябрь 2024
на канале: benryves
849
30

This is a quick look at a very crude two-operator FM synthesiser engine on an ATmega328. I find software synthesisers can be a bit intimidating so what better way to improve your understanding of them than by trying to write your own?

If you're interested in the code at all it's at http://benryves.com/bin/avr_synth/syn... - all very experimental so not documented and messily written!

The microcontroller is expected to run at 20MHz, MIDI goes in at RXD and sound comes out of OC0A and OC0B (it's the same signal at both, I've been wondering if a voltage divider could be use to turn the two 8-bit fast PWM ports into a single 16-bit one).

I think my next steps would be to rewrite the main synthesiser engine code in assembly so I can get an idea of how much CPU time each voice will demand, and from that think about adding multiple voices for polyphony and whether there's enough CPU time left for additional operators.