SDAISCDec 8, 2025

Incorporating Structure and Chord Constraints in Symbolic Transformer-based Melodic Harmonization

arXiv:2512.07627v1h-index: 24AIMC
Originality Incremental advance
AI Analysis

This addresses the challenge of user control in AI-generated music harmonization, but it is an incremental step focused on a specific domain.

The paper tackles the problem of incorporating predefined chord constraints into symbolic melodic harmonization using autoregressive transformer models, proposing the B* algorithm that combines beam search and A* with backtracking to enforce these constraints, though it has exponential worst-case complexity.

Transformer architectures offer significant advantages regarding the generation of symbolic music; their capabilities for incorporating user preferences toward what they generate is being studied under many aspects. This paper studies the inclusion of predefined chord constraints in melodic harmonization, i.e., where a desired chord at a specific location is provided along with the melody as inputs and the autoregressive transformer model needs to incorporate the chord in the harmonization that it generates. The peculiarities of involving such constraints is discussed and an algorithm is proposed for tackling this task. This algorithm is called B* and it combines aspects of beam search and A* along with backtracking to force pretrained transformers to satisfy the chord constraints, at the correct onset position within the correct bar. The algorithm is brute-force and has exponential complexity in the worst case; however, this paper is a first attempt to highlight the difficulties of the problem and proposes an algorithm that offers many possibilities for improvements since it accommodates the involvement of heuristics.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes