Should I give up on the idea of having MIDI music in my game?

So, I’m currently working on a Roblox game that’s retro-themed. It has 3D objects as 2D sprites that follow you, textures no bigger than 256x256, the whole nine yards (the whole 8.2296 metres said the British Roblox dev)

I’m facing two issues currently, the first one I could probably work out on my own, that being;
I’m unable to create a first-person controller without a Robloxian humanoid. I don’t like using Robloxian humanoids in first person because their collision feels rectangular of sorts, so I tried to use a cylindrical part as the player’s collision, but I’m struggling to match it up to the current DOOM-style camera.

That’s not the point of this topic though, my main issue is that I want MIDI music in my game. It’s to sell the true retro theme and have the instruments and drums stop in real time rather than instantaneously cut out like a record. I’ve dug up some old roblox posts but I can’t find any working models that aren’t pre-2015, and these no longer work.

I’m guessing I’ll have to give up on the dynamic music/MIDI idea, due to having to have an audio file for each instrument, but I would love help!


Maybe you could upload one singular sound and then change the pitch/speed of it in the sound properties.

I understand why that could work in theory, but once you get to a new loading zone, the music would instantly cut out.

And if you change the pitch of the music, the drums would also be pitched up, which is completely impossible to do in MIDI files that supports drums.

Yeah, this is why I usually don’t upload singular sounds and change the pitch, I just upload the song in its entirety.

Which is fair, that’s honestly what I would usually do, but the game I’m created is supposed to be retro 3D. 1990-early 2000s style. Think Super Mario 64 for example and how the music was able to easily fade/transition between levels/areas.

I haven’t done much experimenting with sound stuff, but possibly you could slowly change the property of how far away the sound can be heard, because the sounds I upload usually get quieter the farther away you go.

That could honestly be a really good work around, if there isn’t a better one already. I’m gonna keep an open mind before doing anything unless there’s a really good solution/I have no other choice.

Music is obviously integral to any game, but what I’m mainly envisioning is individual instruments stopping when you go to a new area.

For instance, the piano in a song would stop playing any more notes but keep holding down the note that was pressed. Think of it as a live musical preformance, that’s what old retro games did.

They didn’t have the budget to implement 2 minute long tracks due to how much storage it would take up, so they used MIDI files which specified each instrument and note using pre-recorded sounds.

I am very interested in and somewhat experienced with MIDI and have never heard of someone trying to implement MIDI on Roblox. I would like to see what information you have so far on the topic. I would be interested in helping you find and code a solution. I’ll send you a personal message.

1 Like

(Sorry to necrobump but I felt like sharing)
It’s definitely possible:

I made my electric organ work by parsing through the file using a script i found online. I go through every channel of every track and for each different note used I create a looping sound instance and set it’s pitch according to the midi note number. Using separate sound objects helps me to avoid that ‘record scratch’ of starting and stopping sounds repeatedly.

Obviously there are still some things to work out, such as dealing with percussion as mentioned before (since with percussion tracks the note number would determine the instrument rather than pitch), and the timing can get wonky with certain files. Although since i’m using this for an organ most of the song files I use are keyboard pieces that I made myself.