lilypond-user
[Top][All Lists]
Advanced

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

Re: Tune structure when used in \book


From: Ralph Palmer
Subject: Re: Tune structure when used in \book
Date: Mon, 29 Jul 2019 08:40:33 -0400

On Mon, Jul 29, 2019 at 6:27 AM John McWilliam <address@hidden> wrote:

 

I have a large number of pipe tunes and have been trying gather them into a book. I am almost there but have run into problem with the variables I use for each tune part (verse/variation). Briefly, my tunes are structured:

 

------------------------------

Settings

%\Include bagpip.ly

 

PartA = {}

PartB = {}

 

Score {

                \PartA

                \PartB

       }

 

----------------------------------

 

Briefly my book is structured:

 

Settings

\include bagpipe.ly

 

\book {\bookpart}

 

----------------------------------

 

I can compile each tune separately if I include bagpipe.ly. To compile the book I must comment out this since it is included in the book at top level, however, I get errors indicating that the functions in bagpipe.ly are not found. If I do away with the variables and move the music into the score, everything works. This is a pity as it makes my tune files less readable. Is there a way around this?

 

John McWilliam


Hi, John McWilliam -

I did something similar, I think, with fiddle tunes. I had a separate file for the musical content of each tune (notes, meters, markups, etc.), and actually kept those files in separate folders, since I was making multiple books. The books had the same tunes, but different formats - one was a large format (fewer tunes per page) and the other was a small format. I then had a separate .ly file for each book (like small.ly and large.ly), as well as two .ily files (small.ily and large.ily) for global functions for the two books. It sounds like you would only need to do one .ily file, and that you could put all your tune files (tuneOne.ly, tuneTwo.ly, . . .) in the same folder with the main file and the .ily file. The structure of the main file (e.g., tunes.ly) could be like this, for example:

~~~~~~~~~~~~~~~~~~~~~~~~~~

\version "2.19.81"
\language "english"

\include "GlobalSettings.ily"
\include "tuneOne.ly"        % In my case, I had to do \include "Tune1/Tune1.ly", because I had each tune in a separate folder.
\include "tuneTwo.ly"

%%%%  My own version of how I wanted the composer and source to appear  %%%%%%%%%%%%%%%%%
\paper {
  scoreTitleMarkup = \markup {
    \fill-line {
      { \column {
        \fromproperty #'header:title
        }
        { \fromproperty #'header:composer
        }
      }
    }
  }
}

%%%%% The title of the set, for the first page.  %%%%%
\book {
  % Title of set.
  \header {
    subtitle = \markup { \fontsize #4 "Title of the Set"}
  }

%%%%% Then, the individual tunes.  %%%%%
  % Tune One
  \score {
    \relative c' { 
      { \tuneOne }
    }
    \layout {
      indent = #0
      \context {
        %prevent tunes from printing on two pages
        \override NonMusicalPaperColumn.page-break-permission = ##f
      }
    }
   
    % Title of this tune.
    \header {
      title = \markup \large \bold "Tune One"
      composer = \markup \bold {"Composer"}
    }
  }
%%%%%%  These next two lines help keep tunes from being broken onto multiple pages and, I think, help with spacing at the bottom of the page and between tunes.  %%%%%
  \noPageBreak
  \markup  \fill-line { "" }

  % Tune Two
  \score {
    \relative c' {     
      { \tuneTwo }
    }
    \layout {
      indent = #0
      \context {
        %prevent tunes from printing on two pages
        \override NonMusicalPaperColumn.page-break-permission = ##f
      }
    }
   
    % Title and meter of this tune.
    \header {
      title = \markup \large \bold "Tune Two"
      composer = \markup \bold {"Composer"}
    }
  }
  \noPageBreak
}

~~~~~~~~~~~~~~~~~~~~~

The structure I used for individual tune files was like this for, say, Tune One (tuneOne.ly) :
~~~~~~~~~~~~~~~~~~
% Tune One
\version "2.19.49"
\language "english"

tuneOne = \relative c' {
  \clef clef  % i.e., treble, bass, alto, etc.
  \key bf \major
  \time 2/4
  \set Score.markFormatter = #format-mark-box-alphabet       % I used rehearsal marks - A, B, C - to indicate the parts of the tune.
 
  %Part A
   ...music...
 
  %Part B
   ...music...
}

~~~~~~~~~~~~~~~~

In my GlobalSettings.ily file, I included settings for paper size, margins, spacing, staff size, and context.

I'd be happy to share more with you, perhaps off list, if you wish. If you want to see my full collection, to see how it looks "in the flesh", both the large and small formats are available as PDFs from my Google Drive folder at <https://drive.google.com/open?id=1euNCa3b7xbmr8lDaUubwc5O1h31_bBaQ>, or I can send you a zip file of one or both formats. If you want me to send you the zip files or for further discussion, please contact me off list.


--
Ralph Palmer
Brattleboro, VT
USA
address@hidden

reply via email to

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