Synth in C++

I programmed a little synthesizer in C++. It listens for MIDI instructions from an instrument, generates a waveform following the instructions, and then sends the waveform to the speakers. It uses the RtMidi and RtAudio libraries to make this work.

It sounds like this:

The synth can generate four types of waveforms (sine, triangle, square, and saw) using wavetable synthesis. In the audio example, you can hear the difference in the quality of sound (timbre) between these waveforms.

The synth works but there are some limitations:

This was pretty tough for me to build, but I learned a lot about sound synthesis and MIDI along the way! I think I will try to write more audio software in the future.

I got a lot of help on this from people online. And I was able to borrow a lot of ideas from the roto project, which emulates a Hammond B3 organ. This talk by the creator Peter Teichman is really interesting and fun.

←Home