bug-lilypond
[Top][All Lists]
Advanced

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

Faulty file-naming when outputting multiple \books


From: Michael Hendry
Subject: Faulty file-naming when outputting multiple \books
Date: Wed, 22 Feb 2012 03:13:11 -0800 (PST)

The background to this is described in this thread:

"Is there an equivalent of #define ... #ifndef ... #endif in lilypond?"

Essentially, I'm trying to take common code for the production of jazz
charts out into an \include file, but to be able to exclude (let's say) the
trumpet part for a particular piece, and the thread above describes what I
want to achieve, and several helpful suggestions.

I tried using \tag, but this feature works at the music level, not book
level, and here's a later experiment which demonstrates what appears to me
to be fault in lilypond:

[code]
\version "2.14.0"
% TestTag
% Michael Hendry
% 20th Feb 2012

\header {
    title = "TestTag"
    composer = "Michael Hendry"
    enteredby="MDH"
}

\paper {
    paper-width = 21.0\cm
    paper-height = 29.7\cm
    top-margin = 0.0\cm
    bottom-margin = 0.0\cm
    left-margin = 1.0\cm
    right-margin = 1.0\cm
    ragged-last = ##f
    }

TheHead =  \relative c' {
\clef "treble" \key d \minor \numericTimeSignature \time 4/4
\set Score.markFormatter = #format-mark-box-letters
  { s1*32 }
}
TheChords =  \chords {
        d1:m9|
        s1*31|
 }

% The score definition
% Create four separate "books", each consisting of a lead sheet in a
different key
% (for Guitar, Concert, Bb and Eb instruments respectively).

GuitarBook = 
\book {
        \bookOutputName "TestTag (gtr)"
        \new Score
<<
        \transpose f' f' {\TheChords}
        \new Staff
        \repeat unfold 8 {
        s1 \noBreak s1 \noBreak s1 \noBreak s1 \break }
        \transpose f' f' {\TheHead}
>>
        \header {piece = "Guitar"}
} 

ConcertBook =
\book {
        \bookOutputName "TestTag (concert)"
        \new Score
<<
        \transpose f' f {\TheChords}
        \new Staff
        \repeat unfold 8 {
        s1 \noBreak s1 \noBreak s1 \noBreak s1 \break }
        \transpose f' f {\TheHead}
>>
        \header {piece = "Concert Pitch"}
}

TrumpetBook =
\book { 
        \bookOutputName "TestTag (tpt)"
        \new Score
<<
        \transpose f' g {\TheChords}
        \new Staff
        \repeat unfold 8 {
        s1 \noBreak s1 \noBreak s1 \noBreak s1 \break }
    \transpose f' g {\TheHead}
>>
        \header {piece = "Trumpet"}
}

AltoBook = 
\book {
        \bookOutputName "TestTag (alto)"
        \new Score
<<
        \transpose f' d {\TheChords}
        \new Staff
        \repeat unfold 8 {
        s1 \noBreak s1 \noBreak s1 \noBreak s1 \break }
        \transpose f' d {\TheHead}
>>
        \header {piece = "Alto Sax"}
}
\book { \AltoBook }
\book { \GuitarBook }
\book { \ConcertBook }
\book { \TrumpetBook }
[/code]

What I expect to get is a set of four pdf files...

TestTag (alto).pdf
TestTag (gtr).pdf
TestTag (concert).pdf
TestTag (tpt).pdf

But what actually comes out is:

TestTag (alto).pdf
TestTag (alto)-1.pdf
TestTag (alto)-2.pdf
TestTag (alto)-3.pdf

Surprisingly, if I change the order of creation of the books to...

\book { \GuitarBook }
\book { \ConcertBook }
\book { \TrumpetBook }
\book { \AltoBook }

...the output filenames still refer to "(alto)", but the contents are for
guitar, concert, trumpet and alto respectively.

If this experiment had worked, I'd have been able to take the score
definition part out to an include file, and (for example) comment out the
\book { TrumpetBook } line if I didn't need a trumpet part for the
particular piece.

David Kastrup has been very helpful, and suggests that I develop what I'm
trying to do into a more coherent whole. I'll see what I can come up with!
-- 
View this message in context: 
http://old.nabble.com/Faulty-file-naming-when-outputting-multiple-%5Cbooks-tp33370145p33370145.html
Sent from the Gnu - Lilypond - Bugs mailing list archive at Nabble.com.




reply via email to

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