
How Video Game Music Works: Loops, Layers and Adaptive Scores
A film composer usually gets a finished scene that runs, say, two minutes and ten seconds, and writes music to fit it. For the gameplay itself, a game composer rarely gets that number. One player crosses the first area in twenty seconds; another spends twenty minutes exploring every corner. The music has to keep going for both of them, and it has to change when the player does something the composer cannot predict. That single difference explains almost everything about how game music is built: it loops, it is made in layers, and the best scores adapt. This guide covers the history and the craft, then has you build a looping cue in three layers.
Why game music is not film music
Game composers solve two problems a film scorer rarely meets: an unknown length and a player in control. The usual answer to the first is the loop. Wikipedia's survey of the field calls looping "the most common form of game music," and lists pieces "designed to repeat indefinitely, rather than having an arranged ending or fading out" among the features of early game music.
The answer to the second problem is music that reacts. Adaptive music is music that changes in response to events in the game: its volume, arrangement or tempo can shift when the player enters a fight, finds a secret or runs out of time. You can hear the seed of the idea in Taito's Space Invaders (1978). As the Library of Congress notes, many game historians cite it as the first game with a continuous background soundtrack: four descending bass notes, repeating, getting faster as the aliens descend. Some argue those notes are really sound effects rather than music, but the effect on the player is the same: tension rises with the tempo.

A film cue is written to a length the composer knows and lines up with "hits," moments in the picture the music must catch. A game cue repeats until the player does something, then changes at a musical boundary.
Namco's Rally-X (1980) is credited with the first continuous melodic background music, a tune that repeats throughout play, and Konami's Frogger (1981) switched between pieces in response to what the player did. Those are the two building blocks of everything below: a loop that can run forever, and a way to move between loops.
The chip era: five channels, one sound each
When the Famicom arrived in Japan in 1983 (released in the US as the Nintendo Entertainment System in 1985), its music came from a sound generator built into the console's processor chip. It had five channels: two pulse-wave channels, one triangle-wave channel, one noise channel and one channel that plays short recorded samples (DPCM). Each channel plays one sound at a time.

The NES sound budget. The pulse channels offer four pulse widths (12.5, 25, 50 and 75 percent); the triangle has no volume control of its own; the sample channel cost cartridge memory, so most games did without it.
Each channel had its own sound. NESdev's technical reference describes variable-width pulse waves, a stepped (quantized) triangle wave with no volume control, and a pseudo-random noise generator. According to Wikipedia's article on the console's Ricoh 2A03 chip, most of the NES library used only the other four channels, because samples took too much memory; later games such as Super Mario Bros. 3 used the sample channel for simple drum sounds. You can think of the four as a small rock band: triangle as bass, the two pulses as two guitars, noise as drums.
Two limits shaped the music. First, only three pitched notes could sound at once. Second, home consoles often shared their music channels with sound effects, so a laser blast or a jump could cut into the music on that channel.

An original two-bar cue in the NES style, one staff per channel. The fifth channel, for samples, is left out, as it was in most NES music. Every staff is a single line of notes: the three-note harmony in Pulse 2 is played one note at a time.
The way around the three-note limit was the fast arpeggio. Chiptune writers break a chord into its notes and cycle through them quickly in one channel, so a single voice suggests the whole chord. Try it at a keyboard: hold C, E and G together, then play them one after another as fast, even sixteenths. The Arpeggiator Patterns handout shows the same idea as a modern synth feature. The pulse wave's buzzy color comes from its harmonics, and the width changes the recipe (75 percent is the 25 percent wave upside down, so those two sound the same). At the 50 percent width the pulse is a square wave: the Synth Waveforms and Their Harmonics sheet gives that recipe (odd harmonics only, each at 1/n strength). Synthesizer Basics explains oscillators and filters if you want to build these sounds yourself.

The same C major chord, once as three notes that need three channels, once as a broken chord that one channel can play.
The budget grew quickly after the NES. The Sega Genesis had six FM-synthesis channels plus four simpler ones, and the Super Famicom (1990; the Super NES in the US a year later) played eight channels of recorded samples. CD-based games could then play finished recordings, which brought a new seam problem: when the laser reached the end of a looping track, it had to jump back to the start, leaving an audible gap. Developers moved toward streaming compressed audio instead. The hardware changed; the two jobs, looping and reacting, stayed the same.
Themes that survive a thousand repeats
If a loop is going to play for twenty minutes, its melody has to be worth hearing again and again. Koji Kondo, hired by Nintendo in 1984 as its first composer who specialized in music, wrote the score for Super Mario Bros. (1985). Its melodies were written so that short segments could repeat endlessly without boring the player. Writers on the score sum up his two aims as "to convey an unambiguous sonic image of the game world" and "to enhance the emotional and physical experience of the gamer." As development went on, he felt his music did not fit the pace of the game, so he raised the tempos.
In 2023 the overworld theme, officially the "Ground Theme," became the first video-game recording added to the Library of Congress's National Recording Registry. The Library's essay notes that Kondo worked with essentially four channels (two pulse, triangle and noise), passed the melody between the three pitched channels, and used the noise channel for driving rhythm. It also points out that the underground levels get their own darker, more sinister theme to match their look. Kondo has stressed giving each place a distinct musical character, so that players know almost immediately where they are.
You don't need a famous tune to learn the lesson. A melody that survives repetition is usually built from a short motif that returns in new places, so the ear recognizes something without hearing an exact copy every bar. The Motif and sequence handout shows the moves: repeat the motif, shift it higher or lower (a sequence), or disguise it. Here is the theme of the loop you will build later.

