Connecting picocalc to MIDI Synthesizer Module

Using the side pins of the picocalc, I successfully played MIDI sounds on mmbasic.

I configured the GP28 pin as a software UART output, sending a 31250bps signal to the MIDI Synth module. While GP28 could likely be assigned to the hardware UART, I abandoned that idea since UART1 was already in use for the serial console via another pin.
(Is there a way to use the hardware UART?)

The Synth module is Kinoshita Laboratory’s “MIDI-guy” (the red board on the left, equipped with SAM2695). I plan to integrate this and force the audio output to the speaker.

15 Likes

Next step will be a tracker app on the pico :smiley:! Great job!

2 Likes

Thank you!
I’ve seen tracker apps before, but I’ve never actually used one myself…

For now, I’ve managed to parse and play SMF Format 0 .MID files.
Since I’m handling wait times with `pause`, game music with lots of messages happening at once ends up sounding slow, but piano pieces play just fine.

1 Like

That midi module looks great! A tracker app would be so good. The PicoCalc’s keyboard would be great for note entry.

A euclidian sequencer or another kind of generative midi program would be a fun project to build.

2 Likes

grbzng, thank you!

Using Settick instead of Pause improved the tempo drift somewhat.
However, perhaps because I’m using software UART, the tempo still slows down as the number of notes increases.
I tried to use hardware UART to increase processing speed. But I couldn’t disable the serial console function (which connects to a PC terminal software via USB serial) that occupies it.
This is proving quite difficult…

Reference 1: The “Serial Console” section in the Picomite user manual
Reference 2: Unofficial PicoCalc PicoMite/WebMite firmware release thread (V6.00.02) - #216 by Toml_12953

If you compile the source code yourself, look in MM_Misc.c around line 3981.

To regain control of your serial ports, comment out these lines:

//            Option.SerialConsole = 1;
//            Option.SerialTX = 1;
//            Option.SerialRX = 2;
1 Like