Manuscript Offprint
arXiv:2610.29928A Learned Musical-Time Coordinate for Piano Audio-to-Score Transcription
ABSTRACT
End-to-end piano audio-to-score (A2S) transcription is the task of reconstructing a notated score from an audio recording in a single system. Existing A2S approaches usually rely on pre-segmented excerpts, and few handle whole pieces without external segmentation. This raises the question of whether a musical-time coordinate can guide score transcription while also helping the system segment whole pieces. Previous work on jazz saxophone A2S uses an external beat tracker to obtain such a coordinate for score prediction. We introduce downbeat phase, a musical-time coordinate learned jointly with score transcription that represents each audio frame's relative position within a notated bar. With this coordinate, our system can not only condition its score decoder on downbeat phase but also self-segment at bar boundaries and stitch the segments into a whole piece. Evaluation suggests that the coordinate improves metrical structure and supports whole-piece transcription with comparable notation quality.
Index Terms— Audio-to-score transcription, End-to-end learning, Whole-piece transcription, Self-segmentation
1. INTRODUCTION
Audio-to-score (A2S) transcription aims to learn how to recover a text-based score from a music audio recording. A score represents pitches and organizes their timing through note values, beats, and bars. A performer not only plays the notes but also determines the tempo throughout the piece and shapes how these notated rhythms unfold in time. Therefore, transcribing scores from performances involves inferring the notated pitch and duration of notes and their timing within each bar, and predicting bar-level information such as time and key signatures. Among existing end-to-end A2S systems, Piano-A2S, proposed by Zeng et al. [1], directly transcribes piano audio recordings through a GRU decoder, predicting bar-level and note-level information in a hierarchical manner. Alfaro-Contreras et al. [2] use a Transformer decoder to derive scores from polyphonic string music. However, prior work mainly focuses on score sequence prediction from excerpts spanning several bars and pre-segmented at bar boundaries. How to assemble the transcribed score segments into a whole piece remains mostly unexplored.
To extend transcription to whole pieces, it is worth exploring whether a musical-time coordinate can support an A2S system in both score prediction and self-segmentation. Building on the phase-based approach of Oyama et al. [3], Shanin et al. [4] express position within each externally estimated beat as a circular phase and encode it with Fourier features to guide jazz saxophone score transcription. This leaves open whether the coordinate itself can be learned jointly with score transcription.
We introduce an end-to-end piano A2S system that learns a musical-time coordinate jointly with score transcription. As shown in Fig. 1, this coordinate is represented as downbeat phase and supplied to the score decoder through Fourier positional encoding. The predicted phase posterior also provides bar boundaries, allowing the system to self-segment and stitch the segments into a whole piece. We evaluate the system under pre-segmented and whole-piece transcription protocols. Pre-segmented evaluation shows that the learned coordinate helps capture metrical structure. In whole-piece transcription, our system achieves higher metrical scores and comparable or better notation quality without external segmentation.
The target score is a sequence of tokens drawn from a vocabulary of 248 tokens. Its representation is derived from the **kern format used by Piano-A2S [1] and encodes pitches, note values, time and key signatures, and structural markers for bars and voices. When tokenizing, we change the serialization order for **kern. Specifically, the token sequence emits the pitch at the note's notated onset and its duration at the notated offset. The decoder predicts these tokens autoregressively to form , with a limit of 2,048 tokens per decoding pass.
2.1. Architecture
2.1.1. Encoder
We use a frozen hFT-Transformer [5] pretrained on MAESTRO [6] as a front-end audio feature extractor. It produces a 256-dimensional feature vector for each of the 88 piano pitches at every audio frame. To obtain compact frame features, a cross-attention converter uses 32 learned queries to summarize the feature-channel axis, producing an representation. We then flatten and linearly project each frame's representation to a 256-dimensional vector for subsequent temporal modeling.
The resulting sequence C feeds two parallel branches for audio content and downbeat phase. In the content branch, frame positional encoding (Frame PE) assigns each frame a fixed sinusoidal vector determined by its index within the input window. We add these
To reproduce our settings, the implementation is available at https://github.com/bloggerwang1217/MusicTimeA2S.

Fig. 1. The encoder extracts content features and estimates downbeat phase, while the decoder combines these features with audio- and score-side Fourier positional encodings of downbeat phase to generate a score autoregressively.
vectors to C before two Conformer blocks [7] that produce content memory H, with 256 dimensions per frame. Their self-attention uses rotary position embedding (RoPE) [8] to encode frame positions in the queries and keys.
The downbeat phase branch, which we refer to as the phase model, applies a dilated temporal convolutional network (TCN) followed by six bidirectional Mamba (BiMamba) layers. The TCN follows the seven-block residual design of Oyama et al. [3]. We adapt BeatMamba's [9] BiMamba layers with Mamba-2 [10] as a fixed-resolution stack. In place of beat-event prediction, a framewise phase classifier estimates downbeat phase. Its output is used to construct the Audio Fourier PE defined in Sec. 2.1.2.
2.1.2. Fourier Positional Encoding of Downbeat Phase
To support the prediction of bar boundaries, we draw on the phase-based downbeat estimation of Oyama et al. [3] and represent downbeat phase by an angle that completes one cycle per notated bar and resets at each downbeat.
We define as a shared 24-dimensional Fourier feature map for audio- and score-side downbeat phase:
where is the harmonic order and denotes concatenation. The -th harmonic repeats times per bar. We retain harmonics up to order 12 to cover the rhythmic units specified by our supported time signatures—for example, twelve eighth-note units per bar in 12/8 time.
At each audio frame , in both training and inference, softmax converts the phase classifier's logits into a posterior over 360 within-bar positions. Here, is the probability assigned to position class . We denote the 24-dimensional audio-side Fourier positional encoding of downbeat phase (Audio Fourier PE) at frame by . With class centers , we compute this vector as
2.1.3. Transformer Decoder
The decoder is a four-layer Transformer with 256-dimensional hidden states and four attention heads. At decoder input position j, the score prefix consumed through the current token determines the current score time within the bar. We define as times this time divided by the bar duration specified by the current time signature, wrapped to . It resets at bar tokens and is set to zero before a time signature is available. Applying the same feature map gives the 24-dimensional score-side Fourier positional encoding of downbeat phase (Score Fourier PE), , for predicting the next token. The decoder input sums token embeddings, sinusoidal token positional encoding (Token PE) for token order, and a learned projection of . In each decoder layer , cross-attention keys and values combine audio content with its downbeat phase:
(3)
Here, is the content memory at audio frame . The matrices and bias terms project this content into keys and values, while separately project Audio Fourier PE into the same spaces for each layer.
2.2. Training Objective
The score sequence is supervised by a teacher-forced next-token cross-entropy loss . To learn downbeat phase, we introduce a framewise phase loss following Oyama et al. [3],
where is the target distribution and the predicted posterior at frame . The target phase is quantized to the nearest of the 360 circular position classes, then smoothed with triangular circular weights over classes. Following Shanin et al. [4], we anchor the -th beat of an -beat bar at and linearly interpolate within each annotated beat to construct . The total loss is with , where is averaged over all frames with phase annotations.
2.3. Inference
To transcribe the whole recording, we first estimate its bar boundaries and token sequences of time and key signatures, then generate and assemble the score. We scan the audio with 1,280-frame windows at a stride of 640 frames and combine overlapping phase predictions by averaging their circular first moments. The downbeats are linearly interpolated forward phase-zero crossings of the averaged first moment, with the first crossing retained and a minimum interval of 400 ms enforced between successive downbeats to reduce over-segmentation. For each five-bar excerpt, the decoder scores candidate time-signature prefixes and the key-signature tokens that follow them. We apply separate first-order Markov models to the token sequences of time and key signatures across five-bar excerpts. Viterbi decoding maximizes the sum of decoder log probabilities, with a penalty for each change. Key-signature probabilities are marginalized over time signatures. The time- and key-signature penalties, 8.3 and 6.3, are derived from their change rates between consecutive five-bar excerpts in the training split.
With both signature sequences fixed, we transcribe each five-bar excerpt through one or more fixed-length audio windows. Each window recomputes its local Audio Fourier PE. Downbeats within each window's first half determine how many bars to decode. After each grammar-constrained greedy attempt, we retain the longest prefix of complete bars that can be reconstructed into **kern, then move the window to the following downbeat and restart decoding with a fresh autoregressive state. If no bar is accepted, we retry from the preceding downbeat when available and discard the first bar of the retry. This continues until each five-bar excerpt is complete. Finally, the excerpts are assembled into a whole piece, with missing segments represented by blank bars.
3. EXPERIMENTS
3.1. Data
Datasets. Three corpora are adopted: HumSyn, MuseSyn, and ASAP [11]. HumSyn contains classical and ragtime piano **kern scores from the Humdrum database. MuseSyn contains piano arrangements collected from MuseScore in MusicXML format, mainly of popular music. ASAP provides piano scores aligned with human performances, including audio with downbeat and beat annotations.
We adopt HumSyn and MuseSyn, jointly referred to as Syn, for training and validation and use Syn and ASAP for evaluation. The Syn split is based on that of Zeng et al. [1], with works used in the ASAP evaluation excluded. Additionally, for the test split, we exclude works overlapping with the training or validation data of any evaluated system. The resulting splits contain 546 scores for training, 46 scores for validation, and 45 scores for testing. For the ASAP dataset, we use 74 recordings from 39 works, taken from the test split of 102 recordings released by Liu et al. [12] after excluding recordings used to train our hFT-Transformer front end [5].
Data augmentation. We augment the training data by varying tempo and performance style with VirtuosoNet [13] during MIDI generation, and SoundFonts and reverb during audio rendering. We scale the reference tempo by a multiplier , sampled on a logarithmic scale. Each training score is rendered into four audio versions using different combinations of four piano SoundFonts and four room impulse responses. At each training epoch, one version is randomly selected for each score.
The Syn test split follows the synthesis protocol of Zeng et al. [1]. Each test score has four performance versions, rendered with a training-held-out SoundFont.
Table 1. Pre-segmented MV2H evaluation on Syn and ASAP.
| System | MV2H components | MV2H | |||||
|---|---|---|---|---|---|---|---|
| 4 | 5 | ||||||
| Syn (9,958 excerpts, 28 works) | |||||||
| Piano-A2S | .681 | .876 | .352 | .901 | .638 | .774 | .690 |
| Ours | .792* | .885 | .675† | .930* | .749* | .839* | .806* |
| w/o coordinate | .793* | .890* | .557* | .936* | .768* | .847* | .789* |
| ASAP (633 excerpts, 8 works) | |||||||
| Piano-A2S | .636 | .882 | .351 | .903 | .512 | .733 | .657 |
| Ours | .621 | .833 | .384 | .889 | .657* | .750 | .677 |
| w/o coordinate | .652 | .851 | .357 | .901 | .630* | .759 | .678 |
Ours rows: mean over three training seeds.
*: significant improvement over Piano-A2S;
†: significant improvement over all other systems.
3.2. Training Configuration
The full model has 23.4M parameters: 17.9M trainable and 5.5M frozen in the hFT-Transformer. Our models are trained for a maximum of 50 epochs. The best checkpoints are selected by validation with an early stopping patience of five epochs. We use an AdamW optimizer with weight decay of 0.01 and dropout at a rate of 0.1. The learning rate warms up linearly to over 1,000 steps and follows cosine annealing to at epoch 50; the phase model's learning rate instead anneals from step 10,000 to 20,000 and stays fixed thereafter.
3.3. Metrics
We evaluate transcription quality using MV2H and OMR-NED. Significance is assessed with 10,000 paired bootstrap draws over works, independently resampling training seeds for each system. A difference is considered significant when its bootstrap confidence interval excludes zero.
MV2H [14]. This metric evaluates score transcription across five aspects: multi-pitch detection ( ), voice separation ( ), metrical position ( ), note values ( ), and harmony ( ). is most relevant to our task. It is the F1 score of bar, beat, and sub-beat groupings that start and end at the same notes as in the reference, measuring where notes sit within bars and beats. MV2H is the mean of all five components. Following Zeng et al. [1], Table 1 also reports MV2H , which averages all components except .
Ground-truth score MIDI is required as a reference for MV2H evaluation. The pre-segmented experiment uses five-bar excerpts and reference MIDI from Zeng et al.'s pipeline [1]. Coordinate ablation and whole-piece MV2H evaluation use reference MIDI from our preprocessing pipeline.
We use the official implementation of non-aligned MV2H [15] for pre-segmented transcription. Because its alignment is prohibitively slow for whole pieces [16], we implement a single-path version that breaks ties by chord matches [17] for self-segmented transcription, and assess its consistency with the official implementation on pre-segmented excerpts.
https://musescore.com/hub/piano
Mean absolute per-excerpt MV2H difference: 0.0059 (Syn), 0.0076 (ASAP); largest in : 0.0215, 0.0275.
Table 2. Whole-piece transcription quality on Syn and ASAP.
| System | External Segmentation | Coordinate | Syn (180 renderings, 45 works) | ASAP (74 recordings, 39 works) | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| OMR-NED | Transcribed (%) | OMR-NED | Transcribed (%) | |||||||
| Piano-A2S | Beat This! | n/a | .236 | .614 | 75.4 | 98 | .143 | .584 | 84.0 | 97 |
| oracle | n/a | .337 | .650 | 67.9 | 77 | .168 | .566 | 72.6 | 78 | |
| Ours | — | predicted | .667* | .829* | 61.8* | 100 | .318* | .718* | 85.4 | 100 |
| oracle | predicted | .696* | .837* | 60.0* | 100 | .287* | .701* | 85.1 | 100 | |
| oracle | oracle | .807† | .870* | 53.8* | 100 | .518† | .772† | 75.1* | 100 | |
Ours rows: mean over three training seeds. *: significant improvement of Ours over Piano-A2S with Beat This! downbeat segmentation; †: significant improvement of Ours over all other systems. MV2H and OMR-NED are computed on each system's successfully transcribed recordings, with missing segments in the output scores filled with blank bars.
OMR-NED [18]. This metric counts music-symbol insertions and deletions between predicted and reference scores; lower is better. We use it for whole-piece reconstruction quality.
3.4. Results from Pre-segmented Transcription
For Piano-A2S, we use the ASAP-fine-tuned version from Zeng et al. [1]. For the ASAP test split, we exclude works appearing in Piano-A2S training or validation data. Within each dataset, we use the common excerpts scored for all evaluated models.
In Table 1, both of our model variants score higher than Piano-A2S on every component on Syn. Compared with the variant without the coordinate (Ours w/o coordinate), the full model achieves its largest gain in , with a significant improvement. The other component scores are slightly lower, although these differences are not significant. On ASAP, is slightly higher with the coordinate while multi-pitch, voice, and note-value scores are lower, leaving almost unchanged. These results support the coordinate's contribution to recovering metrical structure on Syn, while its benefit for pre-segmented transcription on ASAP remains inconclusive. Although introducing the coordinate slightly lowers some component scores, it also enables self-segmentation for whole-piece transcription, a trade-off we examine in Sec. 3.5.

Fig. 2. Coordinate ablation using one training seed on common scored excerpts from the test splits in Sec. 3.1. denotes the difference from Ours w/o coordinate.
Fig. 2 presents a coordinate ablation of our full model. The results show that phase supervision alone does not improve , and even significantly decreases it on Syn. While Audio or Score Fourier PE alone significantly improves on both test sets, the full model combining both achieves the largest gain.
3.5. Results from Self-segmented Whole-piece Transcription
Beyond conditioning score decoding, the learned coordinate also provides bar boundaries for whole-piece transcription. Piano-A2S requires external bar boundaries, which we obtain from Beat This! [19], a state-of-the-art beat tracker evaluated on ASAP.
In Table 2, our system achieves significantly higher and than Piano-A2S with Beat This! segmentation on both test sets. OMR-NED is significantly lower on Syn and comparable on ASAP. Our system does so without external segmentation and transcribes all recordings. The advantage in and remains on both test sets when Piano-A2S uses annotated downbeats.
To examine boundary and phase estimation errors in our system, we evaluate the oracle conditions shown in gray. In the oracle-coordinate condition, only Audio Fourier PE uses annotated phase targets. The results show that replacing the boundaries alone does not consistently improve metrical scores. Using annotated coordinates as well as boundaries gives a larger improvement, suggesting room for better coordinate estimation on human performances. Although the frozen front end is pretrained on real piano recordings, the phase and score models are trained on synthesized performances. Generalization may therefore depend on learning expressive timing and its relation to the notated metrical structure.
4. CONCLUSION
We present a jointly trained A2S system that uses learned downbeat phase to condition score decoding and provide boundaries for whole-piece transcription. Our experiments suggest that supplying this coordinate to the decoder helps capture metrical structure. Moreover, in self-segmented transcription, bar boundaries derived from the same coordinate let the system stitch bar segments into a whole piece without an external beat tracker. Future work will investigate how expressive timing and notational conventions affect coordinate estimation, and explore editorial style conditioning to improve the transcription of expressive piano performances.
Piano-A2S accepts 4–12 s inputs, so longer annotated segments reduce transcription coverage.
5. REFERENCES
[1] W. Zeng, X. He, and Y. Wang, “End-to-end real-world polyphonic piano audio-to-score transcription with hierarchical decoding,” in Proc. 33rd Int. Joint Conf. Artif. Intell. (IJCAI), 2024, pp. 7788–7795.
[2] M. Alfaro-Contreras, A. Ríos-Vila, J. J. Valero-Mas, and J. Calvo-Zaragoza, “A transformer approach for polyphonic audio-to-score transcription,” in Proc. IEEE Int. Conf. Acoust., Speech, Signal Process. (ICASSP), 2024, pp. 706–710.
[3] T. Oyama, R. Ishizuka, and K. Yoshii, “Phase-aware joint beat and downbeat estimation based on periodicity of metrical structure,” in Proc. 22nd Int. Soc. Music Inf. Retrieval Conf. (ISMIR), 2021, pp. 493–499.
[4] I. Shanin, X. Riley, and S. Dixon, “Audio-to-score jazz solo transcription with the Rhythm Perceiver,” in Proc. IEEE Int. Conf. Acoust., Speech, Signal Process. (ICASSP), 2026, pp. 14642–14646.
[5] K. Toyama, T. Akama, Y. Ikemiya, Y. Takida, W.-H. Liao, and Y. Mitsufuji, “Automatic piano transcription with hierarchical frequency-time transformer,” in Proc. 24th Int. Soc. Music Inf. Retrieval Conf. (ISMIR), 2023, pp. 215–222.
[6] C. Hawthorne et al., “Enabling factorized piano music modeling and generation with the MAESTRO dataset,” in Proc. 7th Int. Conf. Learn. Represent. (ICLR), 2019.
[7] A. Gulati et al., “Conformer: Convolution-augmented transformer for speech recognition,” in Proc. Interspeech, 2020, pp. 5036–5040.
[8] J. Su, M. Ahmed, Y. Lu, S. Pan, W. Bo, and Y. Liu, “RoFormer: Enhanced transformer with rotary position embedding,” Neurocomputing, vol. 568, Feb. 2024, Art. no. 127063.
[9] G. Ru, Y. Yu, and W. Li, “BeatMamba: Bidirectional selective state-space modeling for efficient beat tracking,” in Proc. IEEE Int. Conf. Acoust., Speech, Signal Process. (ICASSP), 2026, pp. 14872–14876.
[10] T. Dao and A. Gu, “Transformers are SSMs: Generalized models and efficient algorithms through structured state space duality,” in Proc. 41st Int. Conf. Mach. Learn. (ICML), 2024, vol. 235 of Proceedings of Machine Learning Research, pp. 10041–10071.
[11] F. Foscarin, A. McLeod, P. Rigaux, F. Jacquemard, and M. Sakai, “ASAP: A dataset of aligned scores and performances for piano transcription,” in Proc. 21st Int. Soc. Music Inf. Retrieval Conf. (ISMIR), 2020, pp. 534–541.
[12] L. Liu, Q. Kong, V. Morfi, and E. Benetos, “Performance MIDI-to-score conversion by neural beat tracking,” in Proc. 23rd Int. Soc. Music Inf. Retrieval Conf. (ISMIR), 2022, pp. 395–402.
[13] D. Jeong, T. Kwon, Y. Kim, K. Lee, and J. Nam, “VirtuosoNet: A hierarchical RNN-based system for modeling expressive piano performance,” in Proc. 20th Int. Soc. Music Inf. Retrieval Conf. (ISMIR), 2019, pp. 908–915.
[14] A. McLeod and M. Steedman, “Evaluating Automatic Polyphonic Music Transcription,” in Proc. 19th Int. Soc. Music Inf. Retrieval Conf. (ISMIR), 2018, pp. 42–49.
[15] A. McLeod, “Evaluating non-aligned musical score transcriptions with MV2H,” 2019, arXiv:1906.00566.
[16] T. Beyer and A. Dai, “End-to-end piano performance-MIDI to score conversion with transformers,” in Proc. 25th Int. Soc. Music Inf. Retrieval Conf. (ISMIR), 2024, pp. 319–326.
[17] A. Cogliati and Z. Duan, “A Metric for Music Notation Transcription Accuracy,” in Proc. 18th Int. Soc. Music Inf. Retrieval Conf. (ISMIR), 2017, pp. 407–413.
[18] J. C. Martinez-Sevilla et al., “Sheet Music Benchmark: Standardized Optical Music Recognition Evaluation,” in Proc. 26th Int. Soc. Music Inf. Retrieval Conf. (ISMIR), 2025, pp. 604–611.
[19] F. Foscarin, J. Schlüter, and G. Widmer, “Beat this! Accurate beat tracking without DBN postprocessing,” in Proc. 25th Int. Soc. Music Inf. Retrieval Conf. (ISMIR), 2024, pp. 962–969.