In NR 2.2.1 Changing staff automatically, it says this: Chords will not be split across the staves; they will be assigned to a staff based on the first note named in the chord construct.
http://kainhofer.com/~lilypond/Documentation/user/lilypond/Common-notation-for-keyboards.html#Changing-staff-automatically Actually, this is not true; they are assigned to a staff based on the *last* note named in the chord construct. The reason is that in scm/autochange.scm, the NOTES variable referenced on line 17 ultimately comes from a *reversed* context-list (see line 38). Anyway, I think that it would make a lot more sense if the staff were determined by the "average" pitch of the chord. And, I think I've solved this in the attached patch. I've also attached 2 png's to demonstrate the difference: the first one (current.png) was compiled with the current autochange.scm and the second one (revised.png) was compiled with my revised patch. You can look at the test file below to see how it is set up. Would anyone like to comment? Are there any objections to me applying it? Thanks. - Mark ___________________ \version "2.13.2" uppersFirst = \relative { <b g>8 <c g> <c a> <d a> <d b> <e b> <e c> <f c> <f c> <e c> <e b> <d b> <d a> <c a> <c g> <b g> } lowersFirst = \relative { <g b>8 <g c> <a c> <a d> <b d> <b e> <c e> <c f> <c f> <c e> <b e> <b d> <a d> <a c> <g c> <g b> } \new PianoStaff \autochange \uppersFirst \new PianoStaff \autochange \lowersFirst ___________________
0001-autochange.scm-Use-averaged-chord-pitches-to-determi.patch
Description: Binary data
<<attachment: current.png>>
<<attachment: revised.png>>
_______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel