-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about measure duration not matching time signature #425
Comments
Hi @Yikai-Liao, Thanks for the question! As you say, the rationale behind this approach was to preserve the literal MusicXML data rather than forcing a strict duration. Actually, MEI also uses this way of representing the duration of a measure implicitly. Our decision for computing the duration of a measure based on the notes rather than fixing a specific duration comes mostly from dealing with classical music, where these kind of measures are common. Besides incorrectly formatted MusicXML files, there are a few cases where that was the desired behavior (and in here, we need to remember that MusicXML was designed to display music in a visually correct way for musicians, rather than represent elements in a "musically" correct way 😅). A few of these cases are:
Piano_Concerto_No.3_in_D_Minor_Op.30-Рояль.musicxml.zip
Hope this helps! BTW, we have also been discussing whether to add symusic/minimidi as a separate backend (in addition to our original Mido backend) to parse MIDI files more quickly in Partitura, so we might also ask you some questions in the future 😉 |
I observed these situations most:
For the repatition problem, I think that is not important for musical meaning, it just simplify notation. Expand should be enough. |
I also see older (maybe originally mensural?) music with each vocal part having different time signatures (3/1, 6/1, 2/1, etc), and all the measures in all the parts have the same (short) duration, but some of the parts have many hidden barlines to make things look like they match the timesig. So the actual MusicXML measures in the parts with longer timesigs are consistently shorter than the timesig would have it. I tried in many different projects (converter21, musicdiff, etc) to either force things to match the timesig, or assume things matched the timesig (for simplicity’s sake), and every time I had to stop doing that and properly handle things not matching, because scores often don’t work that way. |
@gregchapman-dev Yes, that' s common in Medieval and Renaissance music, something like Mensural canons. But as far as I know, even in musicxml, we can acheive different time signature in different part only by adjusting layout information, like hiding barlines or so. And that doesn' t alter core musical information. |
Hi Partitura team,
First off, thank you for creating and maintaining this library — it’s been very helpful!
I’m currently implementing my own MusicXML parser for symusic and noticed that Partitura determines each measure’s duration purely based on the actual note/rest durations (including
<forward>
and<backup>
), rather than enforcing the nominal length implied by the time signature. As a result, measures in Partitura’s parsed output can end up shorter or longer than the “theoretical” bar length indicated by the<time>
element.Could you please share the design rationale behind this approach? Is the goal simply to preserve the literal MusicXML data (where some measures might intentionally or unintentionally underflow or overflow the expected time signature), rather than forcing them to match a strict bar length?
In my own parser, I’m running into scenarios where a measure’s cumulative note durations don’t match the stated time signature. I’m not sure whether I should:
I’d love to hear your insights or best practices on how to handle these “irregular” measures. Do you foresee any drawbacks to strictly enforcing the time signature length, or any edge cases that Partitura tries to accommodate with this design?
Thanks again for all your work on this project, and any guidance you can provide would be greatly appreciated.
Best regards,
Yikai Liao
The text was updated successfully, but these errors were encountered: