Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 13:18 02 May 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Inexpensive MIDI Synth based on SAM2695

     Page 1 of 2    
Author Message
al18
Senior Member

Joined: 06/07/2019
Location: United States
Posts: 222
Posted: 04:03am 29 Jan 2025
Copy link to clipboard 
Print this post

M5Stack just introduced a MIDI synth module based on the SAM2695 chip for $14.50. The model is U187.

https://shop.m5stack.com/products/midi-unit-with-din-connector-sam2695?ref=langship

Both Digikey and Mouser will be carrying this module, though it’s not in stock yet.

The module is interfaced thru UART thru a Grove connector.

Wonder if this module could work with a PicoMite?
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7464
Posted: 07:53am 29 Jan 2025
Copy link to clipboard 
Print this post

If it's only UART then it depends on an enthusiastic someone writing the MIDI protocol software. :) It will need to be someone with an in-depth knowledge of how MIDI works (or is willing to learn).

It's not something to build into MMBasic as the normal COM ports should be fine.

On the other hand, the VS1053 module will already play MIDI files and is supported by MMBasic as an audio device.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
PilotPirx

Regular Member

Joined: 03/11/2020
Location: Germany
Posts: 92
Posted: 08:09am 29 Jan 2025
Copy link to clipboard 
Print this post

I bought the U178 with the same SAM2695 Chip but without DIN connector and Jack.
https://shop.m5stack.com/products/midi-synthesizer-unit-sam2695
I will try to use it with MMBasic (CMM2).
Has anyone written a MMBasic MIDI player? So read in data from a midi file and output it as a MIDI stream on a serial port?
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10000
Posted: 08:21am 29 Jan 2025
Copy link to clipboard 
Print this post

  Quote  M5Stack just introduced a MIDI synth module based on the SAM2695 chip for $14.50. The model is U187.


Does this do much more than the VS1053 which is fully supported by the PicoMite including MMBasic commands to send the MIDI to it. (NOTE ON/OFF etc.). Just needs someone to write the Basic code read in a MIDI file and then convert it to the MMBasic commands.
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 451
Posted: 06:20pm 29 Jan 2025
Copy link to clipboard 
Print this post

A few months ago I started working with midi and a midi player in Basic. But only a beta to learn. I'm still struggling with the exact note length because of the tick calculation. I can look for the code this weekend and upload it here. I documented it quite well. As I said, only for learning and beta.

Matthias
 
PilotPirx

Regular Member

Joined: 03/11/2020
Location: Germany
Posts: 92
Posted: 06:54pm 29 Jan 2025
Copy link to clipboard 
Print this post

@homa
Sounds good. Maybe we can improve it.Thanks.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1134
Posted: 08:03pm 29 Jan 2025
Copy link to clipboard 
Print this post

So, although not a sound module, we should be able to hook-up a MIDI shield to the PicoMite, right?



 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7464
Posted: 08:14pm 29 Jan 2025
Copy link to clipboard 
Print this post

Here is the info on the Atari ST MIDI connections. There is a simple opto-coupler and a couple of transistors IIRC. I don't know if it's of any interest.

Oh, just discovered that for the drivers they used 7404 inverter followed by 7405 0c inverter, not just transistors. They were posh. :)

.
Edited 2025-01-30 06:20 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4815
Posted: 09:12pm 29 Jan 2025
Copy link to clipboard 
Print this post

@Peter,

There is a sound quality difference between the 1053 that is implemented in PicoMite, and the SAM2695 when it comes to MIDI.

See this



I can imagine people looking for the SAM chip.....

source

Volhout
Edited 2025-01-30 07:15 by Volhout
PicomiteVGA PETSCII ROBOTS
 
damos
Regular Member

Joined: 15/04/2016
Location: Australia
Posts: 68
Posted: 09:29pm 29 Jan 2025
Copy link to clipboard 
Print this post

I bought one of these a few years ago and it is very good:

Click here

It has a lot of quite reasonable voices and supports all the things you expect like velocity, polyphony etc and is also reasonably low latency.

The old DIN connections are really only good if you are already heavily invested in the DIN system. If you already have DIN MIDI devices, it is convenient for hooking up to micros and experimenting as the circuity is very simple.

If you want to play from a keyboard, many of the modern controllers only support USB MIDI and don't even have the DIN ports so it can be hard to test your circuit.

If you want to experiment with MIDI on micros and test using a low cost MIDI keyboard, you really need to have a USB MIDI Host controller. There is a company in the UK that has done all the hard work and supports all the Host protocol and outputs it as TTL serial. This saves a lot of pain and works well.
 
al18
Senior Member

Joined: 06/07/2019
Location: United States
Posts: 222
Posted: 11:00pm 29 Jan 2025
Copy link to clipboard 
Print this post

The VS1053 and SAM2695 are similar devices, with the SAM2695 having more advanced MIDI capability, including a second bank of Roland MT32 compatible instruments.

There’s an interesting discussion on Atariage forum, where Mytek discusses incorporating the M5stack U178 into his expansion board for Mytek’s NUC size Atari 8-bit computer at https://forums.atariage.com/topic/337657-invitation-to-the-launch-of-the-midicar-player/page/4/ Check out his video midway down the page.

FYI Mytek was able to reverse engineer the $300 Hybrid Arts Midimate MIDI interface for the Atari 8-bits a few years ago, to an 8 pin PIC chip, an 8 pin Opto Isolator chip and a handful of resistors. More info here https://ataribits.weebly.com/midi.html
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10000
Posted: 08:22am 30 Jan 2025
Copy link to clipboard 
Print this post

  Quote  The VS1053 and SAM2695 are similar devices, with the SAM2695 having more advanced MIDI capability, including a second bank of Roland MT32 compatible instruments.

The point about the VS1053 is that you can just chuck a midi file at it and it will play it. It has the intelligence to understand the file header. The PicoMite firmware doesn't have to do anything on timing just feed its buffer. So PLAY MIDI takes a midi file, without having to interpret anything,  and sends it as fast as the VS1053 can take it. Can the SAM2695 do this or is it expecting the midi commands to be sent at the appropriate timing?
 
al18
Senior Member

Joined: 06/07/2019
Location: United States
Posts: 222
Posted: 10:05pm 30 Jan 2025
Copy link to clipboard 
Print this post

So the VS1053 is not compatible with the MIDI 1.0 specification, which states on page 1 the MIDI interface operates at 31.25 Kbaud, asynchronous, with a start bit, 8 data bits (D0-D7) and a stop bit. I didn’t realize how limiting the VS1053 was, not being able to be connected to a MIDI keyboard.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7464
Posted: 10:13pm 30 Jan 2025
Copy link to clipboard 
Print this post

The VS1053 isn't a MIDI device at all, it's a multi-purpose CODEC that happens to be able to play MIDI data.
  Quote  Decodes multiple formats
Ogg Vorbis
MP3 = MPEG 1 & 2 audio layer III (CBR+VBR+ABR)
MP1 & MP2 = MPEG 1 & 2 audio layers I & II optional
MPEG4 / 2 AAC-LC(+PNS), HE-AAC v2 (Level 3) (SBR + PS)
WMA4.0/4.1/7/8/9 all profiles (5-384 kbps)
FLAC lossless audio with software plugin (up to 24 bits, 48 kHz)
WAV (PCM + IMA ADPCM)
General MIDI 1 / SP-MIDI format 0

Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10000
Posted: 10:58pm 30 Jan 2025
Copy link to clipboard 
Print this post

  Quote   I didn’t realize how limiting the VS1053 was, not being able to be connected to a MIDI keyboard.

It can be - its another mode of use
 
PilotPirx

Regular Member

Joined: 03/11/2020
Location: Germany
Posts: 92
Posted: 09:36am 21 Mar 2025
Copy link to clipboard 
Print this post

I have written a MIDI player that controls the SAM2695. The tracks are played one after the other, so a MIDI file in format 0 is ideal (format 1 - several tracks synchronized can be converted to format 0 with tools).
I developed the IO board for the CMM2 G2 V2 myself. It has MIDI IN/OUT(Through), RS232, joystick, relay output, driver for WS2812 and a GROVE bus (I/O, I2C, UART) with 5 connections that can be switched between 5V and 3.3V. All pins to the outside are ESD protected.

A demo-video:
MIDI player

When the project is finished, I will publish it.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3299
Posted: 04:06pm 21 Mar 2025
Copy link to clipboard 
Print this post

Terrific project. Looking forward to seeing details.

What's the little white device labelled "synth"? Can you share a link for it?
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
PilotPirx

Regular Member

Joined: 03/11/2020
Location: Germany
Posts: 92
Posted: 09:31am 22 Mar 2025
Copy link to clipboard 
Print this post

@lizby

synth
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3299
Posted: 12:19pm 22 Mar 2025
Copy link to clipboard 
Print this post

Cool. Thanks.

"Synth Unit is an audio module designed specifically for MIDI sound systems. This unit features the built-in SAM2695 audio synthesizer and accepts standard MIDI signals through serial communication. It provides various audio synthesis and processing capabilities, including audio synthesis, mixing, and sound effects processing."
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 451
Posted: 08:28pm 22 Mar 2025
Copy link to clipboard 
Print this post

  PilotPirx said  I have written a MIDI player that controls the SAM2695. The tracks are played one after the other, so a MIDI file in format 0 is ideal (format 1 - several tracks synchronized can be converted to format 0 with tools).
I developed the IO board for the CMM2 G2 V2 myself. It has MIDI IN/OUT(Through), RS232, joystick, relay output, driver for WS2812 and a GROVE bus (I/O, I2C, UART) with 5 connections that can be switched between 5V and 3.3V. All pins to the outside are ESD protected.

A demo-video:
MIDI player

When the project is finished, I will publish it.


 
     Page 1 of 2    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025