One solution is to make all the exercises as separate lines of the same \score and use the rehearsal mark mechanism for the numbering.
Here's an example:

\version "2.10.33"

#(set-default-paper-size "letter")

newexample = {
 \break
 % Force a time signature at the top of the new example
 \time 4/4
 % Typeset the number
 \mark \default
}

\score {
\new RhythmicStaff {

\newexample
b'2 b
r4 b r b
b r b r
b2 r4 b
\bar "|."

\newexample
b'2. b4
r4 b8 b r4 b
b r b r
b2 r4 b
\bar "|."
}
}

\layout{
 % Only make each line as long as necessary
 ragged-right = ##t
 % Don't indent the first line (= first example)
 indent = 0
 \context{
   \Score
   % Get rid of bar numbering
   \remove Bar_number_engraver
   % Get rid of reminder time signature at the end of the    % previous line
   \override TimeSignature #'break-visibility = #end-of-line-invisible
   % Use numbers instead of letters
   markFormatter = #format-mark-numbers
 }
}


  /Mats

Quoting Charles Gran <[EMAIL PROTECTED]>:

I'm looking for a way to number short rhythms and melodies on
practice sheets for an ear training class I'm teaching.  The example
below looks how I want it, but I am wondering if there is some way to
have the exercises numbered automatically.

\version "2.10.33"

#(set-default-paper-size "letter")

\score {
\new RhythmicStaff {
\time 4/4
\set Staff.instrumentName = "1 "
b'2 b
r4 b r b
b r b r
b2 r4 b
\bar "|."
}
}

\score {
\new RhythmicStaff {
\time 4/4
\set Staff.instrumentName = "2 "
b'2. b4
r4 b8 b r4 b
b r b r
b2 r4 b
\bar "|."
}
}

The above is what I want, but it would be great if there was some way
to have the exercises numbered automatically.  Is there?

Charles

p.s. For anyone who's interested, these are the relevant threads I
found for making exercises in lilpond:
http://lists.gnu.org/archive/html/lilypond-user/2006-03/msg00285.html
http://lists.gnu.org/archive/html/lilypond-user/2006-11/msg00458.html
http://lists.gnu.org/archive/html/lilypond-user/2007-06/msg00396.html


--
http://www.campdeadly.com
http://www.campdeadly.com/blog



_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user






_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to