Bar 1 is the motif: two eighths, a quarter and a half note, rising A–B–C–E. Bar 2 keeps the rhythm and shape a 3rd lower, adjusted to the scale. Bar 7 is an exact copy of bar 1 a perfect 4th higher (D–E–F–A). Bars 5 and 6 repeat bars 1 and 2.
A loop also needs something steady underneath. A pattern that repeats while the music changes above it is an ostinato, and the Ostinato handout calls it "a stubborn little loop — one pattern, repeated under everything."
Writing a seamless loop
The last bar must connect to the first. A strong cadence can make a repeat feel like a restart; unresolved harmony can give it forward motion. Compare these two endings for our cue.

Version 1 resolves to A minor inside bar 8, then repeats that harmony at bar 1. Version 2 keeps E major through bar 8: G♯ rises a half step to A while the bass steps down from B to A.
For this cue, try four ways to keep the repeat moving:
- Try ending on V: E major in A minor, with G♯ as its leading tone. The Chords & Progressions in A Minor sheet explains this "raised note."
- Let the last melody note step into the first one.
- Keep the rhythm going through the join: a drum fill in bar 8 says "here we go again" rather than "the end."
- Keep a steady tempo and avoid a fade; compare shorter and longer final notes.
Adaptive scores: three techniques
Many games do more than play one loop forever. Adaptive music systems change the score while it plays, and three techniques are the place to start.
Horizontal re-sequencing swaps one piece of music for another. The music is cut into segments, and the game moves between them as things happen: a crossfade, a switch when the current phrase ends, or a short bridge written to join the two pieces. Composer Winifred Phillips describes segments that carry markers at convenient points for a switch: on every beat, at the start of each bar, or at points the composer chooses. Audio middleware (the sound software that developers plug into a game engine) such as FMOD Studio builds this in: loop regions, transition markers that jump the playhead elsewhere, and quantization that holds a change until the next beat or bar.
Vertical layering keeps one piece running and changes what is audible. The composer writes several layers that play in perfect sync, and the game fades them in and out. Phillips stresses that this differs from mixing stems (grouped tracks of a finished mix, such as all the drums): the layers are composed to play in several combinations, not only all together. Horizontal changes suit big events such as a new area, a battle starting or a menu opening; vertical changes suit gradual ones, like danger rising during a fight.

Horizontal re-sequencing changes which piece plays; vertical layering changes how much of one piece you hear. The star is a stinger, which can happen in either system.
Stingers are short phrases played over the music that is already running. Audiokinetic's tutorial for Wwise, another middleware program, describes them as "brief musical phrases that are superimposed and mixed over the currently playing music," triggered at key points in the action.

Two original stingers. "Found it" climbs a C major arpeggio to a held high C; "Danger" slides down four half steps. Quantized to the next beat, either lands in time over the loop, but check the harmony too: the G natural of "Found it" clashes with the G♯ of bar 8.
LucasArts created and patented the iMUSE system in the early 1990s to keep music in step with game events; Monkey Island 2: LeChuck's Revenge (1991) was the first game to use it. Some games go further and generate music live: Spore used an embedded version of the Pure Data music software to respond to the game.

Which tool for which moment. A single level can use all three.
Build one: an 8-bar loop in three layers
The loop is in A minor, 4/4, at 120 beats per minute, so its eight bars last 16 seconds. The chords are Am, F, C, G, Am, F, Dm, E: two bars of question, two of answer, a repeat, a climb in bar 7 and the lead-back in bar 8.
- Layer 1, explore (always on): the theme above, plus a bass that plays each chord's root and 5th in half notes.
- Layer 2, tension: a "Pulse" track of eighth-note broken chords, low–middle–high–middle, twice per bar. Over Am that is C4–E4–A4–E4.
- Layer 3, combat: kick on beat 1, beat 3 and the "and" of 3; snare on 2 and 4; a snare fill on beats 3 and 4 of bar 8.

Bars 1–2 of all five tracks. The full eight-bar theme is in the theme figure under "Themes that survive a thousand repeats."
In bars 3–4 the theme plays its answer (see the theme figure), the bass plays C3–G3, then G2–D3, and the Pulse plays C4–E4–G4–E4 twice in bar 3 and B3–D4–G4–D4 twice in bar 4.

Bars 3–4 of all five tracks: the answer over C and G.
The drums keep the same groove, and bars 5–6 repeat bars 1–2 exactly. Bars 7 and 8 are where the loop climbs and then turns back toward bar 1.

