Hello,I’d like to suggest rearranging the instrument names in LSR 650 using \center-column (more elegant in my eyes). Attached you find an updated version of the file. Do you approve?
Best, Simon Am 01.08.2014 15:10, schrieb Phil Holmes:
----- Original Message ----- From: "Janek Warchoł" <janek.lilyp...@gmail.com>To: "Phil Holmes" <m...@philholmes.net>Cc: "Abraham Lee" <tisimst.lilyp...@gmail.com>; "MING TSANG" <tsan...@rogers.com>; "lilypond-user mailinglist" <lilypond-user@gnu.org>; "David Kastrup" <d...@gnu.org>Sent: Friday, August 01, 2014 1:19 PM Subject: Re: How split SA staff into two staff - each now has two voices? Hi, 2014-08-01 12:13 GMT+02:00 Phil Holmes <m...@philholmes.net>:----- Original Message ----- From: "Janek Warchoł" <janek.lilyp...@gmail.com>% I'm not 100% satisfied with this code, but i think it's better % than the snippet in the docs. Maybe someone would like % to submit an update? I don't really have enough time now.It's a snippet from the LSR and will be updated considerably anyway in thenext build. You might like to check out http://lsr.di.unimi.it/LSR/Item?id=650Thanks for info, Phil. Well, the new version of the snippet suffers from exactly the same problem as the old version, except _more so_. The fact that the snippet defines *three* separate staff contexts for the "Low" parts, which don't split _at all_, is a complete and utter abomination, and it almost gave me a heart attack. This is unbelievably ugly, and against good programming practices. I have expanded my code from my previous email to also show two staves converging into one (see attached). Please note that i didn't have to make *any* changes to the \score block structure - i have just added commands for new arrows and written more music to the _existing_ variables. I believe this proves my code is superior to the one from the snippet. cheers, Janek =============================================I've updated the LSR with your snippet: the code base will have this following an LSR import.-- Phil Holmes _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
#(define-markup-command (arrow-at-angle layout props angle-deg length fill) (number? number? boolean?) (let* ( (PI-OVER-180 (/ (atan 1 1) 34)) (degrees->radians (lambda (degrees) (* degrees PI-OVER-180))) (angle-rad (degrees->radians angle-deg)) (target-x (* length (cos angle-rad))) (target-y (* length (sin angle-rad)))) (interpret-markup layout props (markup #:translate (cons (/ target-x 2) (/ target-y 2)) #:rotate angle-deg #:translate (cons (/ length -2) 0) #:concat (#:draw-line (cons length 0) #:arrow-head X RIGHT fill))))) splitStaffBarLineMarkup = \markup \with-dimensions #'(0 . 0) #'(0 . 0) { \combine \arrow-at-angle #45 #(sqrt 8) ##t \arrow-at-angle #-45 #(sqrt 8) ##t } splitStaffBarLine = { \once \override Staff.BarLine.stencil = #(lambda (grob) (ly:stencil-combine-at-edge (ly:bar-line::print grob) X RIGHT (grob-interpret-markup grob splitStaffBarLineMarkup) 0)) \break } convDownStaffBarLine = { \once \override Staff.BarLine.stencil = #(lambda (grob) (ly:stencil-combine-at-edge (ly:bar-line::print grob) X RIGHT (grob-interpret-markup grob #{ \markup\with-dimensions #'(0 . 0) #'(0 . 0) { \translate #'(0 . -.13)\arrow-at-angle #-45 #(sqrt 8) ##t }#}) 0)) \break } convUpStaffBarLine = { \once \override Staff.BarLine.stencil = #(lambda (grob) (ly:stencil-combine-at-edge (ly:bar-line::print grob) X RIGHT (grob-interpret-markup grob #{ \markup\with-dimensions #'(0 . 0) #'(0 . 0) { \translate #'(0 . .14)\arrow-at-angle #45 #(sqrt 8) ##t }#}) 0)) \break } \paper { ragged-right = ##t short-indent = 10\mm } sIandII = \markup { \vcenter S \vcenter \center-column { I II } } aIandII = \markup { \vcenter A \vcenter \center-column { I II } } sanda = \markup \center-column { S A } tandb = \markup \center-column { T B } separateSopranos = { \set Staff.instrumentName = \aIandII \set Staff.shortInstrumentName = \aIandII \splitStaffBarLine \change Staff = "up" } convSopranos = { \convDownStaffBarLine \change Staff = "shared" \set Staff.instrumentName = \sanda \set Staff.shortInstrumentName = \sanda } sI = { \voiceOne \repeat unfold 4 f''2 \separateSopranos \repeat unfold 4 g''2 \convSopranos \repeat unfold 4 c''2 } sII = { s1*2 \voiceTwo \change Staff = "up" \repeat unfold 4 d''2 } aI = { \voiceTwo \repeat unfold 4 a'2 \voiceOne \repeat unfold 4 b'2 \convUpStaffBarLine \voiceTwo \repeat unfold 4 g'2 } aII = { s1*2 \voiceTwo \repeat unfold 4 g'2 } ten = { \voiceOne \repeat unfold 4 c'2 \repeat unfold 4 d'2 \repeat unfold 4 c'2 } bas = { \voiceTwo \repeat unfold 4 f2 \repeat unfold 4 g2 \repeat unfold 4 c2 } \score { << \new ChoirStaff << \new Staff = up \with { instrumentName = \sIandII shortInstrumentName = \sIandII } { s1*4 } \new Staff = shared \with { instrumentName = \sanda shortInstrumentName = \sanda } << \new Voice = sopI \sI \new Voice = sopII \sII \new Voice = altI \aI \new Voice = altII \aII >> \new Lyrics \with { alignBelowContext = up } \lyricsto sopII { e f g h } \new Lyrics \lyricsto altI { a b c d e f g h i j k l } \new Staff = men \with { instrumentName = \tandb shortInstrumentName = \tandb } << \clef F \new Voice = ten \ten \new Voice = bas \bas >> \new Lyrics \lyricsto bas { a b c d e f g h i j k l } >> >> \layout { \context { \Staff \RemoveEmptyStaves \override VerticalAxisGroup.remove-first = ##t } } }
lsr650alt.pdf
Description: Adobe PDF document
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user