Chiptune Generator: 8-Bit Music Loops as WAV
Pick a mood, a tempo and key, and a length of 4, 8 or 16 bars, and the chiptune generator writes a chord progression, melody, bass line and drum pattern for two pulse channels, a triangle bass and noise drums. Play it, reroll it or mute channels, then download a WAV with loop points that repeats without a gap. It all runs in your browser and the music is yours to use.
How to use it
- Choose a mood such as Heroic, Mysterious, Upbeat, Tense or Sad, and press Next.
- Drag the Tempo slider, pick a Key and, if you like, a different Scale, then press Next.
- Choose 4, 8 or 16 bars, tick the channels you want, and press Generate loop.
- Press Play to listen, Reroll for a new tune with the same settings, and the channel buttons to mute parts.
- Press Download WAV and drop the file into your game project.
How the 8-bit loop is composed
The channels copy the layout of the NES sound chip, which has two pulse wave channels, a triangle wave, a noise channel and a sample channel. The lead and harmony are pulse waves with the NES duty cycles of 12.5, 25 or 50 percent, the bass is a triangle stepped to 16 levels like the NES's 4-bit triangle, and the drums are random noise held for a period set by its pitch, short and low for kicks, brighter for snares and very short for hats.
Each mood sets a starting tempo, a scale and a pool of four-chord progressions built from the scale's own chords, such as I - V - vi - IV for Heroic or i - VI - III - VII for Sad. Every four-bar phrase has a short motif, an answer, the motif moved onto the third chord and a cadence that lands on a chord tone, and 16-bar loops repeat the first phrase as the third so the tune has a hook. The seed makes it reproducible: the same settings and seed always give the same loop.
Loop length is simple math in 4/4 time: one bar is 4 beats, so it lasts 240 divided by the tempo in seconds. At 120 BPM a bar is 2 seconds, so 8 bars is a 16-second loop. Shorter loops repeat sooner, so use 4 bars for menus and jingles and 16 bars for levels where the player stays a while.
Looping the WAV in Godot 4
The download is a 16-bit mono WAV at 44.1 kHz with loop points stored in the file. In Godot 4, WAV files can carry their own loop information, and the importer's Edit > Loop Mode setting defaults to Detect From WAV, so the file loops on its own after import. If you changed that setting, select the file in the FileSystem dock, set Edit > Loop Mode to Forward in the Import dock and press Reimport.
Add an AudioStreamPlayer to the scene, set its Stream to the WAV and tick Autoplay, or call play() from a script. A looping stream never emits the player's finished signal, because it keeps playing until you stop it. To keep music going across scene changes, put the player in an autoload scene.
16-bit mono WAV takes about 88 KB per second, so a 16-second loop is about 1.4 MB. To make it smaller in the exported game, set Compress > Mode to Quite OK Audio in the Import dock, which keeps the loop points. If you convert it to Ogg Vorbis instead, tick Loop in the Ogg import options, since Ogg files do not store loop points.
Frequently asked questions
Can I use the chiptune music in a commercial game?
Does the WAV loop without a gap?
How do I make 8-bit music sound more like a specific mood?
Can I get the same loop again?
Does it work in Unity and Unreal Engine?
More free game dev tools
- Retro Sound Effect Generator: Synthesize 8-bit coin, laser, jump and explosion sounds and download them as WAV.
- AI Sound Effect Generator: Type a description and get AI-generated game sound effects as MP3 files.
- Game Jam Theme Generator: Random game jam themes with an interpretation hint and optional extra limitations.