Get 100 bonus credits with your first plan
Games
Pricing
←All posts

Audio·November 3, 2026·17 min read

How to Make Game Music: Themes, Loops and Godot Import

How to make game music: write a theme, build clean loops, add adaptive layers, pick free DAWs and chiptune trackers, mix for games and import loops into Godot.

To make game music, list the cues your game needs, write one short theme, and turn it into loops that repeat without a seam. Then mix it quieter than you'd mix a song, and import it with looping on. You can do all of this with free tools, and a small game often needs only three or four tracks.

We make Oryn, an AI game maker that generates a soundtrack for every new game, so weigh that. This guide is mostly about doing it yourself, with Godot for the technical steps because its docs are public and the engine is free. Tool details and prices come from each vendor's page as of November 3, 2026.

The short answer

  • Plan cues first: a small game needs a title theme, a gameplay loop, a tense variant and win and lose stings.
  • Write one motif of four to eight notes and reuse it across every cue.
  • Build loops in whole bars, and copy the reverb tail back to the start so the seam disappears.
  • Tools: REAPER ($60), LMMS or Waveform Free (free), and Furnace or BeepBox for chiptune.
  • Mix for the game: leave room for effects and speech. Treat -18 LUFS as a starting point on PC and phones.
  • In Godot: export Ogg Vorbis, tick Loop in the Import dock, and put the player on a Music bus.
  • AI is useful for sketches, with license conditions you should read first.

Start with a cue list

Game music responds to play, so its length and order aren't fixed. Before opening any music software, write down every moment that needs music, what it should feel like and how it ends. Here's a cue list for a small arcade game:

CueLengthLoops?FeelNotes
Title30–60 sYesThe whole mood in one ideaFull statement of the theme
Gameplay60–120 sYesSteady, leaves room for effectsTheme in the background
Danger layerSame as gameplayYesSame key and tempo, more tensionFades in on top
Win sting2–5 sNoResolvesLast notes of the theme
Lose sting2–5 sNoFalls flatTheme in a minor key

Those lengths are our rules of thumb. Longer loops take longer to wear out, so if a player will sit in one area for 20 minutes, give that area more music or some silence. A mobile game with short sessions can get away with less.

Put the cue list in your game design document, next to the art direction. Playing the current build while you write helps too. Koji Kondo's original Super Mario Bros. theme was slower until the game changed and he sped it up, and he threw out pieces that didn't time up with Mario's running and jumping, according to interviews collected on Wikipedia.

Write a theme and motifs

A motif is a handful of notes people can recognize, and a theme is a longer melody, often built out of motifs. Your soundtrack can feel far bigger than it is if several cues share the same small idea.

Journey is the clearest example. Composer Austin Wintory told TheSixthAxis, "There is only one theme in Journey", and it evolves across the whole game, with a cello as the player's voice. Undertale goes the other way, giving characters their own leitmotifs that return across tracks, and "Hopes and Dreams" brings most of them back at the climax (Wikipedia). Toby Fox wrote the music before programming each section, which helped him decide how the scene should go.

To get one motif across a whole soundtrack:

  1. Hum four to eight notes

    Record yourself humming over gameplay, or tap them out on a keyboard. If you can't hum it back the next day, write another one. Limit it to a narrow range at first.

  2. Change the rhythm before the notes

    Stretch the motif to half speed for the title, chop it into short notes for gameplay.

  3. Change the harmony

    Put the same notes over minor chords for the lose sting, or over a low drone for the danger layer.

  4. Change the instrument

    A solo piano for the menu, full band for the boss. Listeners will hear it as the same tune in a new situation.

Keep everything in a related key and at tempos that divide cleanly, such as 120 and 60 BPM, so cues can fade or switch into each other later without a clash.

Loops and loop points

A loop has to end in a way that leads into its own beginning. Three problems usually break it: the length isn't a whole number of bars, the tail of the last chord gets cut, and the file has silence at either end.

Work out the length in advance. In 4/4 time, one bar lasts 240 ÷ BPM seconds:

TempoOne bar16 bars32 bars
80 BPM3.0 s48 s96 s
100 BPM2.4 s38.4 s76.8 s
120 BPM2.0 s32 s64 s
150 BPM1.6 s25.6 s51.2 s

To make a clean loop in any DAW:

  1. Set the tempo and write to the grid. Compose exactly 16 or 32 bars.
  2. Let the instruments ring past the end of the last bar, and keep that reverb and decay.
  3. Render the loop region plus its tail.
  4. Copy the tail (everything after the last bar) and mix it onto the first bars of the same file.
  5. Cut the file exactly at the last bar line. The tail now plays over the start of each repeat, and the first pass plays it too, so fade or filter it there if it stands out, or use an intro.
  6. Play it three times with headphones on and listen at the seam.

