CNN-Transformer architecture for piano performance style recognition and AI-based real-time music accompaniment

This paper studies a piano playing style recognition and intelligent accompaniment system based on deep learning. Through deep learning technology, the system constructs a piano performance style classification model that can accurately distinguish different styles such as classical, jazz and pop, and designs a real-time interactive accompaniment generation system to dynamically generate harmony, rhythm and texture according to the recognition results, so as to adapt to the user's performance style. In the aspect of piano performance style recognition model, the mixed coding architecture is adopted, and CNN-Transformer double-flow network is combined to capture local time-frequency characteristics and global time-sequence dependence respectively. CNN branch processes Mel spectrogram through one-dimensional convolution operation to extract local features, while Transformer branch uses multi-head attention mechanism and position coding to model global time series relationship. The outputs of the two are spliced and sent to the fully connected layer, and the Softmax function is used to predict the performance style category. In the aspect of intelligent accompaniment generation system, based on Transformer-XL architecture, the accompaniment sequence is generated on the condition of MIDI event sequence and style label played by users. The style adaptation module injects the embedded space of the style recognition model into the generation model through the learnable mapping to realize the fine-grained integration of style features and generation process. The streaming processing mechanism adopts sliding window and caching strategy, updates the accompaniment generation results every 100ms, and realizes hard real-time constraints through model lightweight and quantization. The experimental results show that the CNN-Transformer hybrid model proposed in this paper performs well in the task of style recognition, with an accuracy rate of 91.7% and a weighted F1 score of 0.902, which obviously exceeds the baseline models ResNet-18 and BiLSTM. In the evaluation of accompaniment quality, this model achieves a BLEU-4 score of 0.79 and a chord matching degree of 0.89, and at the same time, the rhythm error is controlled within 28 milliseconds, which is significantly better than the LSTM+Attention and Music Transformer baseline models. The subjective evaluation results show that the score of this model in music naturalness, style adaptation and real-time satisfaction is significantly higher than that of LSTM+Attention model.

Authors

Publication Details

Published
2025-08-29
DOI
https://doi.org/10.1117/12.3076216
Primary Topic
Music and Audio Processing
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

CNN-Transformer architecture for piano performance style recognition and AI-based real-time music accompaniment

Xinying Wang
Music and Audio Processing
article

CNN-Transformer architecture for piano performance style recognition and AI-based real-time music accompaniment

Xinying Wang
article en

Abstract

This paper studies a piano playing style recognition and intelligent accompaniment system based on deep learning. Through deep learning technology, the system constructs a piano performance style classification model that can accurately distinguish different styles such as classical, jazz and pop, and designs a real-time interactive accompaniment generation system to dynamically generate harmony, rhythm and texture according to the recognition results, so as to adapt to the user's performance style. In the aspect of piano performance style recognition model, the mixed coding architecture is adopted, and CNN-Transformer double-flow network is combined to capture local time-frequency characteristics and global time-sequence dependence respectively. CNN branch processes Mel spectrogram through one-dimensional convolution operation to extract local features, while Transformer branch uses multi-head attention mechanism and position coding to model global time series relationship. The outputs of the two are spliced and sent to the fully connected layer, and the Softmax function is used to predict the performance style category. In the aspect of intelligent accompaniment generation system, based on Transformer-XL architecture, the accompaniment sequence is generated on the condition of MIDI event sequence and style label played by users. The style adaptation module injects the embedded space of the style recognition model into the generation model through the learnable mapping to realize the fine-grained integration of style features and generation process. The streaming processing mechanism adopts sliding window and caching strategy, updates the accompaniment generation results every 100ms, and realizes hard real-time constraints through model lightweight and quantization. The experimental results show that the CNN-Transformer hybrid model proposed in this paper performs well in the task of style recognition, with an accuracy rate of 91.7% and a weighted F1 score of 0.902, which obviously exceeds the baseline models ResNet-18 and BiLSTM. In the evaluation of accompaniment quality, this model achieves a BLEU-4 score of 0.79 and a chord matching degree of 0.89, and at the same time, the rhythm error is controlled within 28 milliseconds, which is significantly better than the LSTM+Attention and Music Transformer baseline models. The subjective evaluation results show that the score of this model in music naturalness, style adaptation and real-time satisfaction is significantly higher than that of LSTM+Attention model.

Sustainable cities and communities
Openalex Percentile: Top 72%
Music and Audio Processing
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.