Bars 7–8: the motif climbs a 4th, then every pitched track lands on E major for the seam, and the snare fill carries the drums back to bar 1.
To sketch it in a DAW (digital audio workstation, the recording program on your computer or tablet):
- Set the tempo to 120 BPM and a loop region of exactly bars 1–8.
- Make five MIDI tracks: Theme, Bass, Pulse, Kick and Snare. MIDI Explained covers how notes become numbers; the MIDI Notes, Octaves and Frequency handout uses middle C = C4 = MIDI 60, so A4 is 69.
- Enter the notes from the figures. On a General MIDI drum kit (channel 10), note 36 is a bass drum and 38 an acoustic snare. The Drum Patterns: Sixteen Steps, Four Beats handout teaches the 16-step grid you will be clicking into.
- Group the tracks into the three layers and test every combination the game might use: Layer 1 alone, 1 + 2, 1 + 3 and all three. Each combination must sound finished on its own.
- Let the loop run ten times and listen only to the join between bar 8 and bar 1.
- Bounce (export) each layer to its own audio file, exactly eight bars long, so a game engine can stack them in sync.

The whole loop as MIDI clips. Every clip is exactly eight bars, which is what lets the layers line up in any combination.
Then make it adapt. Write a "battle" version that keeps the chords but plays the bass in driving eighth notes instead of half notes, and a one-bar bridge between the two. Add a one-bar stinger in A minor, then play it over every bar of the loop and fix it, or hold it back, in the bars where it clashes. Music Theory for Producers shows how to grow basslines and arpeggios from one chord loop, and Electronic Dance Music Explained shows the same add-and-remove thinking in build-ups and drops. The Arrange a Dance Track in Eight-Bar Blocks exercise has you plan when layers enter, leave or change, and the Texture handout names what changes when they do. New to all of this? How to Start Producing Music at Home covers the gear and the first steps.
What to listen for
Listen with this article's questions in mind: where does the loop join, which layers come and go, and what happens when you stop moving?
- Space Invaders (1978): four bass notes that speed up as the aliens descend.
- Dig Dug (1982): the music stops when the player stops moving.
- Super Mario Bros. (1985), music by Koji Kondo: the overworld and underground themes, and how each loop joins.
- The Legend of Zelda (1986), music by Koji Kondo: the contrast between the overworld theme and the dungeon music.
- Monkey Island 2: LeChuck's Revenge (1991): the first iMUSE game; listen for how the music changes as you enter and leave buildings.
- Streets of Rage 2 (1992), music by Yuzo Koshiro (with three tracks by Motohiro Kawashima): dance-music styles played on the Sega Genesis's FM sound chip.
- Dead Space 2: its background music appears to be built from four layers tied to levels of fear.
- Winifred Phillips's music for Spyder and Sackboy: A Big Adventure: horizontal segments and vertical layers, which she explains in the two articles listed under Sources.
Free worksheets for this lesson
- Motif and sequence — repeat, sequence and disguise one short idea, with real examples.
- The Ostinato — a four-note left-hand loop to keep going while you improvise above it.
- Chords & Progressions in A Minor — Am, Dm, E7 and F, the raised G♯, and three minor-key loops.
- Arpeggiator Patterns: Order, Rate and Gate — Up, Down, Up–Down and Input order on one chord, plus how rate and gate change the line.
- Synth Waveforms and Their Harmonics — sine, square, saw and triangle, and the harmonic recipe behind each sound.
- MIDI Notes, Octaves and Frequency — MIDI numbers, octaves of 12 and how each octave doubles the frequency.
- Drum Patterns: Sixteen Steps, Four Beats — reading kick, snare and hi-hat on a 16-step grid.
- Arrange a Dance Track in Eight-Bar Blocks — plan where layers enter, leave or change across 64 bars.
- Texture — one line, a tune with support, or many voices, and how texture changes inside a piece.
Your next step
Write the loop, then compare two endings: A minor in bar 8, then E major. Listen for which version carries you into bar 1. If you want feedback on your melodies, voicings or a first cue, a Tissimo teacher can work through your sketch in a live lesson; you can book a lesson when you are ready.
Sources
- Video game music — Wikipedia
- Adaptive music — Wikipedia
- Ricoh 2A03 — Wikipedia
- APU — NESdev Wiki
- Chiptune — Wikipedia
- Koji Kondo — Wikipedia
- Super Mario Bros. — Wikipedia
- From the National Recording Registry: "Super Mario" (1985) — Library of Congress, Now See Hear!
- Horizontal resequencing and dynamic transitions — Winifred Phillips, Game Developer
- Pure vertical layering — Winifred Phillips, Game Developer
- Wwise Tutorial 13: Creating Stingers — Audiokinetic
- FMOD Studio User Manual: Glossary — Firelight Technologies
Read this article online: https://tissimo.co/articles/how-video-game-music-works-loops-layers-and-adaptive-scores

Comments