Skip to content

support continuation tie in api #291

Open

Description

@webern

I'm wondering if we should create a similar class like ContinuationTie that models ties at the start of 2nd endings and the like. Not for this PR but something to think about.

Originally posted by @rpatters1 in #286 (comment)

Activity

  1. changed the title [-]I'm wondering if we should create a similar class like `ContinuationTie` that models ties at the start of 2nd endings and the like. Not for this PR but something to think about.[/-] [+]support continuation tie in api[/+] on Jul 2, 2026
  2. added
    featurenew feature request
    apiAffects the mx::api layer
    on Jul 5, 2026
  3. webern commented on Jul 7, 2026

    @webern
    OwnerAuthor

    @rpatters1, see if you agree with the coding agent's take on this in #328. It quoted the spec to us 😅

    Per the MusicXML spec (core::TiedType's doc comment): "For other ties that are visually attached
    to a single note, such as a tie leading into or out of a repeated section or coda, use two tied
    elements on the same note, one start and one stop."

    And confirmed that our bools do this for us...

  4. rpatters1 commented on Jul 7, 2026

    @rpatters1
    Contributor

    The main thing is, we have to suppress the <tie> tag for continuation ties. That is, there is neither a tie start nor a tie stop on a continuation tie. (The playback element.) Then the <notations> has to be encoded with the tied elements in order start, stop. And if the tie continues beyond that, another <start> along with a <tie type="start">.

    We need to be sure the MX writer is getting those details correct. Continuation ties do not participate in isTieStart or isTieStop.

    ChatGPT is claiming there's a continue type for tied. I don't think that is applicable here. We'd need a more authoritative source.

  5. rpatters1 commented on Jul 7, 2026

    @rpatters1
    Contributor

    Here are examples, as best as I can tell.

    Start

      <tie type="start"/>
      <notations>
        <tied type="start"/>
      </notations>

    Stop

      <tie type="start"/>
      <notations>
        <tied type="stop"/>
      </notations>

    Continuation

      <notations>
        <tied type="start"/>
        <tied type="stop"/>
      </notations>

    Continuation + tie to next note

      <tie type="start"/>
      <notations>
        <tied type="start"/>
        <tied type="stop"/>
        <tied type="start"/>
      </notations>

    or possibly

      <notations>
        <tied type="start"/>
        <tied type="stop"/>
      </notations>
      <tie type="start"/>
      <notations>
        <tied type="start"/>
      </notations>

    This is far enough into the weeds that I am not sure how to do the combo. I wonder if there is an example somewhere. Maybe Cuthbert's examples.

  6. rpatters1 commented on Jul 7, 2026

    @rpatters1
    Contributor

    Just to be clear, here is what I mean by continuation tie:

    Image

    According the docs, the continue value for tied is more for system breaks. But it might be applicable here. This is where we need an example. I will see if I can make one.

  7. rpatters1 commented on Jul 7, 2026

    @rpatters1
    Contributor

    I have posted a question here to the musicxml repo. I'd say let's mothball this until/unless we get a definitive answer.

  8. rpatters1 commented on Jul 8, 2026

    @rpatters1
    Contributor

    We got an answer from the main musicxml guy, and none of what I said above is right. Basically, to support continuation ties the client needs

    • access to the number attribute of tied
    • the ability to control exactly what gets emitted in the <notations> array of <tied>.

    I don't think the API can do it for us, because it requires too much knowledge of which ending is going where. Honestly, at this point it is very low priority for me, because the current Finale export doesn't export them either. And I'm not sure how much importer support there is on the other side.

  9. webern commented on Jul 8, 2026

    @webern
    OwnerAuthor

    I tend to agree. It sounds like the kind of thing the api is meant to suppress:

    • vague in the specification
    • hard to understand
    • not supported and/or not represented in actual wild corpus files
  10. rpatters1 commented on Jul 8, 2026

    @rpatters1
    Contributor

    Based on my reading of @infojunkie's answer in the musicxml repo, the correct way to to encode this example:

    Image

    Would be in bar 2:

      <tie type="stop"/>
      <tie type="start"/>
      <notations>
        <tied type="stop"/>
        <tied type="start"/>
        <tied type="continue"/>
      </notations>

    and in bar 4

      <tie type="stop" time-only="2"/>
      <tie type="start"/>
      <notations>
        <tied type="stop"/>
        <tied type="start"/>
      </notations>

    And even then, I am still not sure if this correct. I would be amazed if there are any importers that do this. I might want to come back to this after everything else in my exporter is working. But probably not before then.

  11. infojunkie commented on Jul 11, 2026

    @infojunkie

    I've updated my answer based on a better reading of the MusicXML docs at w3c-cg/musicxml#666 (comment). In a nutshell:

    Ties that are visually attached to only one note, other than undamped ties, should be specified with two <tied> elements on the same note, first type=“start” then type=“stop”. This can be used to represent ties into or out of repeated sections or codas.

  12. webern commented on Jul 22, 2026

    @webern
    OwnerAuthor

    I've updated my answer based on a better reading of the MusicXML docs at w3c-cg/musicxml#666 (comment). In a nutshell:

    Ties that are visually attached to only one note, other than undamped ties, should be specified with two <tied> elements on the same note, first type=“start” then type=“stop”. This can be used to represent ties into or out of repeated sections or codas.

    Thank you @infojunkie for visiting us over here and pointing to the discussion. It seems pretty complicated!

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

    apiAffects the mx::api layerfeaturenew feature request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions