Converting my Synthesizer to accept MIDI
In my previous blog post, I showed off my PCB milling setup that I used to make a VCO for my mini modular synth. In that post, I simply hardcoded MIDI notes into the binary that is executed on the microcontroller. To make this more robust, and to show off for the Pi Pico demo held on Saturday’s MakerDay, I allowed the VCO to receive live MIDI events from a computer that is plugged in for live performances.
Simply running:
Is enough to get the Pi Pico to show up as a MIDI device that you can select in a DAW, like LMMS.
And this is enough to grab the MIDI events and parse them into frequencies that can be sent out of a GPIO pin on the Pi Pico. Of course, there is no DAC onboard the Pi Pico, so I output a PWM on a digital pin with an RC filter to output an analog level, given some output ripple. This analog level is then boosted to give my VCO a large frequency range, and then the VCO is ready to play some single-voice melodies!