-
Notifications
You must be signed in to change notification settings - Fork 407
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
[tracking] Improvements to voice numbering #890
Comments
Saw a note in the XML writer that MusicXML 3.1 defines an "id" attribute for unique elements. We probably do need
|
|
status quo (setting |
There is some discussion here about visual (no-overlap) voices vs. analytical voices w3c/mnx#183 Michael Good uses the term "sequence", which I like, and mentions that may be the direction MNX goes.
in m21, |
The lack of standardized voice numbering caused the following malformed stream representation (leading to dropped data in Finale as well as crashing MuseScore): MIDI file (available on request)
After improvement in f867533 to call
As mentioned above, the "loose" notes crash MuseScore. The problem goes away with #915 because we have standard voice numbering instead of random IDs, and
|
(The trailing loose rest has already been fixed during v7 -- it's the leading loose notes that we would want makeTies to handle, and it does handle once the voices are numbered to match) |
Myke's right, |
Right, okay, it's coming back to me how this is relevant to more than just cross-staff beams. A second use case for With some effort a user can write a function to pre-walk substreams, get the voice IDs in the order encountered, etc., and be conscious of that when then walking the substreams again, but that's burdensome. With VoiceSpanners (which can be ordered like any m21object), we could have a recurse-like function that says, just visit all of those voices, in the order, then go to the next spanner. Then get all the voices unspanned. Then get all the loose notes. |
This is a great idea -- let me think about whether we should explicitly define
voice.number
separately from ID -- the Q is whether it's universal across the score, within a PartStaff or across parts. having it across PartStaffs would help our friend trying to track the tenor line -- IF it was set that way in musicxml. But what happens if it ends and then begins again?Originally posted by @mscuthbert in #886 (comment)
My reply to that is that the expected stream nesting is voice inside a measure, so the numbers parsed from MusicXML or defaulted by
makeVoices
/makeNotation
will be arbitrary, not analytical, and will vary from measure to measure; and if a user wants analytical voice numbers that wouldn't necessarily export to MusicXML to track analytical voices through an entire score, that's a use case for a separate attribute, which we wouldn't be setting through any of the above methods -- or we could document in the user's guide using aGroup
to accomplish this.Very easy to just have
makeVoices
do this, once we decide whether it should be an int or str:However, there could be a usability issue if, say, someone wanted to walk a stream of measures to analyze and set the analytical voice number with a
Group
-- there is some overhead if "id" may or may not be an int or str, etc., that's a lot of try/except/cast to just get the numbers out. Also -- we encourage users to overwrite .id with whatever they please to extract specific objects, in which case they'll lose the numbering.In fact... that leads me to say that there should be a new
.number
for the arbitrary numbers created by makeVoices/musicXML, and let users use .id or .editorial orGroup
or whatever to set analytical voice numbers if they wish.The text was updated successfully, but these errors were encountered: