Music Theory and Composition

How to Make Video Game Music (with a JRPG Town Theme Walkthrough)

Illustration of a JRPG town: a young adventurer walks down stone steps through a sunlit seaside village, with a game HUD
Ryan Leach
Written byRyan Leach

Ryan Leach is an Award Winning Composer for film and tv. His music has been heard on Every major Network. His clients includes Disney, Mtv and Netflix.

October 5, 2026

View profile →ryan-leach

Follow us

Video game music covers a lot of ground: linear cutscene scores, one-time story events, character themes, and the long musical arcs of a campaign. This guide focuses on one important corner of it — the loopable town, area, and adventure cues that players hear for most of their time in a JRPG-style game. These cues have to establish a place, hold up under repetition, and connect back to their own beginning without drawing attention to the join.

The composition examples in this guide come from the Master The Score course curriculum. After a short look at what these cues need, we go through the decisions to make before writing, how a loop is designed, and then a complete JRPG town theme written for The Legend of Otoe, followed by the adventure and dungeon pieces that come after it in the same course. If you want to become a video game composer, or you simply want your next area loop to sound like it belongs in a game, this is a practical place to start.

What a Loopable Area Cue Has to Do

A town theme or exploration cue differs from a film cue in a few specific ways, and it is worth naming them before writing anything.

It usually plays on a cycle. The player decides how long to stay in the village, so the cue repeats for as long as they do. That makes the connection from the end of the loop back to its beginning a compositional decision, not an afterthought. Ryan Leach, who teaches The Legend of Otoe with Gavin Leeper, describes the village theme written for that course as repeating "in an eternal loop for as long as you're peacefully staying in the village."

It represents a place or a state rather than a single moment. A town theme stands for the whole town; an exploration cue stands for the whole region. That pushes the writing toward establishing a mood and sustaining it rather than building toward one climax.

It tends to use compact forms. Small forms — ABA, AB, AABB — expanded with introductions, interludes, and codas are what the MTS courses use for these pieces. Ryan puts it as a matter of practice rather than rule in Pillars of Composition: "I'm more likely to write an ABA than I am a sonata form for a video game track or something. It's just a little more practical for just everyday writing."

None of this makes the music simpler. Modern JRPG scores draw on jazz harmony, French Impressionism, and traditional Japanese instruments at the same time. In these examples, compact forms leave plenty of room for harmonic color, changing textures, and carefully shaped returns.

Before You Write a Note: Make the Decisions First

The most useful habit for this kind of writing is also the least glamorous: decide as much as possible before touching the keyboard. When Ryan starts the video game loop project in Pillars of Composition, he spends the first several minutes writing no music at all.

"What I like to do is make as many decisions as possible. So that first decision is just what am I even making, because that's pretty important to know. A lot of people just kind of wander into something and hope that something comes out." — Ryan Leach, Pillars of Composition

For that project he decides, in order: what the track is for (a fantasy game, the first open-world area, simple enemies, a wooden sword) and a working title ("First Adventure"). He chooses a major key for the upbeat character, settling on D major, then sets a 4/4 meter and an initial tempo of 128 BPM, to be tweaked later. Only then does he lay out the form. The Otoe village theme is built the same way — key, time signature, tempo, and the opening chord are fixed before any melody is written, so that the zoomed-out decisions are in place before zooming in on details.

For an area cue, the up-front list usually looks like this:

  • Function in the game. Town, exploration, dungeon, menu, battle. Each has different needs for length, energy, and repetition.
  • Emotional temperature. Safe or dangerous, familiar or mysterious. This shapes the mode, the harmonic language, tempo, register, and instrumentation; it does not dictate a particular tonic.
  • Key, meter, and tempo. Pick them deliberately. They can change later, but starting with them removes the blank-page problem.
  • Form and loop plan. Where the repeated region begins and ends, whether there is a one-time introduction, and how the end connects back.
  • Ensemble. Solo piano, piano and strings, chamber orchestra, synths, traditional instruments — which also decides how much space the sketch should leave.
