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.

Step 1 of 3: Mood
What should the loop feel like?

How to use it

  1. Choose a mood such as Heroic, Mysterious, Upbeat, Tense or Sad, and press Next.
  2. Drag the Tempo slider, pick a Key and, if you like, a different Scale, then press Next.
  3. Choose 4, 8 or 16 bars, tick the channels you want, and press Generate loop.
  4. Press Play to listen, Reroll for a new tune with the same settings, and the channel buttons to mute parts.
  5. 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?
Yes. The loop is composed and synthesized from your settings in your browser, not taken from a music library, so it is yours to use in free and commercial games without credit.
Does the WAV loop without a gap?
Yes. Notes that ring past the end are wrapped to the start, the way they would sound when the loop repeats, and the file has loop points over the whole track. Godot reads them when the import Loop Mode is Detect From WAV, which is the default.
How do I make 8-bit music sound more like a specific mood?
Start from the closest mood, then change the scale: major sounds bright, minor sad, dorian mysterious, harmonic minor tense and phrygian dark. Faster tempos feel more energetic. Mute the drums for a calmer menu or the lead for a background bed under dialogue.
Can I get the same loop again?
Yes. The result shows the seed, which is also in the file name. The same mood, tempo, key, scale, length and seed always compose and render the same loop.
Does it work in Unity and Unreal Engine?
The WAV imports in both engines. Set the audio to loop in the engine's import or audio source settings, since not every engine reads WAV loop points.

See all tools