arXiv:2611.01047cs.SDOct 2026

Manuscript Offprint

arXiv:2611.01047

How Close to the Theme? Similarity-Label Conditioning for Game Music Generation

Shangxuan Luo, Zixun Guo, Jinjie Shi, Joshua Reiss

Abstract

Composers develop music from an original idea, controlling how similar each new section is to it, from near repetition to new material. Game music needs this often, as its material repeats over long play. Music models, however, rarely learn to control similarity from real pieces. We further train a pretrained MIDI model on section pairs from Super Mario pieces. A label states each pair's similarity, and a context vector summarises the given section, or context. For 157 test contexts, the model generates six outputs per label. Twelve measures score the outputs; one main measure each covers melody, pitch content, rhythm and note length. On average, outputs requested as similar are more similar to their context than those requested as dissimilar, and not to other pieces. All twelve measures favour them; each main measure stays significant after correction for multiple tests. On melody, the gap comes mainly from more frequent restatement of the context's melody. Against an otherwise identical model without a label, only the request for high similarity makes outputs more similar. In a listening test, ratings followed melodic overlap with the context most closely of all measures.

Computer Music Journal

Introduction

Music is built by repeating and varying its own material, and the variation lets a listener hear two passages as related (Volk, de Haas, and van Kranenburg 2012). The composer controls how similar each new section is to that material, from near repetition to a new idea.

Game music asks for this choice more often than most music. It is assembled from loops, branches and layers that the game recombines during play (Summers 2016). Composers write interchangeable sections over the same material, so the game can switch between them (Phillips 2014). Too exact a repetition becomes noticeable over long sessions (Lopez Duarte 2024; Worrall 2025). A tool should therefore let the composer set this similarity, since composers want creative control over AI tools (Worrall and Collins 2024).

Symbolic music models continue a passage fluently but do not offer this choice. Systems for variation let a user set how strongly an original is altered (Bhandari et al. 2025). Real pieces, however, show how close their own sections stand to one another. One model learns variation from such pieces, but only from pairs within fixed similarity bounds, without a choice of degree (Gao, Reuben, and Collins 2024). To our knowledge, no model learns to set similarity from real pairs across their range.

This paper asks whether a model can learn this control from section pairs labelled by their similarity. We fine-tune, or further train, the Moonbeam MIDI model on pairs from one Super Mario piece: a given section, the context, and a target. Each pair carries a high-, mid- or low-similarity label from compound similarity (CS), a measure of our own, the label measure. A context vector summarising the context enters the model at every bar. Three controls separate their roles: one lacks the label, one lacks label and context vector, one has wrong labels. Each model generates six outputs per context and label, one per sampling run, or draw. Twelve measures of melody, pitch content, rhythm and note

Computer Music Journal length, nine computed differently from CS, and a listening test judge the outputs.

Averaged over draws, outputs requested as highly similar are more similar to their context than those requested as dissimilar. All twelve measures favour them, and the four main measures and CS remain significant after correction for multiple tests. Against the no-label control, only the high-similarity label makes outputs more similar. On melody, pitch content and rhythm the shift is toward the output's own context, not other pieces. On melody it comes mainly from more frequent restatement of the context's melody. Mid-similarity outputs do not lie in between.

The listening test did not detect the label effect: its 30 pairs, one output per label, differed little on the measures. Listener ratings followed melodic overlap most closely, which CS leaves out; only 38 percent of its high-similarity pairs restate the same section.

The paper makes two contributions. The first is a model whose similarity label is learned from real section pairs. Requesting high similarity makes its outputs more similar to their own context on average. The second is evidence from ratings of 10-second clips that melodic overlap has the largest observed association with judged similarity. It motivates a melody-aware label measure, which we leave to future work.

References (42)