Reflector: Arrangement-Aware Harmonic Retrieval for Sample-Based Composition

music information retrievalharmonic compatibilitysynthetic trainingcreative systems

ISMIR 2026, Late-Breaking/Demo · Extended abstract. The full paper can be found here.

Abstract

Reflector is an interactive audio workstation that makes sample retrieval arrangement-aware: as a composer places material on a multi-track timeline, the system tracks co-sounding regions, updates a session-level harmonic representation, and retrieves against the arrangement as it evolves. At its core is a fixed interval-class oracle, a stated rule for pitch-class compatibility, distilled through synthetic training into a 128-dimensional embedding where dot products stand in for compatibility scores at interactive speed. Characterized against classical chroma-similarity measures on a working library, the learned embedding preserves the oracle’s judgments while covering the whole library, something the rule cannot do when applied directly. Reflector runs locally, is free, and its training pipeline is open source.

1. Introduction

The early stage of sample-based composition is an ideation process of browsing, testing, and arranging candidate materials, during which harmonic relevance shifts as new sounds are placed in relation to one another. Retrieval tools that query from a fixed reference sample become less informative as the arrangement evolves; systems that track the evolving arrangement turn retrieval from a static lookup into a continuous participant in that process.

Neural models have learned to score loop compatibility [1], context-conditioned retrieval suggests drum samples from a rendered mixdown [2], psychoacoustic consonance models drive harmonic mixing [3], and learned representations retrieve a missing stem from a multi-instrumental context [4]. Commercial platforms such as Splice’s Create [5] and Output’s Co-Producer [6] adapt suggestions to a session, over platform catalogs and with unpublished methodologies. A separate body of work measures tonal content itself: harmonic pitch-class profiles [7], tonal centroid distances [8], Tonal Interval Vectors [9], and transposition-invariant chroma matching [10]. Reflector builds on the same pitch-class substrate, with a constant-Q transform (CQT) [11] chroma front end, and Section 4 uses these measures as reference points for locating its retrieval surface.

To our knowledge, no published work has modeled a multi-track arrangement as an evolving set of co-sounding regions for harmonic retrieval. Reflector is offered as a systems contribution: an interface and retrieval pipeline organized around a stated rule for pitch-class compatibility, designed, trained, and operated end to end on a single machine. This abstract condenses a full account available as a preprint [16]; the application and training pipeline are at github.com/austinrockman/reflector.

2. The Oracle and Its Distillation

At the center of Reflector is a hand-designed 12×12 table of interval weights, K, adapting the interval-class summation framework of Hall et al. [13] from intra-chord consonance to cross-object compatibility. Two chroma frames c, d ∈ ℝ12 score as a kernel-weighted bilinear form,

sframe = c⊤K d(1⊤c)(1⊤d) + ε(1)

where Kab = ω(ic(a, b)) maps each pitch-class pair to the net weight of its interval class. Internal consonance within either source is invisible to the score, which responds only to the relationship the two objects create together; normalizing by activation mass makes the score invariant to level. The full weight table is stated in the preprint [16]: the polarities follow the Schwartz-derived baseline tabulated by Hall et al. [13], in the interval-class tradition of Huron [12], with thirds elevated to encode shared tonality between co-sounding objects and the tritone penalized more strongly as a marker of tonal incompatibility. The kernel is an experimental design position: we make no claim that these weights are perceptually optimal, and Section 4 measures their consequences.

Sources are trajectories, so frame scores aggregate over time with interaction-mass weighting: each moment contributes in proportion to how much both sources are actually sounding in it. The frame normalization and the aggregation weight share the same interaction mass and cancel exactly:

straj = TΣt=1ct⊤K dtTΣu=1(1⊤cu)(1⊤du)(2)

Stacked as a tensor, a file’s pairwise window scores reduce to two matrix multiplications, so oracle scoring is effectively free at runtime. The oracle also scores the candidate under all twelve circular shifts of its pitch-class axis [10]; the full twelve-score profile supervises training and surfaces in the interface as named transposition suggestions.

