How does my Dorico decide the stem direction in this case?

In this case, when I was copying Chopin’s Mazurka no.30, I noticed something odd.


The stem towards the sky even when there is a G way up there.
What is happening? It shouldn’t be right.

Then, when my friend moves the G in the higher octave up by one degree, the stem automatically faces the right direction.
F523A429BB4A99046AC21B042B3A0CAD.png
When my friend moves the A up a degree, the stem faces the right direction too.
6C465B3E9FEAD557AC098EC48F30E946.png
:open_mouth:

The reason Dorico chooses an up-stem for the beam consisting of A#4 and G4/G5 is as follows:

– The first note in the beam should take an up-stem
– The second dyad in the beam should take a down-stem
– Because the number of stems that should point in each direction is the same, it looks at the number of noteheads across the beam that are below the middle staff line versus those that are above the middle staff line; because there are two notes below the mid-line and one above, the end result is a beam with up-stems.

When it’s in this kind of even-stevens situation, Dorico doesn’t consider the greatest distance from the middle line, but rather the overall “weight” of the beam.