Music in a small game does a different job from music in a video. A video track plays once and ends. A game track might play for forty minutes while someone grinds in the same field, and it has to survive being stopped, restarted and crossfaded whenever the player opens a door. This guide is for solo devs, hobbyists and game jam teams who want free music that sounds chosen on purpose.
For trimming and credit basics in a trailer or devlog, see the background music for videos guide. Here we stay inside the game.
1. List your game states before you listen to anything
Write down every place the player can be and what they should feel there. For a typical jam RPG that’s: title screen, town, overworld, dungeon, battle, a scary area, victory and credits. A puzzle or cozy game might only need a menu theme and two area themes.
Give each state an energy level from 1 to 5. Title and battle are usually high, town and save rooms low. This stops you from picking six exciting tracks that all sound the same, which quickly makes a game feel tiring.
A useful rule: the music the player hears longest should be the calmest. Your town theme will loop far more than your boss theme, so it needs a gentle melody that doesn’t wear out.
2. Shortlist tracks for each state
Tags combine on the music page, so you can filter by game use: RPG, title and menu, town, overworld, battle, horror game or pixel plus cozy.
A starter set from the library:
| Game state | Track | BPM | Why it fits |
|---|---|---|---|
| Title screen | Dawn of the Quest | 95 | Bells before the brass leave time for a logo fade-in |
| Pixel menu | Pocket Pixel Quest | 110 | Short (1:33), light bell plucks |
| Town | Village Morn | 105 | Guitar and recorder, calm enough to loop |
| Cozy pixel town | Sunlit Sprite Town | 96 | Swung lo-fi for shops and hubs |
| Overworld | L’Horizon Ouvert | 120 | Horn melody and marching snare |
| Dungeon | Dripstone Depths | 90 | Drips and lone cello first, drums later |
| Boss | Neon Megacity Assault | 120 | Distorted bass, industrial drums |
| Horror save room | Fragile Refuge | 70 | Sad piano that feels safe |
| Victory | March of the Hero | 120 | Start where the horn theme enters |
| Credits | Laudato Si’ | 111 | Grows from one voice to full orchestra |
Don’t commit yet. Run each candidate for at least two full minutes while you play or look at your game. A track that’s great for 20 seconds can become annoying by minute three.
Keep a consistent palette. An acoustic folk town next to an acoustic folk overworld with brass feels like one world. Jumping from chiptune to orchestra to trap between rooms feels like a mixtape, unless that contrast is the point.
3. Do the loop math before you cut
Most game music here is in 4/4 time, so one bar lasts:
seconds per bar = 60 ÷ BPM × 4
- 120 BPM → 2 s per bar, so 8 bars = 16 s
- 105 BPM → about 2.29 s, so 8 bars ≈ 18.3 s
- 96 BPM → 2.5 s, so 16 bars = 40 s
- 90 BPM → about 2.67 s, so 12 bars = 32 s
- 70 BPM → about 3.43 s, so 4 bars ≈ 13.7 s
Melodies usually run in 4, 8 or 16 bar phrases, so make your loop one of those lengths. Many track pages include a tip on where a phrase restarts; the Village Morn page suggests an 8-bar loop, around 18 seconds, where the recorder melody comes back.
Trim Audio takes start and end times in tenths of a second. At 120, 96 and 90 BPM, bar lengths land neatly on tenths. At 105 BPM you’ll be off by a few hundredths, which a short crossfade hides but a hard loop may not. If your game engine lets you set loop points in samples or milliseconds, put the exact value there.
4. Find the loop point and test the seam
These tracks aren’t sold as pre-made seamless loops, so you make the loop yourself:
- Open the track in Trim Audio and look at the waveform. Skip the intro: the bells in Dawn of the Quest are lovely once, odd every 40 seconds.
- Set the start on the first strong beat of a phrase. Use Play selection to check it lands on a hit.
- Set the end to start + (bars × seconds per bar).
- Leave both fades at 0. Fades are for one-shot cues and endings, not loop seams.
- Save as WAV and put it in your game with looping on.
- Listen to the seam at least four times. If you hear a bump, move both points by one bar rather than nudging only one.
If your engine supports an intro plus a loop region, keep the intro and loop only the body. If not, export two files and queue the loop after the intro.
Crossfading between states. Walking from town to overworld, 1 to 2 seconds sounds natural. A battle start feels more urgent with a hard cut or a 0.3 to 0.5 s crossfade. Crossfades work best between similar tempos: Sunlit Sprite Town (96) into Village Morn (105) is close enough, while 70 into 120 will feel like a gear change.
5. Pick the right file format
- WAV is uncompressed, about 10 MB per minute in stereo. Use it as your working copy. The WAV downloads are large (March of the Hero is 34.8 MB), so cut them before shipping.
- MP3 is small, roughly 1.4 MB per minute at 192 kbps, and fine for one-shot cues. But MP3 files carry a few milliseconds of silent padding at each end, which can leave a small gap in a loop depending on how your engine decodes them.
- OGG (Vorbis) is what many engines prefer for looping music: compact, without that padding issue. Our tools save MP3 or WAV, not OGG, so keep your cut loop as WAV and let your engine’s import settings or your audio editor compress it.
Have OGG files from an earlier build you want in a devlog? OGG to MP3 converts them in your browser. Downloaded an MP3 but want a WAV to cut? MP3 to WAV makes a 16-bit WAV (it can’t restore lost detail, but stops further loss). For a size-limited web build, WAV to MP3 at 192 kbps suits one-shot cues.
6. Balance music against sound effects
In games, sound effects carry information: a hit, a pickup, a footstep behind you. Music sits under them. Start with music around 50% of your SFX level (about −6 dB), and lower, around 30% (about −10 dB), in menus full of UI clicks.
Change Audio Volume shows changes in percent and dB. If one track is much louder than the rest (bass-heavy battle music usually is), lower that file until all your loops feel equal at the same in-game setting. Red in the waveform means peaks would clip.
Give players separate music and SFX sliders. Players notice when they’re missing.
7. Credit the music in-game and on your store page
Each track page has a Copy button for the credit line:
Music: “Village Morn” by ziniyeons (niftyshelf.com/music/village-morn)
Add one line per track to your credits screen, and paste the same lines into your store or jam page description.
The license allows free use in personal and commercial projects, so a free jam entry and a paid game are both fine. It doesn’t allow redistributing the files as they are or lightly modified, registering the music in Content ID or similar systems, or claiming it as your own. In practice, shipping the audio inside your game is using it; offering the tracks as a separate soundtrack download or in an asset pack is redistributing them. If your source code is public, note in the README that the music isn’t covered by your code license. Unsure? Contact us.
Common mistakes to avoid
- Looping the intro. Loop the body; play the intro once.
- Fades on a loop seam. It sounds like the game is buffering.
- Battle music as loud as SFX. Players need to hear hits and warnings first.
- Testing for only 20 seconds. Loop each area track for minutes while playing.
- Crediting only in-game. Put the lines on your store page too.
FAQ
Can I use NiftyShelf music in a commercial indie game?
Yes. The license allows free use in personal and commercial projects. Credit each track in your credits and store page, and don’t sell or share the tracks as separate files.
Are these tracks seamless loops?
They aren’t sold as pre-made loops. Several track pages say where a phrase restarts, and with the bar math above you can cut a clean loop in minutes. Always test the seam in your game.
Which format should I ship: OGG, MP3 or WAV?
For looping music, OGG made from your trimmed WAV is usually the best balance of size and clean looping. MP3 is fine for one-shot cues. Keep WAV as your master.
Can I edit or remix a track for my game?
Yes. Cutting, looping, changing volume and blending it into your soundtrack are normal uses. Just credit the original.
Can I use the music in my game’s trailer?
Yes. Since we don’t register music with Content ID, your trailer shouldn’t get claims. The background music for videos guide covers trimming and fading for it.