让Transformer生成音乐时精准匹配指定和弦位置,提升伴奏准确性。
Incorporating Structure and Chord Constraints in Symbolic Transformer-based Melodic Harmonization
- 结合束搜索与A*算法,引入回溯机制强制满足和弦约束。
- 在正确小节的起始位置生成目标和弦,保证时间对齐性。
- 适用于需要精确和声控制的音乐生成场景,如编曲辅助。
Transformer架构在符号化音乐生成中表现出显著优势,其对用户偏好建模的能力正受到广泛关注。本文研究在旋律和声配置中引入预定义和弦约束的问题:即给定特定位置的目标和弦与旋律作为输入,自回归Transformer模型需生成符合该和弦的伴奏。文章分析了此类约束带来的独特挑战,并提出一种名为B*的算法来应对该任务。B*算法融合了束搜索、A*搜索与回溯机制,确保预训练Transformer生成的和声在正确的拍点和小节内满足目标和弦要求。该算法为暴力穷举型,最坏情况具有指数复杂度;但本文首次揭示了该问题的难度,并提出一个可融入启发式信息的框架,为后续改进提供了丰富可能性。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。