1. Prepare your BGM you want to use. - Add a music to sound as the naming rule below. Rule: If your music name is 'Name', the music name should be 'Name (Intro)' and 'Name (Main)'. 'Name (Intro)' will be needed only when that music has an intro phrase like drum fill-in. 'Name (Main)' is the main loop of the music. If you need it to loop, the end of that music should be connected to the beginning of it smoothly. 2. Set the music information to some lists. - Append a title name, which is like 'Name' described avobe, to 'BGM Title' list. - Append 1 to 'BGM Intro' list and you prepare the music like 'Name (Intro)' data, if you need the intro phrase. If you don't need it, append 0 to that list. - Append 1 to 'BGM Loop' list if you want to loop that music. If you don't need to do it, append 0 instead. - the list index number will be a track number of the music. 3. Play the music in the game. - Just send the event name of 'Track' + track number, it is like 'Track1' for the first music. - If you send the event while another BGM is playing, the current BGM will be faded out and the new one will start after stopping the previous one.
This has used at a lot of my games. If you like it, please look at the studio as; https://scratch.mit.edu/studios/35458610