Keep the file exact to the sample. A loop that's 10 milliseconds too long makes the beat stumble at the joint. If you get a small click, the waveform isn't meeting at the same level; a fade of a few milliseconds at each edge usually clears it.

Intros

Many tracks sound better with a pickup that plays once and never returns. Godot can do this with one file: render the intro followed by the loop, then set Loop Offset to where the loop begins. Ogg and MP3 loops restart from that offset and always run to the end of the file. In the 120 BPM example, a two-bar intro means a Loop Offset of 4 seconds.

Layering and adaptive music

Adaptive music changes with the game. This goes back at least to iMUSE, built by Michael Land and Peter McConnell at LucasArts and first used in Monkey Island 2 in 1991, which shifted between themes as the player moved around (Wikipedia). There are two main methods:

  • Vertical layering: several stems play at once in sync, and the game fades them in and out. Dead Space's score was written as four stereo layers, mixed in real time by a fear value (Game Informer, 2009). It's the simpler of the two to build.
  • Horizontal switching: the game moves between sections, usually at a beat or bar line. This gives you bigger changes in mood, and each transition needs to work musically.

Start with vertical. Export each instrument group from the same session as its own file, all the same length, and bring in a danger layer as the threat gets closer.

Godot has shipped resources for this since version 4.3:

ResourceWhat it doesUse it for
AudioStreamSynchronizedPlays up to 32 streams in sync, each with its own volumeVertical layers
AudioStreamInteractiveMoves between clips through a transition table, timed to beat, bar or clip end, with fades or filler clipsHorizontal switching
AudioStreamPlaylistPlays up to 64 streams in order or shuffledVarying a long play session

Fading a danger layer in with a single 0-to-1 value looks like this, assuming the player's stream is an AudioStreamSynchronized with the calm stem in slot 0 and the danger stem in slot 1:

@onready var music: AudioStreamPlayer = $Music

func set_danger(amount: float) -> void:
	var layers := music.stream as AudioStreamSynchronized
	layers.set_sync_stream_volume(1, linear_to_db(clampf(amount, 0.0001, 1.0)))

Move that value smoothly, with a tween over a second or two, or players will hear it jump. If you ship to the web, test layered music in the web build early. Since Godot 4.3 the default web audio mode, Sample playback, has no bus effects, so anything that relies on an effect such as a low-pass on the Music bus needs Stream playback.

Tools: DAWs and trackers

Pick one and stick to it for the whole soundtrack. Any of these can make a finished track.

ToolPricePlatformsBest for
REAPER$60 discounted, $225 commercial, 60-day evaluationWindows, macOS, LinuxFlexible rendering of stems and loops
LMMSFree, open sourceWindows, macOS, LinuxBeats and synths with no budget
Waveform FreeFree; paid add-ons from $30Windows, macOS, LinuxA full DAW at no cost
GarageBandOn the App Store; Apple's page shows no pricemacOS, iOSFirst tracks on a Mac
BeepBoxFree, MIT-licensed codeBrowserSketching melodies in minutes
Bosca Ceoil BlueFree, open sourceNot confirmed; see its pageSimple pattern-based tunes
FurnaceFree, GPLWindows, macOS, LinuxChiptune on many sound chips
Dn-FamiTrackerFree, GPL 2 or laterAppears to target WindowsNES-style music

REAPER's discounted license covers personal use, and commercial use for individuals and businesses with yearly gross revenue of $20,000 or less. If you don't know where to start, take LMMS or Waveform Free for a DAW and BeepBox for a first melody. Nothing there costs money, and the idea can move across by ear.

You'll also need sounds. Your DAW's built-in instruments are enough for a first soundtrack. Pick three or four and use the same ones in every cue, which does more for cohesion than expensive libraries do.

Making 8-bit music: trackers and generators

People searching for an "8 bit music generator" usually want one of three things:

  • Authentic chip music. Use a tracker: you write notes in a vertical grid, and the limits of the chip shape the sound. The NES's 2A03 had five channels (two pulse waves, a triangle, noise and samples), so you can't play more than that at once. Furnace covers NES, Game Boy, SID, SNES and many FM chips, and it exports audio for the whole song, per chip or per channel. Per-channel export gives you ready-made layers for adaptive music.
  • Chiptune style without the learning curve. BeepBox and Bosca Ceoil Blue give you a simple grid. BeepBox runs in the browser and says your songs belong to you. Its page doesn't list export formats, so look in the app's own menu before you rely on it.
  • A finished track from a prompt. AI music tools can imitate the style, and the result is a mixed audio file. It won't obey real chip limits and it won't hand you the notes or channels, so it's a poor fit if you want to edit parts later.