The oracle is distilled into an encoder trained entirely on synthetic data: full control over the training distribution, zero use of copyrighted recordings, and an open-source pipeline. Stage A generates 50k paired pitch-class trajectories (150 frames, 3 seconds) from a triadic grammar with stochastic extensions and four temporal patterns; the oracle labels each pair with a compatibility score and a 12-way transposition profile. A shared convolutional encoder maps context and candidate to L2-normalized 128-D embeddings; a pair head, discarded after training, is supervised by mean squared error against the oracle’s best-over-transpositions score and temperature-sharpened forward KL divergence against the full transposition profile. Stage B renders each pair to audio via additive synthesis with domain randomization, re-extracts chroma with a CQT, and fine-tunes with InfoNCE [14], directly optimizing the dot-product geometry used at inference; a small MSE anchor keeps the embedding’s scores tethered to the oracle’s values. The encoder is then frozen, permanently: every representation in Reflector is a coordinate in one fixed space.

3. The System

To index a library, the system extracts full-length CQT chroma per file, segments it into overlapping 3-second windows, embeds each window with the frozen encoder, and aggregates the windows, weighted by mean pairwise oracle coherence through Eqn (2), into one L2-normalized file embedding. Retrieval ranks all candidates by dot product; a second, optional phase re-embeds every candidate under all twelve pitch-class transpositions. On the working library, 68% of top-10 query pairs achieve higher compatibility under a non-zero transposition.

The composer arranges samples on a multi-track timeline. On each save, a sweep-line pass identifies every region where the set of co-sounding samples changes; the active members’ embeddings combine into coherence-weighted region centroids, which aggregate by duration into a session centroid carrying a dispersion value. The arrangement centroid is recomputed whenever the composer saves, so retrieval targets the session’s current composite harmonic identity. Session centroids project to 3-D in a navigable galaxy view (Figure 1), where nearest neighbors surface which sessions share harmonic vocabulary and samples can move between sessions.

Reflector galaxy view: session centroids in a navigable 3-D space

Figure 1: Galaxy view: session centroids in a navigable 3-D space, with nearest neighbors ranked by cosine similarity.

4. Locating the Retrieval Surface

The learned surface is characterized against established tonal-similarity measures on the working corpus, 631 samples from two composers’ personal collections, one of whom is the author; we make no generality claim beyond it. Six rules are compared by which samples ever appear in a top-10 over all 631 queries: the embedding, mean-chroma cosine, a TIV-style DFT distance [9], the direct kernel (best over 12 transpositions, encoder bypassed), and two perturbed kernels, with tension weights halved and removed, as sensitivity probes.

Ranked by the direct kernel, only 64 of 631 samples ever surface, and a single sparse consonant drone appears in 97% of the lists: judged pair by pair, a tonally pure drone blends acceptably with nearly everything, so the rule crowns universal donors. The sensitivity probes concentrate identically (60 and 56 samples), so the degeneracy belongs to interval-weighted direct scoring rather than to any particular weight choice. The learned embedding preserves the kernel’s values while abandoning its selections: NDCG at rank 10 against the oracle is 0.85 (standard error 0.003, minimum 0.73), yet its surface covers 625 of 631 samples and shares 1.3% of top-10 members with the direct kernel’s. On the unit sphere no candidate can be close to every query direction at once, so a universal donor is inexpressible, and InfoNCE’s uniformity pressure [15] reinforces the spread: the approximation error lands on the degenerate component, and what survives is the interaction structure.

The similarity measures behave as one family, overlapping 0.88, but rank the corpus nearly opposite to the kernel (mean Spearman ρ = −0.65; 0.4% shared top-10 members): resembling and combining are different questions, and Reflector exposes both as two lenses on one library. The arrangement-level behavior follows the composer. In a session pivoting a tritone from D♯ into A, 70% of top-10 suggestions change and dispersion rises from 0.106 to 0.168: the system follows the composer into territory its own rule penalizes. Across 24 composer sessions replayed in timeline order, top-10 overlap between the evolving arrangement centroid and the first placed sample declines from 1 to 0.27: retrieval anchored to a session has something to say precisely because the two diverge musically.

5. Conclusion

A curated sample library contains latent compositional structure: relationships between files that no manual workflow can fully enumerate and no single query can reveal. Reflector makes that structure navigable and tracks how the composer moves through it.

Acknowledgments

The author thanks Roopam Garg for testing Reflector and creating sessions and samples used in the evaluation.

AI Usage Statement

An LLM was used to help identify related applications and systems for the literature review; all cited works were read, verified, and selected by the author.

References

  1. [1]B.-Y. Chen, J. B. L. Smith, and Y.-H. Yang, “Neural loop combiner: Neural network models for assessing the compatibility of loops,” in Proc. Int. Society for Music Information Retrieval Conf., 2020, pp. 424–431.
  2. [2]S. Lattner, “SampleMatch: Drum sample retrieval by musical context,” in Proc. Int. Society for Music Information Retrieval Conf., 2022, pp. 781–788.
  3. [3]R. B. Gebhardt, M. E. P. Davies, and B. U. Seeber, “Psychoacoustic approaches for harmonic music mixing,” Applied Sciences, vol. 6, no. 5, p. 123, 2016.
  4. [4]A. Riou, S. Lattner, G. Hadjeres, M. Anslow, and G. Peeters, “Stem-JEPA: A joint-embedding predictive architecture for musical stem compatibility estimation,” in Proc. Int. Society for Music Information Retrieval Conf., 2024, pp. 625–633.
  5. [5]Splice, “The future of music creation is here,” 2024. [Online]. Available: https://splice.com/innovation/timeline
  6. [6]Output, “Co-Producer user guide,” 2025. [Online]. Available: https://support.output.com/en/articles/10628997-co-producer-user-guide
  7. [7]E. Gómez, “Tonal description of polyphonic audio for music content processing,” INFORMS Journal on Computing, vol. 18, no. 3, pp. 294–304, 2006.
  8. [8]C. Harte, M. Sandler, and M. Gasser, “Detecting harmonic change in musical audio,” in Proc. 1st ACM Workshop on Audio and Music Computing Multimedia, 2006, pp. 21–26.
  9. [9]G. Bernardes, D. Cocharro, M. Caetano, C. Guedes, and M. E. P. Davies, “A multi-level tonal interval space for modelling pitch relatedness and musical consonance,” Journal of New Music Research, vol. 45, no. 4, pp. 281–294, 2016.
  10. [10]M. Müller and M. Clausen, “Transposition-invariant self-similarity matrices,” in Proc. Int. Society for Music Information Retrieval Conf., 2007, pp. 47–50.
  11. [11]J. C. Brown, “Calculation of a constant Q spectral transform,” Journal of the Acoustical Society of America, vol. 89, no. 1, pp. 425–434, 1991.
  12. [12]D. Huron, “Interval-class content in equally tempered pitch-class sets: Common scales exhibit optimum tonal consonance,” Music Perception, vol. 11, no. 3, pp. 289–305, 1994.
  13. [13]E. T. R. Hall, R. Tamir, and M. Rohrmeier, “Optimising computational measures from behavioural data predicts perceived consonance,” Trans. Int. Society for Music Information Retrieval, vol. 8, no. 1, pp. 313–333, 2025.
  14. [14]A. van den Oord, Y. Li, and O. Vinyals, “Representation learning with contrastive predictive coding,” arXiv preprint arXiv:1807.03748, 2018.
  15. [15]T. Wang and P. Isola, “Understanding contrastive representation learning through alignment and uniformity on the hypersphere,” in Proc. Int. Conf. on Machine Learning, 2020, pp. 9929–9939.
  16. [16]A. Rockman, “Reflector: Arrangement-aware harmonic retrieval for sample-based composition,” arXiv preprint arXiv:2607.22413, 2026.

Cite

A. Rockman, “Reflector: Arrangement-Aware Harmonic Retrieval for Sample-Based Composition,” in Extended Abstracts for the Late-Breaking Demo Session of the 27th Int. Society for Music Information Retrieval Conf., Abu Dhabi, UAE, 2026.

Full version: A. Rockman, “Reflector: Arrangement-Aware Harmonic Retrieval for Sample-Based Composition,” arXiv preprint arXiv:2607.22413, 2026.