I'm preparing a modern-notation edition of a piece of choral renaissance
polyphony, in which the maxima at the end of each section is notated as
a neomensural "\maxima*n/m" (where, for each part, n,m are chosen to
cause all the parts to end the section together).  

Example lilypond code and the result are attached.

Bar-numbering is attached to the top part in the score so, when that
part's maxima starts early and other parts are still moving, the other
parts sometimes have "extra" bars of music.  As a result, I have to
reset the bar numbering manually afterwards (see line 27 of the example
attached):

       \set Staff.currentBarNumber = #4

Rather than specifying a static bar number, how could the following
pseudocode be programmed?

       \set Staff.currentBarNumber = Staff.currentBarNumber + x

where, in this example, x = 1

As you can tell, I'm not a Scheme programmer!  Thanks for any help you
can offer.
-- 
Graham King <[email protected]>
% $Header$
% vim:set ai shiftwidth=4 softtabstop=4 expandtab fdm=marker foldcolumn=2 
foldmarker=<<<,>>> syntax=lilypond:

% #(ly:set-point-and-click 'line-column)
\version "2.12.0"

\paper {
    #(set-paper-size "a4")
    ragged-bottom = ##f
    %#(set-paper-size "a4" 'landscape)
}
global = {
    \key c \major
    \time 3/2
    \override Score.BarNumber #'break-visibility = #'#(#t #t #t)
    \set Score.currentBarNumber = #11
    \bar ""  % Permit first bar number to be printed
}

meanMusic = \relative c' {
       g'2 g g
       \once \override Staff.TimeSignature #'break-visibility = #'#(#f #f #f)
       \time 9/2 % invisibly change this to accommodate maxima
       fis4 e8 d fis4. g8 
       \once \override Voice.NoteHead #'style = #'neomensural
       fis\maxima*7/16 \fermata
       \set Staff.currentBarNumber = #4 % catch up with parts that have more 
bars here.
       %fis2 %  added to make lengths of maximas agree
       %~ fis1. ~ fis1.\fermata
       \bar "||" % full bar
       \time 4/2
       R\breve
}

contratenoroneMusic = \relative c' {
       b'2 b b
       r4 a4 fis b2
       % 61r line 4:
       a4 
       \once \override Staff.TimeSignature #'break-visibility = #'#(#f #f #f)
       \time 3/1 % invisibly change this to accommodate maxima
       \once \override Voice.NoteHead #'style = #'neomensural
       d\maxima*3/8 \fermata
       %d1. ~ d1.\fermata
       \bar "||" % full bar
       \time 4/2
       a1. d2
}

\score {
    \context ChoirStaff <<

        \context Staff = mean <<
            \set Staff.instrumentName = "Mean "
            \set Staff.shortInstrumentName = "Mn. "
            \set Staff.midiInstrument = "oboe"

            \context Voice = mean 
                \with {
                    \remove "Note_heads_engraver"
                    \consists "Completion_heads_engraver"
                    \consists "Bar_number_engraver"  % *** Need to add this to 
top part only
                } { << \global \meanMusic >> }
        >>

        \context Staff = contratenorone <<
            \set Staff.instrumentName = \markup { \column { "Contra-"  "tenor 1 
" } }
            \set Staff.shortInstrumentName = "Ct1. "
            \set Staff.midiInstrument = "oboe"
            \context Voice = contratenorone 
                \with {
                    \remove "Note_heads_engraver"
                    \consists "Completion_heads_engraver"
                } { << \global \contratenoroneMusic >> }
        >>


    >>
     
    \layout { % *** Need to add all this
        \context {
            \Score
            \remove "Timing_translator"
            \remove "Default_bar_line_engraver"
        }
        \context {
            \Staff
            \consists "Timing_translator"
            \consists "Default_bar_line_engraver"
        }
    }
     
    \midi {
        \context {
            \Score
            tempoWholesPerMinute = #(ly:make-moment 80 2)
        }
    }

}

<<attachment: test_final_maxima.png>>

_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to