Repository navigation
Conversation
In a |Chord| line, Dur2/Pos2 is a second group of notes sounding with the chord (a split-stem chord), but translateChord read it as a rest placed after the chord, so the notes were lost and everything after them came late. |RestChord| (a rest with a chord sounding at the same time) was not read at all. Each group now goes in its own voice at the chord's offset; voices are inserted at the start of the measure rather than appended after its notes.
|
The diffs were long and this is code I don't really remember so I had my agent look at it. Some comments: Bugs
The suggested fixes have not been built or tested. Not mentioned in the description
Also can you bump version and put "New in v11" for the new public functions. THANKS! |
Notes after a chord group start where the shortest group ends, not at the end of the shortest voice. Ties follow their staff position and slurs their voice. Binary rest chords are dumped as |RestChord|.
|
Thanks looking really good! but a few more things... My agent checked the new commits. Items 1–3 from my last comment are fixed, and the version bump and "New in v11" markers are in. These still need fixing in this PR (or a rebuttal saying my agent messed up)? Bugs
Smaller things
PR descriptionOptionally update it to cover the binary reader change, filler rests, lyrics (a rest chord now uses up a syllable) and repeated OptionalThese two are already wrong on master, so they don't need to hold up this PR, but if you're feeling generous:
THANKS! |
mscuthbert
left a comment
There was a problem hiding this comment.
requesting some more chaanges -- see issue. thanks!
Slurs: a slurred note is slurred to the next note that starts once it has ended, in any voice or measure. Slurred notes in a row still make one slur. Before, slurs were kept per voice, so |Chord|Dur:Half|Pos:1|Dur2:4th|Pos2:3, |Note|Dur:4th,Slur|Pos:2, |Note|Dur:4th|Pos:4 had no slur (also with a |Bar| before the last note), and a slur from a Dur2 group ran to the next chord three bars later instead of the next note. Clefs, keys, time signatures, dynamics, hairpins, repeat marks and text go in at the running measure position, not at the end of the longest group. |Chord|Dur:4th|Pos:-1|Dur2:Whole|Pos2:3, |Dynamic|Style:p, |Note|Dur:4th|Pos:1 put the p at 4.0; it is now at 1.0 with the note. Ties match on step and octave, so they survive a clef change (|Note|Dur:4th|Pos:-6^, |Clef|Type:Bass, |Note|Dur:4th|Pos:6 is C4 to C4) and a sharp tied over a barline still gets its stop. A tie only stops on a note that starts where the tied note ends, so Pos:1^, Pos:2, Pos:1 no longer puts a stop on the third note. Open ties and slurs are cleared at a new staff.
setDurationForObject no longer reads slurs, so its example Dur info drops Slur. Dur2/Pos2 are read now, so the to-do entry for them goes. Annotating __init__ makes mypy check it, so currentMeasure starts as an empty Measure and the list and dict attributes get types. Test notes move into docstrings.
An open tie that ends at a bar line carries over to beat 1 of the next measure; at each bar line every other open tie is dropped. Before, Pos:1^ (whole), |Bar|, Pos:2, |Bar|, Pos:1 put a tie stop on the last note.
|
pushed fixes for all of these:
updated the PR description too |
In nwctxt, a
|Chord|line'sDur2/Pos2is a second group of notes sounding with the chord (a split-stem chord), buttranslateChordread it as a rest placed after the chord, and|RestChord|lines were ignored. Each group, and each repeatedDur:/Pos:pair, now goes in its own voice at the chord's offset. Notes after a chord start where the shortest group ends; clefs, keys, dynamics and text go in at that position.|RestChord|Dur:<rest>|Dur2:<notes>|Pos2:..., where it wrote the rest as aDur2group.|RestChord|sample.Before (a chord from NWCTEXT_Really_complete_example_file.nwctxt; the E5 of
Pos2:3xis lost and the next note comes late):