abcjs icon indicating copy to clipboard operation
abcjs copied to clipboard

Note positioning when putting multiple voices in one staff using %%score

Open jtna opened this issue 4 years ago • 2 comments

Hi Paul,

I've been working a lot with SATB music where I'm grouping 2 voices per staff, i.e. Soprano and Alto in one staff, Tenor and Bass in another. I'm using the %%score directive for this. Things are working great in general, but I've run into some corner cases.

When notes or symbols overlap, they are not positioned apart, making them harder to read: 1

L: 1/4
%%score (S A)
V: S
F2    | (E E) | ^G |
V: A
(E D) | (D C) | =E |

When these same notes are expressed as chords in a single voice, they are positioned properly. But as separate voices, they're stomping on each other.

There are also cases where it would be preferable to have the symbol displayed only once: 2

L: 1/4
%%score (S A)
V: S
(3GGG | z |
V: A
(3EEE | z | 

Finally, I've noticed that in published SATB music, if the Soprano and Alto voices are on the same staff, all notes have upward stems, except when it would make it more difficult to read. For example, this is a scan from a published piece of music:

published

And the best I could do with ABC notation and ABCJS: 3

M: 3/4
L: 1/4
K: Eb
%%score [(S A)]
V: S stem=up
B, | E F G | B2 B/ B/ | c B A/G/ | F2 B, |
V: A stem=up
B, | B, C/D/ E | (F G) E/ E/ | E E D/E/ | (E D) B, |

I know this last point probably too much work for only limited benefit, but I wanted to throw it out there in terms of what would be really nice to have.

jtna avatar Apr 16 '21 16:04 jtna

This first issue has been reported and I plan to get to it, but I can't give you a time table.

The second issue is interesting - I could probably take care of a few cases like the one you show.

The third one should probably be an override for the stem direction of a particular note. That would be a new feature but probably not difficult.

paulrosen avatar Apr 17 '21 13:04 paulrosen

For the third issue, if the stem direction of a particular note needs to be overridden manually, that's not too useful, I think. In other words, if I have to manually modify the ABC string in order to make the stems look nice for certain notes, that;s not ideal.

If ABCJS can figure out when to override the stem direction (not by default, but in a special mode), that would be best, though I can see the logic for figuring that out being not-so-trivial.

jtna avatar Apr 17 '21 16:04 jtna