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
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to