Skip to content

a synthesized score-instrument id is process-global and leaves midi-instrument dangling #445

Description

@webern

When a part has MIDI data but an empty InstrumentData::uniqueId:

  • midi-instrument/@id is written from core::Token{""}, which is X
    (src/private/mx/impl/PartWriter.cpp:188).
  • score-instrument/@id is synthesized as ID1000000, ID1000001, ... from a process-wide atomic
    counter (PartWriter.cpp:64-68, PartWriter.cpp:260-275).

So midi-instrument/@id does not refer to the score-instrument. The output also depends on how
many scores the process has already written, so writing the same ScoreData twice gives different
files.

Related: #397. Found while auditing silent recoveries for #432 (#439).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    aiIssues opened by, or through, a coding agent.bugsoftware defectimplAffects the mx::impl layernon-breakingfixes or implementation that do not require breaking changes

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions