genuinequality

Download free music MP3s on genuine quality, the world’s largest online music catalogue, powered by your scrobbles. Free listening, videos, photos, The world’s largest online music catalogue, powered by your scrobbles. Free listening, videos, photos, stats, charts, biographies and concerts. stats, charts, biographies and concerts.

Thursday, June 26, 2025

XIAO ESP32-C3 MIDI Synthesizer

I quite like many of the XIAO boards, so when I got an email announcing the XIAO MIDI Synthesizer I went off to buy one and take a look. This uses the Dream SAM2695 MIDI device, which is a General MIDI instrument in a chip. I have a couple of device…
Read on blog or Reader
Site logo image Simple DIY Electronic Music Projects Read on blog or Reader

XIAO ESP32-C3 MIDI Synthesizer

By Kevin on June 26, 2025

I quite like many of the XIAO boards, so when I got an email announcing the XIAO MIDI Synthesizer I went off to buy one and take a look.

This uses the Dream SAM2695 MIDI device, which is a General MIDI instrument in a chip. I have a couple of devices that use this chip, so at some point I'll talk about some of them too.

Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expensive instruments!

These are the key Arduino tutorials for the main concepts used in this project:

  • Getting Started with the XIAO MIDI Synthesizer

If you are new to microcontrollers, see the Getting Started pages.

Parts list and Circuit

  • XIAO MIDI Synthesizer
  • USB-C for power and programming

Er, and that's essentially it - it has a built-in speaker. But you can use a 3.5mm stereo TRS to connect to an external amplifier or headphones if you wish too.

XIAO MIDI Synthesizer

This device pulls together the following into a single package:

  • XIAO ESP32-C3
  • Dream SAM2695
  • Audio amplifier and speaker
  • Buttons
  • Grove interface

The XIAO GPIO headers are accessible through the 3D printed case, but the Grove connector is not.

As soon as power is supplied via the USB-C connection, with the default firmware it is possible to do the following:

  • Start or stop a rhythm.
  • Select through each of the 128 voices, playing a single note to hear each of them.
  • Adjust the tempo for the rhythm.
  • Adjust the note to test the voices.
  • Enter a "four track" mode that plays a fixed, four track pattern.

The hardware architecture is described in the published schematics here: https://wiki.seeedstudio.com/xiao_midi_synthesizer/

The XIAO is connected to the SAM2695 using the UART and drives it over MIDI. It also supports 4 buttons on GPIO pins and the aforementioned Grove connector, which also appears to be connected to the same MIDI link.

Presumably the idea is that if the XIAO isn't being used, then the Grove connector will allow something else to drive the synth over MIDI instead.

Running Bespoke Code

Unfortunately, at one point (after pressing the "preset" button too quickly I think) I managed to get the whole thing locked up and even a power cycle didn't seem to wake it up again.

Although eventually it did seem to wake up again (I wonder if I'd managed to get the XIAO loose in its socket inside the enclosure), I never-the-less decided it would be interesting to get some code loaded onto the thing.

The default firmware appears to be this sample application: https://github.com/Seeed-Studio/Seeed_Arduino_MIDIMaster/blob/main/examples/StateMachine/StateMachine.ino

So as I already had the ESP32 Arduino core installed, I just re-downloaded that sketch and got it going again by doing the following:

  • Downloading the ZIP of the above GitHub project, extracting it and copying it to the Arduino libraries folder.
  • Set up the Arduino environment for the XIAO ESP32-C3 as described here: https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started/
  • Select the board: Tools -> Board -> esp32 -> XIAO_ESP32C3
  • Select File -> Examples -> Seeed_Arduino_MIDIMaster -> StateMachine

I also tried the most basic example: Seeed_Arduino_MIDIMaster -> basic which just sets the synth to Voice 1 (Piano) and plays a note every second.

The Code

One thing I thought it would do "out of the box" is act as a MIDI device over USB, but that doesn't seem to be the case. From what I can make out, MIDI USB for ESP32 devices has to use the Adafruit TinyUSB Library, which apparently isn't available for the ESP32-C3 as it doesn't have a native USB device controller (I think I knew that from previous experiments?).

So I have a few options:

  • Use something like Hairless MIDI on a PC to direct MIDI to a USB serial port, which is how the XIAO presents itself, and then get the XIAO to relay everything over to the Dream synth.
  • Use the XIAO RX pin to connect to a 3V3 serial MIDI interface and relay MIDI that way.
  • Replace the XIAO C3 with something else that supports USB MIDI, like the XIAOs based on the RP2040, SAMD21, or the ESP32-S3.

By far the simplest for me at this point is to use an external 3V3 compatible MIDI module on the RX pin.

The connections for that right hand set of header pins are as follows:

  • 5V - not used
  • GND - MIDI module GND
  • 3V3 - MIDI module VCC
  • D10 - not used
  • D9 - not used
  • D8 - not used
  • D7/RX - MIDI module MIDI IN/RX

None of the pins on the left hand set of headers are required.

The code for relaying MIDI from the RX pin to the TX pin is pretty trivial, as the Arduino MIDI Library has a built-in THRU function for serial MIDI.

#include <MIDI.h>

MIDI_CREATE_INSTANCE(HardwareSerial, Serial0, MIDI);

void setup() {
MIDI.begin(MIDI_CHANNEL_OMNI);
}

void loop() {
MIDI.read();
}

But really, at this point the ESP32-C3 is essentially superfluous as I could almost certainly wire up the MIDI interface to the Grove socket and drive the Dream synth directly.

But it shows that the following can be done:

  • Hook up external Serial MIDI.
  • Load custom code onto the device.
  • Use the SAM2695 as a programmable General MIDI sound device.

Closing Thoughts

This seems like it will be quite a fun module to have a proper play with. The demo application is ok, but it doesn't really show-off the potential of the device in my view.

It's a shame that the chosen microcontroller can't act as a USB MIDI device. That would really allow the device to shine.

But as has already been seen, there is an awful lot of potential here. The buttons and built-in amp and speaker could make for a really nicely contained Synth unit. My only slight concern is how much the 3D printed case will cope with me keeping taking the back on and off to get at the boot/reset buttons inside.

The video is my usual "go to" for trying out a synth module - a MIDI file from the Internet of an extract of Stravinsky's Rite of Spring. This is using the external audio connector to go out into a small speaker.

It doesn't sound bad at all for such a neat little unit!

Kevin

Comment
Like
You can also reply to this email to leave a comment.

Simple DIY Electronic Music Projects © 2025.
Unsubscribe or manage your email subscriptions.

WordPress.com and Jetpack Logos

Get the Jetpack app

Subscribe, bookmark, and get real‑time notifications - all from one app!

Download Jetpack on Google Play Download Jetpack from the App Store
WordPress.com Logo and Wordmark title=

Automattic, Inc.
60 29th St. #343, San Francisco, CA 94110

Posted by BigPalaceNews at 3:01 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Search This Blog

About Me

BigPalaceNews
View my complete profile

Blog Archive

  • June (91)
  • May (105)
  • April (95)
  • March (131)
  • February (111)
  • January (104)
  • December (98)
  • November (87)
  • October (126)
  • September (104)
  • August (97)
  • July (112)
  • June (113)
  • May (132)
  • April (162)
  • March (150)
  • February (342)
  • January (232)
  • December (260)
  • November (149)
  • October (179)
  • September (371)
  • August (379)
  • July (360)
  • June (385)
  • May (391)
  • April (395)
  • March (419)
  • February (356)
  • January (437)
  • December (438)
  • November (400)
  • October (472)
  • September (460)
  • August (461)
  • July (469)
  • June (451)
  • May (464)
  • April (506)
  • March (483)
  • February (420)
  • January (258)
  • December (197)
  • November (145)
  • October (117)
  • September (150)
  • August (132)
  • July (133)
  • June (117)
  • May (190)
  • January (48)
Powered by Blogger.