abcjs
abcjs copied to clipboard
Feature request: ability to indicate direction for slurs and ties
see attached, this is especially needed when writing music with two voices on the same staff.
ABC code (3 bars only):
X: 1
T: J.S. Bach Sonata #3 for Solo Violin - Grave
C: J.S. Bach
Q: 1/8=52
M: C
L: 1/32
K: Am
K: clef=treble
%%score (v1 v2)
V: v1
[e8c8] x8 A2!4!^G2(!0!A4 A2)(!crescendo(!ABcd!crescendo)!e2)|!f!f3(!4!ed2c!2!B) !1!!2!B4!3!T"_dim."(A^GA2) T(G4!1!^F2!2!E2) !0!(=D3!4!=FEDCD/)!2!B,/|
!crescendo(!(CA,CEAce!crescendo)!f) T(f6ef) !f!g3!4!(f!4!e2dc) c4T(_BAB2)|
V:v2
!f![A4A,4]x4 v^G,(!diminuendo(!!4!f!4!ed/c/TB2!diminuendo)!A2) F2x6 E2x6|[A3D3]x1x4 ^D4x4 x8 ^G,3x1x4|
x16 [c3E3]
typo it is really Sonata #3 LOL
no matter what I try, whenever there's a second voice those slurs reverse, many of them, from where they were with single voice
I think we might not need a feature for this - I think it just looks like a bug. The slur should always go in the opposite direction of the stem, right?
I read Paul E.'s comment about choral music, great!.. so yes,, here is Bach Adagio for solo violin .. note sometimes they choose to put slurs completely above the beamed notes, sometimes under. Multiple voices on single staff are tricky to notate eh? You would I reckon not only need "direction" choice, but also ability to shift position up or down to get clear of the beams when slur is in the same direction of stems, or perhaps the abcplus has that programmed into the renderer, i.e. (if slur is same direction of stems, it must use the beam position as to where to place the slur.) The typesetter's choice to place slurs facing one way or the other clearly is a factor when there are other markings we don't want to obscure such as fingerings, second voice notes, dynamics/tempo indications, etc.
Going by this snippet, the best solution would be not only choice of direction, but also a position parameter, as here we see this second slur mark, ah! it's a tie not a slur, is not only same direction as stems, but then uses the notehead for positioning instead of the beams. Maybe "ties" always use the noteheads for positioning, that makes sense. So I'm going to suggest: if slur is marked to be same direction of stems, it should clear the beams, but for ties indicated to be the same direction as stems, then still use the noteheads for positioning.

As an incentive.. if you incorporate both direction and placement of ties and slurs as per my last comment, I promise I will put into abc notation the entire 4 page Bach Fugue in Am for solo violin..(impossible to do correctly otherwise) and put in the notes something like "high five Paul Rosen and abcjs!" seriously :1st_place_medal:
I daresay, it WILL be historical.. and let those classical musicians who turn their noses up at abcnotation.. EAT CROW lulz
EVEN more than that, I'll put down the entire 10-page Bach 3rd Sonata for solo violin that includes the fugue, I already have the Alegro parts done (2 of the pages).. I stopped on the Grave section when I hit the slur direction snag. https://melodypedia.com/home/qp/60 https://melodypedia.com/home/qp/183
and fix your trill playback to boot, on my list of things to do