musescore / musescore/MuseScore

MusicXML import: option to make imported D.C./D.S. jumps take repeats on the return (`Jump.playRepeats`)

Open
#33,887 0 comments 0 reactions 1 assignee View on GitHub

@miiizen is already working on this.

Since Jun 23, 2026.

community MusicXML needs review
Dominant language
C++
Stars
15.1k
Forks
3.3k
Avg merge
2d 2h
Merged PRs (30d)
91

Description

Your idea

Add an opt-in on MusicXML import that sets the existing "Play repeats" property (Jump.playRepeats) on the jumps it creates, so that a D.C./D.S. return re-takes repeat barlines. The default would stay exactly as today (returns without repeats); the option would just let pipelines that need the other convention request it — most naturally as a CLI flag mirroring --musicxml-infer-text-type, and/or a MusicXML import preference. (Maintainers' call where the option should live.)

Problem to be solved

Some notation applications play D.C./D.S. returns with the repeats taken. NoteWorthy Composer, for example, always honours repeat barlines on the return. When such a score is exported to MusicXML and imported into MuseScore, that playback intent is silently lost: imported jumps always use MuseScore's "returns without repeats" convention, so the exported MIDI is short by one or more repeats.

MusicXML itself has no element or attribute for this choice — it is a property of the originating application's playback convention, not of the document — so the importer cannot infer it per-score. It needs an explicit opt-in. The capability is otherwise fully present in MuseScore: the Jump element already has a "Play repeats" property that playback and MIDI export honour; import is the only place the choice cannot be expressed.

Prior art
  • MuseScore already fully supports this behaviour — it just can't be reached from import. The Jump Properties panel has a "Play repeats" checkbox (playRepeats), and playback/MIDI export have long honoured it. This is documented in the handbook (Jump and Marker properties) and was reconfirmed in #28511, which was closed by pointing the reporter to that existing checkbox — i.e. it is established, intended functionality, not a recent or speculative one. The only gap is that there is no way to set it during MusicXML import, so a batch conversion would have to hand-edit every jump in the UI.
  • The two conventions are both legitimate, which is exactly why an opt-in (rather than a behaviour change) is the right shape. As noted by a maintainer in #28511: not taking repeats on a D.S. is the norm in classical music, while taking them is more common in lead sheets (where the repeat is part of the form). MuseScore's default correctly follows the classical convention; this request only asks to make the other, already-supported convention selectable on import.
  • Other notation software sits on the other side of that split: NoteWorthy Composer always replays repeats on the return, with no per-jump toggle. A converter currently has no way to carry that intent into MuseScore.
Additional context

Scope. The option should set playRepeats on every imported jump it applies to — D.C., D.S., D.C. al Fine, D.S. al Fine, D.C. al Coda, D.S. al Coda — not special-case one variant. The importer creates all jumps at a single point, so this is uniform.

Dependency. This builds on #33802 (Import explicit MusicXML sound jump attributes regardless of inferTextType, open PR). playRepeats can only be set on a jump the importer actually creates; on stock builds an imported jump currently exists only via --musicxml-infer-text-type text inference, not from the explicit <sound dacapo/fine/…> attributes a converter emits. #33802 should land first. Until then the words-only repro below works on stock builds with --musicxml-infer-text-type.

Reproduction / proof. Attached is a 3-measure score — ‖: C — D :‖ with Fine at m.2, then E with D.C. al Fine:

  • dc-return-with-repeats.musicxml (words only): MuseScore4 --musicxml-infer-text-type -o out.mid dc-return-with-repeats.musicxml
  • with-sound.musicxml (carries <sound dacapo/fine>; requires #33802): MuseScore4 -o out.mid with-sound.musicxml

Current export is C D C D E C D (return without repeats); the desired opt-in result is C D C D E C D C D (return with repeats).

Both ends are already proven:

  • Playback side — adding <playRepeats>1</playRepeats> to the jump in the .mscx by hand (inspect-playrepeats.mscx) and exporting gives exactly the desired sequence.
  • Import side — a one-line change at the jump-creation point that sets playRepeats(true) makes with-sound.musicxml import as a DC_AL_FINE jump with playRepeats() == true (and the default path leaves it false). The only missing piece is the user-facing switch.

So the change is small and self-contained; the open question is purely where the option should live.

samples.zip

Checklist
  • This request follows the guidelines for reporting issues
  • I have verified that this feature request has not been logged before, by searching the issue tracker for similar requests

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.