Raspberry Pi Pico Becomes MIDI-Compatible Synth

ECE 4760 is a microcontroller course that runs at Cornell every year, and it gives students a wide remit to pursue various kinds of microcontroller projects. [Pelham Bergesen] took the class and built himself a MIDI-controllable synthesizer out of a Raspberry Pi Pico.

[Pelham] coded a library to parse MIDI messages on the Pico, with the microcontroller’s UART charged with receiving the input data. MIDI is basically just serial at a baud rate of 31.25k, with a set message structure, after all. From there, the Pico takes the note data and plays the relevant frequencies by synthesizing square waves using a PWM output. A second PWM channel can also be blended with the first to generate more complex tones.  The synthesizer is designed to be used with a source of MIDI note data such as a keyboard controller; [Pelham] demonstrates the project in use with a Roland JD-XI. It’s a fairly basic synthesizer, but [Pelham] does a good job of explaining all the steps required to get this far. If you’ve never done an audio or MIDI project before, you might find his guide very helpful for the way it steps through the basics.

[Pelham] didn’t get to implement fancier features like direct digital synthesis (DDS) or analog audio effects before the class closed out. However, that would be an excellent project for anyone else developing their own Pico synthesizer. If you whip up something that sounds good, or even just interesting, be sure to notify us on the tipsline. Video after the break.

13 thoughts on “Raspberry Pi Pico Becomes MIDI-Compatible Synth

    1. It’s extremely well documented yet he manages to get note input overlap and he can’t get polyphonic playback because he doesn’t know how to parse note-off messages. I wouldn’t give this guy many marks for this if he submitted it as-is.

  1. It’s not necessary to have a whole computer to work with midi 1.0 he wasn’t even using vsts he was just using pwm pins that’s like an Arduino project that just reads the serial port and puts on a pwm that’s supposed to go on a vco chip like a 556 timer you actually need to build analog circuits for the filter and different wave shaping paths for the oscillators . An attiny 85 can handle this task just fine with a 556 two oscillators no real synth just has square waves

    1. Hmm…. I mean cool project and getting it to work. He got a micro controller to respond to MIDI. Not sure why he felt the need to embellish by saying “strange diagrams” when referring to schematics and such… >_>

      I mean, as others have noted, folks have gotten midi synths running on a wide range of much smaller and much less powerful MCU devices.

      The midi spec is very well documented and quite a few sites indicate very clearly and simply the basic circuit to get logic levels at the voltages the MCU can handle.

      Like others, have also made similar circuits and programmed the MCU to handle MIDI commands and perform tone generation.

      Would be interesting to see if he further polishes the project so that it is fully MIDI compliant and able to make more use of an Arm M0 quad core MCU with 200KB+ of sram and 2MB of flash. That is a lot of room for code, waveforms, samples, doing sequencing, etc.

  2. I use an RP2040 based eurorack module (Bleep Sound RP2040 Chord VCO). It uses CV (control voltage) rather than MIDI, but it would be pretty straight forward to make it MIDI. It’s not polyphonic though, but you would still want to handle note off messages correctly to control your envelope.

  3. The negativity down here is something else. This was clearly a self-directed learning project at the end of a beginner’s introductory course in microcontrollers: the end result comes from, I’d guess, no more than a handful of hours work by a total beginner with only minimal guidance from the teacher – sure, there are a lot of obvious mistakes, the functionality is limited and it’s not clear whether the maker fully understands why things went wrong (yet). But that’s a totally normal part of the learning process, and I see nothing but humility and a willingness to acknowledge what went wrong from him, making some people’s decisions to dunk on the guy really quite bizarre. This kind of snarky critique is not at all what hackaday is supposed to be about and a one or two of the comments here actually reveal their writers as not knowing quite as much as they’d like others to think they do.

  4. Every engineer’s got to start learning about protocols at some point. I think MIDI is a fine one to start with. And yeah, he doesn’t quite have it all figured out yet, but he knows enough to get a working example! Such a beginner project may not be normal Hackaday material, but we shouldn’t poop all over them for publishing what they’ve learned. Good job, Pelham! I hope you learn more about MIDI and build more cool synth things.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.