lilypond-user
[Top][All Lists]
Advanced

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

Re: Book of tunes with an index


From: Christopher R. Maden
Subject: Re: Book of tunes with an index
Date: Wed, 13 Dec 2017 16:25:23 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

On 12/13/2017 04:02 PM, Ralph Palmer wrote:
I'm running LilyPond 2.19.80 under Linux/Ubuntu 16.04.

I have a fair amount of experience with LilyPond, but none with lilypond-book or LaTeX.

I'm assembling a collection of fiddle tunes, and I'd like an index.
I thought of using a table of contents, but that won't quite work, I
don't think. The problem is that some tunes are known by multiple
names, and I'd like a quick way to find a tune under any of its
names. I'd like the index to precede the tunes (like a table of
contents).

Is there a fairly straightforward way to accomplish this? The
learning curve for LaTeX seems rather steep, and I don't think I
would need LaTex for anything besides the index. Same with
lilypond-book. I could be mistaken.

I already have the tunes transcribed, with alternative titles. I also
have a spreadsheet that contains columns for title, two or three
alternative titles, and the LY filename.

I’m not aware of a straightforward way to accomplish this.

What I did was to make an XML file of my tunes:

<?xml version="1.0"?>
<tunes longest-src="Ess.I.S.T. p.99">
  <title>crism’s tunes</title>
  <tune-group tune-type="Reel">
    ...
    <tune xml:id="oranmore" key="Dmaj" src="Ess.I.S.T. p.10"
      tag="oranmore" tempo="240 4">
      <title sorts="bucks-of-oranmore,the">The Bucks of
        Oranmore</title>
      <alt-title sorts="bucks-of-carranmore,the">The Bucks of
        Carranmore</alt-title>
      <alt-title sorts="bucks-of-cranmore,the">The Bucks of
        Cranmore</alt-title>
      <alt-title sorts="hearty-bucks,the">The Hearty Bucks</alt-title>
      <arranger>
        <person>
          <name>
            <given-name>Dave</given-name>
            <family-name>Mallinson</family-name>
          </name>
        </person>
      </arranger>
      <arranger>
        <person>
          <name>
            <given-name>Chris</given-name>
            <family-name>Maden</family-name>
          </name>
        </person>
      </arranger>
    </tune>
    ...
  </tune-group>
  ...
</tunes>

For each tune, I have a file called id_music.ly (oranmore_music.ly in this case) that defines a variable called idLayout (oranmoreLayout for this one) with music suitable for including in a LilyPond score object.

I run XSLT to generate a LilyPond file that looks like this:

\version "2.16.2" % I need to update the conversion to 2.18 now...
#(set-default-paper-size "letter")
\paper {
  bottom-margin = 0.5\in
  left-margin = 0.75\in
  line-width = 7.25\in
  print-all-headers = ##t
  right-margin = 0.5\in
  top-margin = 0.5\in
}
\include "oranmore_tune.ly"
% ...
\book {
  \header {
    title = "crism’s tunes"
  }
  \markuplist \table-of-contents
  \bookpart {
    \tocItem \markup {
      \bold "Reels"
    }
    \header {
      title = "Reels"
    }
    \tocItem \markup { \hspace #2 "The Bucks of Oranmore" }
    \label #'oranmore
    \score {
      \oranmoreLayout
      \header {
        arranger = "arr. Mallinson, Maden"
        subtitle =
        \markup {
          \tiny {
            \medium {
              \italic {
                \center-column {
"The Bucks of Carranmore; The Bucks of Cranmore; The Hearty Bucks"
                }
              }
            }
          }
        }
        title =
        \markup {
          \large {
            "The Bucks of Oranmore"
          }
        }
      }
      \layout {}
    }
% ...
  }
% ...
  \bookpart {
    \tocItem \markup {
      \bold "Tunes by Key"
    }
    \header {
      title = "Tunes by Key"
    }
    \markuplist {
      \column-lines {
% ...
        \line { \bold "D maj, B min, E dor, A mix (♯♯)" }
        \line { \hspace #2 \italic "Reels" }
% ...
        \line { \hspace #4 "The Bucks of Oranmore (Dmaj)" }
% ...
      }
    }
  }
  \bookpart {
    \tocItem \markup {
      \bold "Index"
    }
    \header {
      title = "Index"
    }
    \markuplist {
      \column-lines {
% ...
        \vspace #0.5
        \line { \hspace #30 \bold { "= B =" } }
% ...
\line { \page-ref #'oranmore "Ess.I.S.T. p.99" "Ess.I.S.T. p.10" \hspace #1 …… \hspace #1 \concat { "The Bucks of Carranmore (" \italic { "The Bucks of Oranmore" } ")" } } \line { \page-ref #'oranmore "Ess.I.S.T. p.99" "Ess.I.S.T. p.10" \hspace #1 …… \hspace #1 \concat { "The Bucks of Cranmore (" \italic { "The Bucks of Oranmore" } ")" } } \line { \page-ref #'oranmore "Ess.I.S.T. p.99" "Ess.I.S.T. p.10" \hspace #1 …… \hspace #1 \italic { "The Bucks of Oranmore" } }
% ...
        \vspace #0.5
        \line { \hspace #30 \bold { "= H =" } }
% ...
\line { \page-ref #'oranmore "Ess.I.S.T. p.99" "Ess.I.S.T. p.10" \hspace #1 …… \hspace #1 \concat { "The Hearty Bucks (" \italic { "The Bucks of Oranmore" } ")" } }
% ...
      }
    }
  }
}

This allows cross-referencing of all the tunes in my collection by key and alternative titles, including the ones I haven’t transcribed yet.

The XSLT also generates a standalone file:

\version "2.16.2"
\include "oranmore_tune.ly"
theArranger = "arr. Mallinson, Maden"
theComposer = ##f
theFullChords = \oranmoreFullChords
theFullTune = \oranmoreFullTune
theLayout = \oranmoreLayout
theSubtitle =
\markup {
  \tiny {
    \medium {
      \italic {
        \center-column {
"The Bucks of Carranmore; The Bucks of Cranmore; The Hearty Bucks"
        }
      }
    }
  }
}
theTempo = #(ly:make-moment 240 4)
theTitle = "The Bucks of Oranmore"
\include "tunes.ly"

... for generating a single-sheet version of the tune and a MIDI file (with the help of tunes.ly).

Something analogous could be done in LaTeX as well, but I’ve been more in the XML world than TeX for the last 20 years or so. I’m happy to share the details with interested parties.

~Chris
--
Chris Maden, text nerd
<URL: http://crism.maden.org/ >
Emperor Norton had the right idea.



reply via email to

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