Microsoft MakeCode

Melody Editor in Beta!

I saw that the team just dropped this in beta a few hours ago: The melody editor has arrived!

You can find the new melody editor in the Music drawer of the toolbox. I love how brilliantly simple the block is. The melody player blocks until the melody has finished playing, so you can string multiple melody blocks together to create longer songs.

To add background music to a game, add melody blocks to a forever block.

Kudos to the team for a great addition!

Note: The comments above on how the block works are not my own. I totally stole them from Kim’s comments in GitHub. :slight_smile: Kim is the primary author of the melody block. See the full set of comments here, complete with screenshots:

7 Likes

i made a demo for all of the gallery melodies, with colored squares lighting up to signify the notes after the melody plays

1 Like

This is really exciting!! I don’t think previously there were any method to make the background music stop once the game is over.

One feature I’d like to be added would be the ability to change key and whether the scale is major or minor in the blocky interface, though I see that the notes can be customized in JavaScript like this:

game.onUpdate(function () {
    music.playMelody("E2 G2 A2 G2 D3 C3 D3 E3 ", 640)
})
1 Like

Yep! We are definitely not done with the melody editor. If you have any suggestions or features, please file them over at https://github.com/microsoft/pxt-arcade/issues

1 Like

There are some existing tickets in this space, worth looking at these too to add support for things mentioned already: