0

I have a lilypond file with at least one score and a header. When compiling this single song e.g. with

lilypond-windows -ddelete-intermediate-files -dno-point-and-click --pdf example.ly

the full song (including title and composer from the header) is generated:

enter image description here

Is it possible to add commandline switches that print only the score(s) without the header information without stripping the possibility to compile the full stand-alone file?

MWE (if it is much easier we can start also with a single-score example):

\header {
  title = "SUITE I."
  composer = "J. S. Bach."
}

\score {
  \new Staff \relative g, {
    \clef bass
    \key g \major
    \repeat unfold 2 { g16( d' b') a b d, b' d, } |
    \repeat unfold 2 { g,16( e' c') b c e, c' e, } |
  }
  \header {
    piece = "Prélude."
  }
}

\score {
  \new Staff \relative b {
    \clef bass
    \key g \major
    \partial 16 b16 |
    <g, d' b'~>4 b'16 a( g fis) g( d e fis) g( a b c) |
    d16( b g fis) g( e d c) b(c d e) fis( g a b) |
  }
  \header {
    piece = "Allemande."
  }
}

(Score/Example taken from Lilypond manual)

kromuchi
  • 187
  • 1
  • 9
  • I don't know of any such command but you could solve this by removing the header section from your files and then creating a new master file containing only the previously removed header followed by a series of include commands pointing to those individual files with the scores. This way, compiling the individual score files will not output a header but compiling the master file will. Hopefully this is not too cumbersome. – gilbertohasnofb Sep 08 '18 at 22:22
  • It is not suitable to separate the score from the rest for each file (there are plenty that should be printable on their own but for a new collection I want only the scores) but I hoped to find a command that can be placed into a new ini file that would kindof commend out specific areas of the initial file – kromuchi Sep 11 '18 at 18:56
  • I agree with Gilberto. It's a common and useful practice separating a piece in a includable file containing only definitions (the music) and another file (or more) containing the commands which will generate the output. What you need is not supported but it sounds like a feature similar to the current `-dno-print-pages` option (see [Advanced command line options, Usage Manual](http://lilypond.org/doc/v2.19/Documentation/usage/command_002dline-usage.html#advanced-command-line-options-for-lilypond)). – fedelibre Sep 12 '18 at 17:04
  • (If I understand you correctly,) I disagree. Imagine you have 50 songs. That would implicate 50 music definition files, 50 files for the normal page output and another 50 files for the stripped score-only layouts. I find this very insufficient - I would prefer the 50 definition files (music) with 2 different layout definition files (valid for all songs) that are included in each definition file. I don't know if it is more suitable to load the desired layout file directly via command line (then: how to disable specific header outputs) or if you can use command line variables with conditionals. – kromuchi Sep 16 '18 at 18:35

0 Answers0