[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Defining new contexts
From: |
Jim Long |
Subject: |
Defining new contexts |
Date: |
Mon, 23 Feb 2015 00:56:26 -0800 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
I'm experimenting with defining and using custom contexts.
I have not succeeded in applying the example at:
http://lilypond.org/doc/v2.18/Documentation/notation/defining-new-contexts
to my tiny example below attempting the creation of a custom
ChordNames context. The '\new XChords' line throws a warning:
GNU LilyPond 2.18.2
Processing `foo.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Interpreting music...
warning: cannot find or create new `XChords'
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `foo.ps'...
Converting to `./foo.pdf'...
Success: compilation successfully completed
How can I modify the second score's source to have the scores
engrave the same in the output file?
Thank you!
Jim
\version "2.18.2"
\score {
\layout {
\context {
\ChordNames
\override ChordName.font-size = #12
} % context
} % layout
<<
\new ChordNames \chordmode { c1 }
\new Staff \chordmode { c1 }
>>
}
\score {
\layout {
\context {
\name XChords
\alias ChordNames
\override ChordName.font-size = #12
\type "Engraver_group"
} % context
} % layout
<<
\new XChords \chordmode { c1 }
\new Staff \chordmode { c1 }
>>
}