Decide first, then write: five decisions in order — function in the game, emotional temperature, key/meter/tempo, form and loop plan, ensemble — with the values of two course examples, First Adventure (Pillars of Composition) and the Hometown Village theme (The Legend of Otoe, Level 1)
Decide first, then write: five decisions in order — function in the game, emotional temperature, key/meter/tempo, form and loop plan, ensemble — with the values of two course examples, First Adventure (Pillars of Composition) and the Hometown Village theme (The Legend of Otoe, Level 1)

How to Design a Loop

A loop is a piece whose ending leads back into its beginning, and designing that connection is the core craft of area music. Two things have to work: the musical join (does the return feel right?) and the technical join (does the audio file actually loop cleanly?). They are related but not the same, and the MTS courses deal mainly with the first.

The ABA trick: the return is the restart

In Pillars of Composition, Ryan builds the "First Adventure" loop on a small ternary form with one twist: "a nice trick for a video game loop is you can use the small ternary form, the ABA, but that return to the A at the end is actually your start. So it's ABABAB forever." The listener hears a complete ABA shape, but the repeated region only contains A and B. He keeps AABB in reserve as an alternative.

An opening that only partly plays once

The Otoe village theme is an A–B loop with a short introduction and an interlude that reuses the introduction's material. The piece closes by landing on the tonic — melody on scale degree 1, harmony on the I chord — while the accompaniment rhythm keeps moving, and the melody's final arrival overlaps with the return of the introductory figure. Ryan describes the effect as feeling finished and unfinished at the same time: the satisfaction of arriving home, with the energy still rolling.

Only the first four bars play once. Near the end, the melody reaches its final arrival over the returning introductory figure. Playback then jumps to the second half of the opening, completing an eight-bar passage of introductory material before the A theme returns. Where the repeated region begins and ends is a musical choice, not a technical default.

Carrying material across the join

When the village theme was arranged for piano and strings, the pizzicato figure heard at the end of the loop was also introduced earlier in the piece, so that it would not cut out abruptly at the restart. That is one option, not a law: instruments can enter or drop out exactly at the join if that is the intended effect. What matters is whether rhythm, phrasing, harmony, and the sound itself line up across the seam — a pattern that continues can help, and so can a deliberate entrance.

A loop does not have to stay in one key, either. In The Piano Composer, David McCaulley's hero theme modulates during its expansion and still loops. The transition from the end back to the actual start has to work musically; the key change itself is not the obstacle.

Checking the technical loop

The musical join is only half the job. Before delivering, bounce the actual audio and listen to it play back to back several times. Check the loop boundaries for clicks, gaps, or doubled attacks; make sure any pickup notes land where they should; and listen for reverb and delay tails that get cut off or pile up at the restart. Keep the one-time introduction and the repeated region clearly separated in your project. How tails are handled depends on how the game plays the music back: audio middleware such as Wwise, for example, treats the loop's entry and exit points and the tail region as separate settings, so it pays to agree with the audio team on what they expect. A clean join is a requirement, not a guarantee that the cue stays fresh for an hour — that still comes from the writing.

Schematic loop design: the Hometown Village theme with a one-time opening, loop start inside the opening, A, interlude, B, the opening figure returning with the melody’s final arrival, and playback jumping back to the second half of the opening; below, the First Adventure loop where the return of A is the restart
Schematic loop design: the Hometown Village theme with a one-time opening, loop start inside the opening, A, interlude, B, the opening figure returning with the melody’s final arrival, and playback jumping back to the second half of the opening; below, the First Adventure loop where the return of A is the restart

Walkthrough: Writing a JRPG Town Theme

