lilypond-user
[Top][All Lists]
Advanced

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

Snippet for conditional score compilation


From: Saul Tobin
Subject: Snippet for conditional score compilation
Date: Thu, 16 Nov 2017 10:31:49 -0800

Hi all,

Here's a short little snippet to turn on or off whether a score is compiled.

\version "2.18.2"

% Swap the commented lines to demonstrate that you can turn the score on and off

flag = ##t
% flag = ##f

compileIf = #(define-void-function (parser location flag score)  (boolean? ly:score?)
           (if flag
               (add-score parser score)
               ))

\compileIf \flag \score {
  \new Staff { c'1 }
  % \new Staff { d'1 }
}

I'm using this to control which movements are compiled across all my instrumental parts from a flag in a single file.

Saul

reply via email to

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