lilypond-user
[Top][All Lists]
Advanced

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

Re: compilable lilypond-book templeat


From: Ernie Braganza
Subject: Re: compilable lilypond-book templeat
Date: Sat, 1 Feb 2014 13:50:16 -0500

This is what I ended up doing. I had a similar problem, but I was including the file at the wrong point in the Set-List.ly file.

%%%%%%%
% Set-List.ly %
%%%%%%

\version "2.18.0"
\include "globalSettings.ily"

\include "ShortninBread_mandolin.ily" %%NOTE: Include this at the top


\paper {
  #(define (print-positive-page-number layout props arg)
     (if (> (chain-assoc-get 'page:page-number props -1) 0)
         (create-page-number-stencil layout props arg)
         empty-stencil))

  #(define (not-last-page layout props arg)
     (if (and (chain-assoc-get 'page:is-bookpart-last-page props #f)
              (chain-assoc-get 'page:is-last-bookpart props #f))
         empty-stencil
         (interpret-markup layout props arg)))

  print-all-headers = ##f
  first-page-number = -1
  tocItemMarkup = \tocItemWithDotsMarkup
  oddHeaderMarkup = \markup \fill-line { " " }
  evenHeaderMarkup = \oddHeaderMarkup
  oddFooterMarkup = \markup \fill-line { \column { \fontsize #-1
    \on-the-fly #not-first-page \on-the-fly #not-last-page
    \on-the-fly #print-positive-page-number \fromproperty #'page:page-number-string
    \on-the-fly #last-page \fromproperty #'header:tagline
  } }
  evenFooterMarkup = \oddFooterMarkup
}

\header {
  title = \markup {
    \lower #50 \left-align \center-column {
      \fontsize #4 \bold "Old-Time Set List"
    }
  }
  subtitle = \markup {
    \lower #4 \left-align \center-column {
      \fontsize #1 \bold "Mandolin"
    }
  }
  tagline = \markup {
    \fontsize #-3.5 {
      \override #'(box-padding . 1.0) \override #'(baseline-skip . 2.7) \box \center-column {
        \line {
          Arr. by Ernie Braganza.
          \line {
            Engraved using LilyPond \simple #(lilypond-version) (http://lilypond.org/)
          }
        }
      }
    }
  }
}

\pageBreak

\markuplist \table-of-contents
\markup \null

\bookpart {
  \paper {
    print-page-number = ##t
  }
  \header {
    title = "Shortnin' Bread"
    subtitle = ##f % prevent overall subtitle from appearing
    composer = "Trad."
  }
  \tocItem \markup { 1. Shortnin' Bread }
  \score {
  <<
    \ShortninBread_chordChanges
    %ShortninBread_MandoChordDiagrams
    \ShortninBread_melody
    \ShortninBread_MandoTab
  >>
   \header { piece = "Mandolin" }
  }
}

%%%%%%%%%%%%%%%
% ShorninBread_mandolin.ily%
%%%%%%%%%%%%%%%

\version "2.18.0"
\include "globalSettings.ily"

ShortninBread_settings = {
  \globalSettings
  \key d \major
  \time 2/4
}

ShortninBread_leadPart = \relative c'' {
\ShortninBread_settings
\mark \default
\repeat volta 2 { %start repeat
  d8 b16 b a8 b     | %1
  d16 d b8 a4       | %2
  d8 b a b16 b      | %3
  fis16 fis e8 d4   | %4
  \break
  d'8 b16 b a a b b | %5
  d8 b a4           | %6
  d8 b a16 a b8     | %7
  fis8 e8 d4        | %8
  } %end repeat
\break
\mark \default
\repeat volta 2
  { %start repeat
  d16 d b' b a a b8  |%9
  d,8 b' a b         |%10
  d,16 d b' b a a b8 |%11
  fis8 e d4          |%12
  \break
  d16 d b' b a a b8  |%13
  d,8 b' a b         |%14
  d,16 d b' b a a b8 |%15
  fis8 e d4          |%16
  } %end repeat
}

ShortninBread_chordPart = \chordmode {
  \ShortninBread_settings
  d4 d4  |%1
  d4 d4  |%2
  d4 d4  |%3
  a4 d4  |%4
  d4 d4  |%5
  d4 d4  |%6
  d4 d4  |%7
  a4 d4  |%8
  d4 d4  |%9
  d4 d4  |%10
  d4 d4  |%11
  a4 d4  |%12
  d4 d4  |%13
  d4 d4  |%14
  d4 d4  |%15
  a4 d4  |%16
}

ShortninBread_chordChanges = \new ChordNames
{
  \set chordChanges = ##t
  \ShortninBread_chordPart
}

ShortninBread_MandoChordDiagrams = \new FretBoards
{
  \include "predefined-mandolin-fretboards.ly"
  \set Staff.stringTunings = #mandolin-tuning
  \set chordChanges = ##t
  \ShortninBread_chordPart
}

ShortninBread_melody = \new Staff
{
  \clef "treble"
  \ShortninBread_leadPart
}
ShortninBread_MandoTab =  \new TabStaff
{
  \clef "moderntab"
  \set TabStaff.stringTunings = #mandolin-tuning
  \ShortninBread_leadPart
}



On Sat, Feb 1, 2014 at 10:01 AM, MING TSANG <address@hidden> wrote:
Federico & Ernie:
I try to adapt Nick's sample by replacing line 70 with \include my lily full score  and I got the following error
ti="從榮耀降臨" %title
I am not quite sure how to wrap the the score block in my original lily file which contains \include statement with variables for \header? The score is a full lily code with \header & \paper and \midi.

Then I try the following:

\version "2.19.0"
\include "calypso-lullaby\calypso-lullaby.ly"
\pageBreak
\include "Down-from-his-glory\down-from-his-glory.ly"
\pageBreak
\include "forever-thanks\forever-thanks.ly"
\pageBreak

I got the title of the third score ( title for score 1 and 2 disappear - was replace by the third score).  The page number becomes   1 to 16 for the three scores (first score has 8 pages, second score has 1 page & third score has 7 pages).  I was hoping each score retains it page number and header.  Please note:  each score is a full lily code with \header & \paper and \midi.

Any insights and recommendations and/or solutions are appreciated.
Emmanuel,
Ming




 


On Saturday, February 1, 2014 3:28:10 AM, Federico Bruni <address@hidden> wrote:
I also suggest using just lilypond (lilypond-book makes sense only if you write a lot  of text and want to insert some music fragment).
Of course you'll have to adapt Nick's template and replace the \bookpart blocks with an \include statement and then wrap the \score block in the included files inside a \bookpart.


2014/2/1 Ernie Braganza <address@hidden>
This was just posted on the list by Nick Payne <address@hidden>. Hope it helps.


On Fri, Jan 31, 2014 at 8:36 PM, MING TSANG <address@hidden> wrote:
Hi, lilyponders:
Over the years (since lilypond v2.14) I have coded 25+ hymns for our choir. I like to put them in book form.  Is there a lilypond-book template available (compilable - just include my 25+ hymns)? I like to have title page, table of content and each hymn starts on a new page.  If possible to have page number for each hymn, but also have overall page number for the whole book.  I know it is a tall request, but I have not done lilypond-book before. I have no knowledge of laTex. Appreciate any help.
Emmanuel,
Ming

_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user




_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user






reply via email to

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