Skip to content

Fix MetronomeMark objects silently dropped from Lilypond output - #1993

Draft
Emerson936 wants to merge 1 commit into
cuthbertLab:masterfrom
Emerson936:fix/lily-metronome-mark-1852
Draft

Fix MetronomeMark objects silently dropped from Lilypond output#1993
Emerson936 wants to merge 1 commit into
cuthbertLab:masterfrom
Emerson936:fix/lily-metronome-mark-1852

Conversation

@Emerson936

Copy link
Copy Markdown

Fixes MetronomeMark objects being silently dropped from LilyPond output.

Changes:

  • Added a MetronomeMark dispatch branch to LilypondConverter.appendM21ObjectToContext (previously it fell through unhandled and was dropped).
  • Added lyEmbeddedScmFromMetronomeMark(), which converts a MetronomeMark's referent/number into a LyTempoEvent.
  • Fixed LyTempoEvent.stringOutput(), which ignored a paired stenoDuration when no tempoRange was given, producing invalid syntax.
  • Fixed the LyStenoDuration docstring example, which showed an invalid steno duration ('quarter' instead of '4').

Fixes #1852

AI-assisted with Claude (>10 lines).

The Lilypond translator's element dispatch never recognized
MetronomeMark, so tempo markings were dropped entirely when writing
to lily. Also fixes LyTempoEvent.stringOutput(), which ignored a
paired stenoDuration when no tempoRange was given, and its docstring,
which showed an invalid steno duration ('quarter' instead of '4').

Fixes cuthbertLab#1852

This PR is AI-assisted (>10 lines).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Emerson936
Emerson936 marked this pull request as draft August 3, 2026 02:33
@mscuthbert

Copy link
Copy Markdown
Member

great PR. fix lint; move the "New in v.11 to the end of the docstring", and I'll be happy to merge. Thanks!

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.

metronome marks aren't written to lilypond files

2 participants