compases, como por ejemplo @code{s1*23}.
@cindex compresión de música
-@funindex \compressMusic
+@funindex \scaleDurations
De la misma forma, se pueden comprimir por una fracción trozos de
música más largos, como si cada nota, acorde o silencio tuviera la
que lo hace es:
@example
-\compressMusic #'(@emph{numerador} . @emph{denominador}) @{ @emph{música} @}
+\scaleDurations #'(@emph{numerador} . @emph{denominador}) @{ @emph{música} @}
@end example
@noindent
% Normal durations
<c a>4 c8 a
% Scale music by *2/3
-\compressMusic #'(2 . 3) {
+\scaleDurations #'(2 . 3) {
<c a f>4. c8 a f
}
% Scale music by *2
-\compressMusic #'(2 . 1) {
+\scaleDurations #'(2 . 1) {
<c' a>4 c8 b
}
@end lilypond
selon le cas en utilisant @code{timeSignatureFraction} pour obtenir la
division adéquate pour chaque portée. Les durées, dans chacune des
portées, seront alors échelonnées par rapport à la métrique commune.
-L'échelle de représentation se règle avec @code{\compressMusic} ---
+L'échelle de représentation se règle avec @code{\scaleDurations} ---
qui fonctionne comme @code{\times}, sans toutefois créer de crochet.
La syntaxe appropriée est :
@example
-\compressMusic #'(@var{numérateur} . @var{dénominateur}) @var{exprmusicale}
+\scaleDurations #'(@var{numérateur} . @var{dénominateur}) @var{exprmusicale}
@end example
\new Staff {
\time 3/4
\set Staff.timeSignatureFraction = #'(9 . 8)
- \compressMusic #'(2 . 3)
+ \scaleDurations #'(2 . 3)
\repeat unfold 6 { c8[ c c] }
}
\new Staff {
\time 3/4
\set Staff.timeSignatureFraction = #'(10 . 8)
- \compressMusic #'(3 . 5) {
+ \scaleDurations #'(3 . 5) {
\repeat unfold 2 { c8[ c c] }
\repeat unfold 2 { c8[ c] }
| c4. c4. \times 2/3 { c8 c c } c4
@snippets
-@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
-{chord-names-jazz.ly}
@c TODO fix indentation of snippet -- lots of tabs!
@cindex exceptions, chord names.
@seealso
+Notation Reference:
+@ref{Chord name chart}.
+
Installed Files:
@file{scm/@/chords@/-ignatzek@/.scm},
@file{scm/@/chord@/-entry@/.scm},
@cindex String numbers
-String numbers can be added to chords, by indicating the string number
-with @code{\}@var{number},
+The string on which a note should be played may be indicated by
+appending @code{\}@tie{}@var{number} to a note inside a chord
+construct (@code{<>}).
-@lilypond[relative,relative=1,ragged-right,fragment]
-<c\1 e\2 g\3>
+@warning{String numbers @strong{must} be defined inside a chord
+construct even if there is only a single note.}
+
+@lilypond[verbatim,quote,relative=2]
+<c\5>4 <e\4> <g\3>2
+<c,\5 e\4 g\3>1
+@end lilypond
+
+Although fingering is covered in detail elsewhere, it is worth noting
+here how fingerings and string indications behave together, since
+guitar music often incorporates both at once. The usual convention
+is to place the fingering closest to the note, then the string
+indication outside the fingering. This is controlled by the order in
+which the two items appear:
+
+@lilypond[verbatim,quote,relative=2]
+<g\3-0>2
+<g-0\3>
@end lilypond
+@snippets
+
+@ignore
+@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
+{controlling-the-placement-of-chord-fingerings.ly}
+@end ignore
@seealso
Tablature notation is used for notating music for plucked string
instruments. Pitches are not denoted with note heads, but by
-numbers indicating on which string and fret a note must be played. LilyPond
-offers limited support for tablature.
+numbers indicating on which string and fret a note must be played.
+LilyPond offers limited support for tablature.
The string number associated to a note is given as a backslash
followed by a number, e.g., @code{c4\3} for a C quarter on the third
\set TabStaff.minimumFret = #8
e16 fis gis a b4
@end example
+
@lilypond[quote,ragged-right]
frag = {
\key e \major
@cindex fret diagrams
@cindex chord diagrams
-Fret diagrams can be added to music as a markup to the desired note. The
-markup contains information about the desired fret diagram, as shown in the
-following example
+Fret diagrams can be added to music as a markup to the desired note.
+The markup contains information about the desired fret diagram.
+There are three different fret-diagram markup interfaces: standard, terse,
+and verbose. The three interfaces produce equivalent markups, but have
+varying amounts of information in the markup string. Details about the
+markup interfaces are found at @ref{Text markup commands}.
+
+The following example shows the three fret-diagram markup interfaces,
+along with examples of common tweaks. For example, the size of the verbose
+fret diagram is reduced to 0.75, and the finger indications are specified
+to appear below the diagram. The terse diagram includes tweaks to
+specify placement of finger code and color of dots.
@lilypond[verbatim, ragged-right, quote]
\new Voice {
fis'^\markup \override #'(size . 0.75) {
\override #'(finger-code . below-string) {
\fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
- (place-fret 5 4 3) (place-fret 4 4 4)
- (place-fret 3 3 2) (place-fret 2 2 1)
+ (place-fret 5 4 3)
+ (place-fret 4 4 4)
+ (place-fret 3 3 2)
+ (place-fret 2 2 1)
(place-fret 1 2 1))
}
}
}
@end lilypond
-
-There are three different fret-diagram markup interfaces: standard, terse,
-and verbose. The three interfaces produce equivalent markups, but have
-varying amounts of information in the markup string. Details about the
-markup interfaces are found at @ref{Text markup commands}.
-
You can set a number of graphical properties according to your preference.
Details about the property interface to fret diagrams are found at
@rinternals{fret-diagram-interface}.
@node Right hand fingerings
@subsubsection Right hand fingerings
-Right hand fingerings in chords can be entered using
-@code{@var{note}-\rightHandFinger @var{finger}}
+Right-hand fingerings @var{p-i-m-a} can be entered using
+@code{<@var{note}-\rightHandFinger @var{finger} >}.
+The right-hand fingering indication must occur within a @code{<>} chord
+construct for it to be printed in the score, even if it is a single note.
+There must be a hyphen after the note and the space
+before the closing @code{>}.
-@lilypond[verbatim,fragment,relative=2]
- <c-\rightHandFinger #1 e-\rightHandFinger #2 >
+
+@lilypond[quote,ragged-right,fragment,verbatim]
+\relative c' {
+ <c-\rightHandFinger #1 >4
+ <e-\rightHandFinger #2 >
+ <g-\rightHandFinger #3 >
+ <c-\rightHandFinger #4 >
+ <c,-\rightHandFinger #1 e-\rightHandFinger #2 g-\rightHandFinger #3 c-\rightHandFinger #4 >1
+}
@end lilypond
for brevity, you can abbreviate @code{\rightHandFinger} to something
@snippets
-You may exercise greater control over right handing fingerings by
-setting @code{strokeFingerOrientations},
+You may exercise greater control over the placement of right-hand
+fingerings by setting @code{strokeFingerOrientations},
@lilypond[quote,verbatim,ragged-right,fragment,relative=1]
#(define RH rightHandFinger)
\override StrokeFinger #'digit-names = ##("x" "y" "z" "!" "@")
<c-\RH #5 >4
<c-\RH "@">4
+ <c-\RH #2 >4
+ <c-\RH "z">4
+}
+@end lilypond
+
+This example combines left-hand fingering, string indication, and
+right-hand fingering
+
+@lilypond[quote,ragged-right,fragment,verbatim]
+#(define RH rightHandFinger)
+\relative c' {
+ <c-3\5-\RH #1 >4
+ <e-2\4-\RH #2 >
+ <g-0\3-\RH #3 >
+ <c-1\2-\RH #4 >
}
@end lilypond
The file @file{scm/@/output@/-lib@/.scm} contains predefined banjo tunings.
+
+
FIXME: don't complain about anything in this chapter. It's still
under heavy development.
-FIXME: add comments
-@verbatim
-% %{
-@end verbatim
-to 3.1.
-
@menu
-* Input structure::
-* Useful concepts and properties::
-* Titles and headers::
-* Working with input files::
-* Controlling output::
+* Input structure::
+* Useful concepts and properties::
+* Titles and headers::
+* Working with input files::
+* Controlling output::
@end menu
these files end with @code{.ly}.
@menu
-* Structure of a score::
-* Multiple scores in a book::
-* File structure::
+* Structure of a score::
+* Multiple scores in a book::
+* File structure::
@end menu
@node Structure of a score
@subsection Structure of a score
-A @code{\score} must contain a single music expression. However,
-this music expression may be of any size. Recall that music
-expressions may be included inside other expressions to form
-larger expressions. All of these examples are single music
-expressions; note the curly braces @{ @} or angle brackets <<
->> at the beginning and ending of the music.
+@funindex \score
+
+A @code{\score} block must contain a single music expression
+delimited by curly brackets:
+
+@example
+\score @{
+...
+@}
+@end example
+
+@warning{There must be @strong{only one} outer music expression in
+a @code{\score} block, and it @strong{must} be surrounded by
+curly brackets.}
+
+This single music expression may be of any size, and may contain
+other music expressions to any complexity. All of these examples
+are music expressions:
@example
@{ c'4 c' c' c' @}
@end example
-@lilypond[ragged-right,verbatim,quote]
+@lilypond[verbatim,quote]
{
{ c'4 c' c' c'}
{ d'4 d' d' d'}
}
@end lilypond
-@lilypond[ragged-right,verbatim,quote]
+@lilypond[verbatim,quote]
<<
\new Staff { c'4 c' c' c' }
\new Staff { d'4 d' d' d' }
@}
@end example
+Comments are one exception to this general rule. (For others see
+@ref{File structure}.) Both single-line comments and comments
+delimited by @code{%@{ .. %@}} may be placed anywhere within an
+input file. They may be placed inside or outside a @code{\score}
+block, and inside or outside the single music expression within a
+@code{\score} block.
+
+@seealso
+
+Learning Manual:
+
+@rlearning{Working on input files},
+@rlearning{Music expressions explained},
+@rlearning{Score is a single (compound) music expression}.
+
@node Multiple scores in a book
@subsection Multiple scores in a book
@funindex \book
@cindex movements, multiple
-A document may contain multiple pieces of music and texts. Examples
+A document may contain multiple pieces of music and text. Examples
of these are an etude book, or an orchestral part with multiple
movements. Each movement is entered with a @code{\score} block,
@funindex \book
-All the movements and texts which appear in the same @code{.ly} file
-will normally be typeset in the form of a single output file.
+All the movements and texts which appear in the same @code{.ly} file
+will normally be typeset in the form of a single output file.
@example
\score @{
@node File structure
@subsection File structure
-A @code{.ly} file contains any number of toplevel expressions, where a
-toplevel expression is one of the following
+@funindex \paper
+@funindex \midi
+@funindex \layout
+@funindex \header
+@funindex \score
+@funindex \book
-@itemize
+A @code{.ly} file may contain any number of toplevel expressions, where a
+toplevel expression is one of the following:
+
+@itemize @bullet
@item
An output definition, such as @code{\paper}, @code{\midi}, and
@code{\layout}. Such a definition at the toplevel changes the default
-settings for the block entered.
+book-wide settings. If more than one such definition of
+the same type is entered at the top level any definitions in the later
+expressions have precedence.
@item
A direct scheme expression, such as
@item
A @code{\score} block. This score will be collected with other
toplevel scores, and combined as a single @code{\book}.
-
This behavior can be changed by setting the variable
@code{toplevel-score-handler} at toplevel. The default handler is
defined in the init file @file{scm/@/lily@/.scm}.
-The @code{\score} must begin with a music expression, and may
-contain only one music expression.
-
@item
A @code{\book} block logically combines multiple movements
-(i.e., multiple @code{\score} blocks) in one document. If there are
-a number of @code{\scores}, one output file will be created for
-each @code{\book} block, in which all corresponding movements are
-concatenated. The only reason to explicitly specify @code{\book} blocks
-in a @code{.ly} file is if you wish multiple output files from a single
-input file. One exception is within lilypond-book documents, where you
-explicitly have to add a @code{\book} block if you want more than a
-single @code{\score} or @code{\markup} in the same example.
-
-This behavior can be changed by setting the variable
-@code{toplevel-book-handler} at toplevel. The default handler is
-defined in the init file @file{scm/@/lily@/.scm}.
+(i.e., multiple @code{\score} blocks) in one document. If there
+are a number of @code{\score}s, one output file will be created
+for each @code{\book} block, in which all corresponding movements
+are concatenated. The only reason to explicitly specify
+@code{\book} blocks in a @code{.ly} file is if you wish to create
+multiple output files from a single input file. One exception is
+within lilypond-book documents, where you explicitly have to add
+a @code{\book} block if you want more than a single @code{\score}
+or @code{\markup} in the same example. This behavior can be
+changed by setting the variable @code{toplevel-book-handler} at
+toplevel. The default handler is defined in the init file
+@file{scm/@/lily@/.scm}.
@item
A compound music expression, such as
@cindex variables
@item
-An variable, such as
+A variable, such as
@example
foo = @{ c4 d e d @}
@end example
@example
\layout @{
- % movements are non-justified by default
+ % Don't justify the output
ragged-right = ##t
@}
@item @code{\include}
@item @code{\sourcefilename}
@item @code{\sourcefileline}
+@item
+A single-line comment, introduced by a leading @code{%} sign.
+
+@item
+A multi-line comment delimited by @code{%@{ .. %@}}.
@end itemize
+@seealso
+
+Learning Manual:
+@rlearning{How LilyPond input files work}.
@node Useful concepts and properties
@section Useful concepts and properties
@menu
-* Input modes::
-* When to add a -::
-* Controlling direction and placement::
-* Distances and measurements::
-* Spanners::
+* Input modes::
+* Controlling direction and placement::
+* Distances and measurements::
+* Spanners::
@end menu
@node Input modes
@subsection Input modes
-\notemode
+The way in which the notation contained within an input file is
+interpreted is determined by the current input mode.
-\notemode turns the front end of LilyPond into note mode
-(which is the default parsing mode).
-It's certainly useful in certain situations, for example if you
-are in \lyricmode or \chordmode or ... and want to insert
-something that only can be done with \notemode syntax.
+@strong{Chord mode}
-See for example
-http://lists.gnu.org/archive/html/lilypond-user/2007-03/msg00418.html
-http://lists.gnu.org/archive/html/lilypond-user/2007-03/msg00218.html
-http://lists.gnu.org/archive/html/lilypond-user/2006-12/msg00236.html
-http://lists.gnu.org/archive/html/lilypond-user/2006-11/msg00061.html
+This is activated with the @code{\chordmode} command, and causes
+input to be interpreted with the syntax of chord notation, see
+@ref{Chord notation}. Chords are rendered as notes on a staff.
+Chord mode is also activated with the @code{\chords} command.
+This also creates a new @code{ChordNames} context and
+causes the following input to be interpreted with the syntax of
+chord notation and rendered as chord names in the @code{ChordNames}
+context, see @ref{Printing chord names}.
-\chords
-\drums
-\fretmode ?
+@strong{Drum mode}
+This is activated with the @code{\drummode} command, and causes
+input to be interpreted with the syntax of drum notation, see
+@ref{Basic percussion notation}.
-@node When to add a -
-@subsection When to add a -
+Drum mode is also activated with the @code{\drums} command.
+This also creates a new @code{DrumStaff} context and causes the
+following input to be interpreted with the syntax of drum notation
+and rendered as drum symbols on a drum staff, see @ref{Basic
+percussion notation}.
+
+@strong{Figure mode}
+
+This is activated with the @code{\figuremode} command, and causes
+input to be interpreted with the syntax of figured bass, see
+@ref{Entering figured bass}.
+
+Figure mode is also activated with the @code{\figures} command.
+This also creates a new @code{FiguredBass} context and causes the
+following input to be interpreted with the figured bass syntax
+and rendered as figured bass symbols in the @code{FiguredBass}
+context, see @ref{Introduction to figured bass}.
+
+@strong{Fret and tab modes}
+
+There are no special input modes for entering fret and tab symbols.
+
+To create tab diagrams, enter notes or chords in note mode and
+render them in a @code{TabStaff} context, see
+@ref{Default tablatures}.
+
+To create fret diagrams above a staff, enter them as markup
+above the notes using the @code{\fret-diagram} command, see
+@ref{Fret diagrams}.
+
+@strong{Lyrics mode}
+
+This is activated with the @code{\lyricmode} command, and causes
+input to be interpreted as lyric syllables with optional durations
+and associated lyric modifiers, see @ref{Vocal music}.
+
+Lyric mode is also activated with the @code{\addlyrics} command.
+This also creates a new @code{Lyrics} context and an implicit
+@code{\lyricsto} command which associates the following lyrics
+with the preceding music.
+
+@strong{Markup mode}
+
+This is activated with the @code{\markup} command, and causes
+input to be interpreted with the syntax of markup, see
+@ref{Text markup commands}.
+
+@c silly work-around for texinfo broken-ness
+@c (@strong{Note...} causes a spurious cross-reference in Info)
+@b{Note mode}
+
+This is the default mode or it may be activated with the
+@code{\notemode} command. Input is interpreted as pitches,
+durations, markup, etc and typeset as musical notation on a staff.
+
+It is not normally necessary to specify note mode explicitly, but
+it may be useful to do so in certain situations, for example if you
+are in lyric mode, chord mode or any other mode and want to insert
+something that only can be done with note mode syntax.
+
+For example, to indicate dynamic markings for the verses of a
+choral pieces it is necessary to enter note mode to interpret
+the markings:
+
+@lilypond[verbatim,relative=2,quote]
+{ c4 c4 c4 c4 }
+\addlyrics {
+ \notemode{\set stanza = \markup{ \dynamic f 1. } }
+ To be sung loudly
+}
+\addlyrics {
+ \notemode{\set stanza = \markup{ \dynamic p 2. } }
+ To be sung quietly
+}
+@end lilypond
-One of these works, the other doesn't.
-@verbatim
-\version "2.11.38"
-{ c'\mp\fermata\accent-\markup { "forcefully"} }
-% { c'\mp\fermata\accent\markup { "forcefully"} }
-@end verbatim
@node Controlling direction and placement
@subsection Controlling direction and placement
-TODO: everything
+TODO: Maybe rename section to "directions".
-By default, LilyPond does a pretty jazz'n job of picking
-directions. But in some cases, it may be desirable to force a
-direction.
+In typesetting music the direction and placement of many items is
+a matter of choice. For example, the stems of notes can
+be directed up or down; lyrics, dynamics, and other expressive
+marks may be placed above or below the staff; text may be aligned
+left, right or center; etc. Most of these choices may be left to
+be determined automatically by LilyPond, but in some cases it may
+be desirable to force a particular direction or placement.
-@verbatim
--
-^ _
-@end verbatim
+@strong{Default actions}
+
+By default some directions are always up or always down (e.g.
+dynamics or fermata), while other things can alternate between
+up or down based on the stem direction (like slurs or accents).
-Also cover
-#UP
-#DOWN
-#LEFT
-#RIGHT.
+@c TODO Add table showing these
-Maybe rename section to "directions".
+@strong{Context layout}
-Also mention \override Foo #'direction = #'DOWN.
+Contexts are positioned in a system from top to bottom in the
+order in which they are encountered. Note, however, that a
+context will be created implicitly if a command is encountered
+when there is no suitable context available to contain it.
-also mention the typical \fooDown, \fooNeutral predefined commands.
+@c TODO Add example ?
+
+The default order in which contexts are laid out can be changed,
+see @ref{Aligning contexts}
+
+@strong{Articulation direction indicators}
+
+When adding articulations to notes the direction indicator,
+@code{^} (meaning @qq{up}), @code{_} (meaning @qq{down}) or
+@code{-} (meaning @qq{use default direction}), can usually be
+omitted, in which case @code{-} is assumed. But a direction
+indicator is @strong{always} required before
+
+@itemize
+@item @code{\tweak} commands
+@item @code{\markup} commands
+@item @code{\tag} commands
+@item string markups, e.g. -"string"
+@item fingering instructions, e.g. @code{-1}
+@item articulation shortcuts, e.g. @code{-.}, @code{->}, @code{--}
+@end itemize
+
+@strong{The direction property}
+
+The position or direction of many layout objects is controlled
+by the @code{direction} property.
+
+The value of the @code{direction} property may be
+set to @code{1}, meaning @qq{up} or @qq{above}, or to @code{-1},
+meaning @qq{down} or @qq{below}. The symbols @code{UP} and
+@code{DOWN} may be used instead of @code{1} and @code{-1}
+respectively. The default direction may be specified by setting
+@code{direction} to @code{0} or @code{CENTER}. Alternatively,
+in many cases predefined commands
+exist to specify the direction. These are all of the form
+
+@noindent
+@code{\xxxUp}, @code{xxxDown}, @code{xxxNeutral}
+
+@noindent
+where @code{xxxNeutral} means @qq{use the default direction}.
+See @rlearning{Within-staff objects}.
+
+In a few cases, arpeggio being the only common example, the value
+of the @code{direction} property specifies whether the object
+is to be placed to the right or left of the parent object. In
+this case @code{-1} or @code{LEFT} means @qq{to the left} and
+@code{1} or @code{RIGHT} means @qq{to the right}. @code{0}
+or @code{CENTER} means @qq{use the default} direction, as before.
+
+@ignore
+These all have side-axis set to #X
+AmbitusAccidental - direction has no effect
+Arpeggio - works
+StanzaNumber - not tried
+TrillPitchAccidental - not tried
+TrillPitchGroup - not tried
+@end ignore
-also mention that some directions are (without other tweaking)
-always up or always down (like dynamics or fermata), while other
-things can alternate between up or down based on the stem direction
-(like slurs or accents).
@node Distances and measurements
DISCUSS after working on other sections.
-TODO: staff spaces, #UP #DOWN #LEFT #RIGHT. Maybe move into tweaks?
+TODO: staff spaces. Maybe move into tweaks?
@node Spanners
some pieces include a lot more information.
@menu
-* Creating titles::
-* Custom titles::
-* Reference to page numbers::
-* Table of contents::
+* Creating titles::
+* Custom titles::
+* Reference to page numbers::
+* Table of contents::
@end menu
S: pytagoreiskt komma,
FI: pytagorinen komma.
-A sequence of fifths starting on C eventually circles back to C, but this C,
-obtained by adding 12 fifths, is 24 @ref{cent}s higher than the C obtained
-by adding 7 octaves. The difference between those two pitches is called the
-Pythagorean comma.
+Originally, the interval by which the sum of six whole tones exceeds the octave
+-- (9:8)^6 - 2:1 = 531441:524288, or 23.5 cents.
+
+Modern acoustical theory defines it as the interval by which twelve fifths
+exceed seven octaves. To put it another way: A sequence of fifths that starts
+on C eventually circles back to C. However, this C is 23.5 @ref{cent}s higher
+than the C obtained by adding 7 octaves. The difference between those two
+pitches is the Pythagorean comma.
@seealso
@ref{cent}, @ref{temperament}.
+
@node quadruplet
@section quadruplet
FI: syntoninen komma, terssien taajuusero luonnollisessa ja
Pytagorisessa viritysjärjestelmässä.
-Difference between the natural third and the third obtained by
-Pythagorean tuning (@ref{Pythagorean comma}), equal to 22@w{ }cents.
+Named after Ptolemy's syntonic diatonic genus. Originally, the difference
+by which the ditone exceeds the pure major third obtained by Pythagorean
+tuning -- (9:8)^2 - 5:4 = 81:80, or 21.5@w{ }cents.
+
+Modern acoustical theory defines it as the interval by which four fifths exceed
+the sum of two octaves plus a major third. (3:2)^4 - (2:1)^2 + (5:4)
+
+This comma is also known as the comma of Didymus, or didymic comma.
+
+@seealso
+
+@ref{Pythagorean comma}
@node system
A sound of definite pitch and duration, as distinct from @emph{noise}.
Tone is a primary building material of music.
-Music from the 20th century may be based on atonal sounds.
+@c Music from the 20th century may be based on atonal sounds. Meh, not so much
@node tonic
measure: the unit of music
bar line: the symbol delimiting a measure NOT barline
note head NOT notehead
+chord construct NOT chord (when referring to <>)
%%%%% TECHNICAL WRITING STYLE
@ignore
GDP TODO list
-\compressMusic -> \scaleDurations.
-approved by Han-Wen; just needs somebody to kick up a fuss about
-it.
-
1.2.3.1 Time signature
Needs an example of beatLength, which is broken (see my recent
mail
@cindex scaling durations
@cindex durations, scaling
-TODO Change \compressMusic to \scaleDurations when implemented.
-
You can alter the duration of single notes, rests or chords by a
fraction @code{N/M} by appending @code{*N/M} (or @code{*N} if
@code{M} is 1) to the duration.
@code{s1*23}.
@cindex compressing music
-@funindex \compressMusic
+@funindex \scaleDurations
Longer stretches of music may be compressed by a fraction in the
same way, as if every note, chord or rest had the fraction as a
% Normal durations
<c a>4 c8 a
% Scale music by *2/3
-\compressMusic #'(2 . 3) {
+\scaleDurations #'(2 . 3) {
<c a f>4. c8 a f
}
% Scale music by *2
-\compressMusic #'(2 . 1) {
+\scaleDurations #'(2 . 1) {
<c' a>4 c8 b
}
@end lilypond
for each staff but replacing the symbol manually by setting
@code{timeSignatureFraction} to the desired fraction and scaling
the printed durations in each staff to the common time
-signature. This done with @code{\compressMusic}, which
+signature. This done with @code{\scaleDurations}, which
is used in a similar way to @code{\times}, but does not create
a tuplet bracket, see @ref{Scaling durations}.
\new Staff {
\time 3/4
\set Staff.timeSignatureFraction = #'(9 . 8)
- \compressMusic #'(2 . 3)
+ \scaleDurations #'(2 . 3)
\repeat unfold 6 { c8[ c c] }
}
\new Staff {
\time 3/4
\set Staff.timeSignatureFraction = #'(10 . 8)
- \compressMusic #'(3 . 5) {
+ \scaleDurations #'(3 . 5) {
\repeat unfold 2 { c8[ c c] }
\repeat unfold 2 { c8[ c] } |
c4. c4. \times 2/3 { c8 c c } c4
@rinternals{ClusterSpannerBeacon},
@rinternals{Cluster_spanner_engraver}.
-@c Examples: @rlsr{contemporary,cluster@/.ly}.
-
@knownissues
Clusters only look good if they span at least two chords; otherwise
note heads with unequal durations are not merged. Rests opposite
a stem are shifted vertically.
-@c old material to delete, I think. -gp
-@c Normally, equal note heads with the same number of dots and the same
-@c note head are automatically merged, while note heads with different note
-@c heads and/or a different number of dots are not.
-@c The following example
-@c has two cases of this, plus an undesired merging (the half-note head
-@c @code{e} is solid):
-@c Note that LilyPond has vertically shifted the rest, which is opposite
-@c of a stem.
-
@lilypond[quote,verbatim,relative=2]
<<
{
- c8 d e d c d e4
- g2 fis
+ c8 d e d c d c4
+ g'2 fis
} \\ {
- c2 c8. b16 a4
- e2 r
+ c2 c8. b16 c4
+ e,2 r
} \\ {
\oneVoice
s1
>>
@end lilypond
-Note heads with different note heads may be merged:
-@c First we will merge the initial half note head with the eighth
-@c note by setting the @code{merge-differently-headed} property of the
-@c @code{NoteCollision} object:
+Note heads with different note heads may be merged, with the exception
+of half-note heads and quarter-note heads:
@lilypond[quote,verbatim,relative=2]
<<
{
\override Staff.NoteCollision #'merge-differently-headed = ##t
- c8 d e d c d e4
- g2 fis
+ c8 d e d c d c4
+ g'2 fis
} \\ {
- c2 c8. b16 a4
- e2 r
+ c2 c8. b16 c4
+ e,2 r
} \\ {
\oneVoice
s1
@end lilypond
Note heads with different dots may be merged:
-@c Similarly, you can merge differently dotted note heads:
@lilypond[quote,relative=2,verbatim]
<<
{
\override Staff.NoteCollision #'merge-differently-headed = ##t
\override Staff.NoteCollision #'merge-differently-dotted = ##t
- c8 d e d c d e4
- g2 fis
+ c8 d e d c d c4
+ g'2 fis
} \\ {
- c2 c8. b16 a4
- e2 r
+ c2 c8. b16 c4
+ e,2 r
} \\ {
\oneVoice
s1
{
\override Staff.NoteCollision #'merge-differently-headed = ##t
\override Staff.NoteCollision #'merge-differently-dotted = ##t
- c8 d e d c d e4
+ c8 d e d c d c4
\shiftOn
- g2 fis
+ g'2 fis
} \\ {
- c2 c8. b16 a4
- e2 r
+ c2 c8. b16 c4
+ e,2 r
} \\ {
\oneVoice
s1
e8 a b c d2
}
+
>>
@end lilypond
-Merging notes by setting @code{merge-differently-headed} and
-@code{merge-differently-dotted} only works for opposing stem
-directions (i.e., to @code{Voice}s 1 and 2).
+Notes are only merged if they have opposing stem directions (i.e., in
+@code{Voice} 1 and 2).
@cindex multiple voices
@cindex polyphonic music
The Internals Reference documentation contains a lot of information
about LilyPond, but even more information can be gathered by
-looking at the internal LilyPond files. To explore these, first
-find the directory appropriate to your system, as follows:
+looking at the internal LilyPond files. To explore these, you must
+first find the directory appropriate to your system. The location
+of this directory depends (a) on whether you obtained LilyPond
+by downloading a precompiled binary from lilypond.org
+or whether you installed it from a package manager (i.e.
+distributed with Linux, or installed under fink or cygwin) or
+compiled it from source, and (b) on which operating system it is
+being used:
-@strong{Download from lilypond.org: Linux}
+@strong{Downloaded from lilypond.org}
+
+@itemize @bullet
+@item Linux
Navigate to
@file{@var{INSTALLDIR}/lilypond/usr/share/lilypond/current/}
-@strong{Download from lilypond.org: MacOS X}
+@item MacOS X
Navigate to
@file{@var{INSTALLDIR}/LilyPond.app/Contents/Resources/share/lilypond/current/}
Terminal, or control-clicking on the LilyPond application and
selecting @q{Show Package Contents}.
-@strong{Download from lilypond.org: Windows}
+@item Windows
Using Windows Explorer, navigate to
@file{@var{INSTALLDIR}/LilyPond/usr/share/lilypond/current/}
-@strong{Installed from a package manager or from source: all}
+@end itemize
+
+@strong{Installed from a package manager or compiled from source}
Navigate to
@file{@var{PREFIX}/share/lilypond/@var{X.Y.Z}/}, where
@var{PREFIX} is set by your package manager or @code{configure}
script, and @var{X.Y.Z} is the LilyPond version number.
-
@smallspace
Within this directory the two interesting subdirectories are
$(MAKE) test
$(MAKE) out=test -C input/regression/ local-test-baseline
$(MAKE) out=test -C input/regression/musicxml local-test-baseline
+ rm -rf out/lybook-testdb/
+
local-check: test
rm -rf $(RESULT_DIR)
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=11
-PATCH_LEVEL=46
+PATCH_LEVEL=47
MY_PATCH_LEVEL=
texidoc = "
This example demonstrates how to do modern transcription of Gregorian
music. Gregorian music has no measure, no stems; it uses only half and
-quarter noteheads, and special marks, indicating rests of different
+quarter note heads, and special marks, indicating rests of different
length.
"
} % begin verbatim
\include "gregorian-init.ly"
- chant = \relative c' {
- \set Score.timing = ##f
- f4 a2 \divisioMinima
- g4 b a2 f2 \divisioMaior
- g4( f) f( g) a2 \finalis
- }
-
- verba = \lyricmode {
- Lo -- rem ip -- sum do -- lor sit a -- met
- }
-
- \score {
- \new Staff <<
- \new Voice = "melody" {
- \chant
- }
- \new Lyrics = "one" \lyricsto melody \verba
- >>
-
- \layout {
- \context {
- \Staff
- \remove "Time_signature_engraver"
- \remove "Bar_engraver"
- \override Stem #'transparent = ##t
- }
- \context {
- \Voice
- \override Stem #'length = #0
- }
- \context {
- \Score
- barAlways = ##t
- }
- }
- }
+chant = \relative c' {
+ \set Score.timing = ##f
+ f4 a2 \divisioMinima
+ g4 b a2 f2 \divisioMaior
+ g4( f) f( g) a2 \finalis
+}
+verba = \lyricmode {
+ Lo -- rem ip -- sum do -- lor sit a -- met
+}
+
+\score {
+ \new Staff <<
+ \new Voice = "melody" \chant
+ \new Lyrics = "one" \lyricsto melody \verba
+ >>
+ \layout {
+ \context {
+ \Staff
+ \remove "Time_signature_engraver"
+ \remove "Bar_engraver"
+ \override Stem #'transparent = ##t
+ }
+ \context {
+ \Voice
+ \override Stem #'length = #0
+ }
+ \context {
+ \Score
+ barAlways = ##t
+ }
+ }
+}
discantusNotes = {
\transpose c' c'' {
- \set Staff.instrumentName = "Discantus "
+ \set Staff.instrumentName = #"Discantus "
% incipit
\clef "neomensural-c1"
altusNotes = {
\transpose c' c'' {
- \set Staff.instrumentName = "Altus "
+ \set Staff.instrumentName = #"Altus "
% incipit
\clef "neomensural-c3"
tenorNotes = {
\transpose c' c' {
- \set Staff.instrumentName = "Tenor "
+ \set Staff.instrumentName = #"Tenor "
% incipit
\clef "neomensural-c4"
bassusNotes = {
\transpose c' c' {
- \set Staff.instrumentName = "Bassus "
+ \set Staff.instrumentName = #"Bassus "
% incipit
\clef "bass"
-transcription-of-ancient-music-with-incipit.ly
+ancient-fonts.ly
chant-or-psalms-notation.ly
adding-a-figured-bass-above-or-below-the-notes.ly
incipit.ly
ancient-notation-template----modern-transcription-of-mensural-music.ly
-ancient-fonts.ly
+transcription-of-ancient-music-with-incipit.ly
ancient-time-signatures.ly
custodes.ly
mensurstriche-layout-bar-lines-between-the-staves.ly
+++ /dev/null
-%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
-%% This file is in the public domain.
-\version "2.11.46"
-
-\header {
- lsrtags = "rhythms, contexts-and-engravers"
-
- texidoc = "
-The @code{measureLength} property, together with
-@code{measurePosition}, determines when a bar line is needed. However,
-when using @code{\\compressMusic}, the scaling of durations makes it
-difficult to change time signatures without making a mess of it.
-Therefore, @code{measureLength} has to be set manually, using the
-@code{ly:make-moment} callback. The second argument must be the same as
-the second argument of @code{\\compressMusic}.
-
-"
- doctitle = "Changing time signatures inside a polymetric section using \\compressMusic"
-} % begin verbatim
-\layout {
- \context {
- \Score
- \remove "Timing_translator"
- \remove "Default_bar_line_engraver"
- }
- \context {
- \Staff
- \consists "Timing_translator"
- \consists "Default_bar_line_engraver"
- }
-}
-
-<<
- \new Staff {
- \compressMusic #'(8 . 5) {
- \time 6/8
- \set Timing.measureLength = #(ly:make-moment 3 5)
- b8 b b b b b
- \time 2/4
- \set Timing.measureLength = #(ly:make-moment 2 5)
- b4 b
- }
- }
- \new Staff {
- \clef bass
- \time 2/4
- c2 d e f
- }
->>
--- /dev/null
+%% Do not edit this file; it is auto-generated from input/new
+%% This file is in the public domain.
+\version "2.11.48"
+\header {
+ lsrtags = "rhythms,contexts-and-engravers"
+ texidoc = "The @code{measureLength} property, together with
+@code{measurePosition}, determines when a bar line is needed. However,
+when using @code{\\scaleDurations}, the scaling of durations makes it
+difficult to change time signatures without making a mess of it.
+Therefore, @code{measureLength} has to be set manually, using the
+@code{ly:make-moment} callback. The second argument must be the same as
+the second argument of @code{\\scaleDurations}."
+ doctitle = "Changing time signatures inside a polymetric section using @code{\\scaleDurations}"
+} % begin verbatim
+
+\layout {
+ \context {
+ \Score
+ \remove "Timing_translator"
+ \remove "Default_bar_line_engraver"
+ }
+ \context {
+ \Staff
+ \consists "Timing_translator"
+ \consists "Default_bar_line_engraver"
+ }
+}
+
+<<
+ \new Staff {
+ \scaleDurations #'(8 . 5) {
+ \time 6/8
+ \set Timing.measureLength = #(ly:make-moment 3 5)
+ b8 b b b b b
+ \time 2/4
+ \set Timing.measureLength = #(ly:make-moment 2 5)
+ b4 b
+ }
+ }
+ \new Staff {
+ \clef bass
+ \time 2/4
+ c2 d e f
+ }
+>>
creating-blank-staves.ly
-chant-or-psalms-notation.ly
+vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
+changing-time-signatures-inside-a-polymetric-section-using-scaledurations.ly
adding-a-figured-bass-above-or-below-the-notes.ly
adding-an-extra-staff-at-a-line-break.ly
adding-an-extra-staff.ly
+chant-or-psalms-notation.ly
+use-square-bracket-at-the-start-of-a-staff-group.ly
mensurstriche-layout-bar-lines-between-the-staves.ly
-changing-time-signatures-inside-a-polymetric-section-using--compressmusic.ly
engravers-one-by-one.ly
-use-square-bracket-at-the-start-of-a-staff-group.ly
-vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
nesting-staves.ly
texidoc = "
Problem: How to know which @code{midiInstrument} would be best for your
-composition?Solution: A LilyPond demo file.
+composition? Solution: A LilyPond demo file.
}
basemelodie = \relative c' {
- c4. \mf g c16 b' c d |
- e d e f g4 g'4 r |
- r1
+ c4. \mf g c16 b' c d
+ e16 d e f g4 g'4 r
+ R1
}
melodie = { \tempo 4 = 150 \basemelodie }
\score {
\new Staff <<
- \new Voice { \melodie
+ \new Voice { \melodie
}
>>
\layout { }
\score {
\new Staff <<
- %\set Staff.instrumentName= "S/A"
+ %\set Staff.instrumentName= #"S/A"
%\set Staff.midiMinimumVolume = #0.2
%\set Staff.midiMaximumVolume = #0.4
%\set Voice.dynamicAbsoluteVolumeFunction = #0.6
\new Voice { r \mf
- \set Staff.midiInstrument = "acoustic grand" \melodie
- \set Staff.midiInstrument = "bright acoustic" \melodie
- \set Staff.midiInstrument = "electric grand" \melodie
- \set Staff.midiInstrument = "honky-tonk" \melodie
- \set Staff.midiInstrument = "electric piano 1" \melodie
- \set Staff.midiInstrument = "electric piano 2" \melodie
- \set Staff.midiInstrument = "harpsichord" \melodie
- \set Staff.midiInstrument = "clav" \melodie
- \set Staff.midiInstrument = "celesta" \melodie
- \set Staff.midiInstrument = "glockenspiel" \melodie
- \set Staff.midiInstrument = "music box" \melodie
- \set Staff.midiInstrument = "vibraphone" \melodie
- \set Staff.midiInstrument = "marimba" \melodie
- \set Staff.midiInstrument = "xylophone" \melodie
- \set Staff.midiInstrument = "tubular bells" \melodie
- \set Staff.midiInstrument = "dulcimer" \melodie
- \set Staff.midiInstrument = "drawbar organ" \melodie
- \set Staff.midiInstrument = "percussive organ" \melodie
- \set Staff.midiInstrument = "rock organ" \melodie
- \set Staff.midiInstrument = "church organ" \melodie
- \set Staff.midiInstrument = "reed organ" \melodie
- \set Staff.midiInstrument = "accordion" \melodie
- \set Staff.midiInstrument = "harmonica" \melodie
- \set Staff.midiInstrument = "concertina" \melodie
- \set Staff.midiInstrument = "acoustic guitar (nylon)" \melodie
- \set Staff.midiInstrument = "acoustic guitar (steel)" \melodie
- \set Staff.midiInstrument = "electric guitar (jazz)" \melodie
- \set Staff.midiInstrument = "electric guitar (clean)" \melodie
- \set Staff.midiInstrument = "electric guitar (muted)" \melodie
- \set Staff.midiInstrument = "overdriven guitar" \melodie
- \set Staff.midiInstrument = "distorted guitar" \melodie
- \set Staff.midiInstrument = "acoustic bass" \melodie
- \set Staff.midiInstrument = "electric bass (finger)" \melodie
- \set Staff.midiInstrument = "electric bass (pick)" \melodie
- \set Staff.midiInstrument = "fretless bass" \melodie
- \set Staff.midiInstrument = "slap bass 1" \melodie
- \set Staff.midiInstrument = "slap bass 2" \melodie
- \set Staff.midiInstrument = "synth bass 1" \melodie
- \set Staff.midiInstrument = "synth bass 2" \melodie
- \set Staff.midiInstrument = "violin" \melodie
- \set Staff.midiInstrument = "viola" \melodie
- \set Staff.midiInstrument = "cello" \melodie
- \set Staff.midiInstrument = "contrabass" \melodie
- \set Staff.midiInstrument = "tremolo strings" \melodie
- \set Staff.midiInstrument = "pizzicato strings" \melodie
- \set Staff.midiInstrument = "orchestral strings" \melodie
- \set Staff.midiInstrument = "timpani" \melodie
- \set Staff.midiInstrument = "string ensemble 1" \melodie
- \set Staff.midiInstrument = "string ensemble 2" \melodie
- \set Staff.midiInstrument = "synthstrings 1" \melodie
- \set Staff.midiInstrument = "synthstrings 2" \melodie
- \set Staff.midiInstrument = "choir aahs" \melodie
- \set Staff.midiInstrument = "voice oohs" \melodie
- \set Staff.midiInstrument = "synth voice" \melodie
- \set Staff.midiInstrument = "orchestra hit" \melodie
- \set Staff.midiInstrument = "trumpet" \melodie
- \set Staff.midiInstrument = "trombone" \melodie
- \set Staff.midiInstrument = "tuba" \melodie
- \set Staff.midiInstrument = "muted trumpet" \melodie
- \set Staff.midiInstrument = "french horn" \melodie
- \set Staff.midiInstrument = "brass section" \melodie
- \set Staff.midiInstrument = "synthbrass 1" \melodie
- \set Staff.midiInstrument = "synthbrass 2" \melodie
- \set Staff.midiInstrument = "soprano sax" \melodie
- \set Staff.midiInstrument = "alto sax" \melodie
- \set Staff.midiInstrument = "tenor sax" \melodie
- \set Staff.midiInstrument = "baritone sax" \melodie
- \set Staff.midiInstrument = "oboe" \melodie
- \set Staff.midiInstrument = "english horn" \melodie
- \set Staff.midiInstrument = "bassoon" \melodie
- \set Staff.midiInstrument = "clarinet" \melodie
- \set Staff.midiInstrument = "piccolo" \melodie
- \set Staff.midiInstrument = "flute" \melodie
- \set Staff.midiInstrument = "recorder" \melodie
- \set Staff.midiInstrument = "pan flute" \melodie
- \set Staff.midiInstrument = "blown bottle" \melodie
- \set Staff.midiInstrument = "shakuhachi" \melodie
- \set Staff.midiInstrument = "whistle" \melodie
- \set Staff.midiInstrument = "ocarina" \melodie
- \set Staff.midiInstrument = "lead 1 (square)" \melodie
- \set Staff.midiInstrument = "lead 2 (sawtooth)" \melodie
- \set Staff.midiInstrument = "lead 3 (calliope)" \melodie
- \set Staff.midiInstrument = "lead 4 (chiff)" \melodie
- \set Staff.midiInstrument = "lead 5 (charang)" \melodie
- \set Staff.midiInstrument = "lead 6 (voice)" \melodie
- \set Staff.midiInstrument = "lead 7 (fifths)" \melodie
- \set Staff.midiInstrument = "lead 8 (bass+lead)" \melodie
- \set Staff.midiInstrument = "pad 1 (new age)" \melodie
- \set Staff.midiInstrument = "pad 2 (warm)" \melodie
- \set Staff.midiInstrument = "pad 3 (polysynth)" \melodie
- \set Staff.midiInstrument = "pad 4 (choir)" \melodie
- \set Staff.midiInstrument = "pad 5 (bowed)" \melodie
- \set Staff.midiInstrument = "pad 6 (metallic)" \melodie
- \set Staff.midiInstrument = "pad 7 (halo)" \melodie
- \set Staff.midiInstrument = "pad 8 (sweep)" \melodie
- \set Staff.midiInstrument = "fx 1 (rain)" \melodie
- \set Staff.midiInstrument = "fx 2 (soundtrack)" \melodie
- \set Staff.midiInstrument = "fx 3 (crystal)" \melodie
- \set Staff.midiInstrument = "fx 4 (atmosphere)" \melodie
- \set Staff.midiInstrument = "fx 5 (brightness)" \melodie
- \set Staff.midiInstrument = "fx 6 (goblins)" \melodie
- \set Staff.midiInstrument = "fx 7 (echoes)" \melodie
- \set Staff.midiInstrument = "fx 8 (sci-fi)" \melodie
- \set Staff.midiInstrument = "sitar" \melodie
- \set Staff.midiInstrument = "banjo" \melodie
- \set Staff.midiInstrument = "shamisen" \melodie
- \set Staff.midiInstrument = "koto" \melodie
- \set Staff.midiInstrument = "kalimba" \melodie
- \set Staff.midiInstrument = "bagpipe" \melodie
- \set Staff.midiInstrument = "fiddle" \melodie
- \set Staff.midiInstrument = "shanai" \melodie
- \set Staff.midiInstrument = "tinkle bell" \melodie
- \set Staff.midiInstrument = "agogo" \melodie
- \set Staff.midiInstrument = "steel drums" \melodie
- \set Staff.midiInstrument = "woodblock" \melodie
- \set Staff.midiInstrument = "taiko drum" \melodie
- \set Staff.midiInstrument = "melodic tom" \melodie
- \set Staff.midiInstrument = "synth drum" \melodie
- \set Staff.midiInstrument = "reverse cymbal" \melodie
- \set Staff.midiInstrument = "guitar fret noise" \melodie
- \set Staff.midiInstrument = "breath noise" \melodie
- \set Staff.midiInstrument = "seashore" \melodie
- \set Staff.midiInstrument = "bird tweet" \melodie
- \set Staff.midiInstrument = "telephone ring" \melodie
- \set Staff.midiInstrument = "helicopter" \melodie
- \set Staff.midiInstrument = "applause" \melodie
- \set Staff.midiInstrument = "gunshot" \melodie
+ \set Staff.midiInstrument = #"acoustic grand" \melodie
+ \set Staff.midiInstrument = #"bright acoustic" \melodie
+ \set Staff.midiInstrument = #"electric grand" \melodie
+ \set Staff.midiInstrument = #"honky-tonk" \melodie
+ \set Staff.midiInstrument = #"electric piano 1" \melodie
+ \set Staff.midiInstrument = #"electric piano 2" \melodie
+ \set Staff.midiInstrument = #"harpsichord" \melodie
+ \set Staff.midiInstrument = #"clav" \melodie
+ \set Staff.midiInstrument = #"celesta" \melodie
+ \set Staff.midiInstrument = #"glockenspiel" \melodie
+ \set Staff.midiInstrument = #"music box" \melodie
+ \set Staff.midiInstrument = #"vibraphone" \melodie
+ \set Staff.midiInstrument = #"marimba" \melodie
+ \set Staff.midiInstrument = #"xylophone" \melodie
+ \set Staff.midiInstrument = #"tubular bells" \melodie
+ \set Staff.midiInstrument = #"dulcimer" \melodie
+ \set Staff.midiInstrument = #"drawbar organ" \melodie
+ \set Staff.midiInstrument = #"percussive organ" \melodie
+ \set Staff.midiInstrument = #"rock organ" \melodie
+ \set Staff.midiInstrument = #"church organ" \melodie
+ \set Staff.midiInstrument = #"reed organ" \melodie
+ \set Staff.midiInstrument = #"accordion" \melodie
+ \set Staff.midiInstrument = #"harmonica" \melodie
+ \set Staff.midiInstrument = #"concertina" \melodie
+ \set Staff.midiInstrument = #"acoustic guitar (nylon)" \melodie
+ \set Staff.midiInstrument = #"acoustic guitar (steel)" \melodie
+ \set Staff.midiInstrument = #"electric guitar (jazz)" \melodie
+ \set Staff.midiInstrument = #"electric guitar (clean)" \melodie
+ \set Staff.midiInstrument = #"electric guitar (muted)" \melodie
+ \set Staff.midiInstrument = #"overdriven guitar" \melodie
+ \set Staff.midiInstrument = #"distorted guitar" \melodie
+ \set Staff.midiInstrument = #"acoustic bass" \melodie
+ \set Staff.midiInstrument = #"electric bass (finger)" \melodie
+ \set Staff.midiInstrument = #"electric bass (pick)" \melodie
+ \set Staff.midiInstrument = #"fretless bass" \melodie
+ \set Staff.midiInstrument = #"slap bass 1" \melodie
+ \set Staff.midiInstrument = #"slap bass 2" \melodie
+ \set Staff.midiInstrument = #"synth bass 1" \melodie
+ \set Staff.midiInstrument = #"synth bass 2" \melodie
+ \set Staff.midiInstrument = #"violin" \melodie
+ \set Staff.midiInstrument = #"viola" \melodie
+ \set Staff.midiInstrument = #"cello" \melodie
+ \set Staff.midiInstrument = #"contrabass" \melodie
+ \set Staff.midiInstrument = #"tremolo strings" \melodie
+ \set Staff.midiInstrument = #"pizzicato strings" \melodie
+ \set Staff.midiInstrument = #"orchestral strings" \melodie
+ \set Staff.midiInstrument = #"timpani" \melodie
+ \set Staff.midiInstrument = #"string ensemble 1" \melodie
+ \set Staff.midiInstrument = #"string ensemble 2" \melodie
+ \set Staff.midiInstrument = #"synthstrings 1" \melodie
+ \set Staff.midiInstrument = #"synthstrings 2" \melodie
+ \set Staff.midiInstrument = #"choir aahs" \melodie
+ \set Staff.midiInstrument = #"voice oohs" \melodie
+ \set Staff.midiInstrument = #"synth voice" \melodie
+ \set Staff.midiInstrument = #"orchestra hit" \melodie
+ \set Staff.midiInstrument = #"trumpet" \melodie
+ \set Staff.midiInstrument = #"trombone" \melodie
+ \set Staff.midiInstrument = #"tuba" \melodie
+ \set Staff.midiInstrument = #"muted trumpet" \melodie
+ \set Staff.midiInstrument = #"french horn" \melodie
+ \set Staff.midiInstrument = #"brass section" \melodie
+ \set Staff.midiInstrument = #"synthbrass 1" \melodie
+ \set Staff.midiInstrument = #"synthbrass 2" \melodie
+ \set Staff.midiInstrument = #"soprano sax" \melodie
+ \set Staff.midiInstrument = #"alto sax" \melodie
+ \set Staff.midiInstrument = #"tenor sax" \melodie
+ \set Staff.midiInstrument = #"baritone sax" \melodie
+ \set Staff.midiInstrument = #"oboe" \melodie
+ \set Staff.midiInstrument = #"english horn" \melodie
+ \set Staff.midiInstrument = #"bassoon" \melodie
+ \set Staff.midiInstrument = #"clarinet" \melodie
+ \set Staff.midiInstrument = #"piccolo" \melodie
+ \set Staff.midiInstrument = #"flute" \melodie
+ \set Staff.midiInstrument = #"recorder" \melodie
+ \set Staff.midiInstrument = #"pan flute" \melodie
+ \set Staff.midiInstrument = #"blown bottle" \melodie
+ \set Staff.midiInstrument = #"shakuhachi" \melodie
+ \set Staff.midiInstrument = #"whistle" \melodie
+ \set Staff.midiInstrument = #"ocarina" \melodie
+ \set Staff.midiInstrument = #"lead 1 (square)" \melodie
+ \set Staff.midiInstrument = #"lead 2 (sawtooth)" \melodie
+ \set Staff.midiInstrument = #"lead 3 (calliope)" \melodie
+ \set Staff.midiInstrument = #"lead 4 (chiff)" \melodie
+ \set Staff.midiInstrument = #"lead 5 (charang)" \melodie
+ \set Staff.midiInstrument = #"lead 6 (voice)" \melodie
+ \set Staff.midiInstrument = #"lead 7 (fifths)" \melodie
+ \set Staff.midiInstrument = #"lead 8 (bass+lead)" \melodie
+ \set Staff.midiInstrument = #"pad 1 (new age)" \melodie
+ \set Staff.midiInstrument = #"pad 2 (warm)" \melodie
+ \set Staff.midiInstrument = #"pad 3 (polysynth)" \melodie
+ \set Staff.midiInstrument = #"pad 4 (choir)" \melodie
+ \set Staff.midiInstrument = #"pad 5 (bowed)" \melodie
+ \set Staff.midiInstrument = #"pad 6 (metallic)" \melodie
+ \set Staff.midiInstrument = #"pad 7 (halo)" \melodie
+ \set Staff.midiInstrument = #"pad 8 (sweep)" \melodie
+ \set Staff.midiInstrument = #"fx 1 (rain)" \melodie
+ \set Staff.midiInstrument = #"fx 2 (soundtrack)" \melodie
+ \set Staff.midiInstrument = #"fx 3 (crystal)" \melodie
+ \set Staff.midiInstrument = #"fx 4 (atmosphere)" \melodie
+ \set Staff.midiInstrument = #"fx 5 (brightness)" \melodie
+ \set Staff.midiInstrument = #"fx 6 (goblins)" \melodie
+ \set Staff.midiInstrument = #"fx 7 (echoes)" \melodie
+ \set Staff.midiInstrument = #"fx 8 (sci-fi)" \melodie
+ \set Staff.midiInstrument = #"sitar" \melodie
+ \set Staff.midiInstrument = #"banjo" \melodie
+ \set Staff.midiInstrument = #"shamisen" \melodie
+ \set Staff.midiInstrument = #"koto" \melodie
+ \set Staff.midiInstrument = #"kalimba" \melodie
+ \set Staff.midiInstrument = #"bagpipe" \melodie
+ \set Staff.midiInstrument = #"fiddle" \melodie
+ \set Staff.midiInstrument = #"shanai" \melodie
+ \set Staff.midiInstrument = #"tinkle bell" \melodie
+ \set Staff.midiInstrument = #"agogo" \melodie
+ \set Staff.midiInstrument = #"steel drums" \melodie
+ \set Staff.midiInstrument = #"woodblock" \melodie
+ \set Staff.midiInstrument = #"taiko drum" \melodie
+ \set Staff.midiInstrument = #"melodic tom" \melodie
+ \set Staff.midiInstrument = #"synth drum" \melodie
+ \set Staff.midiInstrument = #"reverse cymbal" \melodie
+ \set Staff.midiInstrument = #"guitar fret noise" \melodie
+ \set Staff.midiInstrument = #"breath noise" \melodie
+ \set Staff.midiInstrument = #"seashore" \melodie
+ \set Staff.midiInstrument = #"bird tweet" \melodie
+ \set Staff.midiInstrument = #"telephone ring" \melodie
+ \set Staff.midiInstrument = #"helicopter" \melodie
+ \set Staff.midiInstrument = #"applause" \melodie
+ \set Staff.midiInstrument = #"gunshot" \melodie
}
>>
\midi { }
creating-blank-staves.ly
making-some-staff-lines-thicker-than-the-others.ly
applying-note-head-styles-depending-on-the-step-of-the-scale.ly
-changing-the-appearance-of-a-slur-from-solid-to-dotted-or-dashed.ly
embedding-native-postscript-in-a--markup-block.ly
-default-direction-of-stems-on-the-center-line-of-the-staff.ly
-changing-a-single-notes-size-in-a-chord.ly
+changing-the-appearance-of-a-slur-from-solid-to-dotted-or-dashed.ly
grid-lines--emphasizing-rhythms-and-notes-synchronization.ly
+changing-a-single-notes-size-in-a-chord.ly
grid-lines--changing-their-appearance.ly
controlling-the-placement-of-chord-fingerings.ly
allowing-fingerings-to-be-printed-inside-the-staff.ly
blanking-staff-lines-using-the--whiteout-command.ly
+default-direction-of-stems-on-the-center-line-of-the-staff.ly
hiding-the-extender-line-for-text-dynamics.ly
vertically-aligning-dynamics-across-multiple-notes.ly
modifying-default-values-for-articulation-shorthand-notation.ly
-setting-the-minimum-length-of-hairpins.ly
changing-text-and-spanner-styles-for-text-dynamics.ly
controlling-the-vertical-ordering-of-scripts.ly
using-double-slurs-for-legato-chords.ly
-creating-text-spanners.ly
+setting-the-minimum-length-of-hairpins.ly
creating-real-parenthesized-dynamics.ly
center-text-below-hairpin-dynamics.ly
printing-metronome-and-rehearsal-marks-below-the-staff.ly
+creating-text-spanners.ly
broken-crescendo-hairpin.ly
combining-dynamics-with-markup-texts.ly
creating-slurs-across-voices.ly
texidoc = "
This is quite an advanced template, for a jazz ensemble. Note that all
-instruments are notated in \\key c \\major. This refers to the key in
-concert pitch; LilyPond will automatically transpose the key if the
-music is within a \\transpose section.
+instruments are notated in @code{\\key c \\major}. This refers to the
+key in concert pitch; the key will be automatically transposed if the
+music is within a @code{\\transpose} section.
"
doctitle = "Jazz combo template"
} % begin verbatim
\header {
- title = "Song"
- subtitle = "(tune)"
- composer = "Me"
- meter = "moderato"
- piece = "Swing"
- tagline = \markup {
- \column {
- "LilyPond example file by Amelie Zapf,"
- "Berlin 07/07/2003"
- }
- }
- texidoc = "Jazz tune for combo
- (horns, guitar, piano, bass, drums)."
- }
-
- #(set-global-staff-size 16)
- \include "english.ly"
-
- %%%%%%%%%%%% Some macros %%%%%%%%%%%%%%%%%%%
-
- sl = {
- \override NoteHead #'style = #'slash
- \override Stem #'transparent = ##t
- }
- nsl = {
- \revert NoteHead #'style
- \revert Stem #'transparent
- }
- crOn = \override NoteHead #'style = #'cross
- crOff = \revert NoteHead #'style
-
- %% insert chord name style stuff here.
-
- jzchords = { }
-
-
- %%%%%%%%%%%% Keys'n'thangs %%%%%%%%%%%%%%%%%
-
- global = {
- \time 4/4
- }
-
- Key = { \key c \major }
-
- % ############ Horns ############
-
- % ------ Trumpet ------
- trpt = \transpose c d \relative c'' {
- \Key
- c1 c c
- }
- trpharmony = \transpose c' d {
- \jzchords
- }
- trumpet = {
- \global
- \set Staff.instrumentName = #"Trumpet"
- \clef treble
- <<
- \trpt
- >>
- }
-
- % ------ Alto Saxophone ------
- alto = \transpose c a \relative c' {
- \Key
- c1 c c
- }
- altoharmony = \transpose c' a {
- \jzchords
- }
- altosax = {
- \global
- \set Staff.instrumentName = #"Alto Sax"
- \clef treble
- <<
- \alto
- >>
- }
-
- % ------ Baritone Saxophone ------
- bari = \transpose c a' \relative c {
- \Key
- c1 c \sl d4^"Solo" d d d \nsl
- }
- bariharmony = \transpose c' a \chordmode {
- \jzchords s1 s d2:maj e:m7
- }
- barisax = {
- \global
- \set Staff.instrumentName = #"Bari Sax"
- \clef treble
- <<
- \bari
- >>
- }
-
- % ------ Trombone ------
- tbone = \relative c {
- \Key
- c1 c c
- }
- tboneharmony = \chordmode {
- \jzchords
- }
- trombone = {
- \global
- \set Staff.instrumentName = #"Trombone"
- \clef bass
- <<
- \tbone
- >>
- }
-
- % ############ Rhythm Section #############
-
- % ------ Guitar ------
- gtr = \relative c'' {
- \Key
- c1 \sl b4 b b b \nsl c1
- }
- gtrharmony = \chordmode {
- \jzchords
- s1 c2:min7+ d2:maj9
- }
- guitar = {
- \global
- \set Staff.instrumentName = #"Guitar"
- \clef treble
- <<
- \gtr
- >>
- }
-
- %% ------ Piano ------
- rhUpper = \relative c'' {
- \voiceOne
- \Key
- c1 c c
- }
- rhLower = \relative c' {
- \voiceTwo
- \Key
- e1 e e
- }
-
- lhUpper = \relative c' {
- \voiceOne
- \Key
- g1 g g
- }
- lhLower = \relative c {
- \voiceTwo
- \Key
- c1 c c
- }
-
- PianoRH = {
- \clef treble
- \global
- \set Staff.midiInstrument = "acoustic grand"
- <<
- \new Voice = "one" \rhUpper
- \new Voice = "two" \rhLower
- >>
- }
- PianoLH = {
- \clef bass
- \global
- \set Staff.midiInstrument = "acoustic grand"
- <<
- \new Voice = "one" \lhUpper
- \new Voice = "two" \lhLower
- >>
- }
-
- piano = {
- <<
- \set PianoStaff.instrumentName = #"Piano"
- \new Staff = "upper" \PianoRH
- \new Staff = "lower" \PianoLH
- >>
- }
-
- % ------ Bass Guitar ------
- Bass = \relative c {
- \Key
- c1 c c
- }
- bass = {
- \global
- \set Staff.instrumentName = #"Bass"
- \clef bass
- <<
- \Bass
- >>
- }
-
- % ------ Drums ------
- up = \drummode {
- hh4 <hh sn>4 hh <hh sn> hh <hh sn>4
- hh4 <hh sn>4
- hh4 <hh sn>4
- hh4 <hh sn>4
- }
-
- down = \drummode {
- bd4 s bd s bd s bd s bd s bd s
- }
-
- drumContents = {
- \global
- <<
- \set DrumStaff.instrumentName = #"Drums"
- \new DrumVoice { \voiceOne \up }
- \new DrumVoice { \voiceTwo \down }
- >>
- }
-
- %%%%%%%%% It All Goes Together Here %%%%%%%%%%%%%%%%%%%%%%
-
- \score {
- <<
- \new StaffGroup = "horns" <<
- \new Staff = "trumpet" \trumpet
- \new Staff = "altosax" \altosax
- \new ChordNames = "barichords" \bariharmony
- \new Staff = "barisax" \barisax
- \new Staff = "trombone" \trombone
- >>
-
- \new StaffGroup = "rhythm" <<
- \new ChordNames = "chords" \gtrharmony
- \new Staff = "guitar" \guitar
- \new PianoStaff = "piano" \piano
- \new Staff = "bass" \bass
- \new DrumStaff { \drumContents }
- >>
- >>
-
- \layout {
- \context { \RemoveEmptyStaffContext }
- \context {
- \Score
- \override BarNumber #'padding = #3
- \override RehearsalMark #'padding = #2
- skipBars = ##t
- }
- }
-
- \midi { }
- }
+ title = "Song"
+ subtitle = "(tune)"
+ composer = "Me"
+ meter = "moderato"
+ piece = "Swing"
+ tagline = \markup {
+ \column {
+ "LilyPond example file by Amelie Zapf,"
+ "Berlin 07/07/2003"
+ }
+ }
+}
+%#(set-global-staff-size 16)
+\include "english.ly"
+
+%%%%%%%%%%%% Some macros %%%%%%%%%%%%%%%%%%%
+
+sl = {
+ \override NoteHead #'style = #'slash
+ \override Stem #'transparent = ##t
+}
+nsl = {
+ \revert NoteHead #'style
+ \revert Stem #'transparent
+}
+crOn = \override NoteHead #'style = #'cross
+crOff = \revert NoteHead #'style
+
+%% insert chord name style stuff here.
+
+jazzChords = { }
+
+%%%%%%%%%%%% Keys'n'thangs %%%%%%%%%%%%%%%%%
+
+global = { \time 4/4 }
+
+Key = { \key c \major }
+
+% ############ Horns ############
+
+% ------ Trumpet ------
+trpt = \transpose c d \relative c'' {
+ \Key
+ c1 | c | c |
+}
+trpHarmony = \transpose c' d {
+ \jazzChords
+}
+trumpet = {
+ \global
+ \set Staff.instrumentName = #"Trumpet"
+ \clef treble
+ <<
+ \trpt
+ >>
+}
+
+% ------ Alto Saxophone ------
+alto = \transpose c a \relative c' {
+ \Key
+ c1 | c | c |
+}
+altoHarmony = \transpose c' a {
+ \jazzChords
+}
+altoSax = {
+ \global
+ \set Staff.instrumentName = #"Alto Sax"
+ \clef treble
+ <<
+ \alto
+ >>
+}
+
+% ------ Baritone Saxophone ------
+bari = \transpose c a' \relative c {
+ \Key
+ c1
+ c1
+ \sl
+ d4^"Solo" d d d
+ \nsl
+}
+bariHarmony = \transpose c' a \chordmode {
+ \jazzChords s1 s d2:maj e:m7
+}
+bariSax = {
+ \global
+ \set Staff.instrumentName = #"Bari Sax"
+ \clef treble
+ <<
+ \bari
+ >>
+}
+
+% ------ Trombone ------
+tbone = \relative c {
+ \Key
+ c1 | c | c
+}
+tboneHarmony = \chordmode {
+ \jazzChords
+}
+trombone = {
+ \global
+ \set Staff.instrumentName = #"Trombone"
+ \clef bass
+ <<
+ \tbone
+ >>
+}
+
+% ############ Rhythm Section #############
+
+% ------ Guitar ------
+gtr = \relative c'' {
+ \Key
+ c1
+ \sl
+ b4 b b b
+ \nsl
+ c1
+}
+gtrHarmony = \chordmode {
+ \jazzChords
+ s1 c2:min7+ d2:maj9
+}
+guitar = {
+ \global
+ \set Staff.instrumentName = #"Guitar"
+ \clef treble
+ <<
+ \gtr
+ >>
+}
+
+%% ------ Piano ------
+rhUpper = \relative c'' {
+ \voiceOne
+ \Key
+ c1 | c | c
+}
+rhLower = \relative c' {
+ \voiceTwo
+ \Key
+ e1 | e | e
+}
+
+lhUpper = \relative c' {
+ \voiceOne
+ \Key
+ g1 | g | g
+}
+lhLower = \relative c {
+ \voiceTwo
+ \Key
+ c1 | c | c
+}
+
+PianoRH = {
+ \clef treble
+ \global
+ \set Staff.midiInstrument = #"acoustic grand"
+ <<
+ \new Voice = "one" \rhUpper
+ \new Voice = "two" \rhLower
+ >>
+}
+PianoLH = {
+ \clef bass
+ \global
+ \set Staff.midiInstrument = "acoustic grand"
+ <<
+ \new Voice = "one" \lhUpper
+ \new Voice = "two" \lhLower
+ >>
+}
+
+piano = {
+ <<
+ \set PianoStaff.instrumentName = #"Piano"
+ \new Staff = "upper" \PianoRH
+ \new Staff = "lower" \PianoLH
+ >>
+}
+
+% ------ Bass Guitar ------
+Bass = \relative c {
+ \Key
+ c1 | c | c
+}
+bass = {
+ \global
+ \set Staff.instrumentName = #"Bass"
+ \clef bass
+ <<
+ \Bass
+ >>
+}
+
+% ------ Drums ------
+up = \drummode {
+ \voiceOne
+ hh4 <hh sn> hh <hh sn>
+ hh4 <hh sn> hh <hh sn>
+ hh4 <hh sn> hh <hh sn>
+}
+down = \drummode {
+ \voiceTwo
+ bd4 s bd s
+ bd4 s bd s
+ bd4 s bd s
+}
+
+drumContents = {
+ \global
+ <<
+ \set DrumStaff.instrumentName = #"Drums"
+ \new DrumVoice \up
+ \new DrumVoice \down
+ >>
+}
+
+%%%%%%%%% It All Goes Together Here %%%%%%%%%%%%%%%%%%%%%%
+
+\score {
+ <<
+ \new StaffGroup = "horns" <<
+ \new Staff = "trumpet" \trumpet
+ \new Staff = "altosax" \altoSax
+ \new ChordNames = "barichords" \bariHarmony
+ \new Staff = "barisax" \bariSax
+ \new Staff = "trombone" \trombone
+ >>
+
+ \new StaffGroup = "rhythm" <<
+ \new ChordNames = "chords" \gtrHarmony
+ \new Staff = "guitar" \guitar
+ \new PianoStaff = "piano" \piano
+ \new Staff = "bass" \bass
+ \new DrumStaff \drumContents
+ >>
+ >>
+
+ \layout {
+ \context { \RemoveEmptyStaffContext }
+ \context {
+ \Score
+ \override BarNumber #'padding = #3
+ \override RehearsalMark #'padding = #2
+ skipBars = ##t
+ }
+ }
+
+ \midi { }
+}
+indicating-cross-staff-chords-with-arpeggio-bracket.ly
clusters.ly
creating-slurs-across-voices.ly
-jazz-combo-template.ly
+piano-template-with-centered-lyrics.ly
vocal-ensemble-template-with-automatic-piano-reduction.ly
piano-template-simple.ly
piano-template-with-centered-dynamics.ly
controlling-the-placement-of-chord-fingerings.ly
piano-template-with-melody-and-lyrics.ly
-piano-template-with-centered-lyrics.ly
+jazz-combo-template.ly
demo-midiinstruments.ly
\key c \major
\time 4/4
- a b c d
-
+ a4 b c d
}
lower = \relative c {
\key c \major
\time 4/4
- a2 c
-
+ a2 c
}
\score {
\new PianoStaff <<
- \set PianoStaff.instrumentName = "Piano "
+ \set PianoStaff.instrumentName = #"Piano "
\new Staff = "upper" \upper
\new Staff = "lower" \lower
>>
\key c \major
\time 4/4
- a4 b c d
-
+ a4 b c d
}
lower = \relative c {
\key c \major
\time 4/4
- a2 c
-
+ a2 c
}
text = \lyricmode {
\key c \major
\time 4/4
- a b c d
-
+ a b c d
}
text = \lyricmode {
\key c \major
\time 4/4
- a b c d
-
+ a4 b c d
}
lower = \relative c {
\key c \major
\time 4/4
- a2 c
-
+ a2 c
}
\score {
<<
\new Voice = "mel" { \autoBeamOff \melody }
- \new Lyrics \lyricsto mel \text
-
+ \new Lyrics \lyricsto mel \text
\new PianoStaff <<
\new Staff = "upper" \upper
\new Staff = "lower" \lower
manually-controlling-beam-positions.ly
adding-drum-parts.ly
rest-styles.ly
-skips-in-lyric-mode-2.ly
chant-or-psalms-notation.ly
controlling-tuplet-bracket-visibility.ly
heavily-customized-polymetric-time-signatures.ly
forcing-rehearsal-marks-to-start-from-a-given-letter-or-number.ly
integrating-text-indications-in-metronome-marks.ly
compound-time-signatures.ly
+changing-time-signatures-inside-a-polymetric-section-using-scaledurations.ly
modifying-tuplet-bracket-length.ly
printing-metronome-and-rehearsal-marks-below-the-staff.ly
-changing-time-signatures-inside-a-polymetric-section-using--compressmusic.ly
making-an-object-invisible-with-the-transparent-property.ly
merging-multi-measure-rests-in-a-polyphonic-part.ly
automatic-beam-subdivisions.ly
changing-the-tuplet-number.ly
entering-several-tuplets-using-only-one--times-command.ly
conducting-signs,-measure-grouping-signs.ly
+skips-in-lyric-mode-2.ly
changing-form-of-multi--measure-rests.ly
rhythmic-slashes.ly
automatic-beams-two-per-two-in-4-4-or-2-2-time-signature.ly
lsrtags = "template"
texidoc = "
-A template to write score for a diatonic accordion.
+A template to write a score for a diatonic accordion.
-- There is a horizontal staff indicating if the accordion  must be
+- There is a horizontal staff indicating if the accordion must be
pushed (thick line) or pulled (thin line)
-- There is a small rhytmic staff with lyrics that describes the bass
-buttons to press. Â The bar-lines are made of gridlines ( Gridlines,
-not a really satisfying solution, but the best I found)
+- There is a small rhythmic staff with lyrics that describes the bass
+buttons to press. The bar lines are made from gridlines
- The tabulator staff for diatonic accordions shows the geographic
-position of the buttons  and not (as for every other instrument) the
-pitch of the tones. Â The keys on the melody-side of the accordion are
-placed in three columns and about 12 rows. Â In the tabulator staff
-notation the  - most outer column is described with notes between
-lines  - most inner column is described with notes between lines with
-a cross as accidental  - middle column is described with notes on a
-line, whereby the row in the middle is represented    on the middle
-line in the staff.
-
-
-
-Some words to transpose piano note to the diatonic accordion.
------------------------------------------------------------- 1. Every
-diatonic accordion is built for some keys only. For example   for the
-key of C-major and F-major. Â Â So it is important to transpose a piano
-melody to match one of these keys. Â Â Transpose the source code, not
-only the output because   you need this code later on to translate it
-once more to the tabulator staff. Â Â This can be done with the command
-'displayLilyMusic'.
-
-2. You have to alternate the push and pull-direction of the accordion
-regularely. Â Â If the player has a too long part to pull the accordion
-gets broken. Â Â At the other hand some harmonies are only available in
-one direction (push or pull) Â Â Considering this decide which parts of
-the melody are the push-parts and whic the pull-parts.
-
-3. For each pull- / or push-part translate the piano notes to the
-according tabulatur representation.
+position of the buttons and not (as for every other instrument) the
+pitch of the notes; the keys on the melody-side of the accordion are
+placed in three columns and about 12 rows
+
+
+In the tabulator staff notation the outermost column is described with
+notes between lines, the innermost column is described with notes
+between lines and a cross as accidental, and the middle column is
+described with notes on a line, whereby the row in the middle is
+represented on the middle line in the staff.
+
+
+Some words to transpose piano notes to the diatonic accordion:
+
+
+1. Every diatonic accordion is built for some keys only (for example,
+for the keys of C major and F major), so it is important to transpose a
+piano melody to match one of these keys. Transpose the source code, not
+only the output because this code is required later on to translate it
+once more to the tabulator staff. This can be done with the command
+@code{displayLilyMusic}.
+
+
+2. You have to alternate the push- and pull-direction of the accordion
+regularly. If the player has a too long part to pull the accordion gets
+broken. On the other hand, some harmonies are only available in one
+direction. Considering this, decide which parts of the melody are the
+push-parts and which the pull-parts.
+
+
+3. For each pull- or push-part translate the piano notes to the
+according tabulature representation.
+
This snippet comes with a useful optional macro for the jEdit text
-editor.
+editor.
"
doctitle = "Score for diatonic accordion"
lsrtags = "vocal-music, chords, template"
texidoc = "
-This template allows you to prepare a song with melody, words, and
+This template allows the preparation of a song with melody, words, and
chords.
"
\time 4/4
a4 b c d
-
}
text = \lyricmode {
doctitle = "Single staff template with notes and chords"
} % begin verbatim
melody = \relative c' {
- \clef treble
- \key c \major
- \time 4/4
-
- f4 e8[ c] d4 g |
- a2 ~ a2 |
- }
-
- harmonies = \chordmode {
- c4:m f:min7 g:maj c:aug d2:dim b:sus
- }
-
- \score {
- <<
- \new ChordNames {
- \set chordChanges = ##t
- \harmonies
- }
- \new Staff \melody
- >>
-
- \layout{ }
- \midi { }
- }
+ \clef treble
+ \key c \major
+ \time 4/4
+
+ f4 e8[ c] d4 g
+ a2 ~ a
+}
+harmonies = \chordmode {
+ c4:m f:min7 g:maj c:aug
+ d2:dim b:sus
+}
+
+\score {
+ <<
+ \new ChordNames {
+ \set chordChanges = ##t
+ \harmonies
+ }
+ \new Staff \melody
+ >>
+ \layout{ }
+ \midi { }
+}
texidoc = "
This small template demonstrates a simple melody with lyrics. Cut and
paste, add notes, then words for the lyrics. This example turns off
-automatic beaming, which is common for vocal parts. If you want to use
-automatic beaming, you'll have to change or comment out the relevant
-line.
+automatic beaming, which is common for vocal parts. To use automatic
+beaming, change or comment out the relevant line.
"
doctitle = "Single staff template with notes and lyrics"
} % begin verbatim
melody = \relative c' {
- \clef treble
- \key c \major
- \time 4/4
-
- a4 b c d
- }
-
- text = \lyricmode {
- Aaa Bee Cee Dee
- }
-
- \score{
- <<
- \new Voice = "one" {
- \autoBeamOff
- \melody
- }
- \new Lyrics \lyricsto "one" \text
- >>
- \layout { }
- \midi { }
- }
+ \clef treble
+ \key c \major
+ \time 4/4
+
+ a4 b c d
+}
+text = \lyricmode {
+ Aaa Bee Cee Dee
+}
+
+\score{
+ <<
+ \new Voice = "one" {
+ \autoBeamOff
+ \melody
+ }
+ \new Lyrics \lyricsto "one" \text
+ >>
+ \layout { }
+ \midi { }
+}
doctitle = "Single staff template with only notes"
} % begin verbatim
melody = \relative c' {
- \clef treble
- \key c \major
- \time 4/4
-
- a4 b c d
- }
-
- \score {
- \new Staff \melody
- \layout { }
- \midi {}
- }
+ \clef treble
+ \key c \major
+ \time 4/4
+
+ a4 b c d
+}
+\score {
+ \new Staff \melody
+ \layout { }
+ \midi { }
+}
changing-the-number-of-lines-in-a-staff.ly
incipit.ly
display-bracket-with-only-one-staff-in-a-system.ly
-adding-an-extra-staff.ly
+time-signature-in-parentheses.ly
printing-metronome-and-rehearsal-marks-below-the-staff.ly
tweaking-clef-properties.ly
quoting-another-voice.ly
adding-ambitus-per-voice.ly
making-some-staff-lines-thicker-than-the-others.ly
adding-an-extra-staff-at-a-line-break.ly
-time-signature-in-parentheses.ly
+adding-an-extra-staff.ly
changing-the-staff-size.ly
use-square-bracket-at-the-start-of-a-staff-group.ly
quoting-another-voice-with-transposition.ly
texidoc = "
This template demonstrates a simple string quartet. It also uses a
-\\global section for time and key signatures
+@code{\\global} section for time and key signatures
"
doctitle = "String quartet template (simple)"
} % begin verbatim
global= {
- \time 4/4
- \key c \major
- }
-
- violinOne = \new Voice { \relative c''{
- \set Staff.instrumentName = "Violin 1 "
-
- c2 d e1
-
- \bar "|." }}
- violinTwo = \new Voice { \relative c''{
- \set Staff.instrumentName = "Violin 2 "
-
- g2 f e1
-
- \bar "|." }}
- viola = \new Voice { \relative c' {
- \set Staff.instrumentName = "Viola "
- \clef alto
-
- e2 d c1
-
- \bar "|." }}
- cello = \new Voice { \relative c' {
- \set Staff.instrumentName = "Cello "
- \clef bass
-
- c2 b a1
-
- \bar "|."}}
-
- \score {
- \new StaffGroup <<
- \new Staff << \global \violinOne >>
- \new Staff << \global \violinTwo >>
- \new Staff << \global \viola >>
- \new Staff << \global \cello >>
- >>
- \layout { }
- \midi { }
- }
+ \time 4/4
+ \key c \major
+}
+violinOne = \new Voice \relative c'' {
+ \set Staff.instrumentName = #"Violin 1 "
+
+ c2 d
+ e1
+
+ \bar "|."
+}
+
+violinTwo = \new Voice \relative c'' {
+ \set Staff.instrumentName = #"Violin 2 "
+
+ g2 f
+ e1
+
+ \bar "|."
+}
+
+viola = \new Voice \relative c' {
+ \set Staff.instrumentName = #"Viola "
+ \clef alto
+
+ e2 d
+ c1
+
+ \bar "|."
+}
+
+cello = \new Voice \relative c' {
+ \set Staff.instrumentName = #"Cello "
+ \clef bass
+
+ c2 b
+ a1
+
+ \bar "|."
+}
+
+\score {
+ \new StaffGroup <<
+ \new Staff << \global \violinOne >>
+ \new Staff << \global \violinTwo >>
+ \new Staff << \global \viola >>
+ \new Staff << \global \cello >>
+ >>
+ \layout { }
+ \midi { }
+}
texidoc = "
The \"String quartet template\" snippet produces a nice string quartet,
but what if you needed to print parts? This new template demonstrates
-how to use the \\tag feature to easily split a piece into individual
-parts.
+how to use the @code{\\tag} feature to easily split a piece into
+individual parts.
You need to split this template into separate files; the filenames are
-contained in comments at the beginning of each file. piece.ly contains
-all the music definitions. The other files – score.ly, vn1.ly, vn2.ly,
-vla.ly, and vlc.ly – produce the appropiate part.
+contained in comments at the beginning of each file. @code{piece.ly}
+contains all the music definitions. The other files – @code{score.ly},
+@code{vn1.ly}, @code{vn2.ly}, @code{vla.ly}, and @code{vlc.ly} –
+produce the appropriate part.
Do not forget to remove specified comments when using separate files!
}
Violinone = \new Voice { \relative c''{
- \set Staff.instrumentName = "Violin 1 "
+ \set Staff.instrumentName = #"Violin 1 "
c2 d e1
\bar "|." }} %*********************************
Violintwo = \new Voice { \relative c''{
- \set Staff.instrumentName = "Violin 2 "
+ \set Staff.instrumentName = #"Violin 2 "
g2 f e1
\bar "|." }} %*********************************
Viola = \new Voice { \relative c' {
- \set Staff.instrumentName = "Viola "
+ \set Staff.instrumentName = #"Viola "
\clef alto
e2 d c1
\bar "|." }} %*********************************
Cello = \new Voice { \relative c' {
- \set Staff.instrumentName = "Cello "
+ \set Staff.instrumentName = #"Cello "
\clef bass
c2 b a1
vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
single-staff-template-with-notes-and-lyrics.ly
single-staff-template-with-only-notes.ly
-jazz-combo-template.ly
-score-for-diatonic-accordion.ly
+piano-template-with-centered-lyrics.ly
+vocal-ensemble-template-with-automatic-piano-reduction.ly
piano-template-simple.ly
ancient-notation-template----modern-transcription-of-mensural-music.ly
ancient-notation-template----modern-transcription-of-gregorian-music.ly
-single-staff-template-with-notes-and-chords.ly
-string-quartet-template-simple.ly
-single-staff-template-with-notes,-lyrics,-and-chords.ly
+vocal-ensemble-template.ly
piano-template-with-melody-and-lyrics.ly
string-quartet-template-with-separate-parts.ly
-vocal-ensemble-template.ly
+single-staff-template-with-notes,-lyrics,-and-chords.ly
+string-quartet-template-simple.ly
+single-staff-template-with-notes-and-chords.ly
piano-template-with-centered-dynamics.ly
-piano-template-with-centered-lyrics.ly
-vocal-ensemble-template-with-automatic-piano-reduction.ly
+jazz-combo-template.ly
+score-for-diatonic-accordion.ly
creating-real-parenthesized-dynamics.ly
center-text-below-hairpin-dynamics.ly
demonstrating-all-headers.ly
-combining-two-parts-on-the-same-staff.ly
how-to-put-ties-between-syllables-in-lyrics.ly
+combining-two-parts-on-the-same-staff.ly
combining-dynamics-with-markup-texts.ly
aligning-marks-with-various-notation-objects.ly
-ottava-text.ly
+piano-template-with-centered-lyrics.ly
creating-simultaneous-rehearsal-marks.ly
three-sided-box.ly
utf-8.ly
-piano-template-with-centered-lyrics.ly
+ottava-text.ly
aligning-lyrics.ly
display-bracket-with-only-one-staff-in-a-system.ly
-rhythmic-slashes.ly
+time-signature-in-parentheses.ly
changing-the-default-text-font-family.ly
drawing-boxes-around-grobs.ly
manually-controlling-beam-positions.ly
creating-text-spanners.ly
caesura-railtracks-with-fermata.ly
changing-form-of-multi--measure-rests.ly
-time-signature-in-parentheses.ly
+rhythmic-slashes.ly
changing-a-single-notes-size-in-a-chord.ly
creating-simultaneous-rehearsal-marks.ly
nesting-staves.ly
string-quartet-template-with-separate-parts.ly
-string-quartet-template-simple.ly
changing--flageolet-mark-size.ly
creating-slurs-across-voices.ly
+string-quartet-template-simple.ly
demo-midiinstruments.ly
lsrtags = "vocal-music, tweaks-and-overrides, spacing"
texidoc = "
-This snippet shows of to use the @code{alignBelowContext} and
-@code{alignAboveContext} properties, which may be needed for text
-elements (e.g. lyrics) positioning, but also for musical contents such
-as ossias.
+This snippet demonstrates the use of the @code{alignBelowContext} and
+@code{alignAboveContext} properties to control the positioning of
+lyrics and ossias.
"
doctitle = "Vertically aligning ossias and lyrics"
\relative <<
\new Staff = "1" { c4 c s2 }
- \new Staff = "2" { c4 c s2 }
- \new Staff = "3" { c4 c s2 }
+ \new Staff = "2" { c4 c s2 }
+ \new Staff = "3" { c4 c s2 }
{ \skip 2
<<
\lyrics {
doctitle = "Vertically centered dynamics and textscripts"
} % begin verbatim
music = \relative c'' {
- c2\p^\markup { "gorgeous" } c\f^\markup { "fantastic" }
+ c2\p^\markup { gorgeous } c\f^\markup { fantastic }
c4\p c\f\> c c\!\p
}
This template adds an automatic piano reduction to the standard SATB
vocal score demonstrated in \"Vocal ensemble template\". This
demonstrates one of the strengths of LilyPond – you can use a music
-definition more than once. If you make any changes to the vocal notes
-(say, tenorMusic), then the changes will also apply to the piano
+definition more than once. If any changes are made to the vocal notes
+(say, @code{tenorMusic}), then the changes will also apply to the piano
reduction.
"
texidoc = "
Here is a standard four-part SATB vocal score. With larger ensembles,
-it's often useful to include a section which is included in all parts.
-For example, the time signature and key signatures are almost always
-the same for all parts. Like in the \"Hymn\" template, the four voices
-are regrouped on only two staves.
+it is often useful to include a section which is included in all parts.
+For example, the time signature and key signature are almost always the
+same for all parts. Like in the \"Hymn\" template, the four voices are
+regrouped on only two staves.
"
doctitle = "Vocal ensemble template"
} % begin verbatim
global = {
- \key c \major
- \time 4/4
- }
-
- sopMusic = \relative c'' {
- c4 c c8[( b)] c4
- }
- sopWords = \lyricmode {
- hi hi hi hi
- }
-
- altoMusic = \relative c' {
- e4 f d e
- }
- altoWords =\lyricmode {
- ha ha ha ha
- }
-
- tenorMusic = \relative c' {
- g4 a f g
- }
- tenorWords = \lyricmode {
- hu hu hu hu
- }
-
- bassMusic = \relative c {
- c4 c g c
- }
- bassWords = \lyricmode {
- ho ho ho ho
- }
-
- \score {
- \new ChoirStaff <<
- \new Lyrics = sopranos { s1 }
- \new Staff = women <<
- \new Voice =
- "sopranos" { \voiceOne << \global \sopMusic >> }
- \new Voice =
- "altos" { \voiceTwo << \global \altoMusic >> }
- >>
- \new Lyrics = "altos" { s1 }
- \new Lyrics = "tenors" { s1 }
- \new Staff = men <<
- \clef bass
- \new Voice =
- "tenors" { \voiceOne <<\global \tenorMusic >> }
- \new Voice =
- "basses" { \voiceTwo <<\global \bassMusic >> }
- >>
- \new Lyrics = basses { s1 }
-
- \context Lyrics = sopranos \lyricsto sopranos \sopWords
- \context Lyrics = altos \lyricsto altos \altoWords
- \context Lyrics = tenors \lyricsto tenors \tenorWords
- \context Lyrics = basses \lyricsto basses \bassWords
- >>
-
- \layout {
- \context {
- % a little smaller so lyrics
- % can be closer to the staff
- \Staff
- \override VerticalAxisGroup #'minimum-Y-extent = #'(-3 . 3)
- }
- }
- }
+ \key c \major
+ \time 4/4
+}
+sopMusic = \relative c'' {
+ c4 c c8[( b)] c4
+}
+sopWords = \lyricmode {
+ hi hi hi hi
+}
+
+altoMusic = \relative c' {
+ e4 f d e
+}
+altoWords = \lyricmode {
+ ha ha ha ha
+}
+
+tenorMusic = \relative c' {
+ g4 a f g
+}
+tenorWords = \lyricmode {
+ hu hu hu hu
+}
+
+bassMusic = \relative c {
+ c4 c g c
+}
+bassWords = \lyricmode {
+ ho ho ho ho
+}
+
+\score {
+ \new ChoirStaff <<
+ \new Lyrics = sopranos { s1 }
+ \new Staff = women <<
+ \new Voice = "sopranos" {
+ \voiceOne
+ << \global \sopMusic >>
+ }
+ \new Voice = "altos" {
+ \voiceTwo
+ << \global \altoMusic >>
+ }
+ >>
+ \new Lyrics = "altos" { s1 }
+ \new Lyrics = "tenors" { s1 }
+ \new Staff = men <<
+ \clef bass
+ \new Voice = "tenors" {
+ \voiceOne
+ << \global \tenorMusic >>
+ }
+ \new Voice = "basses" {
+ \voiceTwo << \global \bassMusic >>
+ }
+ >>
+ \new Lyrics = basses { s1 }
+ \context Lyrics = sopranos \lyricsto sopranos \sopWords
+ \context Lyrics = altos \lyricsto altos \altoWords
+ \context Lyrics = tenors \lyricsto tenors \tenorWords
+ \context Lyrics = basses \lyricsto basses \bassWords
+ >>
+ \layout {
+ \context {
+ % a little smaller so lyrics
+ % can be closer to the staff
+ \Staff
+ \override VerticalAxisGroup #'minimum-Y-extent = #'(-3 . 3)
+ }
+ }
+}
-chant-or-psalms-notation.ly
+vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
single-staff-template-with-notes-and-lyrics.ly
adding-ambitus-per-voice.ly
skips-in-lyric-mode-2.ly
ambitus-with-multiple-voices.ly
how-to-put-ties-between-syllables-in-lyrics.ly
vertically-aligning-ossias-and-lyrics.ly
-vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
single-staff-template-with-notes,-lyrics,-and-chords.ly
formatting-lyrics-syllables.ly
piano-template-with-melody-and-lyrics.ly
-aligning-lyrics.ly
+demo-midiinstruments.ly
+chant-or-psalms-notation.ly
vocal-ensemble-template.ly
adjusting-lyrics-vertical-spacing.ly
-demo-midiinstruments.ly
+aligning-lyrics.ly
%% Do not edit this file; it is auto-generated from input/new
%% This file is in the public domain.
\version "2.11.46"
-\layout { ragged-right= ##t }
\header {
lsrtags = "repeats,staff-notation,fretted-strings"
texidoc = "By adding the @code{Volta_engraver} to the relevant
one in a score."
doctitle = "Volta multi-staff"
} % begin verbatim
+
voltaMusic = \relative c'' {
\repeat volta 2
- c1
- \alternative {
- d e
- }
-}
+ c1
+ \alternative {
+ d1
+ e
+ }
+}
<<
\new StaffGroup <<
cresc = {
#(ly:export (make-event-chord (list (make-span-event 'CrescendoEvent START))))
\set crescendoText = \markup { \italic \bold "cresc." }
- \set crescendoSpanner = #'dashed-line
+ \set crescendoSpanner = #'text
}
\layout {
--- /dev/null
+\version "2.11.48"
+\header {
+ lsrtags = "rhythms,contexts-and-engravers"
+ texidoc = "The @code{measureLength} property, together with
+@code{measurePosition}, determines when a bar line is needed. However,
+when using @code{\\scaleDurations}, the scaling of durations makes it
+difficult to change time signatures without making a mess of it.
+Therefore, @code{measureLength} has to be set manually, using the
+@code{ly:make-moment} callback. The second argument must be the same as
+the second argument of @code{\\scaleDurations}."
+ doctitle = "Changing time signatures inside a polymetric section using @code{\\scaleDurations}"
+}
+
+\layout {
+ \context {
+ \Score
+ \remove "Timing_translator"
+ \remove "Default_bar_line_engraver"
+ }
+ \context {
+ \Staff
+ \consists "Timing_translator"
+ \consists "Default_bar_line_engraver"
+ }
+}
+
+<<
+ \new Staff {
+ \scaleDurations #'(8 . 5) {
+ \time 6/8
+ \set Timing.measureLength = #(ly:make-moment 3 5)
+ b8 b b b b b
+ \time 2/4
+ \set Timing.measureLength = #(ly:make-moment 2 5)
+ b4 b
+ }
+ }
+ \new Staff {
+ \clef bass
+ \time 2/4
+ c2 d e f
+ }
+>>
\version "2.11.36"
-\layout { ragged-right= ##t }
\header {
lsrtags = "repeats,staff-notation,fretted-strings"
texidoc = "By adding the @code{Volta_engraver} to the relevant
doctitle = "Volta multi-staff"
}
-% LSR: this is a test which should get automatically
-% LSR: removed from input/lsr/ -gp
voltaMusic = \relative c'' {
\repeat volta 2
- c1
- \alternative {
- d e
- }
-}
+ c1
+ \alternative {
+ d1
+ e
+ }
+}
<<
\new StaffGroup <<
\header {
- texidoc = "Chords can be produced with the new chordname entry
+ texidoc = "Chords can be produced with the chordname entry
code (@code{\chordmode} mode), using a pitch and a suffix. Here,
the suffixes are printed below pitches.
"
\header {
texidoc ="Lyric syllables without note attachment are not
centered. Centering may cause unintended effects when the
-papercolumn is very wide."
+paper column is very wide."
}
\layout{ ragged-right = ##t }
\header
{
-texidoc = "Music function are generic music transformation functions,
+texidoc = "Music functions are generic music transformation functions,
which can be used to extend music syntax seamlessly. Here we
demonstrate a @code{\myBar} function, which works similar to
@code{\bar}, but is implemented completely in Scheme."
\version "2.11.10"
+\header {
+
+ texidoc = "Print the option help text, for comparison against
+ previous releases."
+}
#(ly:option-usage)
use of the scheme function @code{set-octavation}.
The spanner should go below a staff for 8va bassa, and the ottavation
-string can be tuned with @code{Staff.ottavation}.
+markup can be tuned with @code{Staff.ottavation}.
"
}
-\version "2.10.0"
+\version "2.11.47"
%% . There must be a minimum distance between the octavation line and the
%% topmost staff line, taking into account the height of the closing
%% . Octavation lines broken across staves must always start with `8va'
%% (or something similar).
%
-%% . The `8va' should be slightl offset to the left.
+%% . The `8va' should be slightly offset to the left.
%
%% . The final vertical dashed line of the octavation line should be offset
%% to the right.
a b c a
#(set-octavation 0)
#(set-octavation -1)
- a b c a
+ a b c a
#(set-octavation 0)
\break
a,
b
#(set-octavation 0)
c a
- #(set-octavation -1) b a g
+ #(set-octavation -1)
+ \set Staff.ottavation = \markup { \concat { 8 \tiny \raise #0.8 vb }}
+ b a g
#(set-octavation 0)
c
#(set-octavation -1)
--- /dev/null
+\version "2.11.47"
+
+\header {
+ texidoc = "Part combine texts accept markup."
+}
+
+\new Staff <<
+ \set Score.soloText = \markup { \concat { I \super o } }
+ \set Score.soloIIText = \markup { \huge \italic II }
+ \set Score.aDueText = \markup { \normal-text \rounded-box { "a 2" } }
+ \partcombine
+ \relative g' { g4 g r r a2 g }
+ \relative g' { r4 r a( b) a2 g }
+>>
\header {
- texidoc ="The new part combiner detects a2, solo1 and solo2, and prints
+ texidoc ="The part combiner detects a2, solo1 and solo2, and prints
texts accordingly.
"
\header {
texidoc = "Horizontal spacing works as expected on tied notes with
accidentals. No space is reserved for accidentals that end up not being printed,
-but accindentals that are printed don't collide with anything."
+but accidentals that are printed don't collide with anything."
}
\paper { ragged-right = ##t }
cis cis cis cis~ \break
cis
-}
\ No newline at end of file
+}
\header {
texidoc = "
In packed mode, pack notes as tight as possible. This makes
- sense mostly in combination with raggedright mode: the notes
+ sense mostly in combination with ragged-right mode: the notes
are then printed at minimum distance. This is mostly useful
for ancient notation, but may also be useful for some flavours
- of contemporary music. If not in raggedright mode, lily will
- pack as much bars of music as possible into a line, but the
+ of contemporary music. If not in ragged-right mode, lily will
+ pack as many bars of music as possible into a line, but the
line will then be stretched to fill the whole linewidth.
"
}
\version "2.11.40"
-\layout {
- ragged-right = ##t
-}
-
-
\relative {
\override Score.SpacingSpanner #'packed-spacing = ##t
c2 d4 f8[ g]
\header {
- texidoc = "If @code{raggedlast} is set, the systems are broken
+ texidoc = "If @code{ragged-last} is set, the systems are broken
similar to paragraph formatting in text: the last line is
unjustified. "
}
\layout{
- raggedlast = ##t
+ ragged-last = ##t
}
\relative c'' \new Staff { \repeat unfold 20 { c1 } }
\header {
texidoc = "New sections for spacing can be started with
-@code{@\newSpacingSection}. In this example, a section is started at
+@code{\newSpacingSection}. In this example, a section is started at
the 4/16, and a 16th in the second section takes as much space as a
8th in first section."
--- /dev/null
+
+\header {
+ texidoc = "This file gives a different result each time it is run, so
+it should always show up in the output-distance testing. "
+
+}
+
+\version "2.11.46"
+
+
+#(define time (gettimeofday))
+#(define random-number
+ (/ (random 100 (seed->random-state (+ (car time)
+ (cdr time)))) 100.0))
+
+\layout {
+ line-width = #(* cm (+ 5 (* 10 random-number)))
+ ragged-right = ##f
+}
+
+\relative { c4 d f8_\f[ g-.] }
+
\version "2.10.0"
-%If you specify two different key sigs at one point, a
-%warning is printed.
+
+\header {
+ texidoc = "If you specify two different key signatures at one point, a
+warning is printed."
+
+}
\score {
\context Voice <<
{ \key cis \major cis4 \key bes \major bes4 }
- { \key cis \major fis4 \key es \major g4 }
+ { \key cis \major fis4 \key es \major g4 }
>>
}
-
+++ /dev/null
-/*
- book-paper-def.hh -- declare Output_def
-
- source file of the GNU LilyPond music typesetter
-
- (c) 2004--2007 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#ifndef BOOK_PAPER_DEF_HH
-#define BOOK_PAPER_DEF_HH
-
-#include "output-def.hh"
-
-#error
-
-class Output_def : public Output_def
-{
-public:
- VIRTUAL_COPY_CONSTRUCTOR (Output_def, Output_def);
- Output_def (Output_def const &);
- Output_def ();
-
- virtual void derived_mark ();
-};
-
-#endif /* BOOK_PAPER_DEF_HH */
+++ /dev/null
-/*
- dimension-cache-callback.hh -- declare
-
- source file of the GNU LilyPond music typesetter
-
- (c) 2000--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
-*/
-
-#ifndef DIMENSION_CACHE_CALLBACK_HH
-#define DIMENSION_CACHE_CALLBACK_HH
-
-#include "axis.hh"
-
-typedef Interval (*Dim_cache_callback) (Grob *, Axis);
-typedef Real (*Offset_callback) (Grob *, Axis);
-
-#endif /* DIMENSION_CACHE_CALLBACK_HH */
-
#define DIMENSION_CACHE_HH
#include "lily-proto.hh"
-#include "std-vector.hh"
-#include "dimension-cache-callback.hh"
-#include "lily-guile.hh"
/*
XY offset/refpoint/extent structure.
int nchars;
Input start_location_;
bool safe_;
+ Lily_parser *parser_;
+
+ Parse_start() {
+ str = 0;
+ nchars = 0;
+ safe_ = false;
+ parser_ = 0;
+ }
};
SCM catch_protected_parse_body (void *);
SCM protected_ly_parse_scm (Parse_start *, bool);
-SCM ly_parse_scm (char const *, int *, Input, bool);
+SCM ly_parse_scm (char const *, int *, Input, bool, Lily_parser *);
#endif /* PARSE_SCM_HH */
+++ /dev/null
-/*
- swallow-perf.hh -- declare Swallow_performer
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
-*/
-
-#ifndef SWALLOW_PERF_HH
-#define SWALLOW_PERF_HH
-
-#include "performer.hh"
-
-class Swallow_performer : public Performer
-{
-public:
- VIRTUAL_COPY_CONS (Translator);
-
-protected:
- virtual bool try_music (Music *) { return true; }
-};
-
-#endif // SWALLOW_PERF_HH
Input hi = here_input();
hi.step_forward ();
SCM sval = ly_parse_scm (hi.start (), &n, hi,
- be_safe_global && is_main_input_);
+ be_safe_global && is_main_input_, parser_);
if (sval == SCM_UNDEFINED)
{
#include "international.hh"
#include "lily-lexer.hh"
#include "lily-version.hh"
+#include "ly-module.hh"
#include "main.hh"
#include "output-def.hh"
#include "paper-book.hh"
SCM
Lily_parser::make_scope () const
{
- return ly_make_anonymous_module (be_safe_global);
+ SCM module = ly_make_anonymous_module (be_safe_global);
+ return module;
}
b[X_AXIS].unite (back.extent (X_AXIS));
b[Y_AXIS].unite (back.extent (Y_AXIS));
+ b.widen (0.5 * linethick, 0.5 * linethick);
return Stencil (b, at);
}
char const *LILYPOND_DATADIR = PACKAGE_DATADIR "/" TOPLEVEL_VERSION;
+
+/* x86 defaults to using 80-bit extended precision arithmetic. This can cause
+ problems because the truncation from 80 bits to 64 bits can occur in
+ unpredictable places. To get around this, we tell the x87 FPU to use only
+ double precision. Note that this is not needed for x86_64 because that uses
+ the SSE unit by default instead of the x87 FPU. */
+#ifdef __x86__
+
+#include <fpu_control.h>
+static void configure_fpu() {
+ fpu_control_t fpu_control = 0x027f;
+ _FPU_SETCW (fpu_control);
+}
+
+#else
+
+static void configure_fpu() {
+}
+
+#endif /* __x86__ */
+
+
static void
env_var_info (FILE *out, char const *key)
{
int
main (int argc, char **argv, char **envp)
{
+ configure_fpu();
+
for (char **p = envp; *p; p++)
start_environment_global.push_back(*p);
#include "engraver.hh"
+#include "international.hh"
#include "item.hh"
-#include "pointer-group-interface.hh"
-#include "text-interface.hh"
#include "note-column.hh"
+#include "pointer-group-interface.hh"
#include "self-alignment-interface.hh"
#include "spanner.hh"
#include "stream-event.hh"
+#include "text-interface.hh"
#include "translator.icc"
if (cresc_type != ly_symbol2scm ("hairpin"))
{
// Fixme: should put value in error message.
- ly_display_scm (cresc_type);
+ string as_string = ly_scm_write_string (cresc_type);
current_span_event_
- ->origin()->warning ("unknown crescendo style; defaulting to hairpin.");
+ ->origin()->warning (_f ("unknown crescendo style: %s\ndefaulting to hairpin.", as_string.c_str()));
}
current_spanner_ = make_spanner ("Hairpin",
current_span_event_->self_scm ());
#include <cstdio>
using namespace std;
+#include "lily-parser.hh"
#include "international.hh"
#include "main.hh"
#include "paper-book.hh"
SCM answer = SCM_UNSPECIFIED;
SCM form = scm_read (port);
-
/* Reset read_buf for scm_ftell.
Shouldn't scm_read () do this for us? */
scm_fill_input (port);
SCM function = ly_lily_module_constant ("make-safe-lilypond-module");
module = scm_call_0 (function);
}
+
+ // We define the parser so trusted Scheme functions can
+ // access the real namespace underlying the parser.
+ if (ps->parser_)
+ scm_module_define (module, ly_symbol2scm ("parser"),
+ ps->parser_->self_scm());
answer = scm_eval (form, module);
}
else
/* Try parsing. Upon failure return SCM_UNDEFINED.
FIXME: shouldn't we return SCM_UNSCPECIFIED -- jcn */
SCM
-ly_parse_scm (char const *s, int *n, Input i, bool safe)
+ly_parse_scm (char const *s, int *n, Input i, bool safe, Lily_parser *parser)
{
Parse_start ps;
ps.str = s;
ps.start_location_ = i;
ps.safe_ = safe;
+ ps.parser_ = parser;
SCM ans = parse_protect_global ? protected_ly_parse_scm (&ps)
: internal_ly_parse_scm (&ps);
(make-clef-set type))
-compressMusic =
+scaleDurations =
#(define-music-function
(parser location fraction music) (number-pair? ly:music?)
(ly:music-compress music (ly:make-moment (car fraction) (cdr fraction))))
cresc = {
#(ly:export (make-event-chord (list cr)))
\set crescendoText = \markup { \italic "cresc." }
- \set crescendoSpanner = #'dashed-line
+ \set crescendoSpanner = #'text
}
#(ly:export (make-event-chord (list decr)))
\set decrescendoText = \markup { \italic "dim." }
- \set decrescendoSpanner = #'dashed-line
+ \set decrescendoSpanner = #'text
}
enddim = {
CONVERT_LY = $(script-dir)/convert-ly.py
LILYPOND_BOOK = $(script-dir)/lilypond-book.py
-LILYPOND_BOOK_INCLUDES = -I $(src-dir)/ -I $(outdir) -I $(input-dir) -I $(input-dir)/regression/ -I $(input-dir)/manual/ -I $(input-dir)/tutorial/ -I $(top-build-dir)/mf/$(outconfbase)/ -I $(top-build-dir)/mf/out/ -I $(input-dir)/lsr/
+LILYPOND_BOOK_INCLUDES = -I $(src-dir)/ -I $(outdir) -I $(input-dir) \
+ -I $(input-dir)/regression/ -I $(input-dir)/manual/ -I \
+ $(input-dir)/tutorial/ -I $(top-build-dir)/mf/$(outconfbase)/ -I \
+ $(top-build-dir)/mf/out/ -I $(input-dir)/lsr/ -I \
+ $(top-src-dir)/input/manual
## override from cmd line to speed up.
ANTI_ALIAS_FACTOR=2
$(LANG_DOCTITLE_FLAGS) \
--header=texidoc \
$(LANG_TEXIDOC_FLAGS) \
--I $(top-src-dir)/input/manual \
-dcheck-internal-types \
-ddump-signatures \
-danti-alias-factor=$(ANTI_ALIAS_FACTOR)
.SUFFIXES: .doc .tely .texi .ly
# TODO: fix hardcoded out/ ?
-LYS_OUTPUT_OPTION= --lily-output-dir $(top-build-dir)/out/lybook-db/
+LYS_OUTPUT_OPTION= --lily-output-dir $(LYS_OUTPUT_DIR)
+LYS_OUTPUT_DIR=$(top-build-dir)/out/lybook-db/
LILYPOND_BOOK_FLAGS += $(LYS_OUTPUT_OPTION)
$(outdir)/%.latex: %.doc
- $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_INCLUDES) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) $(LILYPOND_BOOK_FLAGS) $<
+ $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) $(LILYPOND_BOOK_FLAGS) $<
# don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir.
# it is not, for --srcdir builds
$(outdir)/%.texi: %.tely $(outdir)/version.itexi
- $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_INCLUDES) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) $<
+ $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) $<
$(outdir)/%.texi: $(outdir)/%.tely $(outdir)/version.itexi
echo -e '\n\n\n' ; \
(cd $(top-src-dir) && git diff ) ; \
fi > $(outdir)/tree.gittxt
- $(MAKE) LILYPOND_BOOK_LILYPOND_FLAGS="-dbackend=eps --formats=ps $(LILYPOND_JOBS) -dseparate-log-files -dinclude-eps-fonts -dgs-load-lily-fonts --header=texidoc -I $(top-src-dir)/input/manual -ddump-profile -dcheck-internal-types -ddump-signatures -danti-alias-factor=1" LILYPOND_BOOK_VERBOSE= $(outdir)/collated-files.html
+ $(MAKE) LILYPOND_BOOK_LILYPOND_FLAGS="-dbackend=eps --formats=ps $(LILYPOND_JOBS) -dseparate-log-files -dinclude-eps-fonts -dgs-load-lily-fonts --header=texidoc -I $(top-src-dir)/input/manual -ddump-profile -dcheck-internal-types -ddump-signatures -danti-alias-factor=1" LILYPOND_BOOK_VERBOSE= $(outdir)/collated-files.html LYS_OUTPUT_DIR=$(top-build-dir)/out/lybook-testdb
rsync -L -a --exclude 'out-*' --exclude 'out' --exclude mf --exclude source --exclude mf $(top-build-dir)/out/share $(outdir)
r"\\revert Hairpin #'to-barline", str)
str = re.sub (r"hairpinToBarline\s*=\s*##([tf]+)",
r"\\override Hairpin #'to-barline = ##\1", str)
+ str = re.sub (r"\\set (de)?crescendoSpanner = #'dashed-line",
+ r"\\set \1crescendoSpanner = #'text", str)
return str
conversions.append (((2, 11, 46), conv, """\\set hairpinToBarline -> \\override Hairpin #'to-barline"""))
+
+def conv (str):
+ str = re.sub (r"compressMusic", r"scaleDurations", str)
+ return str
+
+conversions.append (((2, 11, 48), conv, """\\compressMusic -> \\scaleDurations"""))
start times, music objects and whether they are processed in this
context.")
(rehearsalMark ,integer? "The last rehearsal mark printed.")
- (repeatCommands ,list? "This property is read to find any command
-of the form @code{(volta . @var{x})}, where @var{x} is a string or
-@code{#f}.")
+ (repeatCommands ,list? "This property is a list of commands
+of the form @code{(list 'volta @var{x})}, where @var{x} is a string or
+@code{#f}. @code{'end-repeat} is also accepted as a command.")
(restNumberThreshold ,number? "If a multimeasure rest has more
measures than this, a number is printed.")
other object. Otherwise, it determines whether the object is placed
@code{#UP}, @code{#CENTER} or @code{#DOWN}. Numerical values may also
be used: @code{#UP}=@code{1}, @code{#DOWN}=@code{-1},
-@code{#LEFT}=@code{-1}, @code{#RIGHT}=@code{1}, @code{CENTER}=@code{0}
+@code{#LEFT}=@code{-1}, @code{#RIGHT}=@code{1}, @code{#CENTER}=@code{0}
but also other numerical values are permitted.")
(dot-color ,symbol? "Color of dots. Options include
@code{black} and @code{white}.")
(number->string log)))
(cons (+ (car attach-off) (if (< dir 0) stem-thickness 0)) stemy)))))
- (if (and dots flaggl (> dir 0))
- (set! dots (ly:stencil-translate-axis dots 0.35 X)))
+ ; If there is a flag on an upstem and the stem is short, move the dots to avoid the flag.
+ ; 16th notes get a special case because their flags hang lower than any other flags.
+ (if (and dots (> dir 0) (> log 2) (or (< dir 1.15) (and (= log 4) (< dir 1.3))))
+ (set! dots (ly:stencil-translate-axis dots 0.5 X)))
(if flaggl
(set! stem-glyph (ly:stencil-add flaggl stem-glyph)))
(if (ly:stencil? stem-glyph)
(define-safe-public (set-global-staff-size sz)
"Set the default staff size, where SZ is thought to be in PT."
(let* ((current-mod (current-module))
- (pap (eval '$defaultpaper current-mod))
+ (parser (eval 'parser current-mod))
+ (pap (ly:parser-lookup parser '$defaultpaper))
(in-layout? (or (module-defined? current-mod 'is-paper)
(module-defined? current-mod 'is-layout)))
(define-public (make-circle-stencil radius thickness fill)
"Make a circle of radius @var{radius} and thickness @var{thickness}"
+ (let*
+ ((out-radius (+ radius (/ thickness 2.0))))
+
(ly:make-stencil
(list 'circle radius thickness fill)
- (cons (- radius) radius)
- (cons (- radius) radius)))
+ (cons (- out-radius) out-radius)
+ (cons (- out-radius) out-radius))))
(define-public (box-grob-stencil grob)
"Make a box of exactly the extents of the grob. The box precisely
if not skip_lily:
require_file (base + '-systems.count')
+ if 'ddump-profile' in global_options.process_cmd:
+ require_file (base + '.profile')
+ if 'dseparate-log-file' in global_options.process_cmd:
+ require_file (base + '.log')
+
map (consider_file, [base + '.tex',
base + '.eps',
base + '.texidoc',
system_count = 0
if not skip_lily and not missing:
system_count = int(file (full + '-systems.count').read())
+
for number in range(1, system_count + 1):
systemfile = '%s-%d' % (base, number)
require_file (systemfile + '.eps')
consider_file (systemfile + '.pdf')
-
+
+ # We can't require signatures, since books and toplevel
+ # markups do not output a signature.
+ if 'ddump-signature' in global_options.process_cmd:
+ consider_file (systemfile + '.signature')
+
+
return (result, missing)
def is_outdated (self, output_dir, current_files):
+ ' --formats=%s -dbackend=eps ' % formats)
if global_options.process_cmd:
- global_options.process_cmd += ' '.join ([(' -I %s' % ly.mkarg (p))
- for p in global_options.include_path])
+ includes = global_options.include_path
+ if global_options.lily_output_dir:
+ # This must be first, so lilypond prefers to read .ly
+ # files in the other lybookdb dir.
+ includes = [os.path.abspath(global_options.lily_output_dir)] + includes
+ global_options.process_cmd += ' '.join ([' -I %s' % ly.mkarg (p)
+ for p in includes])
if global_options.format in (TEXINFO, LATEX):
## prevent PDF from being switched on by default.