Le 09/04/2021 à 09:44, Amir a écrit :
Hi everyone,

I recently started with lilypond. I'm very new to this and still have to figure things out. However, the main reasons I want to use lilypond is to create my own drum excercises. For this I need to do something like the following and I don't know if lilypond is capable of doing this: https://images-na.ssl-images-amazon.com/images/I/813dPdca6LL.jpg

So basically I want to create multiple excercises on a single page that are unconnected and numbered (evenly spread) - probably give all of them an individual title. Could somebody point me in the right direction?

Another option would probably be something like this (https://imgv2-1-f.scribdassets.com/img/document/76606752/original/6338616a09/1615371860?v=1), where everything is connected and numbered, but I love to have it how it is done in the first example.

Thank you for your help.

Amir

Hello,

You want to stack \score blocks in \markup
using the \column command. A custom markup
command can spare the boilerplate of definitions
repeated between scores. Here is an example:

\version "2.22.0"

#(set-global-staff-size 17)

#(define-markup-command (exercise layout props n pattern) (string? ly:music?)
   (interpret-markup layout props
     #{
       \markup \score {
         \new Staff \with {
           instrumentName = #n
           \override InstrumentName.font-size = 3
           \override InstrumentName.self-alignment-X = 0.6
           \override InstrumentName.font-series = #'bold
         } {
           \clef bass
           \time 2/2
           #pattern
         }
         \layout { }
       }
     #}))

\markup \override #'(baseline-skip . 10) {
  \column {
    \exercise "1" {
      \repeat unfold 8 { c8_"R" c_"L" }
     }
    \exercise "2" {
      \repeat unfold 8 { c8_"L" c_"R" }
    }
  }
  \column {
    \exercise "13" {
      \repeat unfold 2 {
        \repeat unfold 4 { c_"R" }
        \repeat unfold 4 { c_"L" }
      }
    }
    \exercise "14" {
      \repeat unfold 2 {
        c8_"R" c_"L" c_"R" c_"L" c_"R" c_"R" c_"L" c_"L"
      }
    }
  }
}

Further reading:

https://lilypond.org/doc/v2.22/Documentation/notation/formatting-text#music-notation-inside-markup

https://lilypond.org/doc/v2.22/Documentation/notation/align

https://lilypond.org/doc/v2.22/Documentation/extending/new-markup-command-definition

http://lilypond.org/doc/v2.22/Documentation/notation/setting-the-staff-size

Best,
Jean


Reply via email to