Advertisement · 728 × 90
#
Hashtag
#SAM2695
Advertisement · 728 × 90
Post image Post image

"I have a dream", actually lot of dreams - "French Dreams" #SAM2695! Let's make dreams come true as real #MIDI_Synthesizer for #Oric and #OriCon 😎🎶.

0 0 1 0
A photo of four embedded synth modules.  Two are just PCBs.  Two are in plastic cases. One of the plastic case ones has a jumper wire link to another PCB.

A photo of four embedded synth modules. Two are just PCBs. Two are in plastic cases. One of the plastic case ones has a jumper wire link to another PCB.

I've found another SAM2695 based synth module...

diyelectromusic.com/2025/07/15/other-sam2695...

#SAM2695 #MIDI

2 0 0 0
Photo of a XIAO microcontroller on a mini breadboard connected to an M5 Stack Synth module using jumper wires.  The M5 module is a small (about the size of the breadboard) module with a built-in speaker (unseen) and simple 4-wire connection to the microcontroller.

Photo of a XIAO microcontroller on a mini breadboard connected to an M5 Stack Synth module using jumper wires. The M5 module is a small (about the size of the breadboard) module with a built-in speaker (unseen) and simple 4-wire connection to the microcontroller.

And whilst on the topic of SAM2695 devices, here is a short play with the M5 Stack MIDI Synth using essentially all the same principles of the set of other XIAO posts.

diyelectromusic.com/2025/06/28/xiao-usb-devi...

#MIDI #XIAO #SAM2695

1 0 0 0
Preview
XIAO ESP32-C3 MIDI Synthesizer – Part 4 In Part 2 I looked at how to add USB MIDI to the XIAO MIDI Synthesizer and in Part 3 I looked at some of the properties of the SAM2695 synth chip itself. This post combines the two into a relatively simple, but playable, synth. _**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 If you are new to microcontrollers, see the Getting Started pages. ### The Circuit I’m wanting to plug a USB MIDI keyboard into my XIAO Synth, so I’m going to swap the XIAO ESP32-C3 out once again for a XIAO SAMD21 as described in Part 2. A future post will go back and create a serial MIDI version using the unmodified XIAO Synth. Recall that a source of 5V power is required, and below I’m just using the 5V USB passthrough from the original XIAO ESP32-C3. There is one issue to watch out for in this kind of configuration. Depending on how the USB power is provided, there might not be a common ground point between the XIAO’s power and any audio amplification used. Apparently GND is always passed through many USB charger blocks. To prevent interference and noise, it may be necessary to ground the USB connection providing power. ### The Code I’m using a combination of the SAMD21 USB Host Library “USB MIDI Converter” example and some GPIO and MIDI handling. The general thread of the code will be as follows: loop(): Do any USB host processing (e.g. plug-and-play) IF USB MIDI messages received THEN Send to serial MIDI IF any buttons pressed THEN Handle button IO Generate any additional MIDI messages as required Send to serial MIDI In particular it should be noted that the MIDI “listening” is one-way only USB to serial MIDI; and that any internal control events that generate MIDI are also only going one way – to serial MIDI. The buttons will be used to do the following: * Button 0 and 1: Program Select Up/Down * Button 2 and 3: Channel Volume Up/Down A much more sophisticated interface could be developed – e.g. using one of the buttons to change modes for the other buttons, to allow the selection of different things, but for now, this is plenty. There are several layers to the code to allow this however, so I’ll cover them briefly here. * Main Loop button IO: Checks for the main H->L, L->H, L->L, H->H events and calls functions for all but the last (buttons are pulled high so H->H means “nothing happening). * Event functions for Pressed, Released, Hold which call program or volume handling functions as required. * Program/volume handling functions that update the values and then trigger the appropriate MIDI messages to be sent. * Functions to send a MIDI Program Change or Control Change message as required. In the end I’ve only triggered events on button Pressed, so the Release and Hold functions don’t cause any further action to take place, but the model is there for use in the future if required. Note: as I’m not using the Arduino MIDI Library, I just build PC or CC messages directly and call out to Serial1.Write as shown below. void midiSendControl (uint8_t cmd, uint8_t d) { uint8_t buf[3]; buf[0] = MIDI_CC | (MIDI_CHANNEL-1); buf[1] = cmd; buf[2] = d; Serial1.write(buf, 3); } Simple, but it works. Note PC are only two bytes in size not three. If performance seems to be an issue, then I have a few things to adjust in the scheduling: * I can split the digitalRead() of each button over several scans to allow MIDI processing to happen in between. * I can switch to the XIAO equivalent of direct PORT IO to try to read all IO pins at the same time. I don’t know what this looks like for the SAMD21 however and it would make it hardware specific, so I’d really rather not do that. * I can remove the waiting of 1mS. This was in the original USB converter, so I kept it in here too. I ought to measure the free running loop() time to see if it is needed. Find it on GitHub here. ### Closing Thoughts In the video I cycle through a few of the programs whilst controlling the synth from a keyboard. At one point I remove the external audio connection (yes, I should have turned it down first!) to contrast the sound with the internal speaker. Yes, it is a bit “tinny” but it isn’t too bad. This really is just the very “tip of the iceberg” given the whole range of parameters available that were mentioned in Part 3. Kevin ### Share this: * Click to share on X (Opens in new window) X * Click to share on Facebook (Opens in new window) Facebook * Like Loading... ### _Related_

And part 4 goes back to using the XIAO SAMD21 in the XIAO Synth to create a simple synth module with buttons for voice selection and volume control.

diyelectromusic.com/2025/06/27/xiao-esp32-c3...

#MIDI #SAM2695 #XIAO #SynthDIY

1 0 1 0
Preview
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 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 ### Share this: * Click to share on X (Opens in new window) X * Click to share on Facebook (Opens in new window) Facebook * Like Loading... ### _Related_

Part 3 takes a deeper look at the SAM2695 synth chip itself.

diyelectromusic.com/2025/06/27/xiao-esp32-c3...

#MIDI #SAM2695

1 1 1 0
Photo of the XIAO MIDI Synthesizer connected to a serial MIDI module.  The XIAO module is a white 3D printed case with two slots to access GPIO pins and a speaker grill.

Photo of the XIAO MIDI Synthesizer connected to a serial MIDI module. The XIAO module is a white 3D printed case with two slots to access GPIO pins and a speaker grill.

First steps with the XIAO ESP32-C3 and SAM2965 based Synth module.

diyelectromusic.com/2025/06/26/xiao-esp32-c3...

#MIDI #XIAO #ESP32C3 #SAM2695

1 1 1 0
Video

#MIDI (SAM2695 MIDI GM Synth) with #VFMcartridge (by Ivan -Panyk System-)
Tetris song.

#MSX #MSX2 #MIDI #SAM2695

www.msx.org/forum/msx-ta...

0 0 0 0
Video

#MIDI (SAM2695 MIDI GM Synth) with #VFMcartridge (by Ivan -Panyk System-)
Doom song.

#MSX #MSX2 #MIDI #SAM2695

www.msx.org/forum/msx-ta...

0 0 1 0
Video

Testing #MIDI (SAM2695 MIDI GM Synth) with #VFMcartridge (by Ivan -Panyk System-)
Double Bubble song.

#MSX #MSX2 #MIDI #SAM2695

www.msx.org/forum/msx-ta...

1 1 1 0