Open AlbertHart opened 4 years ago
Several of the rules want to look ahead at future notes, I am not going to look ahead yet because it is much easier to remember notes we have seen already rather than upcoming noites.
maybe post process
concept can make it easier to implement.
loop 1 to parse all the information you need to deal with stem.
loop 2 to do it.
only rough idea :)
I asked my teacher about stem positions today. He didn't really care about the look ahead for quarter notes, but he did think we needed to look ahead for beam groups, and choose the direction which matches the most notes in the beam group.
However, I just tested this with MuseScore and they do not follow the rule properly. The third beam group should have stems going up, because two of the three notes are below the middle line of the staff.
If the majority of notes in the beam group are above the middle line, stems in the beam group point downwards.
If the majority of notes in the beam group are below the middle line, stems in the beam group point upwards.
As you suggest, I can read the entire string (file) and store the information I need, and then read it again to process it. That will work pretty well.
Also, I entered a simple phrase in MuseScore and then transposed it in MuseScore, and Musescore did not handle stems well at all.
But just because other programs don't do a good job, doesn't mean that we can't do a better job.
I'll plan to add the look ahead by reading the entire scode, and storing the look-ahead values for beam groups and quarter notes.
I am going to rework my logic on Stem Direction - especially for staffs with multiple voices.
Here is a current xml_transpose output. Several of the stems are not correct, so I am going to rework the stem logic.
I found a pretty good article yesterday on the rules for stem directions, and I was planning to rework stem logic this week. Besides using the rules properly, I also need to process stems by staff and voice. Currently I am not processing them properly for pieces with two voices.
https://steinberg.help/dorico/v2/en/dorico/topics/notation_reference/notation_reference_stems_direction_c.html
Several of the rules want to look ahead at future notes, I am not going to look ahead yet because it is much easier to remember notes we have seen already rather than upcoming noites,