paulrosen / abcjs

javascript for rendering abc music notation
Other
1.91k stars 282 forks source link

Can't get a key signature with different accidentals on the same note with different octaves #1025

Open goplayerjuggler opened 3 months ago

goplayerjuggler commented 3 months ago

I would expect something like this rendering, for the following ABC: image

But with abcjs it seems impossible to have a different accidental on the low and on the high E. X:1 K:F _E =e "^key signature is missing the low E flat"CDEFGABcdef|

X:2 K:F =e _E "^key signature is missing the high E natural"CDEFGABcdef|

X:1 K:F exp _B _E =e "^key signature is missing the low E flat"CDEFGABcdef|

X:2 K:F exp _B =e _E "^key signature is missing the high E natural"CDEFGABcdef|

seisiuneer commented 3 months ago

I've literally never seen any reference to octave-based key signatures in any reference on music notation, the ABC standard, or in any actual music, but my experience is limited to western classical music and traditional Irish music.

Just curious, is this something you've encountered in real life, or an idea for an extension of standard notation practice? It's a very interesting request.

paulrosen commented 3 months ago

I'd love to see the use case, too.

I can see a use for it in eastern European modes, where, for example, in D Fregish the B is natural in the low octave and flat in the high octave. But all the written examples I've seen either use a standard classical key signature and write in a lot of accidentals, or use a Fregish key sig and just write in natural signs for the low B.

goplayerjuggler commented 3 months ago

I don't really have a convincing use case. I thought it would be a nice thing to have 4 days ago when I was writing a transcription, which I share below. At at one point I mistakenly thought all of the low E's in the A part were flat. And I thought having this sort of special key signature could be a nice thing to have. After a little more careful listing, I now think only the low E's in bars 2 and 6 of this transcription should be flat; the others should be natural. So this key signature wouldn't be appropriate here.

Having said that, I think the example given by Paul is a good enough use case. Even though all examples currently don't use this non-standard key signature, there's no reason it couldn't or shouldn't be used. IMO.

X:1 T:Paddy on the Turnpike [1] M:C| L:1/16 N:Played on a violin tuned one whole tone down (DGCF, top to bottom.) N:From an August 1, 1966, field recording of the playing of Fidel N:Martin (1891-1976) of Berlin N.H., originally from Rogersville, NB, recorded N:by folklorist Art Rosenbaum. Martin, a WWI veteran, had a repertory that N:consisted of Acadian, Irish, American and French-Canadian tunes. D: https://bmac.libs.uga.edu/index.php/Detail/objects/331630 F:UGA Brown Media Archives: identifier artrosen_00180 (Track 3 -29:03 of the tape) Z:transcribed by Andrew Kuntz, with improvements by Malcolm Schonfield K:F P:A FD||!segno!CFCF FEFF AFcF dFcF|CD_EF EDEE (CE)BE cEBE| CFFE {FE}F2FG Acde f-eff|[M:3/4] cABG ABGE F2FD| [M:C|]CFCF FEFF "*"AFcF dFcF|CD_EF ED(E/D/E) (CE)BE cEBE| CFFE {FE}F2FG "*"Acde f2{g}fd|[M:3/4]cABB AcGE F2Ac | P:B [M:C|]dfeg feff afcf afcf|dgdg edee gece gece| dfeg {g}f-e(f/e/f) afcf afcf| [M:5/4]d(cAc) fgff cABG AFGE F2Ac | [M:C|]dfeg feff afcf afcc|dgdg {ef}edee gece gece| dfeg (f/g/f/e/)ff afcf afcf|[M:5/4]!coda!d(cAc) fgfd cABG (A/B/G/A/)GE .Fz F!segno!D|| P:Substitution ""AccA dAcA||"**"Acde fe(f/e/f)|| P:Coda [M:5/4]!coda!d(cAc) fgfd cABG (A/B/G/A/)GE .F2z2|]