Returning to my minimalist Lo-Fi minimalism, bringing the vintage SP0256A-AL2 speech synthesizer to a Philip Glass opera...
https://diyelectromusic.com/2026/04/01/minimalist-lo-fi-minimalism-part-2/
Returning to my minimalist Lo-Fi minimalism, bringing the vintage SP0256A-AL2 speech synthesizer to a Philip Glass opera...
https://diyelectromusic.com/2026/04/01/minimalist-lo-fi-minimalism-part-2/
Minimalist Lo-Fi Minimalism – Part 2
Last year I programmed up an Arduino with my Pi Day MIDI Sequencer to play a short extract from Philip Glass’ Einstein on the Beach. You can read all about that here: Minimalist Lo-Fi Minimalism.
Having spent a fair bit of the time since then playing around with an Arduino and SP0256A-AL2 and finally getting it hooked up to MIDI, I parked an idle though that it might be interesting to get it “singing” part of Einstein on the Beach. This post comes back to that idea.
https://makertube.net/w/4upxhBNemynPiFKfdzzea2
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:
If you are new to Arduino, see the Getting Started pages.
Parts list
The Circuit
I did wonder about combining both the Pi Day sequencer and SP0256A-AL2 shield into a single device, but then decided it would be simpler to treat them as two separate devices and use MIDI to pass control between them.
Consequently I’ve ended up as follows:
Where the Pi sequencer is running the code for Minimalist Lo-Fi Minimalism with a small update to send additional MIDI messages to be interpreted by the SL0256A-AL2. All other MIDI is passed through the SL0256A onto a MIDI synth as before.
The Code
Having decided on the basic architecture, the next decision was how to encode the information destined for the speech synthesizer. I need to be able to tell it a pitch and a number to be “sung”. I toyed with the following ideas:
I opted for the last option, treating each number as a different instrument on a different MIDI channel. This is a bit wasteful but was a lot easier for testing than attempting to get a specific velocity or having to send MIDI PC messages to keep reselecting the “voice” before each note.
As described previously in Minimalist Lo-Fi Minimalism MIDI channels 1,2 and 3 are already used for the bass and two voice lines, so I’m using MIDI channels 4 through to 13 for the numbers one to ten.
The code for the Glass already has pitch and which number encoded into the data structures. To trigger the “singing” via the speech synthesizer I’m using the Soprano voice pitches, but an octave lower, so it is a relatively simple matter of adding in an additional MIDI send as follows:
MIDI.sendNoteOn(sop[i], 64, MIDI_CHANNEL_SOP); // Original codeIt is using the “NUM” MIDI channel – 1 as I’m encoding the numbers 1 to 10 which are stored in the num[] array. As the speech synthesis is essentially running at a fixed duration for each utterance, I’m not even bothering with a Note Off message.
On the speech synth side, again essentially all of the code is the same as for the Arduino and SP0256A-AL2 – Part 6 MIDI code, but instead of singing “do, re, mi”, etc linked to pitch, I need to take the word from the MIDI channel. To do this, I’ve expanded the speak() function to include the number and call it as follows from the NoteOn callback:
speak(channel-MIDI_CH2NUM, pitch);This will result in a number from 1 to 10 and a MIDI pitch which can then be used to select the playback frequency as before and then say the allophones corresponding to the received number.
void speak (uint8_t num, uint8_t note) {The SP0256A-AL2 datasheet lists the allophones to use for the basic numbers.
I’ve used, in a few cases, slightly shortened versions of the numbers from one to ten. In particular I’ve removed the duplicate allophones for six and seven to make them a little shorter to playback.
The allophones for “One” includes the use of “SX” but I can find no other mention of that in the datasheet, so I’ve ignored it.
One final change was to tweak the timings of the original playback. I’ve had to slow it down a lot to give the SP0256A-AL2 time to say each number, and I’ve also introduced a small delay between sending the MIDI messages and updating the numbers on the display to allow them to sync up a little better.
If the MIDI went to the synth directly from the Pi Day sequencer then a delay would probably be required there too, but as it has to go through the SP0256A-AL2 and get sent back out using the “software THRU” of the Arduino MIDI library, it has a natural slight delay already and isn’t too noticeably out of sync.
Closing Thoughts
I always knew there would be a few limitations, not least of which due to the time it takes to play back the allophones, but in essence I believe this works. I’d rather it was a little more up tempo, but sometimes one just has to work with what is available.
I think it is certainly keeping within the spirit of attempting an extract of the original opera on 8-bit microcontrollers, so it’s not doing too badly.
Kevin
#arduinoUno #midi #Minimalism #PhilipGlass #piday #sp0256aal2@futzle Ok. So, I've not done any fancy programming, but I have managed to get my vintage SP0256A-AL2 speech synthesizer chip to "sing" it for you...
Hopefully that tends a bit towards the weird :)
I've persuaded my SP0256A-AL2 to "sing" the Twelve Days of Christmas.
https://diyelectromusic.com/2025/12/23/sp0256a-al2-sings-the-twelve-days-of-christmas/
#SP0256AAL2 #ArduinoUno #MusicAdventCalendar #MyApologies #FiveGoldRings
SP0256A-AL2 Twelve Days of Christmas
SP0256A-AL2 Sings the Twelve Days of Christmas
Partly prompted by a programming challenge by Futzle on Mastodon, I thought it might be interesting to try to get my Arduino and SP0256A-AL2 to sing the Twelve Days of Christmas.
https://makertube.net/w/diBkzrhkh3tekAPBhGzrVj
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:
If you are new to Arduino, see the Getting Started pages.
Parts list
The Code
I wasn’t aiming for a clever code solution, as can be seen submitted to the programming competition already, but I was hoping to get the computer to do at least some of the work for me.
The first issue is getting a useful range for the song. My original MIDI SP0256 project managed around an octave and a half. Well it so happens that the 12 Days of Christmas is just over 1 octave, so if I can position that to the top end of the range, I should be ok.
This is the most compact notation of the tune that I know of. This is from the “Christmas Praise” Brass Band carol book, which seems to be one of the most common references for any band out caroling at this time of year.
Ignoring the introduction, I’m going to transpose this into concert Bb (i.e. up a minor third) which gives me a note range from F2 through to G3. This allows me to use a sensible range of the SP0256A without it getting too slow down at the bottom end of things.
The main text/lyric structure will be set up in a series of functions as follows:
intro() - "on the nth day of Christmas my true love gave to me"Some variations are required as follows:
In order to capture the variations and repeats for each verse, I’ve opted to use an increasing bitmask for each time through to trigger the various phrases. Bit 0 always indicates one() must be called. Bit 1 indicates two(), and so on. It starts with the value 1 but will keep adding another bit as the verses change, so will have the values 1, 3, 7, 15, 31, 63, etc. thus allowing me to build up the verses with one bit per verse.
one() takes bool parameters to indicate first time and last time through. two(), three(), four() take a bool parameter to indicate if it is a “post five gold rings” verse. Using the bitmask this is pretty easy as it just means any of the bits 0x0FF0 will be set for verses 5+.
Here is the main code loop.
uint16_t phrase=1;The timings were really quite tricky as I have several variables to work to:
In principle I could probably work out the slowest interval and work back from there to get some accurate timings, but I just did a bit of trial and error on each phrase until it was close enough. The unevenness remaining was because I didn’t want to slow the whole thing down to the slowest phrases being “sung”. It is slow enough already!
Also, as it doesn’t look much, I’ve added an LED to light up at the start of an allophone and to go off whenever a pause is encountered.
Closing Thoughts
I’m actually really pleased with this. It is a good balance of close enough to show the principle without me undertaking complex timing and endless fiddling.
I could probably get a bit cleverer with the code, but that wasn’t really the point for me. I’ve used an algorithm where it mattered to me, and was quite happy to spell out the allophones, frequencies, and timings by hand as I went.
Lastly, let me wish you the compliments of the season, to you and yours.
Kevin
Interesting project.
Thank you 💕 for sharing
#Raspberry #Pi #arduino #programming #audio #raspberrypipico #sp0256aal2
And so, finally, I can drive a SP0256A-AL2 vintage speech chip using a MIDI keyboard.
This uses all the principles from previous posts and my recent Uno Shield PCB.
It really isn't very responsive at all and can only comfortably do an octave and a bit.
But hey, I'm getting an 80s speech synth chip to "sing" :)
https://diyelectromusic.com/2025/09/24/arduino-and-sp0256a-al2-part-6/
#Arduino #MIDI #SP0256AAL2 #JustBecauseYouCanDoesntMeanYouShould
Arduino and SP0256A-AL2 – Part 6
Finally I’m doing something arguably slightly musical with my SP0256A-AL2! Playing it over MIDI.
https://makertube.net/w/wLRxeVHtMatYo7NGWCw54U
Warning! I strongly recommend using old or second hand equipment for your experiments. I am not responsible for any damage to expensive instruments!
If you are new to microcontrollers, see the Getting Started pages.
The Circuit
This is using my Arduino SP0256A-AL2 Shield with an SI5351 programmable clock module, so this is essentially the circuit from Arduino and SP0256A-AL2 – Part 5 with the addition of a MIDI module.
I also used my Arduino MIDI Proto Shield but any MIDI RX circuit on the Arduino RX pin would work.
The same circuit can be made on solderless breadboard, but I’ve opted to use my PCBs for convenience as that is why I designed them in the first place.
The Code
I’m using all the main code from Arduino and SP0256A-AL2 – Part 5 but I’ve split the speaking into “start” and “stop” parts so I can drive them from MIDI NoteOn and NoteOff messages.
The main “speak” code now looks like the following:
void speak (uint8_t note) {So when called with note==0 it will stop the speaking by sending PA3, but for any note between 36 and 56 it will set the frequency and then say the appropriate “Do, Re, Mi” word. I’ve used the same word for the natural and sharp equivalent. I’ve also allowed for two octaves. This is why there are four note values that result in the word “Do” being said: MIDI notes 36, 37 (C2 and C#2), 48, and 49 (C3 and C#3).
This can now be called from the code that handles MIDI Note On and Note Off messages.
Closing Thoughts
It works, but it isn’t very responsive due to the time it takes to say each allophone.
I guess when I started thinking about doing this, I thought I’d get more of a frequency range from the device and wasn’t anticipating it being so “low” in the musical range either.
But it is quite fun to see it finally being driven by a music keyboard, even if it isn’t particularly practical!
I know there is emulation of an SP0256A-AL2 in the RC2040 (an emulation of the RC2014 on a Raspberry Pi Pico) so I might at some point look at seeing if I can just drop the hardware and doing it all in software at some point by adjusting sample and playback rates.
I suspect that will work a lot better, but it isn’t quite the same as driving the real thing 🙂
Kevin
I've stuck my SP0256A-AL2 circuit onto an Uno shield format board.
It has an option for a fixed oscillator or the SI5351 programmable clock and should make any further messing around a bit easier.
https://diyelectromusic.com/2025/09/23/arduino-sp0256a-al2-shield-design/