A new way to create music in Makecode

It seems that recently there was an update to Makecode Arcade, allowing for sounds to be made using different waveforms. I’m certain this will be excellent for creating custom sound effects, but I wanted to see how far I could push this. And so I decided to use the new blocks to create an entire song! I did have a little trouble trying to figure out how to get more than one “channel” of notes playing, but by using Makecode’s timer extension and the “separately do” block, I was able to get it working. This was by no means an easy feat, as the song itself consists of 207 lines of code! And there was a lot of math involved trying to figure out the correct note lengths.

And while UnsignedArduino has made a MIDI extension for a, much easier way of implementing music, I still wanted to see if it was possible to create songs this way. Plus, because of the different waveforms, you can technically have different instruments for your music. I’m sure this is just the surface of what you can do with the new blocks, but I’m proud of what I’ve got done, so please, take a listen!

The music used is the Kremlantis theme from Donkey Kong Land, composed by the excellent David Wise.


With the sinewaves and PRAAT audio software, i’ve been able to make (low quality) human speech- I might be working on a text to speech game :shushing_face:


Nice work, @Spaghetti_Coder! Have you checked out @kwx “Simple loops” method?

Really cool, @randomuser!!! Do you have a small demo for us?

I’ve been looking some time now for a way to bring back to life something like the old SAM speak synthesizer from the C64 in MCA!!!


Here, a test i did a few months back. It was supposed to be the roblox ‘Hello!’ but as it was my first time in the program, it turned into this monster! In my current demo I’m making the phonemes of english so you could build words, with 3 sine wave tracks instead of the just 1 you hear in this clip. There will also be volume variation- this is important because as you hear in the demo the hello has an odd high note at the end that is actually supposed to be quieter than the rest. Once I’m done with Unique-A-Thon, this will be my top priority again!


(Thats a great idea, using the timer extension. In my usage of sinewaves they always end with an odd few-milisecond beep, so the timers should eliminate that!)


Just sending an update if anyone’s curious. I’ve progressed a bit on this game between unique-a-thon rounds, and its looking great! The PRAAT software is a bit complex for me but now I can understand it. So far I’ve gotten the text to speech to create the english phonemes /b/, /ē/ (long ee sound), and /t/. (What a feat of engineering… i got a computer to say beet) I started with /b/ and /t/ to make sure the bot could handle the full vocal stops, and it looks like it mostly can, although my you need to have great audio quality for it to register correctly on the spectrogram in PRAAT. I’ll send more updates after unique-a-thon ends!


Where can I find it? Because I want to hear how it sounds or even if there are more advancements.

1 Like

I haven’t done any more work on it since- second semester has been tough! I’m hoping to get back into programming it during the next week-long break, so probably april

Can you send what you have right now?

I love it! iI’s amazing that you can use simple blocks to make such beautiful music!

1 Like