Views
No views yet
Pitch, Position, PositionShift, DurationVelocity, TimeShift, TimeDuration, TimeDurationSustainVelocity and Tempo score tokens for tempo and dynamics.symupe library installed:pip install -U symupe1import torch
2from symupe import AutoGenerator
3
4device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
5
6# Build Generator by loading the model and tokenizer directly from the Hub
7generator = AutoGenerator.from_pretrained("SyMuPe/PianoFlow-base", device=device)
8# model, tokenizer = generator.model, generator.tokenizer
9
10# Perform score MIDI (tokenization is handled inside)
11gen_results = generator.perform_score(
12 "score.mid",
13 use_score_context=True,
14 num_samples=8,
15 seed=23,
16)
17# gen_results[i] is PerformanceRenderingResult(...) containing:
18# - score_midi, score_seq, gen_seq, perf_seq, perf_midi, perf_midi_sus
19
20# Save performed MIDI files
21generator.save_performances(gen_results, out_dir="samples/pianoflow")1@inproceedings{borovik2025symupe,
2 title = {{SyMuPe: Affective and Controllable Symbolic Music Performance}},
3 author = {Borovik, Ilya and Gavrilev, Dmitrii and Viro, Vladimir},
4 year = {2025},
5 booktitle = {Proceedings of the 33rd ACM International Conference on Multimedia},
6 pages = {10699--10708},
7 doi = {10.1145/3746027.3755871}
8}