# Music for my game!

**URL:** https://forum.makecode.com/t/music-for-my-game/4818
**Category:** Collaboration
**Created:** [December 6, 2020, 7:29pm UTC](https://forum.makecode.com/t/music-for-my-game/4818 "2020-12-06T19:29:04Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![DahbixLP](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dahbixlp/32/4760_2.png) [@DahbixLP](https://forum.makecode.com/u/DahbixLP)
#### Post date: [December 6, 2020, 7:29pm UTC](https://forum.makecode.com/t/music-for-my-game/4818/1 "2020-12-06T19:29:04Z")

</div>

Hello! I need music for my raft themed game! And what fits better to raft/ ocean? Exactly Bosun Bill (sea of thieves)  
If someone could make this song for me I wuold be very happy!  
Pls Make the song in a new Forever loop so It always plays! And also make it so You don’t hear that it is looped (so that you can’t hear any end or start)  
Thank You!  
(You don’t have to do the secondary sound! Just the main melody!)  
Thx  
Here is the game

> **[Raft Craft! 11](https://arcade.makecode.com/71381-00327-40225-63501)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Here is the song

[![](https://img.youtube.com/vi/ElO4EtPQv8E/maxresdefault.jpg "Bosun Bill") ](https://www.youtube.com/watch?v=ElO4EtPQv8E)

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [December 7, 2020, 5:47pm UTC](https://forum.makecode.com/t/music-for-my-game/4818/2 "2020-12-07T17:47:11Z")

</div>

I whipped up something real quick for you:

> **[Bosun Bill - Sea of Thieves by Rare (studio)](https://arcade.makecode.com/49889-81918-02174-81702)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Open it in TypeScript, copy, and paste away. Hope this helps 🙂

---

<div class="post-metadata">

### Author: ![DahbixLP](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dahbixlp/32/4760_2.png) [@DahbixLP](https://forum.makecode.com/u/DahbixLP)
#### Post date: [December 7, 2020, 5:55pm UTC](https://forum.makecode.com/t/music-for-my-game/4818/3 "2020-12-07T17:55:25Z")

</div>

WOW THX this is amazing!

---

<div class="post-metadata">

### Author: ![andrew-ski](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/andrew-ski/32/1774_2.png) [@andrew-ski](https://forum.makecode.com/u/andrew-ski)
#### Post date: [December 7, 2020, 7:13pm UTC](https://forum.makecode.com/t/music-for-my-game/4818/4 "2020-12-07T19:13:16Z")

</div>

This is great! Did you do this all by hand? I downloaded some public domain sea shanty midi files and converted them to RTTTF for my project, but this sounds SO good.

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [December 7, 2020, 8:34pm UTC](https://forum.makecode.com/t/music-for-my-game/4818/5 "2020-12-07T20:34:26Z")

</div>

Haha thanks for the compliment 😃

This is how I make the songs in Arcade:

1. First I find some sheet music and download it. I usually use the [Musescore](https://musescore.com/dashboard) website to browse for sheet music.
2. Then I open it in the [Musescore](https://musescore.org/en) software, make song adjustments as necessary, and export to the MIDI format. I usually check the `.mid` file in [Audacity](https://www.audacityteam.org/).
3. After, I adjust my Python scripts to use the MIDI file I just exported. The first script opens and parses the MIDI with [Mido](https://pypi.org/project/mido/) and generates a JSON file that looks like this:

```json
{
    "midi": [
        [
            {
                "note": 72,
                "name": "C5",
                "velocity": 80,
                "time": 0.24895833333333334
            },
            {
                "note": 48,
                "name": "C3",
                "velocity": 80,
                "time": 0.24895833333333334
            }
        ],
        [
            {
                "note": 67,
                "name": "G4",
                "velocity": 80,
                "time": 0.24895833333333334
            },
            {
                "note": 55,
                "name": "G3",
                "velocity": 80,
                "time": 0.24895833333333334
            }
        ],
        [
            {
                "note": 72,
                "name": "C5",
                "velocity": 80,
                "time": 0.4739583333333333
            },
            {
                "note": 48,
                "name": "C3",
                "velocity": 80,
                "time": 0.4739583333333333
            }
        ],
        // More notes
    ]
}

```

1. I then run my second script to use this JSON and it produces a `.ts` file that looks like this: (I changed the speed to be I think 1.5x slower.)

```auto
function play_song() {
    // ['C5', 'C3']
    {
        music.setVolume(80)
        // C5
        timer.background(function() {
            music.playTone(523, 372.0)
        })
        // C3
        music.playTone(130, 373)
    }
    // ['G4', 'G3']
    {
        // G4
        timer.background(function() {
            music.playTone(391, 372.0)
        })
        // G3
        music.playTone(195, 373)
    }
    // ['C5', 'C3']
    {
        // C5
        timer.background(function() {
            music.playTone(523, 709.5)
        })
        // C3
        music.playTone(130, 710)
    }
    // More notes
}

play_song()

```

So I don’t do the songs by hand (I would have gone insane) but writing the scripts to generate the typescript took ages…

---

<div class="post-metadata">

### Author: ![dinbags](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dinbags/32/8035_2.png) [@dinbags](https://forum.makecode.com/u/dinbags)
#### Post date: [March 14, 2023, 4:28pm UTC](https://forum.makecode.com/t/music-for-my-game/4818/6 "2023-03-14T16:28:23Z")

</div>

here’s a challenge do the Dance of the Sugar Plum Fairies” from The Nutcracker

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [March 14, 2023, 4:48pm UTC](https://forum.makecode.com/t/music-for-my-game/4818/7 "2023-03-14T16:48:02Z")

</div>

I’m sorry, I’m not accepting music requests anymore. If you have the MIDI file for it, you may be able to convert it with these instructions:

> [@ArcadeMIDI extension](https://forum.makecode.com/t/arcademidi-extension/15079):
>
> A new and improved version of [Musical-Images](https://forum.makecode.com/t/music-requests/6454/22), I’m introducing the extension ArcadeMIDI! Import this extension with the URL: [https://github.com/UnsignedArduino/ArcadeMIDI](https://github.com/UnsignedArduino/ArcadeMIDI)
> 
> > **Blocks available**
> >
> > \<a class="lightbox" href="https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/7/7ee54796472697d8256b15c11a9ba03ed0b725c1.png" data-download-href="/uploads/short-url/i6zodALgp5W3gW2NUSJu1c94a9X.png?dl=1" title="image" rel="noopener nofollow …

or an older version:

> [@Music requests](https://forum.makecode.com/t/music-requests/6454/22):
>
> I’ve been using a new extension that doesn’t generate JavaScript - it generates MakeCode Arcade images that it will parse using an easy-for-a-robot-to-generate-but-not-easy-for-humans-to-make format. So it’s easier to copy and paste a bunch of images into an image editor than to switch to JavaScript, create a new .ts file, paste in JavaScript, pray to the gods of MakeCode Arcade and switch back to blocks hoping nothing has been screwed up. The extension is here: I’ve written a Python script t…

---

<div class="post-metadata">

### Author: ![dinbags](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dinbags/32/8035_2.png) [@dinbags](https://forum.makecode.com/u/dinbags)
#### Post date: [March 15, 2023, 5:26pm UTC](https://forum.makecode.com/t/music-for-my-game/4818/8 "2023-03-15T17:26:38Z")

</div>

do you know how to make platforms move up and down
