Skip to content

add feature - parse tempo directly from score (musicxml) and make it option for tempo adjustment - #42

Merged
CarlosCancino-Chacon merged 4 commits into
developfrom
feature/parse-tempo
Feb 11, 2026
Merged

CarlosCancino-Chacon merged 4 commits into
developfrom
feature/parse-tempo

Conversation

@laurenceyoon

Copy link
Copy Markdown
Collaborator
  • Adds MusicXML tempo-marking parsing (e.g., “Allegro/Andante”) with simple/compound meter handling to derive quarter-note BPM (matchmaker/utils/misc.py).
  • Reorganized tempo selection in Matchmaker:
    • priority becomes 'user tempo' → 'score marking' → default 120;
    • performance-based tempo adjustment now only when adjust_tempo=True (matchmaker/matchmaker.py). -> I'm considering not using it in our benchmark test.
  • Injected tempo marking into tests/resources/Bach-fugue_bwv_858.musicxml for easy testing.

Below is list of text tempo marking mapped to certain BPM:

# Reference: https://en.wikipedia.org/wiki/Tempo#Basic_tempo_markings
TEMPO_MARKING_TO_BPM = {
    # Very slow (24-40 BPM)
    "larghissimo": 24,
    "grave": 30,
    # Slow (40-66 BPM)
    "largo": 40,
    "larghetto": 50,
    "lento": 60,
    # Slow-moderate (44-80 BPM)
    "adagio": 60,
    "adagietto": 70,
    # Walking pace (56-108 BPM)
    "andante": 80,
    "andantino": 90,
    # Moderate (86-126 BPM)
    "moderato": 110,
    "allegretto": 120,
    # Fast (100-156 BPM)
    "allegro": 130,
    # Very fast (136-200+ BPM)
    "vivace": 150,
    "vivacissimo": 170,
    "presto": 180,
    "prestissimo": 200,
}

@laurenceyoon
laurenceyoon marked this pull request as ready for review February 11, 2026 06:49
@CarlosCancino-Chacon
CarlosCancino-Chacon merged commit 9393ffa into develop Feb 11, 2026
8 checks passed
@CarlosCancino-Chacon
CarlosCancino-Chacon deleted the feature/parse-tempo branch February 11, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants