Menu

#1673 Import and Merge MusicXML does not use track names for segment labels

None
closed
None
5
2024-06-09
2024-01-17
musewhirl
No

RG v23.12 has a feature in Edit/Preferences.../General/Behavior called:

Use track name for new segments

During Import and Merge MusicXML, RG populates the track name using the MusicXML "part-name" element which is great. But since new segments are appearing on those tracks, it should use those track names for the labels of the new segments as per the above preference.

At the moment, all segments are labelled: "MusicXML, id=1/". I'm not sure if that is because some other element is missing from the MusicXML file resulting in an internal default or whether it's just never set.

Discussion

  • Philip Leishman

    Philip Leishman - 2024-01-26

    Yes the MusicXML importer was not respecting the usetrackname configuration
    Please merge
    https://sourceforge.net/p/rosegarden/git/merge-requests/116/

     

    Last edit: Ted Felix 2024-01-28
  • Ted Felix

    Ted Felix - 2024-01-28

    The "id=1/" is supposed to be the staff / voice. There are two places in the code it is generated. It appears that one of them isn't working. Does the other?

    Is there any value to having the staff and the voice numbers in the segment names?

    I recommend that we ignore the usetrackname preference and just use the track name in all cases. Unless there is some value to the "id=x/y" label which appears to be broken and no one has noticed.

     
  • Philip Leishman

    Philip Leishman - 2024-01-28

    I have no problem with that approach.
    If there is no disagreement I will do that.
    musewhirl ?

     
  • musewhirl

    musewhirl - 2024-01-29

    I totally agree. Besides, RG preferences says "Use track name for new segments", and it was a good idea to use just the MusicXML's part -name for the track name. And now since the track name does not currently have any trailing id=x/y, the segment labels shouldn't either, just as if the track was created and manually named by a user, followed by adding segments.

     
  • Philip Leishman

    Philip Leishman - 2024-01-30

    OK - changed in the latest version
    please merge.

     
  • Ted Felix

    Ted Felix - 2024-04-02

    Pushed as [9bfedf]. Please test latest git.

     

    Related

    Commit: [9bfedf]

  • Ted Felix

    Ted Felix - 2024-04-02
    • status: open --> feedback
    • assigned_to: Philip Leishman
     
  • musewhirl

    musewhirl - 2024-04-13

    In master [d0760d], I see an issue. I didn't provide any steps in this thread so:

    Steps to reproduce:
    1. Ensure "Use track for new segments" is set in preferences
    2. Open an existing MusicXML file: tracks are labeled based on part-name, but segments still have "MusicXML, id=1/"
    3. Merge in the same MusicXML (or another): new tracks are labeled but segments have no label at all

    Since the new tracks created with the merge have track names based on part-name, I would expect those names to appear on the resulting new segments instead of the "MusicXML, id=1/" which used to be there. NB I did not get a chance to test in [9bfedf] which was mentioned by Ted, so something could have changed in the mean time.

     

    Related

    Commit: [9bfedf]
    Commit: [d0760d]

  • Philip Leishman

    Philip Leishman - 2024-04-13

    I cannot reproduce this.
    Using the latest master I get the expected behaviour - Tracks and segments use the part name.
    If there is no part name set in the MusicXML file the segment has no name and the track is labelled "untitled"

     
  • musewhirl

    musewhirl - 2024-04-14

    Interesting. I'll detail the steps again as I go along in case I missed something, but I can reproduce it consistently. It does not feel like something that would occur only in my environment.

    1. I'm using sourceforge master: d0760d
    2. I start with a fresh install i.e. no autoload, no rosegardenmusic directories
    3. I hit OK on the welcome splash screen
    4. Select Edit/Preferences and check: "Use trackname for segments"
    5. Click Apply, then OK
    6. Select File/Merge/Merge MusicXML File(s)...
    7. Select the attached merge-musicxml-test.xml
    8. In the "Merge File" dialog accept the default "At start of existing composition"
    9. Check: Import these as well
    10. Click OK
    11. New track is created as the last track (after all the audio tracks)
    12. The track name is: "TrackName 1" as per the MusicXML file
    13. The segment has no label, just a single line for the single note it contains

    As an addendum:
    1. Create a segment further down the timeline in that same track, and it does get the title: "TracKName 1".
    2. Now create a segment in one of the other MIDI tracks all of which have track name: "<untitled>". They do not have a label either.

    I did notice this some time ago and assumed it was a valid implementation choice i.e. that "<untitled>" would lead to segments with no label. I thought of mentioning that the track technically has a name, but then thought who wants those angled brackets in all their segments anyway...so I dismissed it. Now that you indicate that the segments should be labelled "untitled", perhaps that is part of the problem too.

    Let me know what you get now with the above steps. If you still can't reproduce it, then perhaps Ted an act as a tie breaker.

     
  • musewhirl

    musewhirl - 2024-04-14

    The test MusicXML file.

     
  • musewhirl

    musewhirl - 2024-04-24

    Addendum:
    When the bug is fixed, what happens if the part name is very long? For a track name, it just gets cut off...a segment can be as long as a track. Is the text just going to look like an essay along the segment covering up the note flow? :-)

    I create my MusicXML files and so can control the part name length. What of other folks who cannot easily change the part name of the MusicXMLs that they have access to? I suppose they could opt for no segment labels, but then again, that preference is global thus affecting them when they create tracks.

    It's just a thought to take into account.

     
  • Philip Leishman

    Philip Leishman - 2024-04-25

    It's easy enough to make a long name without MusicXML import - just double click on the track label and enter a long name.
    So the solution is just as simple - if the track label is too long then edit it.
    The same applies to the segment label.
    I think we can leave this to the user.

     
  • musewhirl

    musewhirl - 2024-05-20

    Just to close this bug off as resolved, that sounds fine with me

     
  • Ted Felix

    Ted Felix - 2024-06-09
    • status: feedback --> closed
     

Log in to post a comment.