this question appears alot but uh how do i add custom music to my Level?

El-fire

i am a toaster
ive searched and searched and looked through many threads on this topic but none of them have helped! i freesloted, i have the correct file names, the level header is set to play the music but when i load the level and play it, the music plays but after a few seconds it just crashes and when i remove the music everything is fine so its not the level its the music all im asking is what am i doing wrong? btw yes u consulted the wiki many times i probably missed something but the wiki didnt help much.
 
Ok so firstly you don't need to declare a freeslot for custom music. Secondly, all digital music lumps/files should have the O_ prefix (for example O_GFZ1.) Thirdly, what file format are your files? I'd use Ogg Vorbis (.ogg) if I were you. Fourthly, how big are those files? Recorded music like MP3 and OGGs can get pretty big, so they shouldn't be too long.
 
Ok so firstly you don't need to declare a freeslot for custom music. Secondly, all digital music lumps/files should have the O_ prefix (for example O_GFZ1.) Thirdly, what file format are your files? I'd use Ogg Vorbis (.ogg) if I were you. Fourthly, how big are those files? Recorded music like MP3 and OGGs can get pretty big, so they shouldn't be too long.
i did all of that (though i read on the wiki i had to freeslot but if i dont have to thats fine) so the music file i have was 9.48MB but after i compressed it in audacity its now 4.86MB idk if thats big or not im still really new to coding and bytes and whatnot. just realized the song im using is 4 minutes long idk if thats a problem.
 
Last edited:
I've been tryin to sort of replicate your problem here, since I've never had SRB2 crash on me cuz of the music (Yet it crashes for the stupidest things,) but to no avail. The music length and size can be anything, but I'd try to keep the length at a max of 5 minutes so to not make it too big. So I'm thinking it might be an issue with the music file itself.

Try getting another music file, but to be on the safe side, the file should be a MP3 file with a bitrate of 128kbps (Just nab a youtube video and put it through one of those youtube to MP3 converters, thats what I do when getting custom music.)
1645743818267.png

Also if you're gonna be using custom music, you might wanna get Audacity if you haven't already.
https://www.audacityteam.org/
 
I've been tryin to sort of replicate your problem here, since I've never had SRB2 crash on me cuz of the music (Yet it crashes for the stupidest things,) but to no avail. The music length and size can be anything, but I'd try to keep the length at a max of 5 minutes so to not make it too big. So I'm thinking it might be an issue with the music file itself.

Try getting another music file, but to be on the safe side, the file should be a MP3 file with a bitrate of 128kbps (Just nab a youtube video and put it through one of those youtube to MP3 converters, thats what I do when getting custom music.)
View attachment 63194
Also if you're gonna be using custom music, you might wanna get Audacity if you haven't already.
https://www.audacityteam.org/
alright thats also the same thing i do but i havent tried a mp3 so ill try that thanks.
Post automatically merged:

it did not like it as and mp3 but i did lower the bitrate to 128kbps like you said with a different video but it didnt work it didnt even play the music this time and it still crashed. i tried to change the bitrate for an .ogg and i couldnt do it and i tried looking up tutorials and still nothing.
 
Last edited:
God this has me stumped. I've never had SRB2 crash on me because of a music file, and I've had the game crash for really dumb reasons cough cough SIGSEV cough cough. MP3 and OGGs should be supported by SRB2, hell, SRB2's own music files are OGGs, so if it's crashing your game, then you must of done something to it.

could you maybe send me a link to the song you're using, perhaps I can try to replicate the crash. If it fails, then I got nothin.
 
ive searched and searched and looked through many threads on this topic but none of them have helped! i freesloted, i have the correct file names, the level header is set to play the music but when i load the level and play it, the music plays but after a few seconds it just crashes and when i remove the music everything is fine so its not the level its the music all im asking is what am i doing wrong? btw yes u consulted the wiki many times i probably missed something but the wiki didnt help much.
Your wad is formatted like this. The music is below the map lumps, this will crash the game.

1645756479145.png


SRB2 is trying to read the music as a map lump. That is because the Map Marker (MAPSU, in my example here) makes the game recognize all files below it as map files. This is why the game crashes when the music is placed below the map lumps.

Here's how to fix it:
Select the music

1645756506358.png


and press CTRL+U to move it upwards, until it is above the map lumps.

1645756534110.png


Now, just load the file. Your music should work now! Hope this helps.
 
Last edited:
Your wad is formatted like this. The music is below the map lumps, this will crash the game.

View attachment 63207

SRB2 is trying to read the music as a map lump. That is because the Map Marker (MAPSU, in my example here) makes the game recognize all files below it as map files. This is why the game crashes when the music is placed below the map lumps.

Here's how to fix it:
Select the music

View attachment 63208

and press CTRL+U to move it upwards, until it is above the map lumps.

View attachment 63210

Now, just load the file. Your music should work now! Hope this helps.
oh... its that simple huh? well thanks i would have never guessed to do that. all it was, was the song being crushed by everything else and i had to fish it back to the top. thanks again.
 
oh... its that simple huh? well thanks i would have never guessed to do that. all it was, was the song being crushed by everything else and i had to fish it back to the top. thanks again.
Yeah no problem! This one stumped me for longer than I care to admit a couple years ago, LOL.
 

Who is viewing this thread (Total: 0, Members: 0, Guests: 0)

Back
Top