SFX in MakeCode Arcade?

FYI, you can do that already, MakeCode has its own string-based notation. peli@'s extension converts RTTL format into the MakeCode syntax which makes it possible to use pre-existing melodies in that format, but if you’re making melodies from scratch I think the existing MakeCode format may be a bit more powerful since it’s more closely tied to the way the underlying sound engine works.

Here’s an example from a test I was working on. FWIW, it doesn’t currently work great since the different instruments quickly get out of sync, it would need a different approach and not just simple repeated loops.

const hihat = new music.Melody("@0,50,0,0 ~5 c8-240 c8 c c c c c @0,250,0,0 c")
const snare = new music.Melody("@10,75,0,0 ~5 r-240 r g5 r r r g r")
const bass = new music.Melody("@10,120,80,0 ~15 c2-120 d# f f# g f# f d#")
const guitar = new music.Melody("@100,100,160,0 ~15 c4-240 g r r c5 g r r c5 b4 g4 f# e d#-120 e-240")
3 Likes