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.

Friday, June 27, 2025

XIAO ESP32-C3 MIDI Synthesizer – Part 3

So, now that the basics are out of the way I'm going to dive into the specifics of the Dream SAM2695 chip itself. Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expe…
Read on blog or Reader
Site logo image Simple DIY Electronic Music Projects Read on blog or Reader

XIAO ESP32-C3 MIDI Synthesizer – Part 3

By Kevin on June 27, 2025

So, now that the basics are out of the way I'm going to dive into the specifics of the Dream SAM2695 chip itself.

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 tutorials for the main concepts used in this project:

  • Getting Started with the XIAO MIDI Synthesizer
  • XIAO SAMD21, Arduino and MIDI
  • CircuitPython USB to Serial MIDI Router

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

The Dream SAM2695

I first encountered this device on a breakout board several years ago, called a "GM Mini Module". Various tutorials at the time showed how to hook this up to an Arduino. For example, my specific module had the following suggested application:

The breakout was essentially just the SAM2695 with an additional MIDI IN circuit and DIN socket.

At the time it was a component of the "fluxamasynth" - an Arduino shield containing the chip. Whilst the shield is now discontinued, a number of resources still remain online about it: https://github.com/fluxly/Fluxamasynth

Since then there have been a number of modules released that use this neat synth chip, probably the most recognisable of which is perhaps the M5 MDI Synth: https://shop.m5stack.com/products/midi-synthesizer-unit-sam2695

There is also a M5 module with built-in MIDI DIN socket too.

This latest XIAO device follows in the footsteps of all these other variations but adds the microcontroller, and ESP32-C3, to make a complete "system".

I happen to have three of these devices - the original Dream "GM mini module", M5 synth and the XIAO, so I'll do a post about them together at some point, but the all work in essentially the same way.

The datasheet for the SAM2695 describes its capabilities:

  • MIDI control processor, serial and parallel interface
  • Synthesis, General MIDI wavetable implementation
  • General MIDI compatible effects: reverb + chorus
  • Spatial Effect
  • 4-band stereo equalizer
  • Stereo DAC. DR: 86dB typ, THD+N: -75dB typ
  • Mike input. DR: 86dB typ, THD+N: -75dB typ
  • Mike echo
  • 64-voice polyphony (without effects)
  • 38-voice polyphony + effects
  • On-chip CleanWave™ wavetable data, firmware, RAM delay lines
  • Audio stereo line output

Interestingly it supports a parallel or serial MIDI access. But using serial is by far the easiest as it can link up directly to another microcontroller's UART or an opto-isolator of a standard MIDI IN circuit.

The GM Sound Engine

The SAM2695 has two complete instrument banks and a drum set. The banks are as follows:

  • CH1-9,11-16: BANKSEL 0: Full General MIDI Sound set
  • CH1-9,11-16: BANKSEL 127: MT-32 Compatible Sound set
  • CH10: General MIDI Drum Sound set:
    • Program 1: Normal kit, notes 35-81
    • Program 17: "Power Set", Normal set + note 38 only
    • Program 41: "Brush", Normal set + notes 35-40 changed
    • Program 49: "Orchestra", Normal set + notes 27-30, 38-53, 88 changed
    • Program 128: "CM 64/32 Partial", range of effects and things - MT-32 like

The device also supports effects and an equaliser. All additional controls are configured using either MIDI NRPN or SysEx message. And there are a lot of messages defined in the datasheet!

There are also a number of control messages which apparently have to be sent over the parallel data interface.

But what I am most interested in is the MIDI implementation for the common range of MIDI messages, the most useful of which (to me) are listed below.

MIDI Message HEX Notes Compatibility
Note On 9n kk vv MIDI
Note Off 8n kk vv MIDI
Pitch Bend En ll hh 14-bit pitch bend data hhll GM
Program Change Cn pp GM/GS
Channel Aftertouch Dn vv MIDI
Control Change Bn cc dd See table below for specific control change messages
RPN Bn 65 ... Registered parameter numbers (see datasheet) MIDI/GM
NRPN Bn 63 ... Non-registered parameter numbers (see datasheet) GS/DREAM
SysEx F0 7E 7F 09 01 F7 MIDI Reset GM
SysEx F0 7F 7F 04 01 00 vv F7 Master volume GM
SysEx F0 41 00 42 12 ... F7 Range of GS specific SysEx messages (see datasheet) GS
SysEx F0 00 20 00 00 ... F7 Dream specific "port write" command DREAM

MIDI Control Change Messages

Command HEX Defaults / Notes
Bank Select Bn 00 cc 0
Modulation Bn 01 cc 0 (Rate/Depth set via SysEx)
Portamento Time Bn 05 cc
Channel Volume Bn 07 cc 100
Pan Bn 0A cc 64
Expression Bn 0B cc 127
Sustain Pedal Bn 40 cc 0 (>63 ON)
Portamento Bn 41 cc 0 (>63 ON)
Sostenuto Pedal Bn 42 cc 0 (>63 ON)
Soft Pedal Bn 43 cc 0 (>63 ON)
Reverb Bn 50 vv 4 (0..7 = reverb effects)
Chorus Bn 51 vv 2 (0..7 = chorus effects)
Reverb Send Bn 5B vv
Chorus Send Bn 5D vv
All Sound Off Bn 78 00
Reset All Controllers Bn 79 00
All Notes Off Bn 7B 00
Mono On Bn 7E 00
Poly On Bn 7F 00 Defaults to poly on power up
CC1 Bn cc vv cc=00..5F, Fn set by SysEx
CC2 Bn cc vv cc=00..5F, Fn set by SysEx

To be honest, I'm not sure I quite understand those last two, but that seems to be what it is saying in the datasheet...

There are a /lot/ of parameters accessible over NRPN or SysEx relating to the routing of signals in the device, the effects and the equaliser. At this point I'm just experimenting with the basics above.

Any of the MIDI interfaces allows me to test it out, but using a XIAO SAMD21 in USB MIDI device mode is the easiest as I can just plug it into a computer and fire up MIDIOx and start messing around with some of the above.

Closing Thoughts

There is a lot to the SAM2695, so I can see why it has captured interest once again after a few years seeming almost forgotten.

It would be nice to build some kind of knob-based interface that supports many of the parameters in the synth, but I guess the major application is meant to be for when some kind of "compatible" sound card is required "off the shelf". For that, it would appear that the SAM2695 can be a General MIDI Synth, a Roland "General Sound" (GS) Synth or even a Roland MT-32.

Not bad for a small, relatively easily integrated component!

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 12:57 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

  • September (104)
  • August (116)
  • July (96)
  • June (100)
  • 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.