Skip to content

AI game music generators: loops, layers and the licence to check

5 min readBy Eduardo Orellana ·

AI music tools write a track in seconds, and most of them write songs. Games rarely need songs. They need loops that do not tire, layers that change with the action, and a licence that lets you sell the game. Flockbay generates game music and loops into your Godot project as part of building it, from the free daily usage or your plan's.

Leer en español

Game music is not a song

A song has a beginning, a build and an end. Game music usually loops for minutes, sometimes hours, under a player who is concentrating on something else. The track that plays while you farm in Stardew Valley has to survive the fortieth hour as well as the first.

So a good game track is often simpler than a good song. It needs a seamless loop point, no lyrics competing with dialogue and sound effects, a mix that leaves room for footsteps and impacts, and a mood that holds without demanding attention. A generator tuned for songs gets all four wrong by default.

There is a second difference: game music reacts. Combat raises the tension, a boss gets its own theme, a shop drops to something quieter. Even a small game usually wants two or three versions of the same idea that can hand over to each other cleanly.

What to ask a generator for

Ask for instrumental, loopable and a length. "A calm 60-second instrumental loop for a village, acoustic guitar and soft strings, no drums" gets you much closer than "village music". Name the instruments and the tempo; generators follow concrete words better than moods.

Ask for the variations in the same session, from the same brief with one word changed: calm, tense, triumphant. Tracks generated from one description share a key and a palette far more often than tracks generated separately, which is what lets you switch between them without a jarring change.

Listen in the game, not on its own. A track that sounds thin in a pair of headphones often sits perfectly under gameplay, and a lush one can bury every sound effect you have.

The main tools

Suno and Udio generate full tracks, with or without vocals, from a text prompt. They are fast and impressive, and they lean toward songs. AIVA composes instrumental music and lets you edit the result, which suits soundtracks. Stable Audio generates instrumental audio and loops. ElevenLabs makes music as well as voices and sound effects.

Each changes often, in quality and in terms. Try two or three with the same brief and compare them in your game.

Check the licence before you keep a track

This is the step people skip. Several tools only allow commercial use on a paid plan. Some keep rights to what they generate. Terms change, and the plan you were on when you generated a track is the one that counts.

Read the current terms for the plan you are on, and save a copy with the date beside the files. If you might sell the game, choose a plan that allows it before you generate the music you will keep.

Making a track behave like game music in Godot

Loop it properly. In Godot an imported OGG or WAV has a loop setting in the Import dock; turn it on, and set the loop offset if the track has an intro that should play once. A loop that clicks or jumps at the seam is usually a track that was cut at the wrong sample, and a short crossfade in an audio editor fixes it.

Switch between versions with two AudioStreamPlayer nodes and a tween on their volume: fade one down while the other comes up over half a second to two seconds. For layered music, play the layers in sync and fade the extra layers in and out instead of swapping whole tracks.

Put music on its own audio bus. A music bus with its own volume lets the player turn it down in the settings, and lets you duck it under dialogue with one line instead of touching every player.

How Flockbay makes music for your game

In Flockbay, music is part of building the game rather than a separate trip to another tool. Ask for it in the chat, "a tense loop for the dungeon and a calm one for the village", and Flockbay generates the tracks, lands them in your project under assets/Audio with loops already set to loop on import, and writes the GDScript that plays and crossfades them where you said.

The music comes out of the usage you build with: the free daily usage on a free account, or your plan's usage on a paid plan. Sound effects work the same way, with real durations and trimmed, levelled files rather than one fixed length. You can play each result in the chat before you keep it, and bring in music from any other tool as an audio file if you prefer.

The behaviour around the track matters as much as the track. Fading to the tense loop when an enemy sees the player, returning after it loses track of you, ducking under a cutscene: those are rules in your code, and they are the part that makes generated music feel composed for the game.

Where a composer still wins

A memorable theme. Generated music is often pleasant and forgettable. The themes players hum years later were usually written by a person with a clear idea of what the game is about.

For a first game, generated music is a fine start. For a game you are proud of, consider commissioning one main theme and using generated tracks for the rest: the theme gives the game an identity, and the loops fill the hours around it.

Generate music and sound for your Godot game as you build it, from the free daily usage. Flockbay runs on Windows, macOS and Linux.

Download Flockbay free

Flockbay

The free AI game maker for Windows, macOS and Linux.