Town music is the archetypal area loop: it has to stay pleasant for a long time, say "you are safe here," and carry the identity of a place. In Level 1 of The Legend of Otoe, Ryan Leach and Gavin Leeper write a complete Hometown Village theme as the model piece for the course, first for solo piano and then arranged for piano and strings and for string quartet. Here is how it comes together, and what each decision does.

Choosing the setting

The theme is in F major — "I just feel like F is a more countryside key. There's no real music theory or science behind that," Ryan admits — in 3/4 for its light, peaceful feel, at a medium-slow tempo. The key is a personal association; the gently lilting triple meter at a relaxed pace is a stylistic decision too, one that in this piece is meant to signal that nothing is going to attack you here.

Opening with a peaceful bed

The introduction is a short figure on two chords, I and ii, over a tonic pedal in the bass — a calm, tension-free bed for the village to start on. Because the loop returns to this material, the introduction also becomes the interlude and the figure that carries the restart.

The voicing of the opening Fmaj7 matters to the style: it uses perfect fourths in the upper voices rather than stacked thirds, which gives the chord an open sound. Level 3 of the course returns to fourth- and fifth-based voicings in depth.

Building the harmony from a known progression

The theme grows out of the "enhanced chord progression" the course develops in its earlier lessons, which builds on progressions characteristic of this style: the Royal Road progression (IVmaj7–V7–iii7–vi), the Seal progression, diatonic walks, and the Nichijou progression. Rather than inventing new harmony for the theme, the melody is written over a progression that is already working. For background, see our guides to the Royal Road progression and anime chord progressions.

Melody notes: sevenths and extensions on strong beats

This is where much of the JRPG flavor lives. In many tonal styles the default strong-beat melody notes are the root, third, and fifth of the current chord. Gavin Leeper observes that "melodies in these Japanese genres tend to favor chord extensions on these strong beats." In practice that means sevenths and upper extensions such as ninths, elevenths, and thirteenths — notes beyond the triad, even though the seventh is already a chord tone of a seventh chord. His analysis of "Zelda's Lullaby" shows a melody leaning heavily on sevenths and elevenths on downbeats; his own start-town theme "Akigami" does it more selectively, staying on triad tones at first and getting more colorful as the melody develops.

The village theme follows the same logic. In the passage Ryan walks through, the melody sits on sevenths, then moves through the ninth, the seventh, and the sharp eleventh before landing on the fifth — the first root, third, or fifth of a chord in that stretch. Ryan treats that landing as "a structural point in the theme." Sevenths and extensions give the line its color; the arrival on a triad tone gives it a shape.

Form: a period, with an interlude that refuses to hurry

The theme is "generally based on the period form": an opening idea, a contrasting idea, then a consequent phrase that restarts the melody and drives toward the cadence. Between them sits an interlude that repeats almost exactly, and that repetition is deliberate — it keeps the music from moving forward too much, because it is a village and it is supposed to stay calm. For a town theme, holding back momentum is a feature. Our sentence form guide covers period and sentence structure if you want a refresher.

From piano to string quartet

Level 1 closes by arranging the village theme first for piano and strings, then for string quartet. These arranged versions are still notation-stage sketches — production comes later — but the arranging principles carry over to any ensemble:

  • Strings have colors the piano does not. Quiet passages can become pizzicato; sustained chords can gain drama as tremolo. A glissando or portamento between notes, which Gavin describes as emulating the erhu, adds a recognizably East Asian flavor to a string line.
  • The piano has a sustain pedal and the strings do not, so resonance has to be written in — for example by giving one instrument a sustained, simplified version of a line while another plays the detailed part on top.
  • Share the melody around. Keeping it in violin 1 the whole time is a valid choice, but the course treats it as a missed opportunity when the other players could carry it just as well.
  • A busy piano figure can be split between two instruments; in the quartet version a climbing left-hand gesture is divided between cello and viola, overlapping on one note so the line never breaks.