Trackers have a learning curve, and they're not for everyone. Toby Fox found FamiTracker unintuitive and composed in FL Studio instead (Wikipedia). So if the grid frustrates you, a DAW with square-wave synths will still get you the sound.

Mixing loudness for games

Music in a game shares the speakers with sound effects and voices, and a song mastered as loud as possible leaves them no room. Make the mix less dense and quieter than a streaming release, and leave some headroom.

Public loudness targets are older and thin. An ITU report from 2018 gives typical game loudness as -24 LKFS (±2) on consoles and -18 LKFS (±2) on portables. Sony's audio working group recommended -23 LUFS on PS3 and -18 on Vita, with ±2 LU tolerance, measured over at least 30 minutes of representative play. Current console requirements sit behind developer agreements, and we found no published Steam target.

Our starting point on PC and phones is around -18 LUFS for the whole game, measured during play, using these rules of thumb:

  • Keep music a few dB under the effects it plays against, and duck it further for speech.
  • Roll off low end that you don't need, since it eats headroom and phone speakers can't reproduce it. Leave the very low end to explosions.
  • Keep the busiest part of your music out of the 1 to 4 kHz range when speech or key effects land there.
  • Leave peaks around -1 dB or lower in your exported file, so the encoder doesn't clip.

Measure a file with FFmpeg's ebur128 filter, which prints integrated loudness at the end:

ffmpeg -i gameplay_loop.wav -af ebur128 -f null -

Always give the player separate Music and Effects sliders. Then listen on the worst speakers you can find, since that's where many of your players will be. If you're building for phones, how to make a mobile game covers more of those constraints.

Get it into Godot

Godot imports WAV, Ogg Vorbis and MP3. For music, its docs recommend Ogg Vorbis: strongest compression, at a higher CPU cost that matters mostly with many streams at once.

  1. Export a master, then encode

    Keep a WAV master outside the project, and encode Ogg from it: ffmpeg -i theme.wav -c:a libvorbis -q:a 6 theme.ogg. Quality 6 is a sensible start; lower it if your web build gets too heavy.

  2. Copy it in and turn on Loop

    Drop the file into res://audio/music/, select it, tick Loop in the Import dock and click Reimport. Ogg and MP3 only support forward looping, with a begin point and no end point, so cut the file so its end is the loop end.

  3. Audition the loop point

    Double-click the file to open the Advanced Import dialog, where you can move the loop point with live preview without reimporting. It also has BPM, Beat Count and Bar Beats. The import page describes those as meant for interactive music; fill them in if you plan to use beat-timed transitions.

  4. Add a player on a Music bus

    Add an AudioStreamPlayer, which has no position and suits background music, assign the stream and set bus to Music. Create that bus in the Audio panel first, because a missing bus name falls back to Master.

  5. Keep it playing across scenes

    Put the player in an autoload so changing scenes doesn't restart the music. Note that finished doesn't fire for looping audio, so don't wait on that signal to start the next track.

  6. Test the export

    Run the actual export on every platform you target. If you're shipping to a browser, players' first sound usually has to follow a click or tap, so open with a title screen.

Using AI as a starting point

If you can't write music, or you're short on time, AI can get you moving. We compare the tools in the best AI music generators for games, and Suno alternatives covers more. We didn't test them hands-on for this guide, so this is a workflow, with no verdict on quality.

The useful way to treat a generated track is as a sketch:

  1. Prompt like a brief. Name the genre, instruments, tempo, mood and use: "instrumental, loopable, 100 BPM, soft piano and upright bass, calm exploration, no vocals, no big ending". Ask for instrumental, since words fight with game dialogue.
  2. Generate several, keep one idea. Choose by the melody or groove.
  3. Find the tempo and cut to bars. Generated files rarely loop cleanly as they come. Find a section between two matching points, cut on bar lines and apply the seam steps above.
  4. Rebuild the parts you like. Play the motif back into your DAW with your own instruments. You get stems for adaptive layers, and the work now contains your own creative choices. The US Copyright Office said in January 2025 that purely AI-generated material without enough human control isn't protected, so human work on top can matter if you care about protecting the track.
  5. Check the plan and the terms. Suno's free plan has no commercial rights, and upgrading later doesn't cover earlier songs by default. ElevenLabs' music terms exclude games above its indie revenue limits, except on its top Enterprise plan. Royalty-free game music goes through the license details, including Steam's disclosure rule.

Getting a soundtrack in Oryn

