Slice addition case

25 views
Skip to first unread message

Joshua Albrecht

unread,
Jun 4, 2025, 3:44:12 PMJun 4
to stars...@googlegroups.com
Hi Craig and all-
I may just be dealing with an old version of musicxml2hum from humlib, but I'm working on converting single-line melodies from xml to kern, and I am frequently getting some version of the following error message:

Warning, replacing existing token: 8g# with a null token
ERROR: Negative duration: -3/4
tokendur = 1
slicedur = 7/4
token    = 4f#_
CURRENT SLICE = TS=7/4 (p0:)(s0:)(v0:) "4f#_"  sside: []  pside: []
TIMESTAMP 7/4
NEXT SLICE = TS=7/4 (p0:)(s0:)(v0:) "4f#_"  sside: []  pside: []
NEXT TIMESTAMP 7/2
Cannot deal with this slice addition case yet...
Cannot deal with this slice addition case yet...


The above is the error I'm getting for the attached file. I'm not sure what's going on with slice addition, but I'm guessing it has something to do with rhythm/meter. In the attached file, it's pretty simple and I don't see any instance of problematic rhythms fitting into a bar. Thoughts? Should I be concerned about what the conversion process is doing to the data?

Thanks much!
-Josh
29_showmelove_mel.musicxml.krn

Craig Sapp

unread,
Jun 4, 2025, 6:45:41 PMJun 4
to stars...@googlegroups.com
Hi Josh et al.,

There is definitely a problem on line 8 of the Humdrum output:

Screenshot 2025-06-04 at 15.40.29.png

Where the null token should be an 8th note (most likely 8g#).

Can you send me the original MusicXML file to test with?

-=+Craig


--
--
This is a message is from the **HUG newgroup.
To post to this group, send email to stars...@googlegroups.com
To unsubscribe from this group, send email to
starstarhug...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/starstarhug?hl=en
---
You received this message because you are subscribed to the Google Groups "starstarhug" group.
To unsubscribe from this group and stop receiving emails from it, send an email to starstarhug...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/starstarhug/CANNxkQOKZKwLfy3zz0%3DX9RjtNNB8Cjs_gj7VQ0FpXb5xzaqD4g%40mail.gmail.com.

Joshua Albrecht

unread,
Jun 5, 2025, 11:52:38 AMJun 5
to stars...@googlegroups.com
Oh, interesting. Is it possible, especially because this is before bar 1, that this could be thought of as an almost complete pickup measure? Anyways, I'm attaching the musicxml file for you to look at.
Thanks!
-Josh


29_showmelove_mel.musicxml

Craig Sapp

unread,
Jun 5, 2025, 6:07:58 PMJun 5
to stars...@googlegroups.com
Hi Josh et al.,

The problem is in the first measure of the MusicXML data on lines 92–94:

Screenshot 2025-06-05 at 14.25.56.png

This moves back the timeline by a 16th note (colliding with the duration of the first 8th note and causing the problem by positioning the next note before the previous one has ended).

Also a similar problem on lines 182–194 at the end of measure one where there is a gratuitous backup of an 8th note:

Screenshot 2025-06-05 at 14.32.20.png

There is also a reverse problem:

Screenshot 2025-06-05 at 14.48.58.png

This also needs to be removed in the first measure.

(no other problems that I see in the score). It looks like you (or your student :-) might have been editing the file to create a monophonic score ("mel" in the filename).  And somehow something got confused in the data which then caused problems in the MusicXML export.   The file was created by MusicXML 3.1.0 (maybe upgrading Musescore 4 might help avoid such problems).

Removing these lines before converting to Humdrum fixes the problem:

Screenshot 2025-06-05 at 14.53.57.png

Attached is the fixed input and updated output.

Also the file loads into MuseScore 4.4.4 with this message:

Screenshot 2025-06-05 at 11.16.58.png

"Opening anyway" results in a strange gray rest added (caused by the <forward>) in first measure) and a gray plus meaning the measure is overfilled:

Screenshot 2025-06-05 at 11.19.59.png

Musescore ignores the problem caused by the backup by how it converted the MusicXML data.


-=+Craig


output.txt
fixed-input.txt
Reply all
Reply to author
Forward
0 new messages