Schematic skeleton of the Hometown Village theme: large form with loop start and end, the opening figure as I–ii chords over a tonic pedal, the period form inside A, and strong-beat melody notes relative to each chord (7, 7, 7, 9, then 9, 7, sharp 11 and 5)
Schematic skeleton of the Hometown Village theme: large form with loop start and end, the opening figure as I–ii chords over a tonic pedal, the period form inside A, and strong-beat melody notes relative to each chord (7, 7, 7, 9, then 9, 7, sharp 11 and 5)
The Legend of Otoe course coverThe Legend of Otoe: Composing Music for Anime and JRPGs Level 1 covers exactly what this walkthrough touches on: harmonic functions and cadences, secondary dominants, the Royal Road and Seal progressions, seventh chords and extensions, melodic structure and note choices, piano accompaniment patterns, and translating a piano theme into piano-and-strings and string-quartet arrangements. The level combines lessons, assignments that build on each other, and worked demos, and it ends with your own Hometown Village theme, written alongside the model piece Ryan and Gavin composed for the course. Explore the course

Area and Adventure Music: Leaving the Village

Once the player leaves the starting town, the music has to change character without changing world. Two pieces from the MTS courses show how that shift was made in each case.

"Otoe's Journey": the call to adventure

Level 2 of The Legend of Otoe is built around a piece the course calls "Otoe's Journey," written for the moment the heroine sets out. Every decision serves one feeling — excited, energetic, still positive:

  • Still major, but faster. A major at 132 BPM, to keep the energy moving.
  • Wide opening intervals. The melody opens across a perfect fourth and an octave. Ryan connects that to the open fifths and octaves of natural horns: a very open, bold, "we're off into the landscape" sound.
  • An active accompaniment from bar one. Syncopated and bouncy rather than a plain four-beat pulse. (Our syncopation guide covers why that reads as motion.)
  • A borrowed chord right away. The second chord is a minor iv (Dm9), borrowed from the parallel minor — a signal that things are colorful, maybe a little mysterious.
  • Real contrast between sections. The A section is loud; B drops to piano, shifts from a rhythmic texture to arpeggios, and moves the bass line.
  • Tension by refusing to move. Before the return to A, the harmony alternates two chords over and over. The lack of motion builds tension and makes the return more satisfying.

"First Adventure": the open-world loop

The Pillars of Composition loop described earlier shows the same idea from a different course. Its melody is written in sentence form — a basic idea, a varied repeat, a continuation — with a call-and-response echo an octave higher, a move toward the IV, and a deceptive cadence because, in Ryan's words, "we're still on an adventure. It's not entirely safe." A touch of modal interchange darkens the second half. The finished loop combines motivic development, sentence and period forms, rhythmic and contrapuntal accompaniment, fills, counterlines, and accents — all inside an ABA that is "just this eternal loop."

Modes as a shortcut to character

If you need to establish an area's character quickly, modes are among the most efficient tools. In the modes lesson of Pillars of Composition, Ryan describes Dorian — natural minor with a major sixth — as having "a bit of a kind of whimsical adventure feel," good for fantasy-game settings; Phrygian — natural minor with a minor second — as suited to real darkness and despair, "maybe a dark fantasy game"; and Lydian — major with an augmented fourth — as bright and lifting. Our modes guide goes through each one.

Chromatic mediants are another staple: triads of the same quality whose roots lie a third apart and which share one tone, like C major and E♭ major sharing G. In Composing Worlds: Vikings and Dragons, Ryan calls the sound "great for fantasy music, adventure music, basically anything in kind of a Hollywood film scoring or video game context."

Dungeon and Ambient Music: Scoring a Place, Not a Person

Not every area needs a theme. Caves, ruins, and other dangerous spaces often work with music that establishes a setting and lets the player's imagination do the rest. Level 3 of The Legend of Otoe is built around such a piece, "Caves of Despair," and it is a good model for ambient game music.

Lead with mood, not melody. "It's not the traditional theme with accompaniment, it's more colors and mood and vibe," Ryan says of the sketch. The Level 2 adventure theme was about Otoe's character; the cave music is about establishing a setting.

Let go of functional harmony. The cave piece uses stacks of fourths and fifths (quartal and quintal voicings), diminished and augmented chords, and non-functional progressions. In the B section the fourths include an augmented fourth — a tritone inside the stack — before landing on an altered dominant (A7♭9♭5). Our guides to diminished chords, augmented chords, and the tritone cover the raw materials.

Leave space on purpose. The sketch deliberately contains gaps — extra bars of silence after each statement, rests inside the long notes — because percussion and traditional instruments are added later in the course. Ambient music that is too dense leaves no room for sound design or the player's own footsteps.

Orchestrate for darkness. When the sketch is arranged for chamber orchestra, the low pulse goes to cellos and basses on a low C; Ryan opts for five-string basses to reach it (a four-string bass with a C extension gets there too). A dark chord is voiced with bass clarinet below bassoon for the thickest, roundest bottom. A twinkling piano figure becomes "drops inside the cave, drops of water." The final gesture is a flute doubled with tremolo "for nervousness," fading out. Each choice is a sound image, not a rule.

Be willing to cut. The first sketch had a third section — a chase, built on rising circle-of-fifths gestures and a "standing on the dominant" hold. It felt like the weakest part and no longer fit the story, so it was cut and the A section was expanded instead. Showing that is part of the course's point: not everything in a first draft works, and that is part of the process.

Comparison of three pieces from The Legend of Otoe — Hometown Village, Otoe’s Journey and Caves of Despair — by key and tempo, melody, form, harmony and texture
Comparison of three pieces from The Legend of Otoe — Hometown Village, Otoe’s Journey and Caves of Despair — by key and tempo, melody, form, harmony and texture
The Legend of Otoe Levels 2 and 3 course coverThe Legend of Otoe: Levels 2 and 3 Continues directly from Level 1. Level 2 covers modes, borrowed and altered chords, tritone substitution, and Royal Road variations, and arranges “Otoe’s Journey” for woodwinds. Level 3 moves into quartal and quintal voicings, diminished and augmented harmony, non-functional harmony and the French Impressionists, orchestral percussion, and guest lectures on writing for shakuhachi and koto, ending with your own “Caves of Despair” piece for chamber orchestra and traditional instruments. More than 50 lessons and over nine hours of material. Explore the course

Battle Music, Boss Themes, and Menus

This guide's focus is on area cues. The other staples of a game score deserve their own guides, so what follows is a short list of options rather than recipes.

Battle and boss music. The tools already covered are all available here: a darker mode such as Phrygian, a faster tempo, a short harmonic cell repeated until release (the "tension by refusing to move" idea from "Otoe's Journey"), and the circle-of-fifths lifts and dominant pedals that were cut from the cave sketch. None of them is mandatory. A battle cue can also stay in major, sit at a moderate tempo, or build on a long melodic line — what matters is a clear decision about the energy and character the fight needs, and a loop that works under it.

Menu music. Menu cues are heard repeatedly and often without much else happening on screen, so a short vamp of two to four chords is a common choice. A borrowed chord or a modal color can give such a vamp enough interest to survive repetition; whether it does is something to test by listening to it loop for longer than feels comfortable.

From Sketch to Game-Ready Cue

Everything above is written in notation software, on purpose. In the Otoe demos the instructors say they are "generally going to stay in Dorico and focus on the pure compositional aspects, just the notes, and not on how to make a good mock-up," and the Pillars loop is finished the same way — with the remark that for a real game Ryan would export the MIDI into Logic and produce it with sample libraries, then add polish.

Separating the two stages is a useful discipline. Composition decisions — key, form, loop region, harmony, melody — are cheap to change in a sketch and expensive to change in a produced track with twenty instrument lanes. Get the composition most of the way there first, then produce.

