How to Create Game Music? Need Pointers!

Not sure if this is the right channel… not even sure it’s a specific Linux question (but it’s on Linux that it’s happening).

My daughter is composing music (she uses MuseScore). Now she would like to compose music for a game (e.g. music/mood changes when changing rooms, etc…). Any pointers on how she could get started on this?

(the fun part is that in FOSS games you can actually change the music in a game and you don’t need to violate terms or go hacking the source files… it’s just all out there. (oh, and if things work well, she could even contribute back to a game)

3 Likes

I’m not a musician, and not even a game developer, so I’m the least competent person. So I’m just speculating…
The music for a “room” is played endlessly in the game, right?
So the music has to be loopable, that means the very last samples of the sound blends smoothly with the very first samples.
That applies to the music in the other “rooms” too.
Now what happens, when changing room?
Depends on the game (game engine?).
Maybe just a crossfade between the loops.
Maybe there should be a lead-out which will be played as finishing the loop for room “A”, then start with a lead-in for room “B”, and loop until “B” is exited, then lead-out the loop for room “B”, and so on.
Does this help somewhat?

3 Likes

If contributing the music to the open source project, watch out for the license of the samples she uses.

3 Likes

Hey Xander, thanks for that reminder! I’ll indeed tell her to keep that in mind. She’s 13, so a whole new can of worms will be opening up for her… (up to present, I’ve been the one looking after the legality of whatever she’s doing/creating - nothing got published yet)

3 Likes

That’s awesome! She could start by looking into audio integration in game engines like Godot or Unity (both support FOSS music), where she can trigger music changes based on events like room transitions.

3 Likes

She’s 13… where should she start?

1 Like

She should use a different software. MuseScore is a notation software. She should try something like LMMS. Of course she can export her music from MuseScore in MIDI format and then import it to LMMS. Then she could progress to a more advanced DAW software, but those beasts are pretty complex.

You can download LMMS appimage from its website, but check your distro’s repos before. There is 90% chance LMMS is there.

EDIT The LMMS forum seems to be active, so it may be a good idea to register there.

3 Likes

Hi Jurgen, I use sdl_mixer to play audio in my programs. Programs like tuxmath use sdl_mixer to play multiple audio files at the same time or to play an audio file in a loop. I use ABC notation to compose the music. abc2midi can create midi files from ABC notation. sdl_mixer can handle playing midi files. However, most games use wave or ogg vorbis or opus. The opus FAQ recommends replacing ogg vorbis with opus but I still find games that use ogg vorbis. I use Timidity++ to convert midi files to wave files when I need that format. Programs like Audacity and sox can convert wave files to opus, ogg vorbis, flac or other formats. There’s a FreeGameDev forum if she wants to talk to developers who use music in their games or wants to share some of her compositions with game developers.

1 Like

That’s a great point. That’s why I really like the FreePats project. They work on providing samples of all the midi instruments (as well as other instruments) with Free/Open licenses.

1 Like