lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple exercises on a single line


From: David Kastrup
Subject: Re: Multiple exercises on a single line
Date: Wed, 07 Jun 2017 09:15:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Gianmaria Lari <address@hidden> writes:

> I would like to write short exercises of one measure consecutively on the
> same line. Something similar to what I attached. How I can do it?

You could try something along the following lines:

exercises =
#(define-scheme-function (cm seq)
  (ly:context-mod? ly:music?)
  (let ((elts (ly:music-property seq 'elements)))
   #{ \markuplist \wordwrap-lines {
   #@(map (lambda (m n)
           #{
             \markup \score {
               \new Staff \with {
                 #cm
                 instrumentName = #(format "~d." n)
                 \override InstrumentName.self-alignment-X = #RIGHT
               }
               { #m }
               \layout {
                     indent = 24\pt
               } } #})
     elts (iota (length elts) 1)) } #}))

\exercises \with { \clef bass
                   \override TimeSignature.style = #'numbered }
{
  { \time 3/4 c,4 e, g, }
  { \time 4/4 c,4 e, e, c, }
  { \time 4/4 c,8-3 d,-2 e,-3-- f,-4 g,-2 f,-4 e,-3-- d,-2 }
}

-- 
David Kastrup

reply via email to

[Prev in Thread] Current Thread [Next in Thread]