Between the arranged sketch and a game-ready cue, a few more things have to be settled: the production itself (libraries, mix, loudness), the export format and loop region the game expects, and whether the cue is delivered as one file or as separate layers or sections. That last point is where adaptive music comes in. Two common approaches are layering — stems that fade in or out as the situation changes, for example adding percussion when enemies appear — and section switching, where the game moves between alternative passages depending on what the player does. Which approach a project uses, and who sets it up, is decided with the developer or audio team; as a composer you mostly need to know early whether your cue will be split into layers or cut at section boundaries, because that changes how you write it. For the production side, our guides to virtual instruments and how to mix orchestral music pick up from here.

Common Mistakes When Writing Area Music

  • An unintended join. The loop restarts with a jolt — a cut-off tail, a rhythmic hiccup, a harmony that does not lead back — because the connection was never designed. A conclusive ending can work if the restart is written for it; it fails when it was not planned.
  • Wandering in without decisions. No key, no tempo, no function in mind. The blank page wins.
  • Missing intended contrast. Keeping the melody on one instrument or using one harmonic language across several locations can be a deliberate way to tie a world together. The mistake is doing it by default, so that the village, the forest, and the cave sound alike without anyone having chosen that.
  • Filling every bar. Ambient and dungeon music especially needs room for sound design and for the player.
  • Keeping a section because you wrote it. The chase section in "Caves of Despair" was cut because it was the weakest part. The piece got better.
  • Skipping the playback test. Listening to the exported loop repeatedly helps catch audible problems at the join. Check it again in the intended playback setup.

FAQ

How do you become a video game composer? The craft side is the same as for any media composer: solid harmony, melody, and form, plus the ability to produce convincing mock-ups. The game-specific skills are loop design, writing for places and states as well as moments, and leaving room for sound and gameplay. A portfolio of game-style cues — a town theme, an area loop, a battle track — is a common starting point, and the pieces walked through in this article are that kind of material.

What makes a loop sound seamless? A loop region that begins and ends at musically sensible points, a connection from the end back to the start that works in rhythm, phrasing, and harmony, and an exported file that has been checked by listening to it loop several times — no clicks, no gaps, no cut-off tails. A one-time introduction before the repeated region is a common way to make the first entrance different from the restart.

What key and tempo should a town theme be in? There is no rule. The model piece in The Legend of Otoe uses F major, 3/4, and a medium-slow tempo for a peaceful village, while its adventure theme moves to A major at 132 BPM. Major keys, moderate tempos, and gentle meters tend to read as safe; faster tempos and wide melodic intervals tend to read as adventure.

Why does JRPG music sound the way it does? The style the course describes blends jazz harmony (seventh chords and extensions, borrowed and altered chords), techniques from French Impressionism (quartal voicings, non-functional color chords), and Romantic-era orchestration, filtered through Japanese musical culture and, in many scores, traditional Japanese instruments and scales. Our guides to Japanese scales and Japanese instruments cover the last two.

Do I need to know audio middleware or programming? It depends on the project. On many teams, implementation — layers, transitions, loop settings — is handled by an audio designer or the developer, and the composer delivers stems and loop points; on small projects the composer may do it all. Either way, knowing early how your cue will be played back changes how you write it.

Should video game music have a melody? It depends on the location and the role of the cue. Town and character themes usually do; dungeon and ambient music often works better as mood and texture, with melody reserved for key moments.

Learn with Master The Score

Composition, orchestration and production, taught by working composers

Courses on composition, orchestration, music production, trailer music and sound design, from composers writing for film, games and media. Students also get exclusive discounts on leading sample libraries and plugins.

Discover all courses →
Master The Score on laptop, tablet and phone
3,000+students worldwide
15in-depth courses
9expert instructors

Get your
free E-books

Subscribe to our newsletter
and receive free copies of our E-books
"Orchestral Clarity" & "DNA of Music"

Get your free sample
Free composition e-books