Oryn generates a soundtrack for each new game as part of the build, so you don't need to do any of the import steps. Describe the mood, instruments and tempo in your prompt or planning answers, and the music goes into the game. The first build takes about 30 minutes, so this is slower than a one-off track from a music tool, and you get a whole game with it. After that you can ask for changes in chat, or upload your own track and say what it's for. The game opens in Godot as a real project, so you can also replace the files there. Some generated assets need a commercial-use check, so read the game's CREDITS.md and the terms before you sell.

Chat won't give you hand control over a score, like layers you've mixed yourself. For that, generate a first version, then build on it in a DAW.

Try this prompt in Oryn

“A 2D pixel art platformer about a lighthouse cat. Chiptune soundtrack at 120 BPM with a short, hummable four-bar melody that returns in every level. Bright square-wave lead, simple triangle bass. Keyboard, gamepad and touch controls.”

Build it in Oryn

A first soundtrack in a weekend

If you're starting with nothing, this order works for a small game. New to the whole process? How to make a video game covers everything around it.

  1. Write the cue list. Five cues, with feel and length.
  2. Find the motif. Four to eight notes, hummed over gameplay.
  3. Make the gameplay loop first. 16 bars at a tempo that suits the movement speed. It's what players hear the most.
  4. Derive the title and stings. Same notes, slower or shorter.
  5. Import it, loop it, set the bus. Play for ten minutes. If it grates, thin out the arrangement before you write more notes.
  6. Add one danger layer. Same length and key, then fade it with one value.
  7. Mix it in the game. Measure, adjust and test on phone speakers.

Note the gameplay loop's tempo and length, which you'll need for the next layer, and list your tools and sample sources for the credits while you remember them.

Frequently asked questions

How do you make music for a game?

List the cues you need, write a short motif, compose loops of whole bars, and mix them quieter than a normal song. Then export Ogg Vorbis and import it into your engine with looping turned on. A small game often needs a title track, a gameplay loop and two short stings.

What software do you need to make game music?

Any DAW works. LMMS and Waveform Free cost nothing, and REAPER costs $60 on its discounted license as of November 2026. For chiptune, Furnace and BeepBox are free. Toby Fox composed Undertale in FL Studio.

Can I make game music without knowing music theory?

Yes. Start with one melody you can hum, stay in one key using a piano-roll scale guide, and reuse the same idea in each track. Toby Fox is self-taught. AI tools can suggest starting points if you're stuck, within their license terms.

How long should a game music loop be?

There's no standard. As a rule of thumb, 60 to 120 seconds for a gameplay loop, longer if the player stays in an area for a long time. Always cut to whole bars: at 120 BPM in 4/4, 32 bars last 64 seconds.

Is there an 8-bit music generator?

Yes, in a few forms. BeepBox makes chiptune-style tunes in a browser for free, trackers like Furnace imitate real sound chips, and AI music tools can imitate the style from a prompt. Only a tracker lets you stay within a chip's channel limits and edit each part.

How do I loop music in Godot?

Select the Ogg Vorbis or MP3 file, tick Loop in the Import dock and click Reimport. Set Loop Offset if the track has an intro. Double-click the file to preview the loop point in the Advanced Import dialog, and play it on an AudioStreamPlayer routed to a Music bus.

Previous

itch.io Assets: How to Find Good Packs and Check Licenses

Next

Godot Web Export: How to Export a Godot 4 Game to HTML5

Don't pick a model. Just ask Oryn.

Art, 3D models, music and sound effects: Oryn picks the right model for each and builds a playable game around them, for desktop and mobile.

Make my game

On this page

  • Start with a cue list
  • Write a theme and motifs
  • Loops and loop points
  • Layering and adaptive music
  • Tools: DAWs and trackers
  • Mixing loudness for games
  • Get it into Godot
  • Using AI as a starting point
  • A first soundtrack in a weekend
  • Frequently asked questions

Don't pick a model. Just ask Oryn.

Art, 3D models, music and sound effects: Oryn picks the right model for each and builds a playable game around them, for desktop and mobile.

Make my game
GamesGuidesBlogComparisonsTools3D game maker2D game makerMobile game makerHorror game makerPlatformer makerAI RPG makerPuzzle game makerIdle game makerGodot AIReviewsAffiliatesFAQPricingTermsPrivacyGuidelinesWithdraw from contractCancel contracts hereImprint
.dev
Made with love in Mannheim, GermanyMade within Mannheim, Germany

Cookies and analytics

With your permission, PostHog and our own MRRocket, both in the EU, measure usage and record masked interactions for session replay. Text, inputs and media are masked or blocked; cookies are used. You can decline or withdraw in Cookie settings. Oryn works the same without this. With your permission, the ad platforms Reddit, Meta, Google Ads also learn whether you came from one of our ads and signed up or paid. Privacy notice