arXiv:2610.21467cs.SDOct 2026

Manuscript Offprint

arXiv:2610.21467

DuET: Note-Frame Dual Encoding for Piano Performance-to-Score Transcription

Wei Zeng, Ye Wang

Abstract

Transcribing expressive piano performances into scores requires interpreting individual note timings within an underlying metrical structure. However, score attributes are associated with notes, whereas beats may occur without coincident note onsets. We introduce DuET, a Dual-Encoder Transformer that jointly learns note-level performance MIDI-to-score (PM2S) transcription and frame-level beat and downbeat tracking. Bidirectional cross-attention connects note and frame encoders, while an autoregressive decoder alternates between their representations to predict structured score attributes. We further introduce TimeRoPE and Time–Pitch Rotary Positional Encoding (TPRoPE) to establish a shared performance-time reference and explicitly encode relative temporal and pitch relationships. Evaluations on ASAP, a classical piano dataset, and our curated Gangqinpu dataset, which spans multiple genres with a focus on popular piano music, demonstrate improvements in score timing and notated duration. Compared with the strongest baseline on each dataset, DuET reduces MUSTER mean error from 6.56% to 3.64% on Gangqinpu and from 11.30% to 11.22% on ASAP. Ablations support the benefits of frame-level context, time-based positional encoding, and decoder-history masking. Code, weights, and demos are available at https://github.com/wei-zeng98/DuET.

1 Introduction

Automatic piano transcription converts piano performances into symbolic representations. These representations are useful for music analysis, education, and downstream music information retrieval (MIR) tasks such as expressive performance rendering. Based on their inputs and outputs, transcription tasks can be grouped into audio-to-MIDI [1–5], audio-to-score (A2S) [6–9], and performance MIDI-to-score (PM2S) [10–12]. Audio-to-MIDI transcribes audio into notes with performance onset times and durations, whereas A2S and PM2S aim to produce notated scores from audio and performance MIDI, respectively. Despite substantial progress in audio-to-MIDI transcription, accurately producing a notated score remains an open problem.

The first challenge in score transcription is that mapping performance time to score time requires interpreting individual note timings within a broader rhythmic context. Under expressive timing, the same performed time interval may correspond to different score-time intervals depending on tempo and metrical context. Accurate PM2S transcription therefore requires modeling not only the temporal relationships among notes but also their alignment with the underlying metrical structure. Beat and downbeat tracking [13, 14] provides supervision for this metrical context, but its prediction granularity differs from that of note-level score transcription. Score attributes are associated with individual notes, whereas beat positions are represented on a frame-level time grid, including frames without any note onset.

Preprint.

A second challenge lies in representing the relative positions of notes in a musically meaningful way. Sequence-index distances do not directly reflect temporal separation: consecutive notes may occur simultaneously or be separated by a substantial time interval. Although timing encodings based on inter-onset intervals (IOIs) [11, 10] explicitly represent adjacent-note distances, non-adjacent temporal distances require accumulating the intervening IOIs. More fundamentally, notes occupy a two-dimensional time–pitch space, as illustrated by a piano roll. Serializing these notes into a one-dimensional sequence preserves their individual attributes, but the resulting sequence order does not explicitly encode relative temporal and pitch distances.

Beyond these modeling challenges, recent neural PM2S studies have primarily relied on publicly available classical piano datasets such as ASAP [15]. However, the practical need for score transcription is particularly strong for popular piano music, where corresponding sheet music is often less readily available than for classical repertoire. This motivates training and evaluation across both classical and popular piano music.

In this paper, we present a complete piano A2S pipeline comprising audio-to-performance MIDI transcription, PM2S transcription, and score formatting. We use Transkun v2 [2] and MuseScore 4 [16] for the first and final stages, respectively, and focus our methodological contributions on the intermediate PM2S stage. We formulate PM2S transcription as a one-to-one mapping between input performance notes and notes in a structured score representation. The mapping preserves note identities and pitches while predicting musical attributes, including score onsets and durations, staff and voice assignments, meter and key signatures, and grace-note labels.

Under this formulation, we introduce DuET (Dual-Encoder Transformer), which integrates frame-level beat tracking with note-level PM2S transcription. To accommodate their different prediction granularities, DuET uses a note encoder to model individual notes and their relationships, and a frame encoder to capture temporal context on a regular time grid. Bidirectional cross-attention allows the two branches to exchange information, while alternating decoder cross-attention combines note relationships with metrical context for score prediction. This architecture enables joint learning from note-level score supervision and frame-level beat/downbeat supervision. To establish a common temporal reference across note and frame representations, we introduce TimeRoPE, which encodes relative performance-time distances within and across the two branches. We further propose Time-Pitch Rotary Positional Encoding (TPRoPE) to explicitly encode both relative temporal distances and pitch intervals in note attention.

DuET achieves the lowest MUSTER mean error among the compared methods on ASAP and Gangqinpu, as well as the lowest onset, offset, duration, and staff-assignment errors on both datasets. Ablation studies examine the contributions of dual encoding, positional encoding, decoder memory access, and masking. Our main contributions are:

• We introduce DuET, a note–frame dual-encoder Transformer that jointly learns frame-level beat and downbeat tracking and note-level PM2S transcription through bidirectional encoder cross-attention and alternating decoder cross-attention.

• We introduce a shared performance-time coordinate system through TimeRoPE and propose TPRoPE to explicitly encode relative temporal and pitch relationships in note attention.

• We evaluate DuET on classical piano performances from ASAP and our curated Gangqinpu dataset, which spans multiple styles with a focus on popular piano music. DuET achieves the lowest MUSTER mean error among the compared methods on both datasets. We provide inference code, pretrained weights, and an interactive audio-to-score demo.

References (30)