Music sequence generation and arrangement based on transformer model

Existing music sequence generation methods often struggle with long-range dependencies, leading to gradient vanishing or exploding, which compromises their ability to capture intricate musical structures. This study integrates the Transformer model, leveraging its self-attention mechanism and position encoding to incorporate global information at each time step. This approach enables the flexible modeling of long-range dependencies, resulting in more natural and harmonically coherent music sequences. First, serialized encoding is employed to transform musical events. A multi-scale attention mechanism is then introduced, applying different attention strategies at each layer to capture distinct musical elements across various time scales. Additionally, periodic position encoding is incorporated to enhance the recognition of recurrent musical patterns. Experimental results demonstrate that compared to state-of-the-art models such as MuseNet, MelodyRNN, and MusicTransformer, the proposed method reduces average perplexity by 5.4%, 11.7%, and 9.5% on one dataset and 5.9%, 12.1%, and 10.3% on another. These findings highlight the model’s superior capability in generating high-quality music with enhanced melodic consistency and diversity. By outperforming existing mainstream approaches across multiple evaluation metrics, this research advances the field of music sequence generation, offering new insights for AI-driven music composition and arrangement.

Authors

Institutions

Publication Details

Journal
Journal of Computational Methods in Sciences and Engineering
Published
2025-04-24
DOI
https://doi.org/10.1177/14727978251337904
Citations
1
Primary Topic
Music and Audio Processing
Type
article
Field-Weighted Citation Impact
1.49
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Music sequence generation and arrangement based on transformer model

Pan Hu, Xiao Cui, Zheng Huang
1 citations
Journal of Computational Methods in Sciences and Engineering
Music and Audio Processing
1.49
article

Music sequence generation and arrangement based on transformer model

Pan Hu, Xiao Cui, Zheng Huang
article en
1 citations

Abstract

Existing music sequence generation methods often struggle with long-range dependencies, leading to gradient vanishing or exploding, which compromises their ability to capture intricate musical structures. This study integrates the Transformer model, leveraging its self-attention mechanism and position encoding to incorporate global information at each time step. This approach enables the flexible modeling of long-range dependencies, resulting in more natural and harmonically coherent music sequences. First, serialized encoding is employed to transform musical events. A multi-scale attention mechanism is then introduced, applying different attention strategies at each layer to capture distinct musical elements across various time scales. Additionally, periodic position encoding is incorporated to enhance the recognition of recurrent musical patterns. Experimental results demonstrate that compared to state-of-the-art models such as MuseNet, MelodyRNN, and MusicTransformer, the proposed method reduces average perplexity by 5.4%, 11.7%, and 9.5% on one dataset and 5.9%, 12.1%, and 10.3% on another. These findings highlight the model’s superior capability in generating high-quality music with enhanced melodic consistency and diversity. By outperforming existing mainstream approaches across multiple evaluation metrics, this research advances the field of music sequence generation, offering new insights for AI-driven music composition and arrangement.

Journal of Computational Methods in Sciences and EngineeringVol. 25(5)
Chongqing University of Education (CN)
Openalex Percentile: Top 20%
Music and Audio Processing
1.49
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.