+++ /dev/null
-*.abc
-*.aux
-*.dvi
-*.eps
-*.html
-*.latex
-*.log
-*.ly
-*.midi
-*.patch
-*.pats
-*.pats
-*.pdf
-*.png
-*.ps
-*.pyc
-*.svg
-*.tely
-*.tex
-*.twy
-*.txt
-*/out/*
-*configure
-*~
-.gdbinit
-.htaccess
-.lineno
-GNUmakefile
-aclocal.m4
-autom4te.cache
-config-*.h
-config-*.hh
-config-*.make
-config-*.status
-config.hh
-config.make
-config.status
-config.status.lineno
-custom.py
-dummy.dep
-nohup.out
-out
-out-*
-out-www
-pats
-socket-output
*.600pk
*.afm
*.aux
+*.checksum
*.eps
*.gcda
*.gcno
*.gcov
+*.graph
*.log
*.midi
+*.new
*.orig
*.patch
*.pats
-*.pdf
-*.ps
+*.profile
*.pyc
*.rej
*.signature
+*.stacks
*.svg
*.tfm
*~
.dotest
.gdbinit
.htaccess
+/*.abc
/*.html
/*.ly
+/*.pdf
/*.png
+/*.po
+/*.ppm
+/*.ps
/.sconf_temp
/.sconsign.dblite
/GNUmakefile
a.out
aclocal.m4
autom4te.cache
+config-*.hh
+config-*.make
config.hh
config.log
config.make
configure
gcstat*.scm
lily-[0-9a-f][0-9a-f][0-9a-f]*
-out-scons
+nohup.out
out-cov
+out-scons
out-test
+pats
tags
test-output-distance
-config-*.hh
-config-*.make
-*.graph
-*.stacks
-*.profile
@node Interpretation contexts
@section Interpretation contexts
-Cette section traite des contextes : que sont-ils ? Comment les modifier ?
+Cette section traite des contextes.
@menu
-* Contexts explained::
-* Creating contexts::
* Changing context properties on the fly::
* Modifying context plug-ins::
* Layout tunings within contexts::
@end menu
-@node Contexts explained
-@subsection Contexts explained
-
-Imprimer de la musique impose d'ajouter un certain nombre d'éléments de notation.
-Par exemple, voici un fragment de partition, précédé du code qui l'engendre :
-
-@lilypond[quote,verbatim,relative=2,fragment]
-cis4 cis2. g4
-@end lilypond
-
-Si le code est assez austère, dans la parition ont été ajoutés un chiffre de mesure,
-des barres de mesure, des altérations et une clé. Pour une bonne raison : LilyPond
-@emph{interprète} le code. Il le compulse dans l'ordre chronologique, de même qu'on
-lit une partition de gauche à droite ; et pendant ce traitement, le logiciel garde en
-mémoire les limites des mesures, ou encore quelles hauteurs de notes demandent des
-altérations accidentelles. Ces informations se présentent à plusieurs niveaux : ainsi,
-une altération n'a d'effet que sur une seule portée, tandis qu'une barre de mesure doit
-être synchronisée sur toute l'étendue verticale de la partition.
-
-LilyPond regroupe ces règles et ces fragments d'information dans des
-@emph{Contextes}. Certains contextes sont les voix (contexte @context{Voice}),
-les portées (contexte @context{Staff}), ou la partition dans son ensemble
-(contexte @context{Score}). Ils sont ordonnés hiérarchiquement : ainsi un
-contexte @context{Staff} peut contenir plusieurs contextes @context{Voice}, et un
-contexte @context{Score} peut contenir plusieurs contextes @context{Staff}.
-
-@quotation
-@image{context-example,5cm,,}
-@end quotation
-
-Chaque contexte est chargé de faire appliquer certaines règles de gravure,
-de créer certains objets, et de prendre en compte les propriétés qui leur
-sont associées. Ainsi, le contexte @context{Voice} peut faire intervenir une
-altération accidentelle, puis le contexte @context{Staff} devra déterminer si
-cette dernière devra être imprimée ou non dans la suite de la mesure. Les barres
-de mesure, enfin, sont alignées verticalement grâce au contexte @context{Score}.
-
-En revanche, dans une musique polymétrique, par exemple mélant une portée à 3/4
-et une autre à 4/4, les barres de mesures n'ont plus à être alignées : il faut alors
-modifier les comportement par défaut des contextes @context{Score} et @context{Staff}.
-
-Dans une partition très simple, les contextes sont créés implicitement, et peuvent
-être ignorés. Mais lorsqu'il s'agit de morceaux plus amples -- entendons par là tout
-ce qui s'écrit sur plus d'une portée -- il faut les créer explicitement pour être sûr
-d'obtenir toutes les portées nécessaires, et dans le bon ordre. Enfin pour des
-morceaux impliquant une notation spéciale, modifier les contextes ou en créer de nouveaux
-devient extrêment utile.
-
-Une description exhaustive de tous les contextes disponibles peut être trouvée dans la
-référence du programme : voir
-@ifhtml
-@internalsref{Contexts}.
-@end ifhtml
-@ifnothtml
-Translation @expansion{} Context.
-@end ifnothtml
-
-@c [TODO: describe propagation]
-
-
-@node Creating contexts
-@subsection Creating contexts
-
-Dans une partition contenant une seule voix sur une seule portée,
-les contextes sont automatiquement créés. Dans une partition plus complexe,
-il faut les crééer à la main. Trois commandes le permettent :
-
-@itemize @bullet
-
-@item
-La plus facile, et la plus rapide à saisir, est @code{\new} -- @qq{nouveau} en français.
-Elle introduit une expression musicale, comme suit :
-
-@funindex \new
-@cindex nouveaux contextes
-@cindex Contextes, création de
-
-@example
-\new @var{Contexte} @var{expression musicale}
-@end example
-
-@noindent
-le choix du @var{Contexte} pouvant être, par exemple, @code{Staff} ou
-@code{Voice}. Cette commande crée un contexte, puis interprète
-l'@var{expression musicale} dans ledit contexte.
-
-En pratique, la commande @code{\new} peut servir dans une partition
-comprenant plusieurs portées. Comme chaque partie doit se trouver sur sa propre
-portée, il faut la faire précéder de @code{\new Staff}.
-
-@lilypond[quote,verbatim,relative=2,ragged-right,fragment]
-<<
- \new Staff { c4 c }
- \new Staff { d4 d }
->>
-@end lilypond
-
-La commande @code{\new} peut aussi permettre de nommer le contexte créé :
-
-@example
-\new @var{Contexte} = @var{"inventezUnNom"} @var{musique}
-@end example
-Le nom que vous choisirez ne pourra être attribué que si aucun autre contexte
-n'a été créé précédemment avec le même nom.
-
-
-@funindex \context
-
-@item
-Tout comme @code{\new}, la commande @code{\context} envoie une expression musicale
-vers un contexte donné, mais attribue nécessairement un nom à ce contexte. La
-syntaxe est la suivante :
-
-@example
-\context @var{Contexte} = @var{unNom} @var{musique}
-@end example
-
-Cette commande va partir à la recherche d'un contexte déjà existant, de type
-@var{Contexte}, et portant le nom @var{unNom}. Ce qui peut être fort utile
-pour se référer à un contexte existant. S'il s'avère que le contexte en question
-n'existe pas encore, il est créé. Dans le cas de musique vocale avec des paroles,
-cela donne :
-
-@example
-\context Voice = "@b{tenor}" @var{musique}
-@end example
-
-@noindent
-et (pour que le texte soit aligné correctement avec les notes) :
-
-@example
-\new Lyrics \lyricsto "@b{tenor}" @var{paroles}
-@end example
-
-@noindent
-
-Une autre utilité de dénommer les contextes est de superposer en un même
-contexte différentes expressions musicales. Dans l'exemple suivant, les
-notes et les ponctuations ont été saisies séparément :
-
-@example
-musique = @{ c4 c4 @}
-ponctuation = @{ s4-. s4-> @}
-@end example
-
-En les envoyant toutes deux dans le même contexte @context{Voice}, on les combine :
-
-@example
-<<
- \new Staff \context Voice = "A" \musique
- \context Voice = "A" \ponctuation
->>
-@end example
-@lilypond[quote,ragged-right]
-music = { c4 c4 }
-arts = { s4-. s4-> }
-\relative c'' <<
- \new Staff \context Voice = "A" \music
- \context Voice = "A" \arts
->>
-@end lilypond
-
-De cette façon, il est possible d'élaborer une édition Urtext (c'est-à -dire originale,
-la plupart du temps sans ponctuations), en laissant la possibilité d'ajouter différentes
-ponctuations sur les mêmes notes.
-
-@cindex crééer des contextes
-
-@item
-La dernière commande pour créer des contextes est
-@example
-\context @var{Contexte} @var{musique}
-@end example
-
-
-@noindent
-Elle ressemble à l'emploi de @code{\context} avec @code{= @var{unNom}}, mais
-cette fois elle se considèrera chez elle partout où elle trouvera un contexte
-de type @var{Contexte}, quel que puisse être son nom.
-
-@c Au secours ! --vv
-
-Cette variante sert à des expressions musicales qui peuvent être interprétées Ã
-plusieurs niveaux. Par exemple, une commande telle que @code{\applyOutput} (voir
-@ref{Running a function on all layout objects}) : si elle n'est pas associée avec
-@code{\context}, elle s'applique par défaut dans le contexte @context{Voice}.
-
-@example
-\applyOutput #'@var{Contexte} #@var{fonction} % s'applique dans le contexte Voice
-@end example
-
-Pour l'appliquer au contexte @context{Score} ou @context{Staff}, il faut utiliser :
-
-@example
-\applyOutput #'Score #@var{fonction}
-\applyOutput #'Staff #@var{fonction}
-@end example
-
-@end itemize
-
-
@node Changing context properties on the fly
@subsection Changing context properties on the fly
@c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
@c This file is part of lilypond-learning.tely
@ignore
- Translation of GIT committish: 5a2beb9fbe0e28ed499f0191d16f7e2a5d86dee1
+ Translation of GIT committish: 007d0b5b94c36f9d9e228309d5b0e6a67ae27ebc
When revising a translation, copy the HEAD committish of the
version that you are working on. See TRANSLATION for details.
@node Fundamental concepts
@chapter Fundamental concepts
-UNTRANSLATED NODE: IGNORE ME
-@menu
+@menu
* How LilyPond files work::
* Voices contain music::
* Contexts and engravers::
* Extending the templates::
-@end menu
+@end menu
+
@node How LilyPond files work
@section How LilyPond files work
-UNTRANSLATED NODE: IGNORE ME
+La mise en forme des fichiers d'entrée de LilyPond est vraiment
+peu astreignante, afin d'offrir assez de souplesse aux utilisateurs
+expérimentés pour qu'ils puissent organiser leurs fichiers comme
+ils l'entendent. Cependant, les nouveaux utilisateurs peuvent parfois
+se perdre en raison de cette souplesse. Cette section présente
+sommairement l'organisation du code LilyPond, en privilégiant
+la simplicité au détriment de certains détails. Vous trouverez une
+description plus complète dans @ruser{File structure}.
@menu
* Introduction to the LilyPond file structure::
* Score is a (single) compound musical expression::
-* Nesting Music Expressions::
+* Nesting music expressions::
* On the un-nestedness of brackets and ties::
-@end menu
+@end menu
+
@node Introduction to the LilyPond file structure
@subsection Introduction to the LilyPond file structure
-UNTRANSLATED NODE: IGNORE ME
+@c FIXME this subsection translation is very outdated
+@c but wait until it is in a stable state in English
+
+La plupart des exemples de ce manuel sont de courts fragments, par exemple
+
+@example
+c4 a b c
+@end example
+
+Comme vous le savez maintenant (du moins nous l'espèrons), ceci ne
+peut pas être traité en tant que tel. Il s'agit de formes abrégées des
+exemples complets ; pour pouvoir être traitées, ces formeulations
+doivent au moins être encadrées par des accolades :
+
+@example
+@{
+ c4 a b c
+@}
+@end example
+
+La plupart des exemples font aussi intervenir la commande
+@code{\relative}, suivie de @code{c'} ou @code{c''}. Elle n'est pas Ã
+proprement parler nécessaire pour le traitement des exemples, mais
+dans la plupart des cas le résultat sera vraiment déplorable si vous
+l'oubliez.
+
+@lilypond[quote,fragment,ragged-right,verbatim]
+\relative c'' {
+ c4 a b c
+}
+@end lilypond
+
+C'est ici que nous passons aux choses sérieuses : le code LilyPond,
+sous cette forme, est en réalité un @emph{autre} raccourci. Même s'il
+est traité sans problème, et aboutit au bon résultat, c'est une forme
+abrégée de :
+
+@example
+\score @{
+ \relative c'' @{
+ c4 a b c
+ @}
+@}
+@end example
+
+Un bloc @code{\score} doit commencer par une et une seule expression
+musicale. Rappelez-vous que cette expression peut être ce que vous
+voulez, d'une note toute seule à un gigantesque
+
+@example
+@{
+ \new GrandStaff <<
+ collez ici la partition complète de votre opéra de Wagner préféré
+ >>
+@}
+@end example
+
+@noindent
+Dès lors que tout cela est entre accolades : @code{@{ ... @}}, c'est
+une et une seule expression musicale.
+
+Le bloc @code{\score} peut contenir d'autres éléments, tels que
+
+@example
+\score @{
+ @{ c'4 a b c' @}
+ \layout @{ @}
+ \midi @{ @}
+ \header @{ @}
+@}
+@end example
+
+@noindent
+Certains préfèrent mettre ces commandes en dehors du bloc
+@code{\score} --- par exemple, on met souvent le @code{\header}
+au-dessus. C'est juste là une autre forme abrégée que LilyPond
+accepte.
+
+@cindex variables
+@cindex identificateurs
+
+Un autre raccourci pratique est la possibilité de définir
+des variables --- également appelées @qq{identificateurs}. Dans tous
+les modèles, vous trouverez :
+
+@example
+melodie = \relative c' @{
+ c4 a b c
+@}
+
+\score @{
+ @{ \melodie @}
+@}
+@end example
+
+Lorsque LilyPond examinera ce fichier, il va prendre la valeur de la
+variable @code{melodie}, c'est-Ã -dire tout ce qui suit le signe @code{=},
+et l'insérer partout où il rencontrera @code{\melodie}. Vous êtes
+libre de choisir comment dénommer vos variables@footnote{Les noms de
+variables sont sensibles à la casse, et ne peuvent contenir ni
+chiffre, ni tiret, ni caractère accentué.} ; ce peut être
+@code{melodie}, @code{global}, @code{maindroitepiano}, ou
+@code{laTeteAToto}. Pour plus de détails, voir @ruser{Saving typing
+with identifiers and functions}.
+
+Pour une description complète du format des fichiers d'entrée, voir
+@ruser{File structure}.
+
@node Score is a (single) compound musical expression
@subsection Score is a (single) compound musical expression
-UNTRANSLATED NODE: IGNORE ME
-
-@node Nesting Music Expressions
-@subsection Nesting Music Expressions
+Dans la section précédente, nous avons vu l'organisation générale des
+fichiers d'entrée de LilyPond. Mais c'est comme si nous avions éludé la
+question essentielle : comment diable peut-on savoir quoi mettre après
+@code{\score} ?
+
+En fait, nous ne l'avons pas éludée du tout : le grand mystère est
+tout simplement qu'il n'y a @emph{pas} de mystère. Allez,
+expliquons-le en une ligne :
+
+@quotation
+@emph{Un bloc @code{\score} doit commencer par une et une seule
+expression musicale.}
+@end quotation
+
+@noindent
+Peut-être serait-il judicieux de relire la section
+@ruser{Music expressions explained}, dans laquelle vous avez
+appris à construire de grandes expressions musicales petit bout
+par petit bout --- nous avons vu les notes, puis les accords, etc.
+Maintenant, nous allons partir d'une grande expression musicale,
+et remonter la pente.
+
+@example
+\score @{
+ @{ % cette accolade marque le début de l'expression musicale
+ \new GrandStaff <<
+ insérez ici votre opéra de Wagner préféré
+ >>
+ @} % cette accolade marque la fin de l'expression musicale
+ \layout @{ @}
+@}
+@end example
+
+Un opéra de Wagner multiplierait facilement la longueur de ce manuel
+par deux ou trois, alors faisons-le en version chant/piano. On n'a
+plus besoin d'une partition d'orchestre --- @code{GrandStaff} --- donc
+laissons cela de côté. Par contre, un chanteur et un piano
+@emph{pourraient} nous être utiles.
+
+@example
+\score @{
+ @{
+ <<
+ \new Staff = "chanteur" <<
+ >>
+ \new PianoStaff = piano <<
+ >>
+ >>
+ @}
+ \layout @{ @}
+@}
+@end example
+
+Vous vous souvenez que nous avons recours à @code{<<} et @code{>>}
+pour mettre en place des musiques simultanées. Et, pour le
+coup, on aimerait @emph{vraiment} que la partie vocale et l'accompagnement
+soient imprimés ensemble...
+
+@example
+\score @{
+ @{
+ <<
+ \new Staff = "chanteur" <<
+ \new Voice = "chant" @{ @}
+ >>
+ \new Lyrics \lyricsto chant \new Lyrics @{ @}
+ \new PianoStaff = "piano" <<
+ \new Staff = "mainDroite" @{ @}
+ \new Staff = "mainGauche" @{ @}
+ >>
+ >>
+ @}
+ \layout @{ @}
+@}
+@end example
+
+On y voit nettement plus clair maintenant. Nous voici donc avec la
+partie du chanteur, qui contient un ensemble @code{Voice}, ce qui dans
+LilyPond correspond à une voix, au sens de voix d'une polyphonie plutôt que
+de voix chantée --- ce pourrait être une partie de violon par
+exemple.
+
+Nous avons également une partie de piano, qui contient deux portées :
+une pour la main droite, une autre pour la main gauche.
+
+
+À ce point, on pourrait commencer à ajouter les notes. Dans les
+accolades qui suivent @code{\new Voice = chant}, on pourrait commencer
+à écrire
+
+@example
+\relative c'' @{
+ a4 b c d
+@}
+@end example
+
+Mais si l'on procédait ainsi, la section @code{\score} deviendrait
+vite assez touffue, et très rapidement on ne s'y retrouverait plus.
+C'est pourquoi on utilisera plutôt des variables, ou identificateurs :
+
+@example
+melodie = @{ @}
+texte = @{ @}
+mainDroite = @{ @}
+mainGauche = @{ @}
+\score @{
+ @{
+ <<
+ \new Staff = "chanteur" <<
+ \new Voice = "chant" @{ \melodie @}
+ >>
+ \new Lyrics \lyricsto chant \new Lyrics @{ \texte @}
+ \new PianoStaff = "piano" <<
+ \new Staff = "mainDroite" @{ \mainDroite @}
+ \new Staff = "mainGauche" @{ \mainGauche @}
+ >>
+ >>
+ @}
+ \layout @{ @}
+@}
+@end example
+
+@noindent
+Souvenez-vous que vous pouvez donner aux variables le nom que vous
+voulez, à condition de respecter les caractères autorisés. Ces
+limitations sont décrites dans @ruser{File structure}.
+
+Quand on écrit, ou que l'on lit, une section @code{\score}, mieux vaut
+y aller lentement et soigneusement. Commencez par le niveau le plus
+large, puis travaillez sur chaque niveau plus détaillé. À ce propos,
+une indentation stricte et propre est vraiment d'une aide précieuse :
+assurez-vous que chaque élément d'un même niveau a le même décalage
+horizontal dans votre éditeur de texte !
+
+
+
+@node Nesting music expressions
+@subsection Nesting music expressions
UNTRANSLATED NODE: IGNORE ME
-@
@node On the un-nestedness of brackets and ties
@subsection On the un-nestedness of brackets and ties
UNTRANSLATED NODE: IGNORE ME
-@menu
+@menu
* I'm hearing Voices::
* Explicitly instantiating voices::
* Voices and vocals::
-@end menu
+@end menu
+
@node I'm hearing Voices
@subsection I'm hearing Voices
@node Explicitly instantiating voices
@subsection Explicitly instantiating voices
-UNTRANSLATED NODE: IGNORE ME
+Les contextes @internalsref{Voice} peuvent être déclarés manuellement
+dans un bloc @code{<< >>} pour créer de la musique polyphonique, en
+utilisant @code{\voiceOne}, @dots{} jusqu'Ã @code{\voiceFour} pour
+assigner des directions de hampes et un déplacement horizontal pour
+chaque partie.
+
+En particulier,
+@example
+<< \upper \\ \lower >>
+@end example
+
+@noindent
+équivaut Ã
+
+@example
+<<
+ \new Voice = "1" @{ \voiceOne \upper @}
+ \new Voice = "2" @{ \voiceTwo \lower @}
+>>
+@end example
+
+Les commandes @code{\voiceXXX} fixent la direction des hampes, des
+liaisons de prolongations et de phrasé, des articulations, des
+annotations, des points d'augmentation des notes pointées et des
+doigtés. @code{\voiceOne} et @code{\voiceThree} font pointer ces objets
+vers le haut, alors que @code{\voiceTwo} et @code{\voiceFour} les font
+pointer vers le bas. La commande @code{\oneVoice} les ramène aux
+critères normaux.
+
+Une expression séquentielle qui apparaît en premier dans un @code{<< >>}
+appartient à la voix principale. Ceci est utile lorsque des voix
+supplémentaires apparaissent pendant que la voix principale est jouée.
+Voici une meilleure réalisation de l'exemple de la section précédente.
+Les notes colorées et en croix mettent en évidence le fait que la mélodie principale
+est maintenant dans un seul contexte de voix.
+
+@lilypond[quote,ragged-right,verbatim]
+\new Staff \relative c' {
+ \override NoteHead #'style = #'cross
+ \override NoteHead #'color = #red
+ c16 d e f
+ \voiceOne
+ <<
+ { g4 f e | d2 e2 }
+ \new Voice="1" { \voiceTwo
+ r8 e4 d c8 ~ | c8 b16 a b8 g ~ g2
+ \oneVoice
+ }
+ \new Voice { \voiceThree
+ s2. | s4 b4 c2
+ \oneVoice
+ }
+ >>
+ \oneVoice
+}
+@end lilypond
+
+La définition correcte des voix permet à la mélodie d'être liée.
+@lilypond[quote,ragged-right,verbatim]
+\new Staff \relative c' {
+ c16^( d e f
+ \voiceOne
+ <<
+ { g4 f e | d2 e2) }
+ \context Voice="1" { \voiceTwo
+ r8 e4 d c8 ~ | c8 b16 a b8 g ~ g2
+ \oneVoice
+ }
+ \new Voice { \voiceThree
+ s2. s4 b4 c2
+ \oneVoice
+ }
+ >>
+ \oneVoice
+}
+@end lilypond
+
+Le fait d'éviter le séparateur @code{\\} permet aussi d'imbriquer des
+constructions polyphoniques, ce qui peut être une manière plus naturelle
+de saisir la musique.
+
+@lilypond[quote,ragged-right,verbatim]
+\new Staff \relative c' {
+ c16^( d e f
+ \voiceOne
+ <<
+ { g4 f e | d2 e2) }
+ \context Voice="1" { \voiceTwo
+ r8 e4 d c8 ~ |
+ <<
+ {c8 b16 a b8 g ~ g2}
+ \new Voice { \voiceThree
+ s4 b4 c2
+ \oneVoice
+ }
+ >>
+ \oneVoice
+ }
+ >>
+ \oneVoice
+}
+@end lilypond
+
+Dans certaines circonstances de polyphonie complexe, vous pourrez être
+amené à recourir à des voix supplémentaires afin d'éviter des collisions
+de notes. Ces voix additionnelles s'ajoutent en définissant un
+identificateur, comme le montre l'exemple suivant :
+
+@lilypond[quote,verbatim,ragged-right,relative=2]
+voiceFive = #(context-spec-music (make-voice-props-set 4) 'Voice)
+
+\relative c''' <<
+ { \voiceOne g4 ~ \stemDown g32[ f( es d c b a b64 )g] } \\
+ { \voiceThree b4} \\
+ { \voiceFive d,} \\
+ { \voiceTwo g,}
+>>
+@end lilypond
+
@node Voices and vocals
@subsection Voices and vocals
@node Contexts and engravers
@section Contexts and engravers
-UNTRANSLATED NODE: IGNORE ME
+Nous avons évoqué rapidement les contextes et graveurs dans les sections
+précédentes ; examinons en détail ces concepts essentiels dans la
+maîtrise de LilyPond.
-@menu
+@menu
* Contexts explained::
* Creating contexts::
* Engravers explained::
* Modifying context properties::
* Adding and removing engravers::
-@end menu
+@end menu
+
@node Contexts explained
@subsection Contexts explained
-UNTRANSLATED NODE: IGNORE ME
+Imprimer de la musique impose d'ajouter un certain nombre d'éléments de notation.
+Par exemple, voici un fragment de partition, précédé du code qui l'engendre :
+
+@lilypond[quote,verbatim,relative=2,fragment]
+cis4 cis2. g4
+@end lilypond
+
+Si le code est assez austère, dans la parition ont été ajoutés un chiffre de mesure,
+des barres de mesure, des altérations et une clé. Pour une bonne raison : LilyPond
+@emph{interprète} le code. Il le compulse dans l'ordre chronologique, de même qu'on
+lit une partition de gauche à droite ; et pendant ce traitement, le logiciel garde en
+mémoire les limites des mesures, ou encore quelles hauteurs de notes demandent des
+altérations accidentelles. Ces informations se présentent à plusieurs niveaux : ainsi,
+une altération n'a d'effet que sur une seule portée, tandis qu'une barre de mesure doit
+être synchronisée sur toute l'étendue verticale de la partition.
+
+LilyPond regroupe ces règles et ces fragments d'information dans des
+@emph{Contextes}. Certains contextes sont les voix (contexte @context{Voice}),
+les portées (contexte @context{Staff}), ou la partition dans son ensemble
+(contexte @context{Score}). Ils sont ordonnés hiérarchiquement : ainsi un
+contexte @context{Staff} peut contenir plusieurs contextes @context{Voice}, et un
+contexte @context{Score} peut contenir plusieurs contextes @context{Staff}.
+
+@quotation
+@image{context-example,5cm,,}
+@end quotation
+
+Chaque contexte est chargé de faire appliquer certaines règles de gravure,
+de créer certains objets, et de prendre en compte les propriétés qui leur
+sont associées. Ainsi, le contexte @context{Voice} peut faire intervenir une
+altération accidentelle, puis le contexte @context{Staff} devra déterminer si
+cette dernière devra être imprimée ou non dans la suite de la mesure. Les barres
+de mesure, enfin, sont alignées verticalement grâce au contexte @context{Score}.
+
+En revanche, dans une musique polymétrique, par exemple mélant une portée à 3/4
+et une autre à 4/4, les barres de mesures n'ont plus à être alignées : il faut alors
+modifier les comportement par défaut des contextes @context{Score} et @context{Staff}.
+
+Dans une partition très simple, les contextes sont créés implicitement, et peuvent
+être ignorés. Mais lorsqu'il s'agit de morceaux plus amples -- entendons par là tout
+ce qui s'écrit sur plus d'une portée -- il faut les créer explicitement pour être sûr
+d'obtenir toutes les portées nécessaires, et dans le bon ordre. Enfin pour des
+morceaux impliquant une notation spéciale, modifier les contextes ou en créer de nouveaux
+devient extrêment utile.
+
+Une description exhaustive de tous les contextes disponibles peut être trouvée dans la
+référence du programme : voir
+@ifhtml
+@internalsref{Contexts}.
+@end ifhtml
+@ifnothtml
+Translation @expansion{} Context.
+@end ifnothtml
+
+@c [TODO: describe propagation]
+
@node Creating contexts
@subsection Creating contexts
-UNTRANSLATED NODE: IGNORE ME
+Dans une partition contenant une seule voix sur une seule portée,
+les contextes sont automatiquement créés. Dans une partition plus complexe,
+il faut les crééer à la main. Trois commandes le permettent :
+
+@itemize @bullet
+
+@item
+La plus facile, et la plus rapide à saisir, est @code{\new} -- @qq{nouveau} en français.
+Elle introduit une expression musicale, comme suit :
+
+@funindex \new
+@cindex nouveaux contextes
+@cindex Contextes, création de
+
+@example
+\new @var{Contexte} @var{expression musicale}
+@end example
+
+@noindent
+le choix du @var{Contexte} pouvant être, par exemple, @code{Staff} ou
+@code{Voice}. Cette commande crée un contexte, puis interprète
+l'@var{expression musicale} dans ledit contexte.
+
+En pratique, la commande @code{\new} peut servir dans une partition
+comprenant plusieurs portées. Comme chaque partie doit se trouver sur sa propre
+portée, il faut la faire précéder de @code{\new Staff}.
+
+@lilypond[quote,verbatim,relative=2,ragged-right,fragment]
+<<
+ \new Staff { c4 c }
+ \new Staff { d4 d }
+>>
+@end lilypond
+
+La commande @code{\new} peut aussi permettre de nommer le contexte créé :
+
+@example
+\new @var{Contexte} = @var{"inventezUnNom"} @var{musique}
+@end example
+Le nom que vous choisirez ne pourra être attribué que si aucun autre contexte
+n'a été créé précédemment avec le même nom.
+
+
+@funindex \context
+
+@item
+Tout comme @code{\new}, la commande @code{\context} envoie une expression musicale
+vers un contexte donné, mais attribue nécessairement un nom à ce contexte. La
+syntaxe est la suivante :
+
+@example
+\context @var{Contexte} = @var{unNom} @var{musique}
+@end example
+
+Cette commande va partir à la recherche d'un contexte déjà existant, de type
+@var{Contexte}, et portant le nom @var{unNom}. Ce qui peut être fort utile
+pour se référer à un contexte existant. S'il s'avère que le contexte en question
+n'existe pas encore, il est créé. Dans le cas de musique vocale avec des paroles,
+cela donne :
+
+@example
+\context Voice = "@b{tenor}" @var{musique}
+@end example
+
+@noindent
+et (pour que le texte soit aligné correctement avec les notes) :
+
+@example
+\new Lyrics \lyricsto "@b{tenor}" @var{paroles}
+@end example
+
+@noindent
+
+Une autre utilité de dénommer les contextes est de superposer en un même
+contexte différentes expressions musicales. Dans l'exemple suivant, les
+notes et les ponctuations ont été saisies séparément :
+
+@example
+musique = @{ c4 c4 @}
+ponctuation = @{ s4-. s4-> @}
+@end example
+
+En les envoyant toutes deux dans le même contexte @context{Voice}, on les combine :
+
+@example
+<<
+ \new Staff \context Voice = "A" \musique
+ \context Voice = "A" \ponctuation
+>>
+@end example
+@lilypond[quote,ragged-right]
+music = { c4 c4 }
+arts = { s4-. s4-> }
+\relative c'' <<
+ \new Staff \context Voice = "A" \music
+ \context Voice = "A" \arts
+>>
+@end lilypond
+
+De cette façon, il est possible d'élaborer une édition Urtext (c'est-à -dire originale,
+la plupart du temps sans ponctuations), en laissant la possibilité d'ajouter différentes
+ponctuations sur les mêmes notes.
+
+@cindex crééer des contextes
+
+@item
+La dernière commande pour créer des contextes est
+@example
+\context @var{Contexte} @var{musique}
+@end example
+
+
+@noindent
+Elle ressemble à l'emploi de @code{\context} avec @code{= @var{unNom}}, mais
+cette fois elle se considèrera chez elle partout où elle trouvera un contexte
+de type @var{Contexte}, quel que puisse être son nom.
+
+@c Au secours ! --vv
+
+Cette variante sert à des expressions musicales qui peuvent être interprétées Ã
+plusieurs niveaux. Par exemple, une commande telle que @code{\applyOutput} (voir
+@ref{Running a function on all layout objects}) : si elle n'est pas associée avec
+@code{\context}, elle s'applique par défaut dans le contexte @context{Voice}.
+
+@example
+\applyOutput #'@var{Contexte} #@var{fonction} % s'applique dans le contexte Voice
+@end example
+
+Pour l'appliquer au contexte @context{Score} ou @context{Staff}, il faut utiliser :
+
+@example
+\applyOutput #'Score #@var{fonction}
+\applyOutput #'Staff #@var{fonction}
+@end example
+
+@end itemize
+
@node Engravers explained
@subsection Engravers explained
UNTRANSLATED NODE: IGNORE ME
-@
+
@node Extending the templates
@section Extending the templates
-UNTRANSLATED NODE: IGNORE ME
+Bon, vous avez lu le tutoriel, vous savez écrire de la musique. Mais
+comment obtenir les portées que vous voulez ? Les @ref{Templates},
+c'est bien beau, mais que faire quand ils ne traitent pas ce que l'on
+veut précisément ?
-@menu
+Les exemples qui suivent vous donneront des méthodes générales pour
+adapter des modèles.
+
+@menu
* Soprano and cello::
* Four-part SATB vocal score::
* Building a score from scratch::
-@end menu
+@end menu
+
@node Soprano and cello
@subsection Soprano and cello
-UNTRANSLATED NODE: IGNORE ME
+Commencez par le modèle qui vous semblera le plus proche de ce à quoi
+vous voulez aboutir. Disons par exemple que vous voulez écrire une pièce
+pour soprano et violoncelle : dans ce cas l'on pourrait commencer par les
+@qq{notes et paroles}, pour la partie de soprano.
+
+@example
+\version "2.11.23"
+melodie = \relative c' @{
+ \clef treble
+ \key c \major
+ \time 4/4
+
+ a4 b c d
+@}
+
+texte = \lyricmode @{
+ Laaa Siii Dooo Rééé
+@}
+
+\score@{
+ <<
+ \new Voice = "voixUn" @{
+ \autoBeamOff
+ \melodie
+ @}
+ \new Lyrics \lyricsto "voixUn" \texte
+ >>
+ \layout @{ @}
+ \midi @{ @}
+@}
+@end example
+
+Maintenant, on veut ajouter une partie de violoncelle.
+Jetons un coup d'oeil sur l'exemple avec les notes seules :
+
+@example
+\version "2.11.23"
+melodie = \relative c' @{
+ \clef treble
+ \key c \major
+ \time 4/4
+
+ a4 b c d
+@}
+
+\score @{
+\new Staff \melodie
+\layout @{ @}
+\midi @{ @}
+@}
+@end example
+
+
+On n'a pas besoin de deux commandes @code{\version}. Ce dont on a besoin,
+c'est la section @code{melodie}. De même, on n'a pas besoin de deux sections
+@code{\score} --- si nous les gardions toutes les deux, on obtiendrait deux
+parties séparées ; mais nous voulons un vrai duo, avec les deux
+parties ensemble. Dans la section @code{\score}, on n'a pas besoin
+non plus de deux @code{\layout} ni de deux @code{\midi}.
+
+Si on se contente de couper et coller les sections @code{melodie}, on se
+retrouvera avec deux sections de ce nom ; il nous faut donc les renommer.
+Appelons la section pour la soprano @code{musiqueSoprano} et celle pour le
+violoncelle @code{musiqueVioloncelle}. Tant qu'on y est, renommons
+@code{texte} en @code{parolesSoprano}. Attention à bien renommer les
+deux occurrences de chacune de ces dénominations : c'est-à -dire la
+définition de départ, où l'on trouve @code{mélodie = relative c' @{ },
+et l'endroit où cette dénomination est utilisée, dans la section
+@code{\score}.
+
+Et puis, toujours tant qu'on y est, mettons le violoncelle en clé de Fa, comme
+le veut l'usage, et donnons-lui d'autres notes.
+
+@example
+\version "2.11.23"
+musiqueSoprano = \relative c' @{
+ \clef treble
+ \key c \major
+ \time 4/4
+
+ a4 b c d
+@}
+
+parolesSoprano = \lyricmode @{
+ Laaa Siii Dooo Rééé
+@}
+
+musiqueVioloncelle = \relative c @{
+ \clef bass
+ \key c \major
+ \time 4/4
+
+ d4 g fis8 e d4
+@}
+
+\score@{
+ <<
+ \new Voice = "voixUn" @{
+ \autoBeamOff
+ \musiqueSoprano
+ @}
+ \new Lyrics \lyricsto "voixUn" \parolesSoprano
+ >>
+ \layout @{ @}
+ \midi @{ @}
+@}
+@end example
+
+Voilà qui est mieux, mais la partie de violoncelle n'apparaît pas sur
+la partition --- en effet, nous n'y avons pas fait appel dans la section
+@code{\score}. Si l'on veut que la partie de violoncelle s'imprime sous
+la partie de soprano, on va devoir ajouter :
+
+@example
+\new Staff \musiqueVioloncelle
+@end example
+
+@noindent
+en dessous de tout ce qui concerne la soprano. Il nous faut également
+encadrer la musique par des @code{<<} et @code{>>}, qui feront comprendre
+à LilyPond que plusieurs évènements --- ici, des objets @code{Staff} ---
+se déroulent en même temps. Le bloc @code{\score} ressemble maintenant Ã
+
+@example
+\score@{
+ <<
+ <<
+ \new Voice = "voixUn" @{
+ \autoBeamOff
+ \musiqueSoprano
+ @}
+ \new Lyrics \lyricsto "voixUn" \parolesSoprano
+ >>
+ \new Staff \musiqueVioloncelle
+ >>
+ \layout @{ @}
+ \midi @{ @}
+@}
+@end example
+
+@noindent
+C'est un peu le bazar dans tout ça ; mais il vous sera facile de
+mettre un peu d'ordre dans l'indentation. Voici le modèle pour
+soprano et violoncelle au complet :
+
+@lilypond[quote,verbatim,ragged-right]
+\version "2.11.23"
+sopranoMusic = \relative c' {
+ \clef treble
+ \key c \major
+ \time 4/4
+
+ a4 b c d
+}
+
+sopranoLyrics = \lyricmode {
+ Aaa Bee Cee Dee
+}
+
+celloMusic = \relative c {
+ \clef bass
+ \key c \major
+ \time 4/4
+
+ d4 g fis8 e d4
+}
+
+\score{
+ <<
+ <<
+ \new Voice = "one" {
+ \autoBeamOff
+ \sopranoMusic
+ }
+ \new Lyrics \lyricsto "one" \sopranoLyrics
+ >>
+ \new Staff \celloMusic
+ >>
+ \layout { }
+ \midi { }
+}
+@end lilypond
+
@node Four-part SATB vocal score
@subsection Four-part SATB vocal score
UNTRANSLATED NODE: IGNORE ME
-
--- SKELETON FILE --
-When you actually translate this file, please remove these lines as
-well as all `UNTRANSLATED NODE: IGNORE ME' lines.
@c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
@c This file is part of lilypond.tely
@ignore
- Translation of GIT committish: 5a2beb9fbe0e28ed499f0191d16f7e2a5d86dee1
+ Translation of GIT committish: 007d0b5b94c36f9d9e228309d5b0e6a67ae27ebc
When revising a translation, copy the HEAD committish of the
version that you are working on. See TRANSLATION for details.
@c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
@c This file is part of lilypond-program.tely
@ignore
- Translation of GIT committish: 5a2beb9fbe0e28ed499f0191d16f7e2a5d86dee1
+ Translation of GIT committish: 007d0b5b94c36f9d9e228309d5b0e6a67ae27ebc
When revising a translation, copy the HEAD committish of the
version that you are working on. See TRANSLATION for details.
@c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
@c This file is part of lilypond-program.tely
@ignore
- Translation of GIT committish: 5a2beb9fbe0e28ed499f0191d16f7e2a5d86dee1
+ Translation of GIT committish: 007d0b5b94c36f9d9e228309d5b0e6a67ae27ebc
When revising a translation, copy the HEAD committish of the
version that you are working on. See TRANSLATION for details.
\input texinfo @c -*- coding: utf-8; mode: texinfo; -*-
@ignore
- Translation of GIT committish: e9a620b6e7e1c0a1bf39b7063ff1744ad61efb08
+ Translation of GIT committish: 007d0b5b94c36f9d9e228309d5b0e6a67ae27ebc
When revising a translation, copy the HEAD committish of the
version that you are working on. See TRANSLATION for details.
* Preface::
* Introduction:: quoi, pourquoi comment.
* Tutorial:: un tutoriel d'introduction.
-* Putting it all together:: explication plus détaillée des concepts de LilyPond.
-* Working on LilyPond projects:: traite de l'utilisation quotidienne.
+* Fundamental concepts:: concepts de base de LilyPond.
* Tweaking output:: introduction aux retouches de mise en forme.
+* Working on LilyPond projects:: traite de l'utilisation quotidienne.
Annexes
+* Templates:: modèles prêts à l'emploi.
+* Scheme tutorial:: programmer au sein de LilyPond.
* GNU Free Documentation License:: licence de ce document.
* LilyPond index::
@end menu
@include preface.itely
@include introduction.itely
@include tutorial.itely
-@include putting.itely
-@include working.itely
+@include fundamental.itely
@include tweaks.itely
+@include working.itely
+@include templates.itely
+@include scheme-tutorial.itely
@include fdl.itexi
@node LilyPond index
\input texinfo @c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
@ignore
- Translation of GIT committish: 1859194a9f46a8886166cafee0e450b39fc5a963
+ Translation of GIT committish: 007d0b5b94c36f9d9e228309d5b0e6a67ae27ebc
When revising a translation, copy the HEAD committish of the
version that you are working on. See TRANSLATION for details.
@end ignore
@setfilename lilypond.info
-@settitle GNU LilyPond -- manuel de référence
+@settitle GNU LilyPond -- manuel de notation
@documentencoding UTF-8
@iftex
@include dedication.itely
@menu
-* Musical notation::
-* Specialist notation::
-* Changing defaults::
+* Musical notation:: notation générale.
+* Specialist notation:: notation à usage spécifique.
+* Input syntax:: généralités sur les fichiers sources.
* Non-musical notation:: aspects autres que la notation musicale.
* Spacing issues:: mise en page de la musique sur le papier.
+* Changing defaults:: ajustement de la gravure.
* Interfaces for programmers:: utilisation avancée.
Annexes
* Literature list:: ouvrages de référence sur la notation musicale.
-* Scheme tutorial:: programmer au sein de LilyPond.
* Notation manual tables:: tables et diagrammes.
-* Templates:: modèles prêts à l'emploi.
* Cheat sheet:: résumé de la syntaxe de LilyPond.
* GNU Free Documentation License:: licence de ce document.
* LilyPond command index::
@include notation.itely
@include specialist.itely
-@include changing-defaults.itely
+@include input.itely
@include non-music.itely
@include spacing.itely
+
+@include changing-defaults.itely
@include programming-interface.itely
@include literature.itely
-@include scheme-tutorial.itely
@include notation-appendices.itely
-@include templates.itely
@include cheatsheet.itely
@include fdl.itexi
@c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
@c This file is part of lilypond.tely
@ignore
- Translation of GIT committish: 5a2beb9fbe0e28ed499f0191d16f7e2a5d86dee1
+ Translation of GIT committish: 007d0b5b94c36f9d9e228309d5b0e6a67ae27ebc
When revising a translation, copy the HEAD committish of the
version that you are working on. See TRANSLATION for details.
@c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
@c This file is part of lilypond.tely
@ignore
- Translation of GIT committish: 5a2beb9fbe0e28ed499f0191d16f7e2a5d86dee1
+ Translation of GIT committish: 007d0b5b94c36f9d9e228309d5b0e6a67ae27ebc
When revising a translation, copy the HEAD committish of the
version that you are working on. See TRANSLATION for details.
version that you are working on. See TRANSLATION for details.
@end ignore
+@c FIXME outdated stuff, to be soon deleted
+
@node Putting it all together
@chapter Putting it all together
@menu
-* Extending the templates::
-* How LilyPond files work::
-* Score is a single musical expression::
* An orchestral part::
@end menu
-
-@node Extending the templates
-@section Extending the templates
-
-Bon, vous avez lu le tutoriel, vous savez écrire de la musique. Mais
-comment obtenir les portées que vous voulez ? Les modèles, c'est bien
-beau, mais que faire quand ils ne traitent pas ce que l'on veut précisément ?
-
-Commencez par le modèle qui vous semblera le plus proche de ce à quoi
-vous voulez aboutir. Disons par exemple que vous voulez écrire une pièce
-pour soprano et violoncelle : dans ce cas l'on pourrait commencer par les
-@qq{notes et paroles}, pour la partie de soprano.
-
-@example
-\version "2.11.23"
-melodie = \relative c' @{
- \clef treble
- \key c \major
- \time 4/4
-
- a4 b c d
-@}
-
-texte = \lyricmode @{
- Laaa Siii Dooo Rééé
-@}
-
-\score@{
- <<
- \new Voice = "voixUn" @{
- \autoBeamOff
- \melodie
- @}
- \new Lyrics \lyricsto "voixUn" \texte
- >>
- \layout @{ @}
- \midi @{ @}
-@}
-@end example
-
-Maintenant, on veut ajouter une partie de violoncelle.
-Jetons un coup d'oeil sur l'exemple avec les notes seules :
-
-@example
-\version "2.11.23"
-melodie = \relative c' @{
- \clef treble
- \key c \major
- \time 4/4
-
- a4 b c d
-@}
-
-\score @{
-\new Staff \melodie
-\layout @{ @}
-\midi @{ @}
-@}
-@end example
-
-
-On n'a pas besoin de deux commandes @code{\version}. Ce dont on a besoin,
-c'est la section @code{melodie}. De même, on n'a pas besoin de deux sections
-@code{\score} --- si nous les gardions toutes les deux, on obtiendrait deux
-parties séparées ; mais nous voulons un vrai duo, avec les deux
-parties ensemble. Dans la section @code{\score}, on n'a pas besoin
-non plus de deux @code{\layout} ni de deux @code{\midi}.
-
-Si on se contente de couper et coller les sections @code{melodie}, on se
-retrouvera avec deux sections de ce nom ; il nous faut donc les renommer.
-Appelons la section pour la soprano @code{musiqueSoprano} et celle pour le
-violoncelle @code{musiqueVioloncelle}. Tant qu'on y est, renommons
-@code{texte} en @code{parolesSoprano}. Attention à bien renommer les
-deux occurrences de chacune de ces dénominations : c'est-à -dire la
-définition de départ, où l'on trouve @code{mélodie = relative c' @{ },
-et l'endroit où cette dénomination est utilisée, dans la section
-@code{\score}.
-
-Et puis, toujours tant qu'on y est, mettons le violoncelle en clé de Fa, comme
-le veut l'usage, et donnons-lui d'autres notes.
-
-@example
-\version "2.11.23"
-musiqueSoprano = \relative c' @{
- \clef treble
- \key c \major
- \time 4/4
-
- a4 b c d
-@}
-
-parolesSoprano = \lyricmode @{
- Laaa Siii Dooo Rééé
-@}
-
-musiqueVioloncelle = \relative c @{
- \clef bass
- \key c \major
- \time 4/4
-
- d4 g fis8 e d4
-@}
-
-\score@{
- <<
- \new Voice = "voixUn" @{
- \autoBeamOff
- \musiqueSoprano
- @}
- \new Lyrics \lyricsto "voixUn" \parolesSoprano
- >>
- \layout @{ @}
- \midi @{ @}
-@}
-@end example
-
-Voilà qui est mieux, mais la partie de violoncelle n'apparaît pas sur
-la partition --- en effet, nous n'y avons pas fait appel dans la section
-@code{\score}. Si l'on veut que la partie de violoncelle s'imprime sous
-la partie de soprano, on va devoir ajouter :
-
-@example
-\new Staff \musiqueVioloncelle
-@end example
-
-@noindent
-en dessous de tout ce qui concerne la soprano. Il nous faut également
-encadrer la musique par des @code{<<} et @code{>>}, qui feront comprendre
-à LilyPond que plusieurs évènements --- ici, des objets @code{Staff} ---
-se déroulent en même temps. Le bloc @code{\score} ressemble maintenant Ã
-
-@example
-\score@{
- <<
- <<
- \new Voice = "voixUn" @{
- \autoBeamOff
- \musiqueSoprano
- @}
- \new Lyrics \lyricsto "voixUn" \parolesSoprano
- >>
- \new Staff \musiqueVioloncelle
- >>
- \layout @{ @}
- \midi @{ @}
-@}
-@end example
-
-@noindent
-C'est un peu le bazar dans tout ça ; mais il vous sera facile de
-mettre un peu d'ordre dans l'indentation. Voici le modèle pour
-soprano et violoncelle au complet :
-
-@lilypond[quote,verbatim,ragged-right]
-\version "2.11.23"
-sopranoMusic = \relative c' {
- \clef treble
- \key c \major
- \time 4/4
-
- a4 b c d
-}
-
-sopranoLyrics = \lyricmode {
- Aaa Bee Cee Dee
-}
-
-celloMusic = \relative c {
- \clef bass
- \key c \major
- \time 4/4
-
- d4 g fis8 e d4
-}
-
-\score{
- <<
- <<
- \new Voice = "one" {
- \autoBeamOff
- \sopranoMusic
- }
- \new Lyrics \lyricsto "one" \sopranoLyrics
- >>
- \new Staff \celloMusic
- >>
- \layout { }
- \midi { }
-}
-@end lilypond
-
-
-
-@node How LilyPond files work
-@section How LilyPond files work
-
-La mise en forme des fichiers d'entrée de LilyPond est vraiment
-peu astreignante, afin d'offrir assez de souplesse aux utilisateurs
-expérimentés pour qu'ils puissent organiser leurs fichiers comme
-ils l'entendent. Cependant, les nouveaux utilisateurs peuvent parfois
-se perdre en raison de cette souplesse. Cette section présente
-sommairement l'organisation du code LilyPond, en privilégiant
-la simplicité au détriment de certains détails. Vous trouverez une
-description plus complète dans @ruser{File structure}.
-
-La plupart des exemples de ce manuel sont de courts fragments, par exemple
-
-@example
-c4 a b c
-@end example
-
-Comme vous le savez maintenant (du moins nous l'espèrons), ceci ne
-peut pas être traité en tant que tel. Il s'agit de formes abrégées des
-exemples complets ; pour pouvoir être traitées, ces formeulations
-doivent au moins être encadrées par des accolades :
-
-@example
-@{
- c4 a b c
-@}
-@end example
-
-La plupart des exemples font aussi intervenir la commande
-@code{\relative}, suivie de @code{c'} ou @code{c''}. Elle n'est pas Ã
-proprement parler nécessaire pour le traitement des exemples, mais
-dans la plupart des cas le résultat sera vraiment déplorable si vous
-l'oubliez.
-
-@lilypond[quote,fragment,ragged-right,verbatim]
-\relative c'' {
- c4 a b c
-}
-@end lilypond
-
-C'est ici que nous passons aux choses sérieuses : le code LilyPond,
-sous cette forme, est en réalité un @emph{autre} raccourci. Même s'il
-est traité sans problème, et aboutit au bon résultat, c'est une forme
-abrégée de :
-
-@example
-\score @{
- \relative c'' @{
- c4 a b c
- @}
-@}
-@end example
-
-Un bloc @code{\score} doit commencer par une et une seule expression
-musicale. Rappelez-vous que cette expression peut être ce que vous
-voulez, d'une note toute seule à un gigantesque
-
-@example
-@{
- \new GrandStaff <<
- collez ici la partition complète de votre opéra de Wagner préféré
- >>
-@}
-@end example
-
-@noindent
-Dès lors que tout cela est entre accolades : @code{@{ ... @}}, c'est
-une et une seule expression musicale.
-
-Le bloc @code{\score} peut contenir d'autres éléments, tels que
-
-@example
-\score @{
- @{ c'4 a b c' @}
- \layout @{ @}
- \midi @{ @}
- \header @{ @}
-@}
-@end example
-
-@noindent
-Certains préfèrent mettre ces commandes en dehors du bloc
-@code{\score} --- par exemple, on met souvent le @code{\header}
-au-dessus. C'est juste là une autre forme abrégée que LilyPond
-accepte.
-
-@cindex variables
-@cindex identificateurs
-
-Un autre raccourci pratique est la possibilité de définir
-des variables --- également appelées @qq{identificateurs}. Dans tous
-les modèles, vous trouverez :
-
-@example
-melodie = \relative c' @{
- c4 a b c
-@}
-
-\score @{
- @{ \melodie @}
-@}
-@end example
-
-Lorsque LilyPond examinera ce fichier, il va prendre la valeur de la
-variable @code{melodie}, c'est-Ã -dire tout ce qui suit le signe @code{=},
-et l'insérer partout où il rencontrera @code{\melodie}. Vous êtes
-libre de choisir comment dénommer vos variables@footnote{Les noms de
-variables sont sensibles à la casse, et ne peuvent contenir ni
-chiffre, ni tiret, ni caractère accentué.} ; ce peut être
-@code{melodie}, @code{global}, @code{maindroitepiano}, ou
-@code{laTeteAToto}. Pour plus de détails, voir @ruser{Saving typing
-with identifiers and functions}.
-
-Pour une description complète du format des fichiers d'entrée, voir
-@ruser{File structure}.
-
-
-@node Score is a single musical expression
-@section Score is a single musical expression
-
-Dans la section précédente, @ruser{How LilyPond files work}, nous
-avons vu l'organisation générale des fichiers d'entrée de LilyPond.
-Mais c'est comme si nous avions éludé la question essentielle : comment
-diable peut-on savoir quoi mettre après @code{\score} ?
-
-En fait, nous ne l'avons pas éludée du tout : le grand mystère est
-tout simplement qu'il n'y a @emph{pas} de mystère. Allez,
-expliquons-le en une ligne :
-
-@quotation
-@emph{Un bloc @code{\score} doit commencer par une et une seule
-expression musicale.}
-@end quotation
-
-@noindent
-Peut-être serait-il judicieux de relire la section
-@ruser{Music expressions explained}, dans laquelle vous avez
-appris à construire de grandes expressions musicales petit bout
-par petit bout --- nous avons vu les notes, puis les accords, etc.
-Maintenant, nous allons partir d'une grande expression musicale,
-et remonter la pente.
-
-@example
-\score @{
- @{ % cette accolade marque le début de l'expression musicale
- \new GrandStaff <<
- insérez ici votre opéra de Wagner préféré
- >>
- @} % cette accolade marque la fin de l'expression musicale
- \layout @{ @}
-@}
-@end example
-
-Un opéra de Wagner multiplierait facilement la longueur de ce manuel
-par deux ou trois, alors faisons-le en version chant/piano. On n'a
-plus besoin d'une partition d'orchestre --- @code{GrandStaff} --- donc
-laissons cela de côté. Par contre, un chanteur et un piano
-@emph{pourraient} nous être utiles.
-
-@example
-\score @{
- @{
- <<
- \new Staff = "chanteur" <<
- >>
- \new PianoStaff = piano <<
- >>
- >>
- @}
- \layout @{ @}
-@}
-@end example
-
-Vous vous souvenez que nous avons recours à @code{<<} et @code{>>}
-pour mettre en place des musiques simultanées. Et, pour le
-coup, on aimerait @emph{vraiment} que la partie vocale et l'accompagnement
-soient imprimés ensemble...
-
-@example
-\score @{
- @{
- <<
- \new Staff = "chanteur" <<
- \new Voice = "chant" @{ @}
- >>
- \new Lyrics \lyricsto chant \new Lyrics @{ @}
- \new PianoStaff = "piano" <<
- \new Staff = "mainDroite" @{ @}
- \new Staff = "mainGauche" @{ @}
- >>
- >>
- @}
- \layout @{ @}
-@}
-@end example
-
-On y voit nettement plus clair maintenant. Nous voici donc avec la
-partie du chanteur, qui contient un ensemble @code{Voice}, ce qui dans
-LilyPond correspond à une voix, au sens de voix d'une polyphonie plutôt que
-de voix chantée --- ce pourrait être une partie de violon par
-exemple.
-
-Nous avons également une partie de piano, qui contient deux portées :
-une pour la main droite, une autre pour la main gauche.
-
-
-À ce point, on pourrait commencer à ajouter les notes. Dans les
-accolades qui suivent @code{\new Voice = chant}, on pourrait commencer
-à écrire
-
-@example
-\relative c'' @{
- a4 b c d
-@}
-@end example
-
-Mais si l'on procédait ainsi, la section @code{\score} deviendrait
-vite assez touffue, et très rapidement on ne s'y retrouverait plus.
-C'est pourquoi on utilisera plutôt des variables, ou identificateurs :
-
-@example
-melodie = @{ @}
-texte = @{ @}
-mainDroite = @{ @}
-mainGauche = @{ @}
-\score @{
- @{
- <<
- \new Staff = "chanteur" <<
- \new Voice = "chant" @{ \melodie @}
- >>
- \new Lyrics \lyricsto chant \new Lyrics @{ \texte @}
- \new PianoStaff = "piano" <<
- \new Staff = "mainDroite" @{ \mainDroite @}
- \new Staff = "mainGauche" @{ \mainGauche @}
- >>
- >>
- @}
- \layout @{ @}
-@}
-@end example
-
-@noindent
-Souvenez-vous que vous pouvez donner aux variables le nom que vous
-voulez, à condition de respecter les caractères autorisés. Ces
-limitations sont décrites dans @ruser{File structure}.
-
-Quand on écrit, ou que l'on lit, une section @code{\score}, mieux vaut
-y aller lentement et soigneusement. Commencez par le niveau le plus
-large, puis travaillez sur chaque niveau plus détaillé. À ce propos,
-une indentation stricte et propre est vraiment d'une aide précieuse :
-assurez-vous que chaque élément d'un même niveau a le même décalage
-horizontal dans votre éditeur de texte !
-
-
-
@node An orchestral part
@section An orchestral part
@c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
@c This file is part of lilypond-program.tely
@ignore
- Translation of GIT committish: 5a2beb9fbe0e28ed499f0191d16f7e2a5d86dee1
+ Translation of GIT committish: 007d0b5b94c36f9d9e228309d5b0e6a67ae27ebc
When revising a translation, copy the HEAD committish of the
version that you are working on. See TRANSLATION for details.
@c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
@c This file is part of lilypond-learning.tely
@ignore
- Translation of GIT committish: 5a2beb9fbe0e28ed499f0191d16f7e2a5d86dee1
+ Translation of GIT committish: 007d0b5b94c36f9d9e228309d5b0e6a67ae27ebc
When revising a translation, copy the HEAD committish of the
version that you are working on. See TRANSLATION for details.
@c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
@c This file is part of lilypond-program.tely
@ignore
- Translation of GIT committish: 5a2beb9fbe0e28ed499f0191d16f7e2a5d86dee1
+ Translation of GIT committish: 007d0b5b94c36f9d9e228309d5b0e6a67ae27ebc
When revising a translation, copy the HEAD committish of the
version that you are working on. See TRANSLATION for details.
@menu
* Basic polyphony::
-* Explicitly instantiating voices::
* Collision Resolution::
* Automatic part combining::
* Writing music in parallel::
pas à @code{noteB} ou @code{noteA}.
-@node Explicitly instantiating voices
-@unnumberedsubsubsec Explicitly instantiating voices
-
-Les contextes @internalsref{Voice} peuvent être déclarés manuellement
-dans un bloc @code{<< >>} pour créer de la musique polyphonique, en
-utilisant @code{\voiceOne}, @dots{} jusqu'Ã @code{\voiceFour} pour
-assigner des directions de hampes et un déplacement horizontal pour
-chaque partie.
-
-En particulier,
-@example
-<< \upper \\ \lower >>
-@end example
-
-@noindent
-équivaut Ã
-
-@example
-<<
- \new Voice = "1" @{ \voiceOne \upper @}
- \new Voice = "2" @{ \voiceTwo \lower @}
->>
-@end example
-
-Les commandes @code{\voiceXXX} fixent la direction des hampes, des
-liaisons de prolongations et de phrasé, des articulations, des
-annotations, des points d'augmentation des notes pointées et des
-doigtés. @code{\voiceOne} et @code{\voiceThree} font pointer ces objets
-vers le haut, alors que @code{\voiceTwo} et @code{\voiceFour} les font
-pointer vers le bas. La commande @code{\oneVoice} les ramène aux
-critères normaux.
-
-Une expression séquentielle qui apparaît en premier dans un @code{<< >>}
-appartient à la voix principale. Ceci est utile lorsque des voix
-supplémentaires apparaissent pendant que la voix principale est jouée.
-Voici une meilleure réalisation de l'exemple de la section précédente.
-Les notes colorées et en croix mettent en évidence le fait que la mélodie principale
-est maintenant dans un seul contexte de voix.
-
-@lilypond[quote,ragged-right,verbatim]
-\new Staff \relative c' {
- \override NoteHead #'style = #'cross
- \override NoteHead #'color = #red
- c16 d e f
- \voiceOne
- <<
- { g4 f e | d2 e2 }
- \new Voice="1" { \voiceTwo
- r8 e4 d c8 ~ | c8 b16 a b8 g ~ g2
- \oneVoice
- }
- \new Voice { \voiceThree
- s2. | s4 b4 c2
- \oneVoice
- }
- >>
- \oneVoice
-}
-@end lilypond
-
-La définition correcte des voix permet à la mélodie d'être liée.
-@lilypond[quote,ragged-right,verbatim]
-\new Staff \relative c' {
- c16^( d e f
- \voiceOne
- <<
- { g4 f e | d2 e2) }
- \context Voice="1" { \voiceTwo
- r8 e4 d c8 ~ | c8 b16 a b8 g ~ g2
- \oneVoice
- }
- \new Voice { \voiceThree
- s2. s4 b4 c2
- \oneVoice
- }
- >>
- \oneVoice
-}
-@end lilypond
-
-Le fait d'éviter le séparateur @code{\\} permet aussi d'imbriquer des
-constructions polyphoniques, ce qui peut être une manière plus naturelle
-de saisir la musique.
-
-@lilypond[quote,ragged-right,verbatim]
-\new Staff \relative c' {
- c16^( d e f
- \voiceOne
- <<
- { g4 f e | d2 e2) }
- \context Voice="1" { \voiceTwo
- r8 e4 d c8 ~ |
- <<
- {c8 b16 a b8 g ~ g2}
- \new Voice { \voiceThree
- s4 b4 c2
- \oneVoice
- }
- >>
- \oneVoice
- }
- >>
- \oneVoice
-}
-@end lilypond
-
-Dans certaines circonstances de polyphonie complexe, vous pourrez être
-amené à recourir à des voix supplémentaires afin d'éviter des collisions
-de notes. Ces voix additionnelles s'ajoutent en définissant un
-identificateur, comme le montre l'exemple suivant :
-
-@lilypond[quote,verbatim,ragged-right,relative=2]
-voiceFive = #(context-spec-music (make-voice-props-set 4) 'Voice)
-
-\relative c''' <<
- { \voiceOne g4 ~ \stemDown g32[ f( es d c b a b64 )g] } \\
- { \voiceThree b4} \\
- { \voiceFive d,} \\
- { \voiceTwo g,}
->>
-@end lilypond
-
-
@node Collision Resolution
@unnumberedsubsubsec Collision Resolution
@c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
@c This file is part of lilypond.tely
@ignore
- Translation of GIT committish: 5a2beb9fbe0e28ed499f0191d16f7e2a5d86dee1
+ Translation of GIT committish: 007d0b5b94c36f9d9e228309d5b0e6a67ae27ebc
When revising a translation, copy the HEAD committish of the
version that you are working on. See TRANSLATION for details.
@c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
@c This file is part of lilypond-learning.tely
@ignore
- Translation of GIT committish: 5a2beb9fbe0e28ed499f0191d16f7e2a5d86dee1
+ Translation of GIT committish: 007d0b5b94c36f9d9e228309d5b0e6a67ae27ebc
When revising a translation, copy the HEAD committish of the
version that you are working on. See TRANSLATION for details.
"Project-Id-Version: de\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-12-06 16:13+0100\n"
-"PO-Revision-Date: 2007-12-01 16:58+0200\n"
+"PO-Revision-Date: 2007-12-07 18:06+0200\n"
"Last-Translator: Till Rettig <till.rettig@gmx.de>\n"
"Language-Team: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
+"Content-Transfer-Encoding: 8bit"
#: add_html_footer.py:44
#, python-format
#. @subsection in ../../../Documentation/es/user/changing-defaults.itely
#. @subsection in ../../../Documentation/de/user/changing-defaults.itely
msgid "@code{\\set} vs. @code{\\override}"
-msgstr "@code{\\set} vs. @code{\\override}"
+msgstr "@code{\\set} versus @code{\\override}"
#. @node in ../../../Documentation/user/changing-defaults.itely
#. @subsection in ../../../Documentation/user/changing-defaults.itely
#. @subsection in ../../../Documentation/es/user/tutorial.itely
#. @node in ../../../Documentation/de/user/tutorial.itely
#. @subsection in ../../../Documentation/de/user/tutorial.itely
-#, fuzzy
msgid "Printing lyrics"
-msgstr "Eingabe von Text"
+msgstr "Eingabe von Gesangtext"
#. @node in ../../../Documentation/fr/user/tutorial.itely
#. @subsection in ../../../Documentation/fr/user/tutorial.itely
#. @subsection in ../../../Documentation/es/user/tutorial.itely
#. @node in ../../../Documentation/de/user/tutorial.itely
#. @subsection in ../../../Documentation/de/user/tutorial.itely
-#, fuzzy
msgid "Organizing pieces with identifiers"
msgstr "Stücke durch Bezeichner organisieren"
#. @section in ../../../Documentation/es/user/putting.itely
#. @node in ../../../Documentation/de/user/putting.itely
#. @section in ../../../Documentation/de/user/putting.itely
-#, fuzzy
msgid "Score is a single musical expression"
-msgstr "Score ist ein (einziger) zusammengesetzter musikalischer Ausdruck"
+msgstr "Score ist ein einziger musikalischer Ausdruck"
#. @node in ../../../Documentation/fr/user/putting.itely
#. @section in ../../../Documentation/fr/user/putting.itely
#. @section in ../../../Documentation/es/user/working.itely
#. @node in ../../../Documentation/de/user/working.itely
#. @section in ../../../Documentation/de/user/working.itely
-#, fuzzy
msgid "Saving typing with identifiers and functions"
msgstr "Tipparbeit sparen durch Bezeichner und Funktionen"
#. @unnumberedsubsubsec in ../../../Documentation/es/user/pitches.itely
#. @node in ../../../Documentation/de/user/pitches.itely
#. @unnumberedsubsubsec in ../../../Documentation/de/user/pitches.itely
-#, fuzzy
msgid "Relative octaves"
msgstr "Relative Oktavenbezeichnung"
#. @unnumberedsubsubsec in ../../../Documentation/es/user/simultaneous.itely
#. @node in ../../../Documentation/de/user/simultaneous.itely
#. @unnumberedsubsubsec in ../../../Documentation/de/user/simultaneous.itely
-#, fuzzy
msgid "Collision Resolution"
msgstr "Auflösung von Zusammenstößen"
#. @unnumberedsubsubsec in ../../../Documentation/es/user/educational.itely
#. @node in ../../../Documentation/de/user/educational.itely
#. @unnumberedsubsubsec in ../../../Documentation/de/user/educational.itely
-#, fuzzy
msgid "Easy Notation note heads"
msgstr "Easy-Notation-Notenköpfe"
#. @unnumberedsubsubsec in ../../../Documentation/fr/user/vocal.itely
#. @node in ../../../Documentation/es/user/vocal.itely
#. @unnumberedsubsubsec in ../../../Documentation/es/user/vocal.itely
-#, fuzzy
msgid "Working with lyrics and identifiers"
msgstr "Mit Gesangtexten und Bezeichnern arbeiten"
"Project-Id-Version: fr\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-12-06 16:13+0100\n"
-"PO-Revision-Date: 2007-11-25 15:21+0100\n"
+"PO-Revision-Date: 2007-12-15 15:15+0100\n"
"Last-Translator: Jean-Charles Malahieude <lolyfan-AT-wanadoo-DOT-fr>\n"
"Language-Team: Français <lilypond-user-fr@gnu.org>\n"
"MIME-Version: 1.0\n"
#: add_html_footer.py:45
#, python-format
msgid "Report errors to <a href=\"%(mail_address_url)s\">%(mail_address)s</a>."
-msgstr ""
-"Rapportez toute anomalie en français à <a href=\"mailto:lilypond-user-fr@gnu."
-"org\">lilypond-user-fr@gnu.org</a> ou en anglais à <a href=\"%"
-"(mail_address_url)s\">%(mail_address)s</a>"
+msgstr "Rapportez toute anomalie en français à <a href=\"mailto:lilypond-user-fr@gnu.org\">lilypond-user-fr@gnu.org</a> ou en anglais à <a href=\"%(mail_address_url)s\">%(mail_address)s</a>"
#: add_html_footer.py:47
#, python-format
#. @node in ../../../Documentation/user/fundamental.itely
#. @subsection in ../../../Documentation/user/fundamental.itely
-#, fuzzy
msgid "Nesting music expressions"
msgstr "Expressions musicales imbriquées"
#. @node in ../../../Documentation/user/tweaks.itely
#. @section in ../../../Documentation/user/tweaks.itely
-#, fuzzy
msgid "Tweaking basics"
-msgstr "Retouche des partitions"
+msgstr "Retouches élémentaires"
#. @node in ../../../Documentation/user/tweaks.itely
#. @subsection in ../../../Documentation/user/tweaks.itely
-#, fuzzy
msgid "Introduction to tweaks"
-msgstr "Élaboration d'une retouche"
+msgstr "Introduction aux retouches"
#. @node in ../../../Documentation/user/tweaks.itely
#. @subsection in ../../../Documentation/user/tweaks.itely
-#, fuzzy
msgid "Objects and interfaces"
-msgstr "Interfaces de rendu"
+msgstr "Objets et interfaces"
#. @node in ../../../Documentation/user/tweaks.itely
#. @subsection in ../../../Documentation/user/tweaks.itely
msgid "Naming conventions of objects and properties"
-msgstr ""
+msgstr "Conventions de noms d'objets et de propriétés"
#. @node in ../../../Documentation/user/tweaks.itely
#. @subsection in ../../../Documentation/user/tweaks.itely
-#, fuzzy
msgid "Tweaking methods"
-msgstr "Retouche des partitions"
+msgstr "Méthodes de retouche"
#. @node in ../../../Documentation/user/tweaks.itely
#. @section in ../../../Documentation/user/tweaks.itely
msgstr ""
#. @heading in ../../../Documentation/user/tweaks.itely
-#, fuzzy
msgid "Reverting"
-msgstr "Rapport de bogue"
+msgstr ""
#. @node in ../../../Documentation/user/tweaks.itely
#. @subsection in ../../../Documentation/user/tweaks.itely
-#, fuzzy
msgid "Properties found in interfaces"
-msgstr "Interfaces de programmation"
+msgstr "Propriétés listées par interface"
#. @node in ../../../Documentation/user/tweaks.itely
#. @subsection in ../../../Documentation/user/tweaks.itely
-#, fuzzy
msgid "Types of properties"
-msgstr "Propriétés de la musique"
+msgstr "Types de propriétés"
#. @node in ../../../Documentation/user/tweaks.itely
#. @section in ../../../Documentation/user/tweaks.itely
msgid "Appearance of objects"
-msgstr ""
+msgstr "Apparence des objets"
#. @node in ../../../Documentation/user/tweaks.itely
#. @subsection in ../../../Documentation/user/tweaks.itely
msgid "Visibility and color of objects"
-msgstr ""
+msgstr "Visibilité et couleur des objets"
#. @heading in ../../../Documentation/user/tweaks.itely
msgid "stencil"
msgstr ""
#. @heading in ../../../Documentation/user/tweaks.itely
-#, fuzzy
msgid "transparent"
-msgstr "Transposition"
+msgstr "transposition"
#. @heading in ../../../Documentation/user/tweaks.itely
-#, fuzzy
msgid "color"
-msgstr "accord"
+msgstr "couleur"
#. @node in ../../../Documentation/user/tweaks.itely
#. @subsection in ../../../Documentation/user/tweaks.itely
-#, fuzzy
msgid "Size of objects"
-msgstr "Déplacement d'objets"
+msgstr "Taille des objets"
#. @node in ../../../Documentation/user/tweaks.itely
#. @section in ../../../Documentation/user/tweaks.itely
msgstr "Durées"
#. @rglos in ../../../Documentation/user/rhythms.itely
-#, fuzzy
msgid "breve"
-msgstr "accolade"
+msgstr "brève"
#. @rglos in ../../../Documentation/user/rhythms.itely
-#, fuzzy
msgid "longa"
-msgstr "Chansons"
+msgstr "longue"
#. @rglos in ../../../Documentation/user/rhythms.itely
-#, fuzzy
msgid "Tuplet"
msgstr "Nolets"
#. @rglos in ../../../Documentation/user/rhythms.itely
msgid "laissez vibrer"
-msgstr ""
+msgstr "laissez vibrer"
#. @node in ../../../Documentation/user/rhythms.itely
#. @subsection in ../../../Documentation/user/rhythms.itely
#. @rglos in ../../../Documentation/user/rhythms.itely
msgid "church rests"
-msgstr "longues figure de silence"
+msgstr "longues figures de silence"
#. @node in ../../../Documentation/user/rhythms.itely
#. @subsection in ../../../Documentation/user/rhythms.itely
msgstr "Aide-mémoire"
#. @top in ../../../Documentation/fr/user/lilypond-learning.tely
-#, fuzzy
msgid "GNU LilyPond --- manuel d'initiation"
msgstr "GNU LilyPond --- manuel d'initiation"
#. @subsubheading in ../../../Documentation/es/user/macros.itexi
#. @subsubheading in ../../../Documentation/de/user/macros.itexi
msgid "Bugs"
-msgstr ""
+msgstr "Bogues"
#. @subheading in ../../../Documentation/fr/user/introduction.itely
msgid "Manuel de l'utilisateur"
msgstr ""
#. @subsubheading in ../../../Documentation/fr/user/introduction.itely
-#, fuzzy
msgid "Autre documentation"
-msgstr "Compilation de la documentation"
+msgstr ""
#. @rglos in ../../../Documentation/fr/user/tutorial.itely
#. @rglos in ../../../Documentation/es/user/tutorial.itely
#. @rglos in ../../../Documentation/de/user/tutorial.itely
msgid "fourth"
-msgstr ""
+msgstr "quarte"
#. @node in ../../../Documentation/fr/user/tutorial.itely
#. @subsection in ../../../Documentation/fr/user/tutorial.itely
#. @subsection in ../../../Documentation/es/user/tutorial.itely
#. @node in ../../../Documentation/de/user/tutorial.itely
#. @subsection in ../../../Documentation/de/user/tutorial.itely
-#, fuzzy
msgid "Relative note names"
-msgstr "Noms de note absolus"
+msgstr ""
#. @node in ../../../Documentation/fr/user/tutorial.itely
#. @subsection in ../../../Documentation/fr/user/tutorial.itely
#. @subsection in ../../../Documentation/es/user/tutorial.itely
#. @node in ../../../Documentation/de/user/tutorial.itely
#. @subsection in ../../../Documentation/de/user/tutorial.itely
-#, fuzzy
msgid "Printing lyrics"
-msgstr "Saisie de paroles"
+msgstr "Gravure de paroles"
#. @node in ../../../Documentation/fr/user/tutorial.itely
#. @subsection in ../../../Documentation/fr/user/tutorial.itely
#. @subsection in ../../../Documentation/es/user/tutorial.itely
#. @node in ../../../Documentation/de/user/tutorial.itely
#. @subsection in ../../../Documentation/de/user/tutorial.itely
-#, fuzzy
msgid "Organizing pieces with identifiers"
msgstr "Organisation du code source avec des variables"
#. @chapter in ../../../Documentation/es/user/putting.itely
#. @node in ../../../Documentation/de/user/putting.itely
#. @chapter in ../../../Documentation/de/user/putting.itely
-#, fuzzy
msgid "Putting it all together"
msgstr "Assemblage"
#. @section in ../../../Documentation/es/user/putting.itely
#. @node in ../../../Documentation/de/user/putting.itely
#. @section in ../../../Documentation/de/user/putting.itely
-#, fuzzy
msgid "Score is a single musical expression"
msgstr "La partition est une unique expression musicale composée"
#. @section in ../../../Documentation/es/user/putting.itely
#. @node in ../../../Documentation/de/user/putting.itely
#. @section in ../../../Documentation/de/user/putting.itely
-#, fuzzy
msgid "An orchestral part"
-msgstr "Cordes frottées"
+msgstr "Partie d'orchestre"
#. @node in ../../../Documentation/fr/user/working.itely
#. @section in ../../../Documentation/fr/user/working.itely
#. @section in ../../../Documentation/es/user/working.itely
#. @node in ../../../Documentation/de/user/working.itely
#. @section in ../../../Documentation/de/user/working.itely
-#, fuzzy
msgid "Saving typing with identifiers and functions"
msgstr "Économies de saisie grâce aux identificateurs et fonctions"
#. @section in ../../../Documentation/es/user/tweaks.itely
#. @node in ../../../Documentation/de/user/tweaks.itely
#. @section in ../../../Documentation/de/user/tweaks.itely
-#, fuzzy
msgid "Default files"
-msgstr "Fichiers d'entrée"
+msgstr "Fichiers fournis avec le logiciel"
#. @top in ../../../Documentation/fr/user/lilypond-program.tely
-#, fuzzy
msgid "GNU LilyPond --- utilisation du programme"
-msgstr "GNU LilyPond --- utilisation du programme"
+msgstr ""
#. @top in ../../../Documentation/fr/user/lilypond.tely
-#, fuzzy
msgid "GNU LilyPond --- le système de gravure musicale"
-msgstr "GNU LilyPond --- manuel d'initiation"
+msgstr ""
#. @node in ../../../Documentation/fr/user/pitches.itely
#. @unnumberedsubsubsec in ../../../Documentation/fr/user/pitches.itely
#. @unnumberedsubsubsec in ../../../Documentation/es/user/pitches.itely
#. @node in ../../../Documentation/de/user/pitches.itely
#. @unnumberedsubsubsec in ../../../Documentation/de/user/pitches.itely
-#, fuzzy
msgid "Normal pitches"
-msgstr "Répétitions courantes"
+msgstr "Hauteurs courantes"
#. @node in ../../../Documentation/fr/user/pitches.itely
#. @unnumberedsubsubsec in ../../../Documentation/fr/user/pitches.itely
#. @unnumberedsubsubsec in ../../../Documentation/es/user/pitches.itely
#. @node in ../../../Documentation/de/user/pitches.itely
#. @unnumberedsubsubsec in ../../../Documentation/de/user/pitches.itely
-#, fuzzy
msgid "Cautionary accidentals"
-msgstr "Altérations accidentelles automatiques"
+msgstr "Altérations accidentelles"
#. @node in ../../../Documentation/fr/user/pitches.itely
#. @unnumberedsubsubsec in ../../../Documentation/fr/user/pitches.itely
#. @unnumberedsubsubsec in ../../../Documentation/es/user/pitches.itely
#. @node in ../../../Documentation/de/user/pitches.itely
#. @unnumberedsubsubsec in ../../../Documentation/de/user/pitches.itely
-#, fuzzy
msgid "Micro tones"
-msgstr "Fonctions musicales"
+msgstr "Altérations microtonales"
#. @node in ../../../Documentation/fr/user/pitches.itely
#. @unnumberedsubsubsec in ../../../Documentation/fr/user/pitches.itely
#. @unnumberedsubsubsec in ../../../Documentation/es/user/pitches.itely
#. @node in ../../../Documentation/de/user/pitches.itely
#. @unnumberedsubsubsec in ../../../Documentation/de/user/pitches.itely
-#, fuzzy
msgid "Relative octaves"
msgstr "Octaves relatives"
#. @unnumberedsubsubsec in ../../../Documentation/es/user/rhythms.itely
#. @node in ../../../Documentation/de/user/rhythms.itely
#. @unnumberedsubsubsec in ../../../Documentation/de/user/rhythms.itely
-#, fuzzy
msgid "Augmentation dots"
-msgstr "Polices de caractères non européens"
+msgstr "Points d'augmentation"
#. @node in ../../../Documentation/fr/user/rhythms.itely
#. @unnumberedsubsubsec in ../../../Documentation/fr/user/rhythms.itely
#. @unnumberedsubsubsec in ../../../Documentation/es/user/rhythms.itely
#. @node in ../../../Documentation/de/user/rhythms.itely
#. @unnumberedsubsubsec in ../../../Documentation/de/user/rhythms.itely
-#, fuzzy
msgid "Feathered beams"
-msgstr "Musique sans métrique"
+msgstr "Liens de croches en soufflet"
#. @node in ../../../Documentation/fr/user/rhythms.itely
#. @unnumberedsubsubsec in ../../../Documentation/fr/user/rhythms.itely
#. @unnumberedsubsubsec in ../../../Documentation/es/user/rhythms.itely
#. @node in ../../../Documentation/de/user/rhythms.itely
#. @unnumberedsubsubsec in ../../../Documentation/de/user/rhythms.itely
-#, fuzzy
msgid "Bar check"
-msgstr "Vérification d'octave"
+msgstr "Vérification des limites de mesure"
#. @node in ../../../Documentation/fr/user/rhythms.itely
#. @unnumberedsubsubsec in ../../../Documentation/fr/user/rhythms.itely
#. @unnumberedsubsubsec in ../../../Documentation/es/user/rhythms.itely
#. @node in ../../../Documentation/de/user/rhythms.itely
#. @unnumberedsubsubsec in ../../../Documentation/de/user/rhythms.itely
-#, fuzzy
msgid "Barnumber check"
-msgstr "Vérification des limites et numéros de mesure"
+msgstr "Vérification des numéros de mesure"
#. @node in ../../../Documentation/fr/user/rhythms.itely
#. @unnumberedsubsubsec in ../../../Documentation/fr/user/rhythms.itely
#. @unnumberedsubsubsec in ../../../Documentation/es/user/rhythms.itely
#. @node in ../../../Documentation/de/user/rhythms.itely
#. @unnumberedsubsubsec in ../../../Documentation/de/user/rhythms.itely
-#, fuzzy
msgid "Proportional notation (introduction)"
-msgstr "Notation proportionnelle"
+msgstr "Introduction à la notation proportionnelle"
#. @node in ../../../Documentation/fr/user/expressive.itely
#. @unnumberedsubsubsec in ../../../Documentation/fr/user/expressive.itely
#. @node in ../../../Documentation/de/user/expressive.itely
#. @unnumberedsubsubsec in ../../../Documentation/de/user/expressive.itely
msgid "Laissez vibrer ties"
-msgstr ""
+msgstr "Liaisons ``laissez vibrer''"
#. @node in ../../../Documentation/fr/user/repeats.itely
#. @unnumberedsubsubsec in ../../../Documentation/fr/user/repeats.itely
#. @unnumberedsubsubsec in ../../../Documentation/es/user/repeats.itely
#. @node in ../../../Documentation/de/user/repeats.itely
#. @unnumberedsubsubsec in ../../../Documentation/de/user/repeats.itely
-#, fuzzy
msgid "Repeat types"
-msgstr "Répétitions"
+msgstr "Types de répétitions"
#. @node in ../../../Documentation/fr/user/simultaneous.itely
#. @unnumberedsubsubsec in ../../../Documentation/fr/user/simultaneous.itely
#. @unnumberedsubsubsec in ../../../Documentation/es/user/simultaneous.itely
#. @node in ../../../Documentation/de/user/simultaneous.itely
#. @unnumberedsubsubsec in ../../../Documentation/de/user/simultaneous.itely
-#, fuzzy
msgid "Basic polyphony"
-msgstr "polyphonie"
+msgstr "Polyphonie basique"
#. @node in ../../../Documentation/fr/user/simultaneous.itely
#. @unnumberedsubsubsec in ../../../Documentation/fr/user/simultaneous.itely
#. @unnumberedsubsubsec in ../../../Documentation/es/user/simultaneous.itely
#. @node in ../../../Documentation/de/user/simultaneous.itely
#. @unnumberedsubsubsec in ../../../Documentation/de/user/simultaneous.itely
-#, fuzzy
msgid "Collision Resolution"
msgstr "Résolution des collisions"
#. @section in ../../../Documentation/es/user/educational.itely
#. @node in ../../../Documentation/de/user/educational.itely
#. @section in ../../../Documentation/de/user/educational.itely
-#, fuzzy
msgid "Educational use"
-msgstr "durée"
+msgstr "Utilisation en milieu éducatif"
#. @node in ../../../Documentation/fr/user/educational.itely
#. @unnumberedsubsubsec in ../../../Documentation/fr/user/educational.itely
#. @unnumberedsubsubsec in ../../../Documentation/es/user/educational.itely
#. @node in ../../../Documentation/de/user/educational.itely
#. @unnumberedsubsubsec in ../../../Documentation/de/user/educational.itely
-#, fuzzy
msgid "Easy Notation note heads"
msgstr "Têtes de note avec nom de note"
#. @unnumberedsubsubsec in ../../../Documentation/fr/user/vocal.itely
#. @node in ../../../Documentation/es/user/vocal.itely
#. @unnumberedsubsubsec in ../../../Documentation/es/user/vocal.itely
-#, fuzzy
msgid "Working with lyrics and identifiers"
msgstr "Travail avec des paroles et variables"
#. @unnumberedsubsubsec in ../../../Documentation/fr/user/vocal.itely
#. @node in ../../../Documentation/es/user/vocal.itely
#. @unnumberedsubsubsec in ../../../Documentation/es/user/vocal.itely
-#, fuzzy
msgid "Other vocal issues"
-msgstr "Autres éléments relatifs à la guitare"
+msgstr "Autres éléments relatifs à la voix"
#. @node in ../../../Documentation/fr/user/chords.itely
#. @section in ../../../Documentation/fr/user/chords.itely
#. @section in ../../../Documentation/es/user/chords.itely
#. @node in ../../../Documentation/de/user/chords.itely
#. @section in ../../../Documentation/de/user/chords.itely
-#, fuzzy
msgid "Chords Blah"
msgstr "Accords"
#. @subsection in ../../../Documentation/es/user/guitar.itely
#. @node in ../../../Documentation/de/user/guitar.itely
#. @subsection in ../../../Documentation/de/user/guitar.itely
-#, fuzzy
msgid "Guitar TODO"
msgstr "Guitare"
#. @subsection in ../../../Documentation/es/user/strings.itely
#. @node in ../../../Documentation/de/user/strings.itely
#. @subsection in ../../../Documentation/de/user/strings.itely
-#, fuzzy
msgid "Orchestral strings TODO"
msgstr "Cordes frottées"
#. @subsection in ../../../Documentation/es/user/bagpipes.itely
#. @node in ../../../Documentation/de/user/bagpipes.itely
#. @subsection in ../../../Documentation/de/user/bagpipes.itely
-#, fuzzy
msgid "Bagpipe"
msgstr "Cornemuse"
#. @subsection in ../../../Documentation/es/user/ancient.itely
#. @node in ../../../Documentation/de/user/ancient.itely
#. @subsection in ../../../Documentation/de/user/ancient.itely
-#, fuzzy
msgid "Ancient TODO"
-msgstr "Silences anciens"
+msgstr "Musique ancienne"
#. @node in ../../../Documentation/fr/user/changing-defaults.itely
#. @section in ../../../Documentation/fr/user/changing-defaults.itely
#. @node in ../../../Documentation/es/user/changing-defaults.itely
#. @section in ../../../Documentation/es/user/changing-defaults.itely
-#, fuzzy
msgid "Automatic notation"
-msgstr "Découpage automatique des notes"
+msgstr "Notation automatique"
#. @subheading in ../../../Documentation/es/user/introduction.itely
#. @subheading in ../../../Documentation/de/user/introduction.itely
#. @subsubheading in ../../../Documentation/es/user/introduction.itely
#. @subsubheading in ../../../Documentation/de/user/introduction.itely
-#, fuzzy
msgid "Learning manual"
-msgstr "Manuel d'initiation"
+msgstr ""
#. @subsubheading in ../../../Documentation/es/user/introduction.itely
#. @subsubheading in ../../../Documentation/de/user/introduction.itely
-#, fuzzy
msgid "Notation reference"
-msgstr "Manuel de notation"
+msgstr ""
#. @top in ../../../Documentation/es/user/lilypond.tely
-#, fuzzy
msgid "GNU LilyPond --- El tipografiador de música"
-msgstr "GNU LilyPond --- utilisation du programme"
+msgstr ""
#. @top in ../../../Documentation/de/user/lilypond.tely
-#, fuzzy
msgid "GNU LilyPond -- Das Notationsprogramm"
-msgstr "GNU LilyPond --- utilisation du programme"
+msgstr ""
msgid "Up:"
msgstr "Haut :"
fractions. This allows some forms of microtonal music. For example,
Turkish makam music uses 1/9th tone alterations.
-@lilypondfile{makam.ly}
+@lilypondfile{pitches/makam.ly}
>4-\parenthesize -.
@end lilypond
-This only functions inside chords, even for single notes
+This only functions inside chords, to parenthesize a single note it
+must be enclosed with @code{<>} as if it is a chord.
@example
< \parenthesize NOTE>
\new Voice \with { \consists "Balloon_engraver" }
{
\balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" }
- <c-\balloonText #'(-2 . -2) \markup { Hello } >8
+ <c-\balloonText #'(-2 . -2) \markup { "I'm a notehead" } >8
}
@end lilypond
@node Fundamental concepts
@chapter Fundamental concepts
+You've seen in the Tutorial how to produce beautifully printed
+music from a simple text file. This section introduces the
+concepts and techniques required to produce equally beautiful
+but more complex scores.
@menu
* How LilyPond files work::
}
@end lilypond
+@noindent
+Note that the size of the clef is the same as a clef printed
+following a clef change -- slightly smaller than the clef
+at the begining of the line. This is usual for clefs printed
+in the middle of a line.
+
The ossia section may be placed above the staff
as follows:
@c attempt to force this onto a new page
@need 50
-@multitable @columnfractions .3 .7
+@multitable @columnfractions .3 .7
@headitem Bracket Type
@tab Function
@item @code{@{ .. @}}
@item @code{< .. >}
@tab Encloses the notes of a chord
@item @code{<< .. >>}
- @tab Encloses concurrent or simultaneous sections
+ @tab Encloses concurrent or simultaneous sections
@item @code{( .. )}
@tab Marks the start and end of a slur
@item @code{\( .. \)}
tuplets written as @code{\times x/y @{..@}}, and grace notes
written as @code{\grace@{..@}}.
-Outside LilyPond, the conventional use of brackets requires
-the different types to be properly nested, like this,
+Outside LilyPond, the conventional use of brackets requires
+the different types to be properly nested, like this,
@code{<< [ @{ ( .. ) @} ] >>}, with the closing brackets being
-encountered in exactly the opposite order to the opening
-brackets. This @strong{is} a requirement for the three types of
+encountered in exactly the opposite order to the opening
+brackets. This @strong{is} a requirement for the three types of
bracket described by the word @q{Encloses} in the table above --
they must nest properly.
-However, the remaining brackets, described with the word
+However, the remaining brackets, described with the word
@q{Marks} in the table above together with ties and tuplets,
do @strong{not} have to nest
-properly with any of the brackets. In fact, these are not
+properly with any of the brackets. In fact, these are not
brackets in the sense that
they enclose something -- they are simply markers to indicate
where something starts and ends.
@end lilypond
Let us see how this is done.
+@smallspace
@funindex \\
@node Engravers explained
@subsection Engravers explained
-cindex engravers
+@cindex engravers
Every mark on the printed output of a score produced by LilyPond
is produced by an @code{Engraver}. Thus there is an engraver
@code{\set} command. This takes the form
@example
-\set @emph{ContextName}.@emph{propertyName} = @emph{value}
+\set @emph{ContextName}.@emph{propertyName} = #@emph{value}
@end example
Where the @emph{ContextName} is usually @code{Score},
@c attempt to force this onto a new page
@need 50
-@multitable @columnfractions .2 .2 .6
+@multitable @columnfractions .25 .2 .4 .15
@headitem propertyName
@tab Value
@tab Function
+ @tab Example
@item extraNatural
- @tab ##t or ##f
- @tab If true (##t), set extra natural signs before accidentals
+ @tab Boolean
+ @tab If true, set extra natural signs before accidentals
+ @tab @code{#t}, @code{#f}
@item currentBarNumber
@tab Integer
@tab Set the current bar number
+ @tab @code{50}
@item doubleSlurs
- @tab ##t or ##f
- @tab If true (##t), print slurs both above and below notes
+ @tab Boolean
+ @tab If true, print slurs both above and below notes
+ @tab @code{#t}, @code{#f}
@item instrumentName
@tab Text
@tab Set the name to be placed at the start of the staff
+ @tab @code{"Cello I"}
@item fontSize
- @tab Number
+ @tab Real
@tab Increase or decrease the font size
+ @tab @code{2.4}
@item stanza
@tab Text
@tab Set the text to print before the start of a verse
+ @tab @code{"2"}
@end multitable
+@noindent
+where a Boolean is either True (@code{#t}) or False (@code{#f}),
+an Integer is a positive whole number, a Real is a positive
+or negative decimal number, and text is enclosed in double
+apostrophes. Note the occurrence of hash signs,
+(@code{#}), in two different places -- as part of the Boolean
+value before the @code{t} or @code{f}, and before @emph{value}
+in the @code{\set} statement. So when a Boolean is being
+entered you need to code two hash signs, e.g., @code{##t}.
@smallspace
But what
if you want something that isn't covered there? Read on.
+TODO Add links to templates after they have been moved to LSR
+
@menu
* Soprano and cello::
* Four-part SATB vocal score::
@end lilypond
+
@end macro
@macro ruser{TEXT}
-user manual, @ref{\TEXT\,,,lilypond}
+notation reference, @ref{\TEXT\,,,lilypond}
@c @internalsref{\TEXT\}
@end macro
@author Jan Nieuwenhuizen @c Dutch glossary
@c Fixes by Jean-Pierre Coulon and `Dirk', alphabetized by last name, KK, 10/07
+@c Updates to the German translation by Till Rettig, 12/07
Copyright @copyright{} 1999--2007 by the authors
* octave::
* ornament::
* ossia::
+* ottava::
* part::
* pause::
* pennant::
* triplet::
* tritone::
* tuning fork::
+* tuplet::
* turn::
* unison::
* upbeat::
ES: alteración accidental,
I: accidento,
F: altération accidentelle,
-D: Vorzeichen, Versetzungszeichen, Akzidenz,
+D: Versetzungszeichen, Akzidenz,
NL: toevallig (verplaatsings)teken,
DK: løst fortegn,
S: tillfälligt förtecken,
@section alteration
ES: alteración,
-I: alterazione
-F: altération
-D:
+I: alterazione,
+F: altération,
+D: Alteration,
NL: verhoging of verlaging,
DK:
S:
ES: ámbito,
I: ambitus,
F: ambitus,
-D: ambitus,
+D: Ambitus,
NL: ambitus,
DK: ambitus,
S: ambitus,
ES: escala menor antigua,
I: scala minore naturale,
-F: forme du mode mineur ancien, troisème mode, mode hellénique
-D: reines Moll,
+F: forme du mode mineur ancien, troisème mode, mode hellénique,
+D: reines Moll, natürliches Moll,
NL: authentieke mineurtoonladder,
DK: ren mol,
S: ren mollskala,
ES: apoyatura,
I: appoggiatura,
F: appoggiature, (port de voix),
-D: Vorschlag,
+D: Vorschlag, Vorhalt
NL: voorslag,
DK: forslag,
S: förslag,
NL: articulatie,
DK: ?,
S: ?,
-FI: ?.
+FI: artikulaatio, ilmaisu.
Articulation refers to notation which indicates how a note or notes should
be played. Slurs, accents, staccato, and legato are all examples of
@node cluster
@section cluster
-ES: racimo.
+ES: racimo,
+DE: Cluster,
+FI: klusteri, cluster.
A @emph{cluster} is a range of simultaneously sounding pitches that
may change over time. The set of available pitches to apply usually
@section custos
F: guidon,
-D: Notenzeiger.
+D: Notenzeiger, Custos.
A custos is a staff symbol that appears at the end of a staff line
with monophonic musical contents (i.e., with a single voice). It
ES: diminuendo,
I: diminuendo,
F: diminuendo,
-D: Diminuendo,
+D: diminuendo,
NL: diminuendo,
DK: diminuendo,
S: diminuendo,
@ref{decrescendo}.
-
@node direct
@section direct
ES: ?,
I: ?,
F: ?,
-D: ?,
+D: Weiser, Zeiger,
NL: ?,
DK: ?,
S: ?,
@ref{custos}.
-
@node disjunct movement
@section disjunct movement
ES: tiempo binario,
I: tempo binario,
F: temps binaire,
-D: in zwei,
+D: in zwei, grader Takt,
NL: tweedelige maatsoort,
DK: todelt takt,
S: tvåtakt,
ES: ?,
I: ?,
-F: ?,
-D: ?,
+F: nuances,
+D: Dynamik, Lautstärke,
NL: ?,
DK: ?,
S: ?,
ES: grabar,
I: incisione,
F: gravure,
-D: Notenstechen, Notendruck
+D: Notenstich, Notendruck
NL: steken,
DK: nodestik,
S: nottryck,
@node extender line
@section extender line
-FIXME: add languages
-
ES: lÃnea de extención [de melisma, de bajo cifrado, etc.],
I: ?,
F: ligne d'extension [de mélisme, de basse chiffrée, etc.],
-D: ?,
+D: Fülllinie,
NL: ?,
DK: ?,
S: ?,
-FI: .
+FI: ?.
The generic term for a line (or dash) of arbitrary length that
extends text (without indicating the musical @emph{function} of
ES: ?,
I: ?,
-F: ?,
-D: ?,
+F: liens de croches en soufflet,
+D: gespreizter Balken,
NL: ?,
DK: ?,
S: ?,
ES: bemol,
I: bemolle,
F: bémol,
-D: B, b,
+D: B,
NL: mol,
DK: b,
S: beförtecken,
ES: sistema de piano,
I: accolatura,
F: accolade,
-D: Akkolade,
+D: Akkolade, Klaviersystem,
NL: piano systeem,
DK: klaversystem,
S: ackolad, böjd klammer,
ES: grave,
I: grave,
F: grave,
-D: grave, langsam,
+D: Grave, Langsam,
NL: grave, ernstig,
DK: grave,
S: grave,
ES: legato,
I: legato,
F: legato, lié,
-D: legato,
+D: legato, gebunden,
NL: legato,
DK: legato,
S: legato,
@node ligature
@section ligature
-ES: ligadura
+ES: ligadura,
+DE: Ligatur,
+FI: ligatuura.
A ligature is a coherent graphical symbol that represents at least two
distinct notes. Ligatures originally appeared in the manuscripts of
ES: apoyatura larga,
I: appoggiatura lunga,
F: appoggiature longue,
-D: langer Vorschlag,
+D: Vorhalt,
NL: Lange voorslag,
DK: langt forslag,
S: långt förslag,
@section lyrics
ES: letra (de la canción),
-I: .,
+I: ?,
F: paroles,
-D: Liedtext,
+D: Liedtext, Gesangtext,
NL: liedtekst,
-DK: .,
-S: .,
-FI, sanoitus.
+DK: ?,
+S: ?,
+FI: sanoitus.
@node lyric tie
@section lyric tie
+ES: ?,
+I: ?,
+F: ?,
+D: Textbindung,
+NL: ?,
+DK: ?,
+S: ?,
+FI: ?.
+
FIXME: add languages
@seealso
ES: melisma,
F: mélisme,
+D: Melisma,
NL: melisma,
FI: melisma, laulettavan tavun sävelkuvio.
ES: modo,
I: modo,
F: mode,
-D: Modus,
+D: Kirchentonart, Modus,
NL: modus,
DK: skala,
S: modus, skala,
of the music, for example for small hands.
+@node ottava
+@section ottava
+
+FIXME
+
+DE: Oktavierung.
+
+
@node part
@section part
ES: ritardando,
I: ritardando,
F: ritardando,
-D: Ritardando, langsamer werden,
+D: ritardando, langsamer werden,
NL: ritardando,
DK: ritardando,
S: ritardando,
ES: ritenuto,
I: ritenuto,
F: ritenuto,
-D: Ritenuto,
+D: ritenuto,
NL: ritenuto,
DK: ritenuto,
S: ritenuto,
ES: ?,
I: scordatura,
F: à cordes ravallées,
-D: ?,
+D: Skordatur,
NL: ?,
DK: ?,
S: ?,
ES: segunda,
I: secunda,
F: seconde,
-D: Sekund(a),
+D: Sekunde,
NL: secunde,
DK: sekund,
S: sekund,
ES: ligadura (de expresión),
I: legatura (di portamento or espressiva),
F: liaison, coulé,
-D: Bogen, Legatobogen, Phrasierungsbogen,
+D: Bogen (Legatobogen, Phrasierungsbogen),
NL: fraseringsboog, legatoboog, streekboog,
DK: legatobue, fraseringsbue,
S: båge,
ES: picado,
I: staccato,
F: staccato, piqué, détaché,
-D: Staccato,
+D: staccato,
NL: staccato,
DK: staccato,
S: staccato,
ES: pentagrama,
I: pentagramma, rigo (musicale),
F: portée,
-D: Notenzeile,
+D: Notensystem, Notenzeile,
NL: (noten)balk, partij,
DK: nodesystem,
S: notsystem,
ES: sobre la G,
I: sul g,
F: sur la G,
-D: ?,
+D: auf G, auf der G-Saite,
NL: ?,
DK: ?,
S: ?,
ES: sistema,
I: accollatura,
F: système,
-D: Notensystem,
+D: Notensystem, Partitur,
NL: systeem,
DK: system,
S: system,
ES: ligadura de prolongación,
I: legatura (di valore),
F: liaison,
-D: Haltebogen,
+D: Haltebogen, Bindebogen,
NL: overbinding, bindingsboog,
DK: bindebue,
S: bindebåge, överbindning,
ES: compás ternario,
I: tempo ternario,
F: mesure ternaire,
-D: in drei,
+D: in drei, ungerader Takt,
NL: driedelige maatsoort,
DK: tredelt takt,
S: tretakt,
vibrations per second).
+@node tuplet
+@section tuplet
+
+A non-standard subdivision of a beat or part of a beat, usually
+indicated with a bracket and a number indicating the number of
+subdivisions.
+
+@seealso
+
+@ref{triplet}, @ref{note value}.
+
+
@node turn
@section turn
@item Webster's Revised Unabridged Dictionary, Springfield 1913.
+@item Felix Krohn, Lyhyt musiikkioppi, Porvoo, Helsinki, 1976.
+
@end itemize
@bye
c d e f g a b c'
@end lilypond
-There are two different ways to enter these note names with regard
-to octave placement: absolute and relative. The relative mode
-will in most cases be the most convenient, but the absolute mode
-is more fundamental and will be presented first.
-
@cindex absolute
@cindex absolute octave specification
-In absolute mode, every note is placed explicitly in a specific
-octave. The note names @code{c} to @code{b} are engraved in the
-octave below middle C, as in the previous example.
+There are two different ways to enter these note names with regard
+to octave placement: absolute and relative. The relative mode
+will in most cases be the most convenient, but the absolute mode
+is more fundamental and will be presented first. In absolute
+mode, every note is placed explicitly in a specific octave. The
+note names @code{c} to @code{b} are engraved in the octave below
+middle C, as in the previous example.
@lilypond[verbatim,quote,ragged-right,fragment]
\clef treble
Snippets: @lsrdir{pitches}.
-Internals reference: @internalsref{LedgerLineSpanner},
+Internals Reference: @internalsref{LedgerLineSpanner},
@internalsref{NoteHead}.
If the preceding item is a chord, the first note of the chord is
used as the reference point for the octave placement of a
-following note or chord:
+following note or chord. Inside of chords the next note is always
+relative to the preceding one.
@lilypond[verbatim,quote,ragged-right,fragment]
\relative c' {
@end lilypond
@noindent
-These are the Dutch note names. In Dutch, @code{aes} is
-contracted to @code{as}, but both forms are accepted. Similarly,
-both @code{es} and @code{ees} are accepted:
+The above notes are the Dutch note names. In Dutch, @code{aes} is
+contracted to @code{as}, but both forms are accepted in LilyPond.
+Similarly, both @code{es} and @code{ees} are accepted:
@lilypond[verbatim,quote,ragged-right,fragment,relative=2]
a2 as e es
@lilypond[verbatim,quote,ragged-right,fragment,relative=2]
\set Staff.extraNatural = ##f
-ceseh ceh cih cisih
+ceseh ces ceh c cih cis cisih
@end lilypond
Micro tones are also exported to the MIDI file.
@commonprop
-@lsr{pitches,
-preventing-extra-naturals-from-being-automatically-added.ly}
+@lilypondfile[quote,ragged-right,texidoc]
+{pitches/preventing-extra-naturals-from-being-automatically-added.ly}
-@lsr{pitches,
-dodecaphonic-style-accidentals-for-each-note-including-naturals.ly}
+@lilypondfile[quote,ragged-right,texidoc]
+{pitches/dodecaphonic-style-accidentals-for-each-note-including-naturals.ly}
-@lsr{pitches,
-makam.ly}
+@lilypondfile[quote,ragged-right,texidoc]{pitches/makam.ly}
@seealso
@noindent
the@tie{}@code{d} will generate a warning, because
a@tie{}@code{d''} is expected, as indicated by the octave check
-@code{=''}, but a @code{d'} is found, since both @code{c}-@code{g}
-and @code{g}-@code{d} without octavation marks are descending
-fourths. In the output, the octave is corrected to be
-a@tie{}@code{d''} and the next note is calculated relative
+@code{=''}, but a@tie{}@code{d'} is found, since both
+@code{c}-@code{g} and @code{g}-@code{d} without octavation marks
+are descending fourths. In the output, the octave is corrected to
+be a@tie{}@code{d''} and the next note is calculated relative
to@tie{}@code{d''} instead of@tie{}@code{d'}.
There is also an octave check that produces no visible output.
@cindex transpose
@cindex transposition of pitches
+@cindex transposing instruments
@funindex \transpose
A music expression can be transposed with @code{\transpose}. The
\transpose @var{from} @var{to} @var{musicexpr}
@end example
+@noindent
This means that @var{musicexpr} is transposed by the interval
between the pitches @var{from} and @var{to}: any note with pitch
@var{from} is changed to @var{to} and any other note is transposed
@commonprop
-@lsr{pitches,transposing-pitches-with-minimum-accidentals.ly}
+@lilypondfile[quote,ragged-right,texidoc]
+{pitches/transposing-pitches-with-minimum-accidentals-smart-transpose.ly}
@seealso
Snippets: @lsrdir{pitches}.
-Internals reference: @internalsref{TransposedMusic}.
+Internals Reference: @internalsref{TransposedMusic}.
@refbugs
\clef "G_8" c4
@end lilypond
-@commonprop
-
-@c FIXME
-When a clef change takes place at a line break the new clef symbol
-is printed at both the end of the previous line and the beginning
-of the new line by default. If the warning clef at the end of the
-previous line in not required it can be suppressed by setting the
-@code{explicitClefVisibility} Staff property to the value
-@var{end-of-line-invisible}: @code{\set
-Staff.explicitClefVisibility = #end-of-line-invisible} The default
-behaviour can be recovered with @code{\unset
-Staff.explicitClefVisibility}
-
-The command @code{\clef "treble_8"} is equivalent to setting
-@code{clefGlyph}, @code{clefPosition} (which controls the Y
-position of the clef), @code{middleCPosition} and
-@code{clefOctavation}. A clef is printed when either the
-@code{clefGlyph}, @code{clefPosition} or @code{clefOctavation}
-properties are changed. Note that changing the glyph, the
-position of the clef, or the octavation, does not in itself change
-the position of subsequent notes on the staff: the position of
-middle C must also be specified to do this. The positional
-parameters are relative to the staff centre line, positive numbers
-displacing upwards, counting 1 for each line and space. The
-clefOctavation value would normally be set to 7, -7, 15 or -15,
-but other values are not invalid.
-
-The following examples show the possibilities when setting these
-properties manually. First some manual changes which preserve the
-standard relative positioning of clefs and notes:
-
-@lilypond[verbatim,quote,ragged-right]
-{
- % The default treble clef
- c'4
- % The standard bass clef
- \set Staff.clefGlyph = #"clefs.F"
- \set Staff.clefPosition = #2
- \set Staff.middleCPosition = #6
- c'4
- % The baritone clef
- \set Staff.clefGlyph = #"clefs.C"
- \set Staff.clefPosition = #4
- \set Staff.middleCPosition = #4
- c'4
- % The standard choral tenor clef
- \set Staff.clefGlyph = #"clefs.G"
- \set Staff.clefPosition = #-2
- \set Staff.clefOctavation = #-7
- \set Staff.middleCPosition = #1
- c'4
- % A non-standard clef
- \set Staff.clefPosition = #0
- \set Staff.clefOctavation = #0
- \set Staff.middleCPosition = #-4
- c'4
-}
-@end lilypond
-
-and some which do not:
-
-@lilypond[verbatim,quote,ragged-right]
-{
- \set Staff.clefGlyph = #"clefs.F"
- \set Staff.clefPosition = #2
- c'4
- \set Staff.clefGlyph = #"clefs.G"
- c'4
- \set Staff.clefGlyph = #"clefs.C"
- c'4
- \set Staff.clefOctavation = #7
- c'4
- \set Staff.clefOctavation = #0
- \set Staff.clefPosition = #0
- c'4
- \set Staff.middleCPosition = #4
- c'4
-}
-@end lilypond
@commonprop
-@lsr{pitches,
-clefs-commonly-tweaked-properties.ly}
+@lilypondfile[quote,ragged-right,texidoc]
+{pitches/clefs-commonly-tweaked-properties.ly}
@seealso
Snippets: @lsrdir{pitches}.
-Internals reference: @internalsref{Clef}.
+Internals Reference: @internalsref{Clef}.
@node Key signature
@commonprop
-@lsr{pitches,
-preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly}
+@lilypondfile[quote,ragged-right,texidoc]
+{pitches/preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly}
-@lsr{pitches, non-traditional-key-signatures.ly}
+@lilypondfile[quote,ragged-right,texidoc]
+{pitches/non-traditional-key-signatures.ly}
-@lsr{pitches,
-dodecaphonic-style-accidentals-for-each-note-including-naturals.ly}
+@lilypondfile[quote,ragged-right,texidoc]
+{pitches/dodecaphonic-style-accidentals-for-each-note-including-naturals.ly}
@seealso
Snippets: @lsrdir{pitches}.
-Internals reference: @internalsref{KeyCancellation},
+Internals Reference: @internalsref{KeyCancellation},
@internalsref{KeySignature}, @internalsref{Key_engraver}.
@seealso
-Music Glossary: @c FIXME add link once it's in the glossary @c @rgloss{ottava}.
+Music Glossary: @rglos{ottava}.
Snippets: @lsrdir{pitches}.
-Internals reference: @internalsref{OttavaBracket}.
+Internals Reference: @internalsref{OttavaBracket}.
@refbugs
@seealso
-Music Glossary: @c FIXME add link once it's in the glossary @c @rgloss{instrument transposition}.
-
Notation Reference: @ref{Quoting other voices}, @ref{Transpose}.
Snippets: @lsrdir{pitches}.
@unnumberedsubsubsec Automatic accidentals
@cindex automatic accidentals
-Common rules for typesetting accidentals have been placed in a
-function. This function is called as follows
-
@funindex set-accidental-style
+There are many different conventions on how to typeset
+accidentals. LilyPond provides a function to specify which such
+accidental style to use. This function is called as follows
+
@example
\new Staff <<
#(set-accidental-style 'voice)
>>
@end example
-@c FIXME: check the context stuff below
-@c -does it *really* work?
-@c -the default contexts as specified in
-@c scm/music-function.scm seem to be different -vv
-
-If no context name is supplied, the accidental style applies to
-the @code{Staff} by default. Optionally, the function can take
-the context for which the style should be changed as a second
-argument:
+The accidental style applies to the current @code{Staff} by
+default (with the exception of the styles @code{piano} and
+@code{piano-cautionary}, see below. Optionally, the function can
+take a second argument which determines in which scope the style
+should be changed. For example, to use the same style in all
+staves of the current @code{StaffGroup}, use
@example
-#(set-accidental-style 'STYLE #('CONTEXT))
+#(set-accidental-style 'voice 'StaffGroup)
@end example
The following accidental styles are supported. To demonstrate
<<
\context Staff = "up" {
%%% change the next line as desired:
- %#(set-accidental-style 'default)
+ #(set-accidental-style 'default)
\musicA
}
\context Staff = "down" {
%%% change the next line as desired:
- %#(set-accidental-style 'default)
+ #(set-accidental-style 'default)
\musicB
}
>>
}
@end lilypond
+Note that the last lines of this example can be replaced by the
+following, as long as the same accidental style should be used in
+both staves.
+@example
+\new PianoStaff @{
+ <<
+ \context Staff = "up" @{
+ %%% change the next line as desired:
+ #(set-accidental-style 'default 'Score)
+ \musicA
+ @}
+ \context Staff = "down" @{
+ \musicB
+ @}
+ >>
+@}
+@end example
+
+
@c don't use verbatim in this table.
@table @code
@item default
This is the default typesetting behavior. It corresponds to
-eighteenth-century common practice: Accidentals are remembered to
+eighteenth-century common practice: accidentals are remembered to
the end of the measure in which they occur and only on their own
octave. Thus, in the example below, no natural signs are printed
before the@tie{}@code{b} in the second measure or the
\new PianoStaff {
<<
\context Staff = "up" {
- %#(set-accidental-style 'default)
+ #(set-accidental-style 'default)
\musicA
}
\context Staff = "down" {
- %#(set-accidental-style 'default)
+ #(set-accidental-style 'default)
\musicB
}
>>
@end lilypond
@item voice
-The normal behavior is to remember the accidentals on
-Staff-level. This variable, however, typesets accidentals
-individually for each voice. Apart from that, the rule is similar
-to @code{default}.
+The normal behavior is to remember the accidentals on Staff-level.
+In this style, however, accidentals are typeset individually for
+each voice. Apart from that, the rule is similar to
+@code{default}.
As a result, accidentals from one voice do not get canceled in
other voices, which is often an unwanted result: in the following
This rule is the same as @code{modern-voice}, but with the extra
accidentals (the ones not typeset by @code{voice}) typeset
as cautionaries. Even though all accidentals typeset by
-@code{default} @emph{are} typeset by this variable,
+@code{default} @emph{are} typeset with this rule,
some of them are typeset as cautionaries.
@lilypond[quote,ragged-right]
GrandStaff or PianoStaff, hence all the cancellations of the final
notes.
-This accidental style takes place in a GrandStaff context.
-However, you have to explicitly set it for @emph{each} individual
-Staff of the GrandStaff:
-
-
-@example
-\new GrandStaff @{ <<
- \new Staff = "up" @{ <<
- #(set-accidental-style 'piano)
- @{ @dots{} @}
- >> @}
- \new Staff = "down" @{ <<
- #(set-accidental-style 'piano)
- @{ @dots{} @}
- >> @}
->> @}
-@end example
+This accidental style applies to the current @code{GrandStaff} or
+@code{PianoStaff} by default.
@lilypond[quote,ragged-right]
musicA = {
\musicA
}
\context Staff = "down" {
- #(set-accidental-style 'piano)
\musicB
}
>>
\musicA
}
\context Staff = "down" {
- #(set-accidental-style 'piano-cautionary)
\musicB
}
>>
Snippets: @lsrdir{pitches}.
-Internals reference: @internalsref{Accidental_engraver},
+Internals Reference: @internalsref{Accidental_engraver},
@internalsref{Accidental}, @internalsref{AccidentalSuggestion},
@internalsref{AccidentalPlacement}, @internalsref{GrandStaff} and
@internalsref{PianoStaff}, @internalsref{Staff}.
which they appear in the input file. This is a problem when
accidentals in a chord depend on each other, which does not happen
for the default accidental style. The problem can be solved by
-manually inserting@tie{}@code{!} and@tie{}@code{?} for the
+manually inserting@tie{}@code{!} and@tie{}@code{?} for the
problematic notes.
@commonprop
-@lsr{pitch, adding-ambiti-per-voice.ly}
+@lilypondfile[quote,ragged-right,texidoc]
+{pitches/adding-ambiti-per-voice.ly}
-@lsr{pitch, ambiti-multiple-voices.ly}
+@lilypondfile[quote,ragged-right,texidoc]
+{pitches/ambiti-multiple-voices.ly}
@seealso
Snippets: @lsrdir{pitches}.
-Internals reference: @internalsref{Ambitus},
+Internals Reference: @internalsref{Ambitus},
@internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead},
@internalsref{AmbitusAccidental}, @internalsref{Ambitus_engraver},
@internalsref{Staff}, @internalsref{Voice}.
Snippets: @lsrdir{pitches},
-Internals reference: @internalsref{NoteHead}.
+Internals Reference: @internalsref{NoteHead}.
@node Shape note heads
@commonprop
-@lsr{pitches,
-applying-noteheads-styles-depending-on-the-step-of-the-scale.ly}
+@lilypondfile[quote,ragged-right,texidoc]
+{pitches/applying-noteheads-styles-depending-on-the-step-of-the-scale.ly}
@seealso
Snippets: @lsrdir{pitches}.
-Internals reference: @internalsref{Pitch_squash_engraver} and
+Internals Reference: @internalsref{Pitch_squash_engraver},
@internalsref{Voice}.
@node Special noteheads
Notation Reference: @ref{Note head styles}.
-Internals reference: @internalsref{NoteHead}.
+Internals Reference: @internalsref{NoteHead}.
@cindex triplets
@funindex \times
-@c TODO Add Tuplet to glossary
-
Tuplets are made out of a music expression by multiplying all
durations with a fraction:
@seealso
-Music Glossary: @c TODO Add @rglos{Tuplet} when Tuplet has been added to the Glossary
+Music Glossary: @rglos{tuplet}.
Notation Reference: @ref{Time administration},
@ref{Objects connected to the input}, @ref{Polymetric notation}.
@seealso
-Music Glossary: @rglos{tie}, @c [TODO]add @rglos{laissez vibrer}. when there is a glossary entry.
+Music Glossary: @rglos{tie},
+@c [TODO]add @rglos{laissez vibrer}. when there is a glossary entry.
Snippets: @lsrdir{rhythms}
@node Rests
@unnumberedsubsubsec Rests
@cindex rest
+@cindex maxima
+@cindex longa
+@cindex breve
@funindex \rest
@funindex r
@funindex \maxima
+@funindex \longa
+@funindex \breve
Rests are entered like notes with the note name @code{r}:
a4 a4 s4 a4 \skip 1 a4
@end lilypond
+@cindex lyrics, skip
+
The @code{s} syntax is only available in note mode and chord mode.
In other situations, for example, when entering lyrics, one must
use the @code{\skip} command:
Rests for one or more full measures are entered using @code{R}
followed by a duration (see @ref{Durations}). The duration should
correspond to an integral number of measures, otherwise a barcheck
-warning is printed. Multi-measure rests are principally used to
-indicate that a part in a multi-part score should be silent:
+warning is printed. A @rglos{multi-measure rest} is used
+principally to indicate that a part in a multi-part score should
+be silent:
@lilypond[quote,fragment,verbatim,relative=2]
\set Score.skipBars = ##t
or breve rest, centered in the measure, regardless of the time
signature.
+@cindex church rest
+@cindex rest, church
+@cindex kirchenpausen
+
If there are 10 or fewer measures of rest, LilyPond prints
-@rglos{church rests} (a series of longa and breve rests)
-in the staff and
+a series of longa and breve rests (called in German
+Kirchenpausen - @q{church rests}) within the staff and
prints a simple line otherwise. This default number of 10
may be changed by overriding
@code{MultiMeasureRest.expand-limit}.
@seealso
-This manual: @ref{Text}, @ref{Text scripts}.
+Notation Reference: @ref{Durations}, @ref{Text},
+@ref{Text markup}, @ref{Text scripts}.
Snippets: @lsrdir{rhythms}
-Internals Reference:
-
-@internalsref{MultiMeasureRest}.
+Internals Reference: @internalsref{MultiMeasureRest}.
The layout object @internalsref{MultiMeasureRestNumber} is for the
default number, and @internalsref{MultiMeasureRestText} for user
@cindex polymetric signatures
@cindex meter, polymetric
+@c TODO: add glossary entries for {signature, polymetric},
+@c {meter, polymetric}, {polymetric} (time signature, double}. rp
+
Double time signatures are not supported explicitly, but they can
be faked. In the next example, the markup for the time signature
is created with a markup text. This markup text is inserted in
signature. The latter is done with @code{\compressMusic}, which
is used in a similar way to @code{\times}, but does not create
a tuplet bracket. The syntax is
+
@funindex \compressMusic
@example
@seealso
-Snippets: @lsrdir{rhythms}
+@ignore
+TODO: add @rglos{polymetric time signature}, {polymetric}, {double time
+signature}, and {polymetric meter}. when glossary entries
+exist.
+@end ignore
+
+Snippets: @lsrdir{rhythms}, @lsr{contemporary,compound-time-signature}.
+
+Internals Reference: @internalsref{TimeSignature}, @internalsref{Timing-translator}, @internalsref{Staff}.
@node Automatic note splitting
Snippets: @lsrdir{rhythms}
-Internals Reference: @internalsref{Completion_heads_engraver},
+Internals Reference: @internalsref{Note_heads_engraver},
+@internalsref{Completion_heads_engraver},
@internalsref{Forbid_line_break_engraver}.
@node Automatic beams
@unnumberedsubsubsec Automatic beams
-By default beams are inserted automatically:
+By default, beams are inserted automatically:
+
+@cindex beams, manual
+@cindex manual beams
@lilypond[quote,ragged-right,fragment,verbatim,relative=2]
\time 2/4 c8 c c c
c8[^"(3+2)" c16 c8]
@end lilypond
+@c [TODO I think this could be worded more clearly, but I'm not sure how.] rp
The property @code{subdivideBeams} can be set in order to
subdivide all 16th or shorter beams. When set, multiple beams
will be sub-divided at beat positions, defined by the current
value of @code{beatLength} (defaults to a quarter note), by
-drawing only one beam over the beat.
+drawing only one beam over the connection between beats.
@lilypond[fragment,ragged-right,quote,relative=2,verbatim]
c32[ c c c c c c c]
@ref{Time administration}.
@funindex breakable
+@cindex break, line
+@cindex line breaks
Line breaks are normally forbidden when beams cross bar lines.
This behavior can be changed by setting the @code{breakable}
@seealso
+Notation Reference: @ref{Manual beams}, @ref{Setting automatic beam behavior}.
+
Snippets: @lsrdir{rhythms}
Internals Reference: @internalsref{Beam}.
these would delimit the same group of notes, but this is not
required: the two commands are independent.
-In the following example the eight 16th notes occupy exactly
-the same time as a half note, but the first note is twice
-as short as the last one, with the intermediate notes gradually
-lengthening. The first four 32nd notes gradually speed up,
-while the last four 32nd notes are at a constant tempo.
+In the following example the eight 16th notes occupy exactly the
+same time as a half note, but the first note is one half as long
+as the last one, with the intermediate notes gradually
+lengthening. The first four 32nd notes gradually speed up, while
+the last four 32nd notes are at a constant tempo.
@lilypond[ragged-right,relative=1,fragment,verbatim,quote]
\override Beam #'grow-direction = #LEFT
breaks happen only at the end of complete bars, i.e. where
the end of a note coincides with the end of a bar.
+@cindex line breaks
+@cindex bar lines, invisible
+@cindex measure lines, invisible
+
Line breaks are also permitted at manually inserted bar lines
even within incomplete bars. To allow a line break without
printing a bar line, use
f1 \bar "|:" g \bar ":|:" a \bar ":|" b
@end lilypond
+@cindex repeats
+
Although the bar line types signifying repeats may be inserted
manually they do not in themselves cause LilyPond to recognise
a repeated section. Such repeated sections are better entered
@seealso
-Notation Reference: @ref{Repeats}, @ref{System start delimiters}.
+Notation Reference: @ref{Line breaking}, @ref{Repeats},
+@ref{System start delimiters}.
Snippets: @lsrdir{rhythms}
@cindex measure numbers
@funindex currentBarNumber
-Bar numbers are typeset by default at the start of every line
-except the first line. The
-number itself is stored in the @code{currentBarNumber} property,
-which is normally updated automatically for every measure. It
-may also be set manually:
+Bar numbers are typeset by default at the start of every line except
+the first line. The number itself is stored in the
+@code{currentBarNumber} property, which is normally updated
+automatically for every measure. It may also be set manually:
@lilypond[verbatim,ragged-right,quote,fragment,relative]
c1 c c c
c c c c c
@end lilypond
+@cindex measure number, format
+@cindex bar number, format
+
The size of the bar number may be changed. This is illustrated
in the following example, which also shows how to enclose bar
numbers in boxes and circles, and shows an alternative way
a list of warnings is printed in the log file,
showing the line numbers and lines
in which the bar checks failed. In the next
-example, the second bar check will signal an error
+example, the second bar check will signal an error.
@example
\time 3/4 c2 e4 | g2 |
@unnumberedsubsubsec Rehearsal marks
@cindex rehearsal marks
+@cindex mark, rehearsal
@funindex \mark
To print a rehearsal mark, use the @code{\mark} command
mark manually. The value to use is stored in the property
@code{rehearsalMark}.
+@cindex rehearsal mark format
+@cindex rehearsal mark style
+@cindex style, rehearsal mark
+@cindex format, rehearsal mark
+@cindex mark, rehearsal, style
+@cindex mark, rehearsal, format
+
The style is defined by the property @code{markFormatter}. It is
a function taking the current mark (an integer) and the current
context as argument. It should return a markup object. In the
Snippets: @lsrdir{rhythms}
-This manual: @ref{Text marks}.
+This manual: @ref{The Feta font}, @ref{Text marks}.
Internals Reference: @internalsref{RehearsalMark}.
@funindex \afterGrace
+@cindex grace notes, following
+
If you want to end a note with a grace, use the @code{\afterGrace}
command. It takes two arguments: the main note, and the grace
notes following the main note.
seen in the file @file{ly/@/grace@/-init@/.ly}. By redefining
them other effects may be obtained.
+@cindex stem, with slash
+
@noindent
The slash through the stem in @emph{acciaccatura}s can be obtained in
other situations by @code{\override Stem #'stroke-style =
@seealso
+Music Glossary: @rglos{grace notes}, @rglos{acciaccatura},
+@c [TODO add appoggiatura]
+
Snippets: @lsrdir{rhythms}
Internals Reference: @internalsref{GraceMusic}.
@node Aligning to cadenzas
@unnumberedsubsubsec Aligning to cadenzas
+@cindex cadenza
+@cindex cadenza, aligning to
+@cindex aligning to cadenza
+
In an orchestral context, cadenzas present a special problem: when
constructing a score that includes a cadenza, all other
instruments should skip just as many notes as the length of the
cadenza, otherwise they will start too soon or too late.
-A solution to this problem are the functions
+A solution to this problem is to use the functions
@code{mmrest-of-length} and @code{skip-of-length}. These Scheme
-functions take a piece of music as argument, and generate a
-multi-rest or @code{\skip}, exactly as long as the piece. The use
-of @code{mmrest-of-length} is demonstrated in the following
-example.
+functions take a piece of music as argument, and generate a multi-rest
+or @code{\skip}, exactly as long as the piece. The use of
+@code{mmrest-of-length} is demonstrated in the following example.
@lilypond[verbatim,ragged-right,quote]
cadenza = \relative c' {
@unnumberedsubsubsec Time administration
@cindex time administration
+@cindex timing (within the score)
+@cindex music, unmetered
+@cindex unmetered music
@funindex currentBarNumber
@funindex measurePosition
The following properties of @code{Timing} are used
to keep track of timing within the score.
+@cindex bar number
+@cindex measure number
+
@table @code
@item currentBarNumber
The current measure number. For an example showing the
+
better support for LilyPond. For more information, see
@rprogram{Text editor support}.
-@warning{the first time you ever run LilyPond, it may take a
+@warning{The first time you ever run LilyPond, it may take a
minute or two because all of the system fonts have to be analyzed
first. After this, LilyPond will be much faster!}
@subsubheading Unix
-Create a file (such as @file{test.ly}) and enter:
+Create a text file called @file{test.ly} and enter:
@example
@{
@cindex crescendo
@notation{Crescendi} and @notation{decrescendi} are started with
-the commands @code{\<} and @code{\>}. An ending dynamic, for
-example @code{\f}, will finish the (de)crescendo, or the command
+the commands @code{\<} and @code{\>}. The next dynamics sign, for
+example @code{\f}, will end the (de)crescendo, or the command
@code{\!} can be used:
@lilypond[verbatim,quote,ragged-right,fragment,relative=2]
This mechanism is similar to mathematical formulas: a big formula
is created by composing small formulas. Such formulas are called
-expressions, and they can contain other music expressions, so you
-can make arbitrarily complex and large expressions. For example,
+expressions, and they can contain other expressions, so you can
+make arbitrarily complex and large expressions. For example,
@example
1
little) space there is at the beginning of a line, but indenting
LilyPond code like this makes it much easier for humans to read.
+@c FIXME: number of backslashes?! works in html but not pdf.
@warning{each note is relative to the previous note in
the input, not relative to the @code{c''} in the initial
@code{\\relative} command.}
@lilypond[verbatim,quote,ragged-right,fragment,relative=2]
r4 <c e g>8[ <c f a>]~ <c f a>2
-@end lilypond
-
-@lilypond[verbatim,quote,ragged-right,fragment,relative=2]
-r4 <c e g>8\>( <c e g> <c e g>4 <c f a>\!)
+r4 <c e g>8( <c e g>\> <c e g>4 <c f a>\!)
@end lilypond
@noindent
but scores any more complex than this simple example are
better produced by separating out the staff structure
-from the notes and lyrics with variables. These
+from the notes and lyrics with variables. These are
discussed in @ref{Organizing pieces with variables}.
@seealso
This chapter discusses how to modify output. LilyPond is extremely
configurable; virtually every fragment of output may be changed.
-NB: This chapter is still under development and this version is
-somewhat experimental; nothing is fixed. Don't translate yet!
+TODO: This chapter is still under development and this version is
+not yet complete. Don't translate yet!
* Placement of objects::
* Collisions of objects::
* Page layout::
-* Common tweaks::
-* TODO other name::
+* Further tweaking::
@end menu
@node Tweaking basics
that you may learn how to develop your own tweaks.
Before starting on this Chapter you may wish to review the section
-@ref{Contexts and engravers}, as Contexts, Engravers, and the
+@ref{Contexts and engravers}, as Contexts, Engravers, and the
Properties contained within them are fundamental to understanding
and constructing Tweaks.
We have already met the commands @code{\set} and @code{\with},
used to change the properties of @strong{contexts} and to remove
-and add @strong{engravers}, in
+and add @strong{engravers}, in
@ref{Modifying context properties} and @ref{Adding
and removing engravers}. We now must meet one more command.
@emph{layout_object}, which is a member of the @emph{context}
context, to the value @emph{value}.
-The @emph{context} can be omitted (and usually is) when the
+The @emph{context} can be omitted (and usually is) when the
required context is unambiguously implied and is one of lowest
-level contexts, i.e., @code{Voice}, @code{ChordNames} or
-@code{Lyrics}, and we shall omit it in many of the following
+level contexts, i.e., @code{Voice}, @code{ChordNames} or
+@code{Lyrics}, and we shall omit it in many of the following
examples. We shall see later when it must be specified.
For now, don't worry about the @code{#'}, which must precede the
@end example
Again, just like @emph{context} in the @code{\override} command,
-@emph{context} is often not needed. It will be omitted
+@emph{context} is often not needed. It will be omitted
in many of the following examples.
There is another form of the override command,
-@code{\overrideProperty}, which is occasionally required.
+@code{\overrideProperty}, which is occasionally required.
We mention it here for completeness, but for details see
@ruser{Difficult tweaks}.
@c Maybe explain in a later iteration -td
The final tweaking command which is available is @code{\tweak}.
It is not really a new command but a shorthand for an
-@code{\override} command which must be used in a few special
+@code{\override} command which must be used in a few special
circumstances. Again, we shall not discuss or use it here.
You may find the details in
@ruser{Objects connected to the input}.
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
{
\time 6/8
- {
+ {
r4 b8 b[( g]) g |
g[( e]) e d[( f]) a |
a g
}
- \addlyrics {
+ \addlyrics {
The man who feels love's sweet e -- mo -- tion
}
}
The final question is, @q{Where should this command be
placed?} While you are unsure and learning, the best
-answer is, @q{Within the music, before the first slur and
+answer is, @q{Within the music, before the first slur and
close to it.} Let's do that:
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
{
\time 6/8
- {
+ {
% Increase thickness of all following slurs from 1.2 to 5.0
\override Slur #'thickness = #5.0
r4 b8 b[( g]) g |
the @code{Slur_engraver} is in. Follow the link to the
@code{Slur_engraver} page. At the very bottom it tells
us that @code{Slur_engraver} is part of five Voice contexts,
-including the standard voice context, @code{Voice}, so our
+including the standard voice context, @code{Voice}, so our
guess was correct. And because @code{Voice} is one of the
lowest level contexts which is implied unambiguously by
the fact that we are entering notes, we can omit it in this
@cindex once override
@funindex \once
-As you can see, @emph{all} the slurs are thicker in the
+As you can see, @emph{all} the slurs are thicker in the
final example above. But what if we
wanted just the first slur to be thicker? This is achieved
with the @code{\once} command. Placed immediately before
immediately following note does not begin a slur the command
has no effect at all -- it is not remembered until a slur
is encountered, it is simply discarded. So the command with
-@code{\once} must be
+@code{\once} must be
repositioned as follows:
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
{
\time 6/8
- {
+ {
r4 b8
% Increase thickness of immediately following slur only
\once \override Slur #'thickness = #5.0
g[( e]) e d[( f]) a |
a g
}
- \addlyrics {
+ \addlyrics {
The man who feels love's sweet e -- mo -- tion
}
}
@noindent
Now only the first slur is made heavier.
+
+The @code{\once} command can also be used before @code{\set}
+and @code{\unset}, and before the command to be introduced
+in the following section -- @code{revert}.
@subheading Reverting
g[( e]) e d[( f]) a |
a g
}
- \addlyrics {
+ \addlyrics {
The man who feels love's sweet e -- mo -- tion
}
}
@end lilypond
-@cindex revert
-@funindex \revert
-
@noindent
-or we could omit the @code{\once} command and use the
+or we could omit the @code{\once} command and use the
@code{\revert} command
to return the @code{thickness} property to its default value
after the second slur:
e d[( f]) a |
a g
}
- \addlyrics {
+ \addlyrics {
The man who feels love's sweet e -- mo -- tion
}
}
This is because the shape property is one that is common to all
font objects, so, rather than including it in every layout
object, it is grouped together with other similar common
-properties and placed in an @strong{Interface}, the
+properties and placed in an @strong{Interface}, the
@code{font-interface}.
So now we need to learn how to find the properties of interfaces,
Look again at the IR page which describes LyricText. At the
bottom of the page is a list of clickable (in the html versions
of the IR) interfaces which LyricText supports. The list has
-seven items, including @code{font-interface}.
+seven items, including @code{font-interface}.
Clicking on this brings up the properties associated
with this interface, which are also properties of all the objects
which support it, including LyricText.
are also listed there.
This immediately raises the question: Why are the common font
properties @code{font-series} and @code{font-size} listed under
-@code{LyricText} as well as under the interface
+@code{LyricText} as well as under the interface
@code{font-interface} but @code{font-shape} is not? The answer
is that @code{font-series} and @code{font-size} are changed
from their global default values when a @code{LyricText} object
-is created, but @code{font-shape} is not. The entries in
+is created, but @code{font-shape} is not. The entries in
@code{LyricText} then tell you the values for those two
properties which apply to @code{LyricText}. Other objects
which support @code{font-interface} will set these
Let's see if we can now construct the @code{\override} command
to change the lyrics to italics. The object is @code{LyricText},
-the property is @code{font-shape} and the value is
+the property is @code{font-shape} and the value is
@code{italic}. As before, we'll omit the context.
As an aside, although it is an important one, note that because
@code{font-shape} are symbols they must be introduced with a
single apostrophe, @code{'}. That is why apostrophes
are needed before @code{thickness} in the earlier example
-and @code{font-shape}. These are both symbols too.
+and @code{font-shape}. These are both symbols too.
Symbols are special names which are known internally to
LilyPond. Some of them are the names of properties,
like @code{thickness} or @code{font-shape}, others are in
The type of property is always shown in brackets after the
property name in the IR. Here is a list of the types you may
need, together with the rules for that type, and some examples.
-You must always add a hash symbol, @code{#}, of course,
+You must always add a hash symbol, @code{#}, of course,
to the front of these values when they are entered in the
@code{\override} command.
@tab @code{2.5}, @code{0.34}
@item Direction
@tab A valid direction constant or its numerical equivalent
- @tab @code{#LEFT}, @code{#CENTER}, @code{#UP},
+ @tab @code{#LEFT}, @code{#CENTER}, @code{#UP},
@code{1}, @code{-1}
@item Integer
@tab A positive whole number
@item List
@tab A bracketed set of items separated by spaces,
preceded by an apostrophe
- @tab @code{'(left-edge staff-bar)}, @code{'(1)},
+ @tab @code{'(left-edge staff-bar)}, @code{'(1)},
@code{'(1.0 0.25 0.5)}
@item Markup
@tab Any valid markup
@item Moment
@tab A fraction of a whole note constructed with the
make-moment function
- @tab @code{(ly:make-moment 1 4)},
+ @tab @code{(ly:make-moment 1 4)},
@code{(ly:make-moment 3 8)}
@item Number
@tab Any positive or negative decimal value
@tab @code{'italic}, @code{'inside}
@item Unknown
@tab A procedure or @code{#f} (to cause no action)
- @tab @code{bend::print}, @code{ly:text-interface::print},
+ @tab @code{bend::print}, @code{ly:text-interface::print},
@code{#f}
@item Vector
@tab A list of three items enclosed in brackets and preceded
by a hash sign, @code{#}.
- @tab @code{#(#t #t #f)}
+ @tab @code{#(#t #t #f)}
@end multitable
@node Appearance of objects
we find there
is a layout object called @code{BarLine}. Its properties include
two that control its visibility: @code{break-visibility} and
-@code{stencil}. Barline also supports a number of interfaces,
-including the @code{grob-interface}, where we find the
+@code{stencil}. Barline also supports a number of interfaces,
+including the @code{grob-interface}, where we find the
@code{transparent} and the @code{color} properties. All
of these can affect the visibility of barlines (and, of course,
by extension, many other layout objects too.) Let's consider
@cindex break-visibility property
-We see from the @code{BarLine} properties in the IR that the
-@code{break-visibility} property requires a vector of three
+We see from the @code{BarLine} properties in the IR that the
+@code{break-visibility} property requires a vector of three
booleans.
These control respectively whether barlines are printed at
the end of a line, in the middle of lines, and at the beginning
of lines. For our example we want all barlines to be suppressed,
-so the value we need is @code{#(#f #f #f)}.
+so the value we need is @code{#(#f #f #f)}.
Let's try that, remembering
to include the @code{Staff} context. Note also that in writing
this value we have two hash signs before the opening bracket.
the @q{All layout objects} page in the IR to find the properties
of the @code{TimeSignature} layout object. This is produced by
the @code{Time_signature_engraver} which you can check also lives
-in the @code{Staff} context and also supports the
+in the @code{Staff} context and also supports the
@code{grob-interface}. So the command to make the time signature
transparent is:
the time signature should be. Maybe this is what is wanted for
an exercise for the student to fill it in, but in other
circumstances a gap might be undesirable. To remove it, the
-stencil for the time signature should be set to @code{#f}
+stencil for the time signature should be set to @code{#f}
instead:
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
Let us begin by looking again at the earlier example
see @ref{Nesting music expressions}) which showed
-how to introduce a new temporary staff, as in an @rglos{ossia}.
+how to introduce a new temporary staff, as in an @rglos{ossia}.
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
\new Staff ="main" {
a typeface font. These include noteheads, accidentals, markup,
clefs, time signatures, dynamics and lyrics.
Their size is changed by modifying the
-@code{font-size} property, as we shall shortly see. Other
+@code{font-size} property, as we shall shortly see. Other
layout objects such as slurs and ties -- in general, spanner
objects -- are drawn individually, so there is no
@code{font-size}
overrides which can modify this automatic behaviour, as we
shall shortly see.
-Objects belonging outside the staff include things
-such as rehearsal marks, text and dynamic markings.
-LilyPond’s rule for the
-vertical placement of outside-staff objects is to place them as
-close to the staff as possible but not so close that they
-collide with any other object. LilyPond uses the
-@code{outside-staff-priority} property to determine the order
-in which the objects should be placed, as follows.
+Objects belonging outside the staff include things such as
+rehearsal marks, text and dynamic markings. LilyPond's rule for
+the vertical placement of outside-staff objects is to place them
+as close to the staff as possible but not so close that they
+collide with any other object. LilyPond uses the
+@code{outside-staff-priority} property to determine the order in
+which the objects should be placed, as follows.
First, LilyPond places all the within-staff objects.
Then it sorts the outside-staff objects according to their
@code{outside-staff-priority}. The outside-staff objects are
taken one by one, beginning with the object with the lowest
-@code{outside-staff-priority}, and placed so that they do not
+@code{outside-staff-priority}, and placed so that they do not
collide with any objects that have already been placed. That is,
if two outside-staff grobs are competing for the same space, the
-one with the lower @code{outside-staff-priority} will be placed
+one with the lower @code{outside-staff-priority} will be placed
closer to the staff. If two objects have the same
@code{outside-staff-priority} the one encountered first will be
placed closer to the staff.
>>
@end lilypond
-
+@c TODO Mention somewhere, probably not here, how to avoid staves
+@c interleaving too much by specifying skyline-horizontal-padding
+@c Presumably this moves the skyline boundary further out, making
+@c objects appear wider? Not yet tested. -td
@node Within-staff objects
@subsection Within-staff objects
the direction of slurs, ties, fingering and
everything else which depends on the direction of the stems.
These commands are essential when writing polyphonic music to
-permit the interweaving melodic lines to be distinguished.
+permit interweaving melodic lines to be distinguished.
But occasionally it may be necessary to override this automatic
behaviour. This can be done for whole sections of music or even
-for an individual note. The property which control this
+for an individual note. The property which controls this
behaviour is the @code{direction} property of each layout object.
We first explain what this does, and then introduce a number of
ready-made commands which avoid your having to code explicit
right or left when they point up or down. This is controlled
automatically when @code{direction} is set.
-The following example shows first the default behaviour of stems,
+The following example shows in bar 1 the default behaviour of
+stems,
with those on high notes pointing down and those on low notes
pointing up, followed by four notes with all stems forced down,
four notes with all stems forced up, and finally four notes
@headitem Down/Left
@tab Up/Right
@tab Revert
- @tab Effect
-@item \arpeggioDown
- @tab \arpeggioUp
- @tab \arpeggioNeutral
+ @tab Effect
+@item @code{\arpeggioDown}
+ @tab @code{\arpeggioUp}
+ @tab @code{\arpeggioNeutral}
@tab Arrow is at bottom, at top, or no arrow
-@item \dotsDown
- @tab \dotsUp
- @tab \dotsNeutral
+@item @code{\dotsDown}
+ @tab @code{\dotsUp}
+ @tab @code{\dotsNeutral}
@tab Direction of movement to avoid staff lines
-@item \dynamicDown
- @tab \dynamicUp
- @tab \dynamicNeutral
+@item @code{\dynamicDown}
+ @tab @code{\dynamicUp}
+ @tab @code{\dynamicNeutral}
@tab
-@item \phrasingSlurDown
- @tab \phrasingSlurUp
- @tab \phrasingSlurNeutral
+@item @code{\phrasingSlurDown}
+ @tab @code{\phrasingSlurUp}
+ @tab @code{\phrasingSlurNeutral}
@tab Note: distinct from slur commands
-@item \slurDown
- @tab \slurUp
- @tab \slurNeutral
+@item @code{\slurDown}
+ @tab @code{\slurUp}
+ @tab @code{\slurNeutral}
@tab
-@item \stemDown
- @tab \stemUp
- @tab \stemNeutral
+@item @code{\stemDown}
+ @tab @code{\stemUp}
+ @tab @code{\stemNeutral}
@tab
-@item \textSpannerDown
- @tab \textSpannerUp
- @tab \textSpannerNeutral
+@item @code{\textSpannerDown}
+ @tab @code{\textSpannerUp}
+ @tab @code{\textSpannerNeutral}
@tab Text entered as spanner is below/above staff
-@item \tieDown
- @tab \tieUp
- @tab \tieNeutral
+@item @code{\tieDown}
+ @tab @code{\tieUp}
+ @tab @code{\tieNeutral}
@tab
-@item \tupletDown
- @tab \tupletUp
- @tab \tupletNeutral
- @tab Tuplets below or above notes
+@item @code{\tupletDown}
+ @tab @code{\tupletUp}
+ @tab @code{\tupletNeutral}
+ @tab Tuplets are below/above notes
@end multitable
-Note that these predefined commands may @strong{not} be
+Note that these predefined commands may @strong{not} be
preceded by @code{\once}. If you wish to limit the
effect to a single note you must either use the equivalent
@code{\once \override} command or use the predefined command
followed after the affected note by the corresponding
-@code{\neutralXXX} command.
+@code{\xxxNeutral} command.
@subheading Fingering
@cindex fingering, placement
c-5 a-3 f-1 c'-5
@end lilypond
-This may be suitable for single notes, but the @code{direction}
+This is how to control fingering on single notes, but the
+@code{direction}
property is ignored for chords. Instead, by default, the
-fingering is placed both above and below the notes of a chord,
-as shown:
+fingering is automatically placed both above and below the
+notes of a chord, as shown:
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
<c-5 g-3>
The property may be set to a list of one to three values.
It controls whether fingerings may be placed above (if
-@code{up} appears in the list), below (if @code{down} appears),
-to the left (if @code{left} appears, or to the right
+@code{up} appears in the list), below (if @code{down} appears),
+to the left (if @code{left} appears, or to the right
(if @code{right} appears). Conversely, if a location is not
listed, no fingering is placed there. LilyPond takes these
contraints and works out the best placement for the fingering
-for the notes of the following chords. Note that @code{left} and
+of the notes of the following chords. Note that @code{left} and
@code{right} are mutually exclusive -- fingering may be placed
only on one side or the other, not both.
\set fingeringOrientations = #'(right)
<f-2>
< c-1 e-2 g-3 b-5 > 4
-
@end lilypond
+@noindent
+If the fingering seems a little crowded the @code{font-size}
+could be reduced. The default value can be seen from the
+@code{Fingering} object in the IR to be @code{-5}, so let's
+try @code{-7}:
+
+@lilypond[quote,fragment,ragged-right,verbatim,relative=1]
+\override Fingering #'font-size = #-7
+\set fingeringOrientations = #'(left)
+<f-2>
+< c-1 e-2 g-3 b-5 > 4
+\set fingeringOrientations = #'(left)
+<f-2>
+< c-1 e-2 g-3 b-5 > 4
+\set fingeringOrientations = #'(up left down)
+<f-2>
+< c-1 e-2 g-3 b-5 > 4
+\set fingeringOrientations = #'(up left)
+<f-2>
+< c-1 e-2 g-3 b-5 > 4
+\set fingeringOrientations = #'(right)
+<f-2>
+< c-1 e-2 g-3 b-5 > 4
+@end lilypond
+
@node Outside staff objects
@subsection Outside staff objects
-TODO - dynamics, markup
- - Priority
- - \fatText
+Outside-staff objects are automatically placed to avoid collisions.
+Objects with the lower value of @code{outside-staff-priority}
+property are placed nearer to the staff, and other outside-staff
+objects are then raised as far as necessary to avoid collisions.
+The @code{outside-staff-priority} is defined in the
+@code{grob-interface} and so is a property of all layout objects.
+It is set to @code{#f} (the default) for all within-staff objects,
+and is set explicitly to the default numerical value appropriate
+to the each object as it is created. The following table shows
+the default numerical values for some of the commonest
+outside-staff objects. Others may be found in the object
+properties listed in the IR.
+
+@multitable @columnfractions .3 .3
+@headitem Layout Object @tab Priority
+@item @code{BarNumber} @tab @code{ 100}
+@item @code{DynamicLineSpanner} @tab @code{ 250}
+@item @code{DynamicText} @tab @code{ 250}
+@item @code{MetronomeMark} @tab @code{1000}
+@item @code{OttavaBracket} @tab @code{ 400}
+@item @code{RehearsalMark} @tab @code{1500}
+@item @code{TextScript} @tab @code{ 450}
+@item @code{TextSpanner} @tab @code{ 350}
+@end multitable
+TODO Add example showing iteraction of all these
+If this ordering does not give you the placing you want, the
+priority of the objects may be overridden. Suppose we would
+like @qq{Text3} to be placed above @qq{Text4} in the example
+under Automatic behaviour, above (see @ref{Automatic behaviour}).
+All we need to do is to look up the priority of @code{TextScript}
+in the IR or in the table above, and increase the priority of
+@qq{Text3} to a higher value:
-@node Collisions of objects
-@section Collisions of objects
+@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
+c2^"Text1"
+c^"Text2"
+\once \override TextScript #'outside-staff-priority = #500
+c^"Text3"
+c^"Text4"
+@end lilypond
-@menu
-* Moving objects::
-* Fixing overlapping notation::
-@end menu
+This certainly lifts @qq{Text3} above @qq{Text4} but it also
+lifts it above @qq{Text2}, and @qq{Text4} now drops down.
+Perhaps this is not so good. Can we instead position them all
+at the same distance from the staff? To do this, we clearly
+will need to space the notes out horizontally to make more
+room for the text. This is done using the @code{fatText}
+command.
-@node Moving objects
-@subsection Moving objects
+@subheading \fatText
-This may come as a surprise, but LilyPond is not perfect. Some notation
-elements can overlap. This is unfortunate, but (in most cases) is easily
-solved.
+@funindex \fatText
+@cindex notes, spreading out with text
-TODO: with the new spacing features in 2.12, these specific examples are no
-longer relevant. However, they still demonstrate powerful features
-of lilypond, so they remain until somebody creates some better examples.
+By default, text produced by markup takes up no horizontal space
+as far as laying out the music is concerned. The @code{\fatText}
+command reverses this behaviour, causing the notes to be spaced
+out as far as is necessary to accommodate the text:
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
- % temporary code to break this example:
- \override TextScript #'outside-staff-priority = ##f
-e4^\markup{ \italic ritenuto } g b e
-@end lilypond
+\fatText % Cause notes to space out to accommodate text
+c2^"Text1"
+c^"Text2"
+c^"Text3"
+c^"Text4"
+@end lilypond
-@cindex padding
+The command to revert to the default behaviour is
+@code{\emptyText}. Remember @code{\once} only works with
+@code{\override}, @code{\set}, @code{\revert} or @code{unset},
+so cannot be used with @code{\fatText}.
-The easiest solution is to increase the distance between the object
-(in this case text, but it could easily be fingerings or dynamics
-instead) and the note. In LilyPond, this is called the
-@code{padding} property; it is measured in staff spaces. For most
-objects, this value is around 1.0 or less (it varies with each
-object). We want to increase it, so let's try 1.5
+Markup text will also avoid notes which project above the staff.
+If this is not desired, the automatic displacement upwards may
+be turned off by setting the priority to @code{#f}. Here's an
+example to show how markup text interacts with such notes.
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
- % temporary code to break this example:
- \override TextScript #'outside-staff-priority = ##f
-\once \override TextScript #'padding = #1.5
-e4^\markup{ \italic ritenuto } g b e
+% This markup is short enough to fit without collision
+c2^"Tex"
+c''2
+R1
+% This is too long to fit, so it is displaced upwards
+c,,2^"Text"
+c''2
+R1
+% Turn off collision avoidance
+\once \override TextScript #'outside-staff-priority = ##f
+c,,2^"Long Text "
+c''2
+R1
+% Turn off collision avoidance
+\once \override TextScript #'outside-staff-priority = ##f
+\fatText % and turn on fatText
+c,,2^"Long Text " % Spaces at end are honoured
+c''2
@end lilypond
-That looks better, but it isn't quite big enough. After experimenting
-with a few values, we think 2.3 is the best number in this case. However,
-this number is merely the result of experimentation and my personal
-taste in notation. Try the above example with 2.3... but also try higher
-(and lower) numbers. Which do you think looks the best?
-The @code{staff-padding} property is closely related. @code{padding}
-controls the minimum amount of space between an object and the nearest
-other object (generally the note or the staff lines);
-@code{staff-padding} controls the minimum amount of space between an
-object and the staff. This is a subtle difference, but you can see
-the behavior here.
+@subheading Dynamics
-@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
- % temporary code to break this example:
- \override TextScript #'outside-staff-priority = ##f
-c4^"piu mosso" b a b
-\once \override TextScript #'padding = #4.6
-c4^"piu mosso" d e f
-\once \override TextScript #'staff-padding = #4.6
-c4^"piu mosso" fis a g
-\break
-c'4^"piu mosso" b a b
-\once \override TextScript #'padding = #4.6
-c4^"piu mosso" d e f
-\once \override TextScript #'staff-padding = #4.6
-c4^"piu mosso" fis a g
-@end lilypond
+Dynamic markings will normally be positioned beneath the
+staff, but may be positioned above with the @code{dynamicUp}
+command. They will be positioned vertically relative to the
+note to which they are attached, and will float below (or above)
+all within-staff objects such as phrasing slurs and bar numbers.
+This can give quite acceptable results, as this example
+shows:
-@cindex extra-offset
+@lilypond[quote,fragment,ragged-right,verbatim,relative=1]
+\clef "bass"
+\key aes \major
+\time 9/8
+\dynamicUp
+bes4.~\f\< \( bes4 bes8 des4\ff\> c16 bes\! |
+ees,2.~\)\mf ees4 r8 |
+@end lilypond
-Another solution gives us complete control over placing the object -- we
-can move it horizontally or vertically. This is done with the
-@code{extra-offset} property. It is slightly more complicated and can
-cause other problems. When we move objects with @code{extra-offset},
-the movement is done after LilyPond has placed all other objects. This
-means
-that the result can overlap with other objects.
+However, if the notes and attached dynamics are close
+together the automatic placement will avoid collisions
+by displacing later dynamic markings further away, but this may
+not be the optimum placement, as this rather artificial example
+shows:
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
- % temporary code to break this example:
- \override TextScript #'outside-staff-priority = ##f
-\once \override TextScript #'extra-offset = #'( 1.0 . -1.0 )
-e4^\markup{ \italic ritenuto } g b e
+\dynamicUp
+a4\f b\mf c\mp b\p
@end lilypond
-With @code{extra-offset}, the first number controls the horizontal
-movement (left is negative); the second number controls the vertical
-movement (up is positive). After a bit of experimenting, we decided
-that these values look good
+@noindent
+Should a similar situation arise in @q{real} music, it may
+be preferable to space out the notes
+a little further, so the dynamic markings can all fit at the
+same vertical distance from the staff. We were able to do this
+for markup text by using the @code{\fatText} command, but there
+is no equivalent command for dynamic marks. So we shall have to
+work out how to do this using @code{\override} commands.
+
+@subheading Grob sizing
+
+@cindex grob sizing
+@cindex sizing grobs
+@cindex @code{X-offset}
+@cindex @code{Y-offset}
+@cindex @code{X-extent}
+@cindex @code{Y-extent}
+
+First we must learn how grobs are sized. All grobs have a
+reference point defined within them which is used to position
+them relative to their parent object. This point in the grob
+is then positioned at a horizontal distance, @code{X-offset},
+and at a vertical distance, @code{Y-offset}, from its parent.
+The horizontal extent of the object is given by a pair of
+numbers, @code{X-extent}, which say where the left and right
+edges are relative to the reference point. The vertical extent
+is similarly defined by a pair of numbers, @code{Y-extent}.
+These are properties of all grobs which support the
+@code{grob-interface}.
+
+@cindex @code{extra-spacing-width}
+
+By default, outside-staff objects are given a width of zero so
+that they may overlap in the horizontal direction. This is done
+by by the trick of adding infinity to the leftmost extent and
+minus infinity to the rightmost extent by setting the
+@code{extra-spacing-width} to @code{'(+inf.0 . -inf.0)}. So
+to ensure they do not overlap in the horizontal direction we
+must override this value of @code{extra-spacing-width} to
+@code{'(0 . 0)} so the true width shines through. This is
+the command to do this for dynamic text:
+
+@example
+\override DynamicText #'extra-spacing-width = #'(0 . 0)
+@end example
+
+@noindent
+Let's see if this works in our previous example:
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
- % temporary code to break this example:
- \override TextScript #'outside-staff-priority = ##f
-\once \override TextScript #'extra-offset = #'( -1.6 . 1.0 )
-e4^\markup{ \italic ritenuto } g b e
+\dynamicUp
+\override DynamicText #'extra-spacing-width = #'(0 . 0)
+a4\f b\mf c\mp b\p
@end lilypond
@noindent
-Again, these numbers are simply the result of a few experiments and
-looking at the output. You might prefer the text to be slightly higher,
-or to the left, or whatever. Try it and look at the result!
+Well, it has certainly stopped the dynamic marks being
+displaced, but two problems remain. The marks should be
+spaced a little further apart and it would be better
+if they were all the same distance from the staff.
+We can solve the first problem easily. Instead of making
+the @code{extra-spacing-width} zero we could add a little
+more to it. The units are the space between two staff
+lines, so moving the left edge half a unit to the left and the
+right edge half a unit to the right should do it:
-One final warning: in this section, we used
+@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
+\dynamicUp
+% Extend width by 1 staff space
+\override DynamicText #'extra-spacing-width = #'(-0.5 . 0.5)
+a4\f b\mf c\mp b\p
+@end lilypond
-@example
-\once \override TextScript @dots{}
-@end example
+@noindent
+This looks better, but maybe we would prefer the dynamic marks
+to be aligned along the same baseline rather than going up and
+down with the notes. The property to do this is
+@code{staff-padding} which is covered in the following section.
-This tweaks the display of text for the next note. If the note has
-no text, this tweak does nothing (and does @strong{not} wait until
-the next bit of text). To change the behavior of everything after
-the command, omit the @code{\once}. To stop this tweak, use a
-@code{\revert}. This is explained in depth in
-@ruser{The \override command}.
-@lilypond[quote,fragment,ragged-right,verbatim,relative=3]
- % temporary code to break this example:
- \override TextScript #'outside-staff-priority = ##f
-c4^"piu mosso" b
-\once \override TextScript #'padding = #4.6
- a4 b
-c4^"piu mosso" d e f
-\once \override TextScript #'padding = #4.6
-c4^"piu mosso" d e f
-c4^"piu mosso" d e f
-\break
-\override TextScript #'padding = #4.6
-c4^"piu mosso" d e f
-c4^"piu mosso" d e f
-\revert TextScript #'padding
-c4^"piu mosso" d e f
-@end lilypond
+@node Collisions of objects
+@section Collisions of objects
+@menu
+* Moving objects::
+* Fixing overlapping notation::
+@end menu
-@node Fixing overlapping notation
-@subsection Fixing overlapping notation
+@node Moving objects
+@subsection Moving objects
-In @ref{Moving objects}, we saw how to move a @code{TextScript}
-object. The same mechanism can be used to move other types of
-objects; simply replace @code{TextScript} with the name of
-another object.
+This may come as a surprise, but LilyPond is not perfect. Some
+notation elements can overlap. This is unfortunate, but in fact
+rather rare. Usually the need to move objects is for clarity or
+aesthetic reasons -- they would look better with a little more
+or a little less space around them.
-To find the object name, look at the @q{@strong{see also}} at
-bottom of the relevant documentation page. For example, at
-the bottom of @ruser{Dynamics}, we see
+There are three main main approaches to resolving overlapping
+notation. They should be considered in the following order:
-@quotation
-@seealso
+@enumerate
+@item
+The @strong{direction} of one of the overlapping objects may
+be changed using the predefined commands listed above for
+within-staff objects (see @ref{Within-staff objects}).
+Stems, slurs, beams, ties, dynamics, text and tuplets may be
+repositioned easily in this way. The limitation is that you
+have a choice of only two positions, and neither may be
+suitable.
-Internals Reference: @internalsref{DynamicText}, @internalsref{Hairpin}.
-Vertical positioning of these symbols is handled by
-@internalsref{DynamicLineSpanner}.
-@end quotation
+@item
+The @strong{object properties}, which LilyPond uses
+when positioning layout objects, may be modified using
+@code{\override}. The advantages
+of making changes to this type of property are (a) that some
+other objects will be moved automatically if necessary to make
+room and (b) the single override can apply to all instances of
+the same type of object. Such properties include:
+@itemize
-@noindent
-So to move dynamics around vertically, we use
+@item
+@code{direction}
+
+This has already been covered in some detail -- see
+@ref{Within-staff objects}.
+
+@item
+@code{padding}, @code{left-padding},
+@code{right-padding}, @code{staff-padding}
+
+@cindex left-padding property
+@cindex padding property
+@cindex right-padding property
+@cindex staff-padding property
+As an object is being positioned the value of its @code{padding}
+property specifies the gap that must be left between itself and
+the nearest edge of the object against which it is being
+positioned. Note that it is the @code{padding} value of the object
+@strong{being placed} that is used;
+the @code{padding} value of the object which is already placed is
+ignored. Gaps specified by @code{padding} can be applied
+to all objects which support the @code{side-position-interface}.
+
+Instead of @code{padding}, the placement of groups of accidentals
+is controlled by @code{left-padding} and @code{right-padding}.
+These properties are to be found in the @code{AccidentalPlacement}
+object which, note, lives in the @strong{staff} context. Because
+accidentals are always positioned after and to the left of
+noteheads only the @code{right-padding} property has any effect.
+
+The @code{staff-padding} property is closely related to the
+@code{padding} property: @code{padding}
+controls the minimum amount of space between any object which
+supports the @code{side-position-interface} and the nearest
+other object (generally the note or the staff lines);
+@code{staff-padding} applies only to those objects which are always
+set outside the staff -- it controls the minimum amount of space
+that should be inserted between that object and the staff. Note
+that @code{staff-padding} has no effect on objects which are
+positioned relative to the note rather than the staff, even though
+it may be overridden without error for such objects -- it is simply
+ignored.
+
+To discover which padding property is required for the object
+you wish to reposition, you
+need to return to the IR and look up the object's properties.
+Be aware that the padding properties might not be located in the
+obvious object, so look in objects that appear to be related.
+
+All padding values are measured in staff spaces. For most
+objects, this value is set by default to be around 1.0 or less
+(it varies with each object). It may be overridden if a larger
+(or smaller) gap is required.
+
+@item
+@code{self-alignment-X}
+
+@cindex self-alignment-X property
+This property aligns the object to the left, to the right, or
+centers it with respect to the parent object's reference point.
+It may be used with all objects which support the
+@code{self-alignment-interface}. In general these are objects
+that contain text. The values are @code{LEFT}, @code{RIGHT}
+or @code{CENTER}. The movement is limited by the length of the
+object. Any numerical value between @code{-1} and @code{+1} may
+also be specified, where @code{-1} is left-aligned, @code{+1}
+is right-aligned, and numbers in between move the text
+progressively from left-aligned to right-aligned.
+
+@item
+@code{extra-spacing-width}
+
+@cindex extra-spacing-width property
+This property is available for all objects which support the
+@code{item-interface}. It takes two numbers, the first is added
+to the leftmost extent and the second is added to the rightmost
+extent. Negative numbers move the edge to the left, positive to
+the right, so to widen an object the first number must be negative,
+the second positive. Note that not all objects honour both
+numbers. For example, the @code{Accidental} object only takes
+notice of the first (left edge) number.
+
+@item
+@code{staff-position}
+
+@cindex staff-position property
+@code{staff-position} is a property of the
+@code{staff-symbol-referencer-interface}, which is supported by
+objects which are positioned relative to the staff. It specifies
+the vertical position of the object relative to the center line
+of the staff in half staff-spaces. It is useful in resolving
+collisions between layout objects like multi-measure rests, ties
+and notes in different voices.
+
+@item
+@code{force-hshift}
+
+@cindex force-hshift property
+
+TODO Move this explanation and add expanation of \shiftOn etc to
+ Explicitly instantiating voices section in Fundamental concepts
+
+[Closely spaced notes in a chord, or notes occuring at the same
+time in different voices, are arranged in two, occasionally more,
+columns to prevent the noteheads overlapping. These are called
+note columns, and an object called @code{NoteColumn} is created
+to lay out the notes in that column. There are separate columns
+for each voice.]
+The @code{force-hshift}
+property is a property of a @code{NoteColumn} (actually of the
+@code{note-column-interface}). Changing it permits a note column
+to be moved in units appropriate to a note column, viz. the note
+head width of the first voice note. It should be used in
+complex situations where the normal @code{\shiftOn} commands (see
+@ref{Explicitly instantiating voices}) do
+not resolve the note conflict. It is preferable to the
+@code{extra-offset} property for this purpose as there is no need
+to work out the distance in staff-spaces, and moving the notes
+into or out of a @code{NoteColumn} affects other actions such as
+merging noteheads.
-@example
-\override DynamicLineSpanner #'padding = #2.0
-@end example
+@end itemize
-We cannot list every object, but here is a list of the most
-common objects.
+Objects do not all have all of these properties in general.
+It is necessary to go to the IR to look up which properties
+are available for the object in question.
-@multitable @columnfractions .33 .66
+@item
+Finally, when all else fails, objects may be manually repositioned
+relative to the staff center line verically, or by
+displacing them by any distance to a new position. The
+disadvantages are that the correct values for the repositioning
+have to be worked out, often by trial and error, for every object
+individually, and, because the movement is done after LilyPond has
+placed all other objects, the user is responsible for avoiding any
+collisions that might ensue. But the main difficulty with this
+approach is that the repositioning values may need to be reworked
+if the music is later modified. The properties that can be used
+for this type of manual repositioning are:
+
+@table @code
+@item extra-offset
+@cindex extra-offset property
+This property applies to any layout object
+supporting the @code{grob-interface}. It takes a pair of
+numbers which specify the extra displacement in the horizontal and
+vertical directions. Negative numbers move the object to
+the left or down. The units are staff-spaces. The extra
+displacement is made after the typesetting of objects is
+finished, so an object may be repositioned anywhere without
+affecting anything else.
+
+@item positions
+@cindex positions property
+This is most useful for manually adjusting the slope and height
+of beams, slurs, and tuplets. It takes a pair of numbers
+giving the position of the left and right ends of the beam, slur,
+etc. relative to the center line of the staff. Units are
+staff-spaces.
+@end table
+
+Objects do not all have all of these properties in general.
+It is necessary to go to the IR to look up which properties
+are available for the object in question.
+
+@end enumerate
+
+Here is a list of the objects which are most likely to be
+involved in collisions, together with the name of the object which
+should be looked up in the IR in order to discover which properties
+should be used to move them.
+
+@multitable @columnfractions .5 .5
@headitem Object type @tab Object name
+@item Articulations @tab @code{Script}
+@item Beams @tab @code{Beam}
@item Dynamics (vertically) @tab @code{DynamicLineSpanner}
@item Dynamics (horizontally) @tab @code{DynamicText}
-@item Ties @tab @code{Tie}
-@item Slurs @tab @code{Slur}
-@item Articulations @tab @code{Script}
@item Fingerings @tab @code{Fingering}
-@item Text e.g. @code{^"text"} @tab @code{TextScript}
@item Rehearsal / Text marks @tab @code{RehearsalMark}
+@item Slurs @tab @code{Slur}
+@item Text e.g. @code{^"text"} @tab @code{TextScript}
+@item Ties @tab @code{Tie}
+@item Tuplets @tab @code{TupletBracket}
@end multitable
-Ways of correcting horizontal placings are described fully
-in the Notation Reference.
-We introduce just one here, the @code{force-hshift} property of
-@code{NoteColumn}. The lower two notes of the first chord (i.e,
-those in the third voice) should not be shifted away from the
-note column of the higher two notes. To correct this we set
-@code{force-hshift} of these notes to zero.
-The lower note of the second chord is best placed just to the
-right of the higher notes. We achieve this by setting
-@code{force-hshift} of this note to 0.5, ie half a notehead's
-width to the right of the note column of the higher notes.
-Here's the final result:
-
-@lilypond[quote,verbatim,fragment,ragged-right]
-\new Staff \relative c'' {
- \key aes \major
- <<
- { c2 aes4. bes8 } \\
- { aes2 f4 fes } \\
- { \voiceFour
- \once \override NoteColumn #'force-hshift = #0 <ees c>2
- \once \override NoteColumn #'force-hshift = #0.5 des2
- }
- >> |
- <c ees aes c>1 |
-}
-@end lilypond
+@node Fixing overlapping notation
+@subsection Fixing overlapping notation
+
+Let's now see how the properties in the previous section can
+help to resolve overlapping notation.
-@cindex padding
+@subheading padding property
+@cindex padding property
The @code{padding} property can be set to increase
(or decrease) the distance between symbols that are printed
-above or below notes. This applies to all objects with
-@code{side-position-interface}.
+above or below notes.
@lilypond[quote,fragment,relative=1,verbatim]
c2\fermata
@code{Voice} context will not be noticed. For more details, see
@ruser{Constructing a tweak}.
-@cindex extra-offset
+@subheading left-padding and right-padding properties
+@cindex left-padding property
+@cindex right-padding property
+
+TODO Example of this - at the moment I can't find one! -td
+
+@subheading staff-padding property
+@cindex staff-padding property
+
+@code{staff-padding} can be used to align objects such as dynamics
+along a baseline at a fixed height above the staff, rather than
+at a height dependent on the position of the note to which they
+are attached. It is not a property of
+@code{DynamicText} but of @code{DynamicLineSpanner}.
+This is because the baseline should apply equally to @strong{all}
+dynamics, including those created as extended spanners.
+So this is the way to align the dynamic marks in the example
+taken from the previous section:
+
+@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
+\dynamicUp
+% Extend width by 1 unit
+\override DynamicText #'extra-spacing-width = #'(-0.5 . 0.5)
+% Align dynamics to a base line 2 units above staff
+\override DynamicLineSpanner #'staff-padding = #2
+a4\f b\mf c\mp b\p
+@end lilypond
+
+
+@subheading self-alignment-X property
+@cindex self-alignment-X property
+
+The following example shows how this can resolve the collision
+of a string fingering object with a note's stem by aligning the
+right edge with the reference point of the parent note:
+
+@lilypond[quote,fragment,ragged-right,verbatim,relative=3]
+\voiceOne
+< a \2 >
+\once \override StringNumber #'self-alignment-X = #RIGHT
+< a \2 >
+@end lilypond
+
+@subheading staff-position property
+@cindex staff-position property
+
+Multimeasure rests in one voice can collide with notes in another.
+Since these rests are typeset centered between the bar lines, it
+would require significant effort for LilyPond to figure out which
+other notes might collide with it, since all the current collision
+handling between notes and between notes and rests is done only
+for notes and rests that occur at the same time. Here's an
+example of a collision of this type:
+
+@lilypond[quote,verbatim,fragment,ragged-right, relative=1]
+<< {c c c c} \\ {R1} >>
+@end lilypond
-The @code{extra-offset} property moves objects around
-in the output; it requires a pair of numbers. The first number
-controls horizontal movement; a positive number will
-move the object to the right. The second number controls vertical
-movement; a positive number will move it higher. The
-@code{extra-offset} property is a low-level feature: the
-formatting engine is completely oblivious to these offsets.
+The best solution here is to move the multimeasure rest down,
+since the rest is in voice two.
+The default in @code{\voiceTwo} (i.e. in the second voice of a
+@code{<<@{...@} \\ @{...@}>>} construct)
+is that @code{staff-position} is set to -4 for MultiMeasureRest,
+so we need to move it, say, four half-staff spaces down to
+@code{-8}.
+
+@lilypond[quote,verbatim,fragment,ragged-right, relative=1]
+<<
+ {c c c c}
+\\
+ \override MultiMeasureRest #'staff-position = #-8
+ {R1}
+>>
+@end lilypond
+
+This is better than using, for example, @code{extra-offset},
+because the ledger line above the rest is inserted automatically.
+
+@subheading extra-offset property
+@cindex extra-offset property
+
+The @code{extra-offset} property provides complete control over the
+positioning of an object both horizontally and vertically.
In the following example, the second fingering is moved a little to
the left, and 1.8 staff space downwards:
@end lilypond
+@subheading force-hshift property
+@cindex force-hshift property
+@c FIXME: formatting stuff (ie not important right now IMO)
+@c @a nchor Chopin finally corrected TODOgp
+
+We can now see how to apply the final corrections to the Chopin
+example introduced at the end of @ref{I'm hearing Voices}, which
+was left looking like this:
+
+@lilypond[quote,verbatim,fragment,ragged-right]
+\new Staff \relative c'' {
+ \key aes \major
+ <<
+ { c2 aes4. bes8 } \\
+ { aes2 f4 fes } \\
+ { \voiceFour
+ <ees c>2
+ des2
+ }
+ >> |
+ <c ees aes c>1 |
+}
+@end lilypond
+
+@noindent
+The lower two notes of the first chord (i.e,
+those in the third voice) should not be shifted away from the
+note column of the higher two notes. To correct this we set
+@code{force-hshift}, which is a property of
+@code{NoteColumn}, of these notes to zero.
+The lower note of the second chord is best placed just to the
+right of the higher notes. We achieve this by setting
+@code{force-hshift} of this note to 0.5, ie half a notehead's
+width to the right of the note column of the higher notes.
+
+Here's the final result:
+
+@lilypond[quote,verbatim,fragment,ragged-right]
+\new Staff \relative c'' {
+ \key aes \major
+ <<
+ { c2 aes4. bes8 } \\
+ { aes2 f4 fes } \\
+ { \voiceFour
+ \once \override NoteColumn #'force-hshift = #0 <ees c>2
+ \once \override NoteColumn #'force-hshift = #0.5 des2
+ }
+ >> |
+ <c ees aes c>1 |
+}
+@end lilypond
+
+
+@subheading positions property
+@cindex positions property
+
+The @code{positions} property allows the position and slope of
+ tuplets, slurs, phrasing slurs and beams to be controlled
+manually. Here's an example which has an ugly phrasing slur
+due to its trying to avoid the slur on the acciaccatura.
+
+@lilypond[quote,verbatim,fragment,ragged-right,relative=1]
+r4 \acciaccatura e8\( d8 c ~c d c d\)
+@end lilypond
+
+@noindent
+We could simply move the phrasing slur above the notes, and this
+would be the preferred solution:
+
+@lilypond[quote,verbatim,fragment,ragged-right,relative=1]
+r4
+\phrasingSlurUp
+\acciaccatura e8\( d8 c ~c d c d\)
+@end lilypond
+
+@noindent
+but if there were some reason why this could not be done the
+other alternative would be to move the left end of the phrasing
+slur down a little using the @code{positions} property. This
+also resolves the rather nasty shape.
+
+@lilypond[quote,verbatim,fragment,ragged-right,relative=1]
+r4
+\once \override PhrasingSlur #'positions = #'(-4 . -3)
+\acciaccatura
+e8\( d8 c ~c d c d\)
+@end lilypond
+
+Here's a further example taken from the opening of the left-hand
+staff of Chopin's Prelude Op 28 No. 2. We see that the beam
+collides with the upper notes:
+
+@lilypond[quote,verbatim,fragment,ragged-right]
+{
+\clef "bass"
+<< {b,8 ais, b, g,} \\ {e, g e, g} >>
+<< {b,8 ais, b, g,} \\ {e, g e, g} >>
+}
+@end lilypond
+
+@noindent
+This can only be resolved by manually moving both ends of the beam
+up from their position at 2 staff-spaces above the center line to,
+say, 3:
+
+@lilypond[quote,verbatim,fragment,ragged-right]
+{
+ \clef "bass"
+ <<
+ \override Beam #'positions = #'(3 . 3)
+ {b,8 ais, b, g,}
+ \\
+ {e, g e, g}
+ >>
+ << {b,8 ais, b, g,} \\ {e, g e, g} >>
+}
+@end lilypond
+
+@noindent
+Note that the override continues to apply in the first voice of
+the second block of quavers, but not to any of the beams in the
+second voice.
+
+TODO Examples of real music showing collisions and their resolution
+
@node Page layout
@section Page layout
@menu
+* Introduction to layout::
+* Global sizes::
+* Line breaks::
+* Page breaks::
* Fitting music onto fewer pages::
@end menu
+@node Introduction to layout
+@subsection Introduction to layout
+
+The global paper layout is determined by three factors:
+the page layout, the line breaks, and the spacing. These all
+influence each other. The choice of spacing determines how
+densely each system of music is set. This influences where line
+breaks are chosen, and thus ultimately, how many pages a piece
+of music takes.
+
+Settings which influence layout may be placed in two blocks.
+The @code{\paper @{...@}} block is placed outside any
+@code{\score @{...@}} blocks and contains settings that
+relate to the entire document. The @code{\layout @{...@}}
+block is placed within a @code{\score @{...@}} block and
+contains settings for that particular score. If you have
+only one @code{\score @{...@}} block the two have the same
+effect. In general the commands shown in this section can
+be placed in either.
+
+Much more detail on the options for tweaking the laying out
+of music are contained in @ruser{Spacing issues}.
+
+@node Global sizes
+@subsection Global sizes
+
+TODO Check all these examples
+
+The default @strong{paper size} which LilyPond assumes in laying
+out the music is A4. This may be changed in two ways:
+
+@example
+#(set-default-paper-size "a6")
+
+\paper @{
+#(set-paper-size "letter")
+@}
+@end example
+
+@noindent
+The first command sets the size of all pages. The second command
+sets the size of the pages to which the \paper block applies -\96 if
+the \paper block is at the top of the file, then it will apply
+to all pages. Support for the following paper sizes is included:
+a6, a5, a4, a3, legal, letter, 11x17 (also known as tabloid).
+Setting the paper size automatically sets suitable margins and
+line length.
+
+If the symbol @code{landscape} is supplied as an argument to
+@code{set-default-paper-size}, the pages will be rotated by 90
+degrees, and wider line widths will be set correspondingly, e.g.
+
+@example
+#(set-default-paper-size "a6" 'landscape)
+@end example
+
+The default @strong{staff size} is set to 20 points.
+This may be changed in two ways:
+
+@example
+#(set-global-staff-size 14)
+
+\paper @{
+#(set-global-staff-size 16)
+@}
+@end example
+
+@noindent
+The first command sets the size in all pages. The second command
+sets the size in the pages to which the \paper block applies \96 if
+the \paper block is at the top of the file, then it will apply
+to all pages. All the fonts are automatically scaled to suit
+the new value of the staff size.
+
+@node Line breaks
+@subsection Line breaks
+
+Line breaks are normally computed automatically. They are chosen
+so that lines look neither cramped nor loose, and consecutive
+lines have similar density. Occasionally you might want to
+override the automatic breaks; you can do this by specifying
+@code{\break}. This will force a line break at this point. However,
+line breaks can only occur at the end of @q{complete} bars, i.e.,
+where there are no notes or tuplets left @q{hanging} over the bar
+line. If you want to have a line break where there is no bar line,
+you can force an invisible bar line by entering @code{\bar ""},
+although again there must be no notes left hanging over in any of
+the staves.
+
+The opposite command, @code{\noBreak}, forbids a line break at the
+bar line where it is inserted.
+
+The most basic settings influencing line spacing are @code{indent}
+and @code{line-width}. They are set in the @code{\layout} block.
+They control the indentation of the first line of music, and the
+lengths of the lines.
+
+If @code{ragged-right} is set to true in the @code{\layout} block,
+then systems end at their natural horizontal length, instead of
+being spread horizontally to fill the whole line. This is useful
+for short fragments, and for checking how tight the natural
+spacing is.
+
+The option @code{ragged-last} is similar to @code{ragged-right},
+but affects only the last line of the piece.
+
+@example
+\layout @{
+indent = #0
+line-width = #150
+ragged-last = ##t
+@}
+@end example
+
+@node Page breaks
+@subsection Page breaks
+
+The default page breaking may be overriden by inserting
+@code{\pageBreak} or @code{\noPageBreak} commands.
+These commands are analogous to @code{\break} and @code{\noBreak}.
+These commands force and forbid a page-break at the point where
+they are inserted.
+Of course, the @code{\pageBreak} command also forces a line break.
+Like @code{\break}, the @code{\pageBreak} command is effective only
+at the end of a @q{complete} bar as defined above. For more
+details see @ruser{Page breaking} and following sections.
+
+There are also analogous settings to @code{ragged-right} and
+@code{ragged-last} which have the same effect on vertical spacing:
+@code{ragged-bottom} and @code{ragged-last-bottom}. If set to
+@code{##t} the systems on all pages or just the last page
+respectively are not justified vertically.
+
+For more details see @ruser{Vertical spacing}.
+
@node Fitting music onto fewer pages
@subsection Fitting music onto fewer pages
the volta repeats and another system without.
Another example is moving dynamics which @q{stick out} of
-a system.
-
-@lilypond[verbatim,quote,fragment]
-\relative c' {
- e4 c g\f c
- \override DynamicLineSpanner #'padding = #-1.8
- \override DynamicText #'extra-offset = #'( -2.1 . 0)
- e4 c g\f c
-}
+a system, as in the second bar here:
+
+@lilypond[verbatim,quote,fragment,ragged-right,relative=1]
+e4 c g\f c
+\override DynamicText #'extra-offset = #'( -2.2 . 2.0)
+e4 c g\f c
@end lilypond
@item
Alter the horizontal spacing via @code{SpacingSpanner}. See
-@ruser{Changing horizontal spacing}, for more details.
+@ruser{Changing horizontal spacing}, for more details. Here's
+an example first showing the default behaviour:
-@lilypond[verbatim,quote]
+@lilypond[verbatim,quote,ragged-right]
\score {
\relative c'' {
- g4 e e2 | f4 d d2 | c4 d e f | g4 g g2 |
- g4 e e2 | f4 d d2 | c4 e g g | c,1 |
- d4 d d d | d4 e f2 | e4 e e e | e4 f g2 |
- g4 e e2 | f4 d d2 | c4 e g g | c,1 |
+ g4 e e2 |
+ f4 d d2 |
+ c4 d e f |
+ g4 g g2 |
+ g4 e e2 |
+ }
+}
+@end lilypond
+
+@noindent
+and now with @code{common-shortest-duration} increased from the
+value of @code{1/4} (a quarter note is the most common in this
+example) to @code{1/2}:
+
+@lilypond[verbatim,quote,ragged-right]
+\score {
+ \relative c'' {
+ g4 e e2 |
+ f4 d d2 |
+ c4 d e f |
+ g4 g g2 |
+ g4 e e2 |
}
\layout {
\context {
\Score
\override SpacingSpanner
- #'base-shortest-duration = #(ly:make-moment 1 4)
+ #'common-shortest-duration = #(ly:make-moment 1 2)
}
}
}
@end lilypond
-@end itemize
+@noindent
+Note that this override cannot be modified dynamically, so it must
+always be placed in a @code{\context@{..@}} block so that it applies
+to the whole score.
+
+TODO Add description of using \context in this way earlier if it is
+not already anywhere -td
+@end itemize
+TODO Mention line-thickness somewhere else and move this there
+@cindex Tweaks, distances
+@cindex Distances
+Distances in LilyPond are measured in staff-spaces, while most
+thickness properties are measured in line-thickness. Some
+properties are different; for example, the thickness of beams
+are measured in staff-spaces. For more information, see the
+relevant portion of the program reference.
-@c Old stuff follows -td
-@node Common tweaks
-@section Common tweaks
-blah blah
+@node Further tweaking
+@section Further tweaking
@menu
-* Other common tweaks::
+* Other uses for tweaks::
+* Other sources of information::
+* Advanced tweaks with Scheme::
+* Avoiding tweaks with slower processing::
@end menu
-
-
-@node Other common tweaks
-@subsection Other common tweaks
-
-Some overrides are so common that predefined commands are provided as
-short-cuts, such as @code{\slurUp} and @code{\stemDown}. These
-commands are described in the Notation Reference under the appropriate
-sections.
-
-The complete list of modifications available for each type of
-object (like slurs or beams) are documented in the Program
-Reference. However, many layout objects share properties which can be
-used to apply generic tweaks.
+@node Other uses for tweaks
+@subsection Other uses for tweaks
@itemize
-
@item
Setting the @code{transparent} property will cause an object to be printed
in @q{invisible ink}: the object is not printed, but all its other
and blanking the first up-stem in that voice, the tie appears to cross
voices:
-
@lilypond[quote,fragment,relative=2,verbatim]
<< {
\once \override Stem #'transparent = ##t
@end itemize
-@cindex Tweaks, distances
-@cindex Distances
-
-Distances in LilyPond are measured in staff-spaces, while most
-thickness properties are measured in line-thickness. Some
-properties are different; for example, the thickness of beams
-are measured in staff-spaces. For more information, see the
-relevant portion of the program reference.
-
-
-
-@node TODO other name
-@section TODO other name
-
-@menu
-* Predefined tweaks::
-* Advanced tweaks with Scheme::
-* Avoiding tweaks with slower processing::
-* The three methods of tweaking::
-@end menu
-
-@node Predefined tweaks
-@subsection Predefined tweaks
-
-TODO: Some tweaks are really common, blah blah.
-
-for example \slurUp, \fatText.
-
-Show example, then explain where to find ly/propert-ly.
+@node Other sources of information
+@subsection Other sources of information
The Internals Reference documentation contains a lot of information
about LilyPond, but even more information can be gathered from
looking at the internal LilyPond files.
+TODO Show example, then explain where to find ly/propert-ly.
+
Some default settings (such as the definitions for
@code{\header@{@}}s) are stored as @code{.ly} files. Other
settings (such as the definitions of markup commands) are
We can use Scheme to simply @code{\override} commands,
+TODO Check this is a valid example with skylining
+
@lilypond[quote,verbatim,ragged-right]
padText = #(define-music-function (parser location padding) (number?)
#{
We can use it to create new commands,
+TODO Check this is a valid example with skylining
+
@lilypond[quote,verbatim,ragged-right]
tempoMark = #(define-music-function (parser location padding marktext)
(number? string?)
@end verbatim
-@node The three methods of tweaking
-@subsection The three methods of tweaking
-
-FIXME write this.
-
-@verbatim
-\override
-@end verbatim
-
-@verbatim
-\with {
-
-}
-@end verbatim
-
-@verbatim
-\layout{ \context
-
-}}
-@end verbatim
-
-
-FIXME discuss \tweak
-FIXME:
-- There is a section in the manual on \set vs \override (3.3.7),
-which is incomplete. First it doesn't mention \overrideProperty,
-nor does it mention properties which are not capitalized at all.
-And it should explain that \override should be used to set
-properties with hyphenated names, like auto-knee-gap. (I had to
-experiment to find out how to do this.)
STEPMAKE_TEMPLATES=toplevel po install
include $(depth)/make/stepmake.make
-#
-# suggested settings
-#
-# LILYPOND_JOBS= -djob-count=X ## for SMP/Multicore machine
-#
-include local.make
local-dist: dist-toplevel-txt-files
fi
$(MAKE)
$(MAKE) test
- $(MAKE) -C input/regression/ local-test-baseline
- $(MAKE) -C input/regression/musicxml local-test-baseline
+ $(MAKE) out=test -C input/regression/ local-test-baseline
+ $(MAKE) out=test -C input/regression/musicxml local-test-baseline
local-check: test
rm -rf $(RESULT_DIR)
test-clean:
$(MAKE) -C input/regression/ out=test clean
+
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=11
-PATCH_LEVEL=35
+PATCH_LEVEL=36
MY_PATCH_LEVEL=
--- /dev/null
+#!/usr/bin/env python
+
+notes = "CDEFGAB"
+alterations = [-1, 0, 1]
+
+def print_note (octave, note, alteration):
+ print " <note>\n <pitch>\n <step>%s</step>" % notes[note]
+ if alteration <> 0:
+ print " <alter>%s</alter>" % alteration
+ print " <octave>%s</octave>\n </pitch>\n <duration>1</duration>\n <voice>1</voice>\n <type>quarter</type>\n </note>" % octave
+
+
+print """<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.0 Partwise//EN"
+ "http://www.musicxml.org/dtds/partwise.dtd">
+<score-partwise>
+ <movement-title>Various piches and interval sizes</movement-title>
+ <part-list>
+ <score-part id="P1">
+ <part-name>MusicXML Part</part-name>
+ </score-part>
+ </part-list>
+ <!--=========================================================-->
+ <part id="P1">
+ <measure number="1">
+ <attributes>
+ <divisions>1</divisions>
+ <key>
+ <fifths>0</fifths>
+ <mode>major</mode>
+ </key>
+ <time symbol="common">
+ <beats>2</beats>
+ <beat-type>4</beat-type>
+ </time>
+ <clef>
+ <sign>G</sign>
+ <line>2</line>
+ </clef>
+ </attributes>
+"""
+
+start_octave = 5
+
+for octave in (start_octave, start_octave+1):
+ for note in (0,1,2,3,4,5,6):
+ for alteration in alterations:
+ if octave == start_octave and note == 0 and alteration == -1:
+ continue
+ print_note (octave, note, alteration)
+# if octave == start_octave and note == 0 and alteration == 0:
+# continue
+ print_note (start_octave-(octave-start_octave)-(1-(7-note)/7), (7-note)%7, -alteration)
+
+print """ </measure>
+ </part>
+</score-partwise>
+"""
\ No newline at end of file
--- /dev/null
+#!/usr/bin/env python
+
+notes = "CDEFGAB"
+alterations = [-1, 0, 1]
+
+def print_measure (nr, fifth, mode, atts = "", final = ""):
+ print """ <measure number="%s">
+ <attributes>
+%s <key>
+ <fifths>%s</fifths>
+ <mode>%s</mode>
+ </key>
+ </attributes>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>2</duration>
+ <voice>1</voice>
+ <type>half</type>
+ </note>
+%s </measure>""" % (nr, atts, fifth, mode, final)
+
+first_atts = """ <divisions>1</divisions>
+ <time symbol="common">
+ <beats>2</beats>
+ <beat-type>4</beat-type>
+ </time>
+ <clef>
+ <sign>G</sign>
+ <line>2</line>
+ </clef>
+"""
+
+final_barline = """ <barline location="right">
+ <bar-style>light-heavy</bar-style>
+ </barline>
+"""
+
+print """<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.0 Partwise//EN"
+ "http://www.musicxml.org/dtds/partwise.dtd">
+<score-partwise>
+ <movement-title>Different Key signatures</movement-title>
+ <part-list>
+ <score-part id="P1">
+ <part-name>MusicXML Part</part-name>
+ </score-part>
+ </part-list>
+ <!--=========================================================-->
+ <part id="P1">
+"""
+
+max_range = 11
+measure = 0
+for fifth in range(-max_range, max_range+1):
+ measure += 1
+ if fifth == -max_range:
+ print_measure (measure, fifth, "major", first_atts)
+ else:
+ print_measure (measure, fifth, "major")
+ measure += 1
+ if fifth == max_range:
+ print_measure (measure, fifth, "minor", "", final_barline)
+ else:
+ print_measure (measure, fifth, "minor")
+
+
+print """ </part>
+</score-partwise>
+"""
\ No newline at end of file
--- /dev/null
+#!/usr/bin/env python
+
+notes = "CDEFGAB"
+alterations = [-1, 0, 1]
+
+def print_measure (nr, beats, type, params = "", attr = "", barline = ""):
+ print """ <measure number="%s">
+ <attributes>
+%s <time %s>
+ <beats>%s</beats>
+ <beat-type>%s</beat-type>
+ </time>
+ </attributes>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ </note>
+%s </measure>""" % (nr, attr, params, beats, type, barline)
+
+first_atts = """ <divisions>1</divisions>
+ <key>
+ <fifths>0</fifths>
+ <mode>major</mode>
+ </key>
+ <time symbol="common">
+ <beats>2</beats>
+ <beat-type>4</beat-type>
+ </time>
+ <clef>
+ <sign>G</sign>
+ <line>2</line>
+ </clef>
+"""
+
+final_barline = """ <barline location="right">
+ <bar-style>light-heavy</bar-style>
+ </barline>
+"""
+
+print """<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.0 Partwise//EN"
+ "http://www.musicxml.org/dtds/partwise.dtd">
+<score-partwise>
+ <movement-title>Different time signatures</movement-title>
+ <part-list>
+ <score-part id="P1">
+ <part-name>MusicXML Part</part-name>
+ </score-part>
+ </part-list>
+ <!--=========================================================-->
+ <part id="P1">
+"""
+
+measure = 1
+
+print_measure (measure, 2, 2, " symbol=\"common\"", first_atts)
+measure += 1
+
+print_measure (measure, 4, 4, " symbol=\"common\"")
+measure += 1
+
+print_measure (measure, 2, 2)
+measure += 1
+
+print_measure (measure, 3, 2)
+measure += 1
+
+print_measure (measure, 2, 4)
+measure += 1
+
+print_measure (measure, 3, 4)
+measure += 1
+
+print_measure (measure, 4, 4)
+measure += 1
+
+print_measure (measure, 5, 4)
+measure += 1
+
+print_measure (measure, 3, 8)
+measure += 1
+
+print_measure (measure, 6, 8)
+measure += 1
+
+print_measure (measure, 12, 8, "", "", final_barline)
+measure += 1
+
+print """ </part>
+</score-partwise>
+"""
\ No newline at end of file
--- /dev/null
+#! /usr/bin/perl
+
+##################################################
+# Convert stylized Metafont to PostScript Type 1 #
+# By Scott Pakin <scott+mf@pakin.org> #
+##################################################
+
+########################################################################
+# mf2pt1 #
+# Copyright (C) 2007 Scott Pakin #
+# #
+# This program may be distributed and/or modified under the conditions #
+# of the LaTeX Project Public License, either version 1.3c of this #
+# license or (at your option) any later version. #
+# #
+# The latest version of this license is in: #
+# #
+# http://www.latex-project.org/lppl.txt #
+# #
+# and version 1.3c or later is part of all distributions of LaTeX #
+# version 2006/05/20 or later. #
+########################################################################
+
+our $VERSION = "2.4.2"; # mf2pt1 version number
+require 5.6.1; # I haven't tested mf2pt1 with older Perl versions
+
+use File::Basename;
+use File::Spec;
+use Getopt::Long;
+use Pod::Usage;
+use Math::Trig;
+use warnings;
+use strict;
+
+# Define some common encoding vectors.
+my @standardencoding =
+ ((map {"_a$_"} (0..31)),
+ qw (space exclam quotedbl numbersign dollar percent ampersand
+ quoteright parenleft parenright asterisk plus comma hyphen
+ period slash zero one two three four five six seven eight
+ nine colon semicolon less equal greater question at A B C D E
+ F G H I J K L M N O P Q R S T U V W X Y Z bracketleft
+ backslash bracketright asciicircum underscore quoteleft a b c
+ d e f g h i j k l m n o p q r s t u v w x y z braceleft bar
+ braceright asciitilde),
+ (map {"_a$_"} (127..160)),
+ qw (exclamdown cent sterling fraction yen florin section currency
+ quotesingle quotedblleft guillemotleft guilsinglleft
+ guilsinglright fi fl _a176 endash dagger daggerdbl
+ periodcentered _a181 paragraph bullet quotesinglbase
+ quotedblbase quotedblright guillemotright ellipsis
+ perthousand _a190 questiondown _a192 grave acute circumflex
+ tilde macron breve dotaccent dieresis _a201 ring cedilla
+ _a204 hungarumlaut ogonek caron emdash),
+ (map {"_a$_"} (209..224)),
+ qw (AE _a226 ordfeminine _a228 _a229 _a230 _a231 Lslash Oslash OE
+ ordmasculine _a236 _a237 _a238 _a239 _a240 ae _a242 _a243
+ _a244 dotlessi _a246 _a247 lslash oslash oe germandbls _a252
+ _a253 _a254 _a255));
+my @isolatin1encoding =
+ ((map {"_a$_"} (0..31)),
+ qw (space exclam quotedbl numbersign dollar percent ampersand
+ quoteright parenleft parenright asterisk plus comma minus
+ period slash zero one two three four five six seven eight
+ nine colon semicolon less equal greater question at A B C D E
+ F G H I J K L M N O P Q R S T U V W X Y Z bracketleft
+ backslash bracketright asciicircum underscore quoteleft a b c
+ d e f g h i j k l m n o p q r s t u v w x y z braceleft bar
+ braceright asciitilde),
+ (map {"_a$_"} (128..143)),
+ qw (dotlessi grave acute circumflex tilde macron breve dotaccent
+ dieresis _a153 ring cedilla _a156 hungarumlaut ogonek
+ caron space exclamdown cent sterling currency yen brokenbar
+ section dieresis copyright ordfeminine guillemotleft
+ logicalnot hyphen registered macron degree plusminus
+ twosuperior threesuperior acute mu paragraph periodcentered
+ cedilla onesuperior ordmasculine guillemotright onequarter
+ onehalf threequarters questiondown Agrave Aacute Acircumflex
+ Atilde Adieresis Aring AE Ccedilla Egrave Eacute Ecircumflex
+ Edieresis Igrave Iacute Icircumflex Idieresis Eth Ntilde
+ Ograve Oacute Ocircumflex Otilde Odieresis multiply Oslash
+ Ugrave Uacute Ucircumflex Udieresis Yacute Thorn germandbls
+ agrave aacute acircumflex atilde adieresis aring ae ccedilla
+ egrave eacute ecircumflex edieresis igrave iacute icircumflex
+ idieresis eth ntilde ograve oacute ocircumflex otilde
+ odieresis divide oslash ugrave uacute ucircumflex udieresis
+ yacute thorn ydieresis));
+my @ot1encoding =
+ qw (Gamma Delta Theta Lambda Xi Pi Sigma Upsilon Phi
+ Psi Omega ff fi fl ffi ffl dotlessi dotlessj grave acute caron
+ breve macron ring cedilla germandbls ae oe oslash AE OE Oslash
+ suppress exclam quotedblright numbersign dollar percent
+ ampersand quoteright parenleft parenright asterisk plus comma
+ hyphen period slash zero one two three four five six seven
+ eight nine colon semicolon exclamdown equal questiondown
+ question at A B C D E F G H I J K L M N O P Q R S T U V W X Y
+ Z bracketleft quotedblleft bracketright circumflex dotaccent
+ quoteleft a b c d e f g h i j k l m n o p q r s t u v w x y z
+ endash emdash hungarumlaut tilde dieresis);
+my @t1encoding =
+ qw (grave acute circumflex tilde dieresis hungarumlaut ring caron
+ breve macron dotaccent cedilla ogonek quotesinglbase
+ guilsinglleft guilsinglright quotedblleft quotedblright
+ quotedblbase guillemotleft guillemotright endash emdash cwm
+ perthousand dotlessi dotlessj ff fi fl ffi ffl space exclam
+ quotedbl numbersign dollar percent ampersand quoteright
+ parenleft parenright asterisk plus comma hyphen period slash
+ zero one two three four five six seven eight nine colon
+ semicolon less equal greater question at A B C D E F G H I J K L
+ M N O P Q R S T U V W X Y Z bracketleft backslash bracketright
+ asciicircum underscore quoteleft a b c d e f g h i j k l m n o p
+ q r s t u v w x y z braceleft bar braceright asciitilde
+ sfthyphen Abreve Aogonek Cacute Ccaron Dcaron Ecaron Eogonek
+ Gbreve Lacute Lcaron Lslash Nacute Ncaron Eng Ohungarumlaut
+ Racute Rcaron Sacute Scaron Scedilla Tcaron Tcedilla
+ Uhungarumlaut Uring Ydieresis Zacute Zcaron Zdotaccent IJ
+ Idotaccent dcroat section abreve aogonek cacute ccaron dcaron
+ ecaron eogonek gbreve lacute lcaron lslash nacute ncaron eng
+ ohungarumlaut racute rcaron sacute scaron scedilla tcaron
+ tcedilla uhungarumlaut uring ydieresis zacute zcaron zdotaccent
+ ij exclamdown questiondown sterling Agrave Aacute Acircumflex
+ Atilde Adieresis Aring AE Ccedilla Egrave Eacute Ecircumflex
+ Edieresis Igrave Iacute Icircumflex Idieresis Eth Ntilde Ograve
+ Oacute Ocircumflex Otilde Odieresis OE Oslash Ugrave Uacute
+ Ucircumflex Udieresis Yacute Thorn SS agrave aacute acircumflex
+ atilde adieresis aring ae ccedilla egrave eacute ecircumflex
+ edieresis igrave iacute icircumflex idieresis eth ntilde ograve
+ oacute ocircumflex otilde odieresis oe oslash ugrave uacute
+ ucircumflex udieresis yacute thorn germandbls);
+
+# Define font parameters that the user can override.
+my $fontversion;
+my $creationdate;
+my $comment;
+my $familyname;
+my $weight;
+my $fullname;
+my $fixedpitch;
+my $italicangle;
+my $underlinepos;
+my $underlinethick;
+my $fontname;
+my $uniqueID;
+my $designsize;
+my ($mffile, $pt1file, $pfbfile, $ffscript);
+my $encoding;
+my $rounding;
+my $bpppix;
+
+# Define all of our other global variables.
+my $progname = basename $0, ".pl";
+my $mag;
+my @fontbbox;
+my @charbbox;
+my @charwd;
+my @glyphname;
+my @charfiles;
+my $filebase;
+my $filedir;
+my $filenoext;
+my $versionmsg = "mf2pt1 version $VERSION
+
+Copyright (C) 2007 Scott Pakin
+
+This program may be distributed and/or modified under the conditions
+of the LaTeX Project Public License, either version 1.3c of this
+license or (at your option) any later version.
+
+The latest version of this license is in:
+
+ http://www.latex-project.org/lppl.txt
+
+and version 1.3c or later is part of all distributions of LaTeX
+version 2006/05/20 or later.
+";
+
+
+######################################################################
+
+# The routines to compute the fractional approximation of a real number
+# are heavily based on code posted by Ben Tilly
+# <http://www.perlmonks.org/?node_id=26179> on Nov 16th, 2000, to the
+# PerlMonks list. See <http://www.perlmonks.org/index.pl?node_id=41961>.
+
+
+# Takes numerator/denominator pairs.
+# Returns a PS fraction string representation (with a trailing space).
+sub frac_string (@)
+{
+ my $res = "";
+
+ while (@_) {
+ my $n = shift;
+ my $d = shift;
+ $res .= $n . " ";
+ $res .= $d . " div " if $d > 1;
+ }
+
+ return $res;
+}
+
+
+# Takes a number.
+# Returns a numerator and denominator with the smallest denominator
+# so that the difference of the resulting fraction to the number is
+# smaller or equal to $rounding.
+sub frac_approx ($)
+{
+ my $num = shift;
+ my $f = ret_frac_iter ($num);
+
+ while (1) {
+ my ($n, $m) = $f->();
+ my $approx = $n / $m;
+ my $delta = abs ($num - $approx);
+ return ($n, $m) if ($delta <= $rounding);
+ }
+}
+
+
+# Takes a number, returns the best integer approximation and (in list
+# context) the error.
+sub best_int ($)
+{
+ my $x = shift;
+ my $approx = sprintf '%.0f', $x;
+ if (wantarray) {
+ return ($approx, $x - $approx);
+ }
+ else {
+ return $approx;
+ }
+}
+
+
+# Takes a numerator and denominator, in scalar context returns
+# the best fraction describing them, in list the numerator and
+# denominator.
+sub frac_standard ($$)
+{
+ my $n = best_int(shift);
+ my $m = best_int(shift);
+ my $k = gcd($n, $m);
+ $n /= $k;
+ $m /= $k;
+ if ($m < 0) {
+ $n *= -1;
+ $m *= -1;
+ }
+ if (wantarray) {
+ return ($n, $m);
+ }
+ else {
+ return "$n/$m";
+ }
+}
+
+
+# Euclidean algorithm for calculating a GCD.
+# Takes two integers, returns the greatest common divisor.
+sub gcd ($$)
+{
+ my ($n, $m) = @_;
+ while ($m) {
+ my $k = $n % $m;
+ ($n, $m) = ($m, $k);
+ }
+ return $n;
+}
+
+
+# Takes a list of terms in a continued fraction, and converts it
+# into a fraction.
+sub ints_to_frac (@)
+{
+ my ($n, $m) = (0, 1); # Start with 0
+ while (@_) {
+ my $k = pop;
+ if ($n) {
+ # Want frac for $k + 1/($n/$m)
+ ($n, $m) = frac_standard($k*$n + $m, $n);
+ }
+ else {
+ # Want $k
+ ($n, $m) = frac_standard($k, 1);
+ }
+ }
+ return frac_standard($n, $m);
+}
+
+
+# Takes a number, returns an anon sub which iterates through a set of
+# fractional approximations that converges very quickly to the number.
+sub ret_frac_iter ($)
+{
+ my $x = shift;
+ my $term_iter = ret_next_term_iter($x);
+ my @ints;
+ return sub {
+ push @ints, $term_iter->();
+ return ints_to_frac(@ints);
+ }
+}
+
+
+# Terms of a continued fraction converging on that number.
+sub ret_next_term_iter ($)
+{
+ my $x = shift;
+ return sub {
+ (my $n, $x) = best_int($x);
+ if (0 != $x) {
+ $x = 1/$x;
+ }
+ return $n;
+ }
+}
+
+######################################################################
+
+# Round a number to the nearest integer.
+sub round ($)
+{
+ return int($_[0] + 0.5*($_[0] <=> 0));
+}
+
+
+# Round a number to a given precision.
+sub prec ($)
+{
+ return round ($_[0] / $rounding) * $rounding;
+}
+
+
+# Set a variable's value to the first defined value in the given list.
+# If the variable was not previously defined and no value in the list
+# is defined, do nothing.
+sub assign_default (\$@)
+{
+ my $varptr = shift; # Pointer to variable to define
+ return if defined $$varptr && $$varptr ne "UNSPECIFIED";
+ foreach my $val (@_) {
+ next if !defined $val;
+ $$varptr = $val;
+ return;
+ }
+}
+
+
+# Print and execute a shell command. An environment variable with the
+# same name as the command overrides the command name. Return 1 on
+# success, 0 on failure. Optionally abort if the command fails, based
+# on the first argument to execute_command.
+sub execute_command ($@)
+{
+ my $abort_on_failure = shift;
+ my @command = @_;
+ $command[0] = $ENV{uc $command[0]} || $command[0];
+ my $prettyargs = join (" ", map {/[\\ ]/ ? "'$_'" : $_} @command);
+ print "Invoking \"$prettyargs\"...\n";
+ my $result = system @command;
+ die "${progname}: \"$prettyargs\" failed ($!)\n" if $result && $abort_on_failure;
+ return !$result;
+}
+
+
+# Output the font header.
+sub output_header ()
+{
+ # Show the initial boilerplate.
+ print OUTFILE <<"ENDHEADER";
+%!FontType1-1.0: $fontname $fontversion
+%%CreationDate: $creationdate
+% Font converted to Type 1 by mf2pt1, written by Scott Pakin.
+11 dict begin
+/FontInfo 11 dict dup begin
+/version ($fontversion) readonly def
+/Notice ($comment) readonly def
+/FullName ($fullname) readonly def
+/FamilyName ($familyname) readonly def
+/Weight ($weight) readonly def
+/ItalicAngle $italicangle def
+/isFixedPitch $fixedpitch def
+/UnderlinePosition $underlinepos def
+/UnderlineThickness $underlinethick def
+end readonly def
+/FontName /$fontname def
+ENDHEADER
+
+ # If we're not using an encoding that PostScript knows about, then
+ # create an encoding vector.
+ if ($encoding==\@standardencoding) {
+ print OUTFILE "/Encoding StandardEncoding def\n";
+ }
+ else {
+ print OUTFILE "/Encoding 256 array\n";
+ print OUTFILE "0 1 255 {1 index exch /.notdef put} for\n";
+ foreach my $charnum (0 .. $#{$encoding}) {
+ if ($encoding->[$charnum] && $encoding->[$charnum]!~/^_a\d+$/) {
+ print OUTFILE "dup $charnum /$encoding->[$charnum] put\n";
+ }
+ }
+ print OUTFILE "readonly def\n";
+ }
+
+ # Show the final boilerplate.
+ print OUTFILE <<"ENDHEADER";
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/UniqueID $uniqueID def
+/FontBBox{@fontbbox}readonly def
+currentdict end
+currentfile eexec
+dup /Private 5 dict dup begin
+/RD{string currentfile exch readstring pop}executeonly def
+/ND{noaccess def}executeonly def
+/NP{noaccess put}executeonly def
+ENDHEADER
+}
+
+
+# Use MetaPost to generate one PostScript file per character. We
+# calculate the font bounding box from these characters and store them
+# in @fontbbox. If the input parameter is 1, set other font
+# parameters, too.
+sub get_bboxes ($)
+{
+ execute_command 1, ("mpost", "-mem=mf2pt1", "-progname=mpost",
+ "\\mode:=localfont; mag:=$mag; bpppix $bpppix; input $mffile");
+ opendir (CURDIR, ".") || die "${progname}: $! ($filedir)\n";
+ @charfiles = grep /^$filebase.*\.\d+$/, readdir(CURDIR);
+ close CURDIR;
+ @fontbbox = (1000000, 1000000, -1000000, -1000000);
+ foreach my $psfile (@charfiles) {
+ # Read the character number from the output file's extension.
+ $psfile =~ /\.(\d+)$/;
+ my $charnum = $1;
+
+ # Process in turn each line of the current PostScript file.
+ my $havebbox = 0;
+ open (PSFILE, "<$psfile") || die "${progname}: $! ($psfile)\n";
+ while (<PSFILE>) {
+ my @tokens = split " ";
+ if ($tokens[0] eq "%%BoundingBox:") {
+ # Store the MetaPost-produced bounding box, just in case
+ # the given font doesn't use beginchar.
+ @tokens = ("%", "MF2PT1:", "glyph_dimensions", @tokens[1..4]);
+ $havebbox--;
+ }
+ next if $#tokens<1 || $tokens[1] ne "MF2PT1:";
+
+ # Process a "special" inserted into the generated PostScript.
+ MF2PT1_CMD:
+ {
+ # glyph_dimensions llx lly urx ury -- specified glyph dimensions
+ $tokens[2] eq "glyph_dimensions" && do {
+ my @bbox = @tokens[3..6];
+ $fontbbox[0]=$bbox[0] if $bbox[0]<$fontbbox[0];
+ $fontbbox[1]=$bbox[1] if $bbox[1]<$fontbbox[1];
+ $fontbbox[2]=$bbox[2] if $bbox[2]>$fontbbox[2];
+ $fontbbox[3]=$bbox[3] if $bbox[3]>$fontbbox[3];
+ $charbbox[$charnum] = \@bbox;
+ $havebbox++;
+ last MF2PT1_CMD;
+ };
+
+ # If all we want is the bounding box, exit the loop now.
+ last MF2PT1_CMD if !$_[0];
+
+ # glyph_name name -- glyph name
+ $tokens[2] eq "glyph_name" && do {
+ $glyphname[$charnum] = $tokens[3];
+ last MF2PT1_CMD;
+ };
+
+ # charwd wd -- character width as in TFM
+ $tokens[2] eq "charwd" && do {
+ $charwd[$charnum] = $tokens[3];
+ last MF2PT1_CMD;
+ };
+
+ # font_identifier name -- full font name
+ $tokens[2] eq "font_identifier" && do {
+ $fullname = $tokens[3];
+ last MF2PT1_CMD;
+ };
+
+ # font_size number -- font design size (pt, not bp)
+ $tokens[2] eq "font_size" && $tokens[3] && do {
+ $designsize = $tokens[3] * 72 / 72.27;
+ last MF2PT1_CMD;
+ };
+
+ # font_slant number -- italic amount
+ $tokens[2] eq "font_slant" && do {
+ $italicangle = 0 + rad2deg (atan(-$tokens[3]));
+ last MF2PT1_CMD;
+ };
+
+ # font_coding_scheme string -- font encoding
+ $tokens[2] eq "font_coding_scheme" && do {
+ $encoding = $tokens[3];
+ last MF2PT1_CMD;
+ };
+
+ # font_version string -- font version number (xxx.yyy)
+ $tokens[2] eq "font_version" && do {
+ $fontversion = $tokens[3];
+ last MF2PT1_CMD;
+ };
+
+ # font_comment string -- font comment notice
+ $tokens[2] eq "font_comment" && do {
+ $comment = join (" ", @tokens[3..$#tokens]);
+ last MF2PT1_CMD;
+ };
+
+ # font_family string -- font family name
+ $tokens[2] eq "font_family" && do {
+ $familyname = $tokens[3];
+ last MF2PT1_CMD;
+ };
+
+ # font_weight string -- font weight (e.g., "Book" or "Heavy")
+ $tokens[2] eq "font_weight" && do {
+ $weight = $tokens[3];
+ last MF2PT1_CMD;
+ };
+
+ # font_fixed_pitch number -- fixed width font (0=false, 1=true)
+ $tokens[2] eq "font_fixed_pitch" && do {
+ $fixedpitch = $tokens[3];
+ last MF2PT1_CMD;
+ };
+
+ # font_underline_position number -- vertical underline position
+ $tokens[2] eq "font_underline_position" && do {
+ # We store $underlinepos in points and later
+ # scale it by 1000/$designsize.
+ $underlinepos = $tokens[3];
+ last MF2PT1_CMD;
+ };
+
+ # font_underline_thickness number -- thickness of underline
+ $tokens[2] eq "font_underline_thickness" && do {
+ # We store $underlinethick in points and later
+ # scale it by 1000/$designsize.
+ $underlinethick = $tokens[3];
+ last MF2PT1_CMD;
+ };
+
+ # font_name string -- font name
+ $tokens[2] eq "font_name" && do {
+ $fontname = $tokens[3];
+ last MF2PT1_CMD;
+ };
+
+ # font_unique_id number (as string) -- globally unique font ID
+ $tokens[2] eq "font_unique_id" && do {
+ $uniqueID = 0+$tokens[3];
+ last MF2PT1_CMD;
+ };
+ }
+ }
+ close PSFILE;
+ if (!$havebbox) {
+ warn "${progname}: No beginchar in character $charnum; glyph dimensions are probably incorrect\n";
+ }
+ }
+}
+
+
+# Convert ordinary, MetaPost-produced PostScript files into Type 1
+# font programs.
+sub output_font_programs ()
+{
+ # Iterate over all the characters. We convert each one, line by
+ # line and token by token.
+ print "Converting PostScript graphics to Type 1 font programs...\n";
+ foreach my $psfile (@charfiles) {
+ # Initialize the font program.
+ $psfile =~ /\.(\d+)$/;
+ my $charnum = $1;
+ my $gname = $glyphname[$charnum] || $encoding->[$charnum];
+ my @fontprog;
+ push @fontprog, ("/$gname {",
+ frac_string (frac_approx ($charbbox[$charnum]->[0]),
+ frac_approx ($charwd[$charnum] * $mag))
+ . "hsbw");
+ my ($cpx, $cpy) =
+ ($charbbox[$charnum]->[0], 0); # Current point (PostScript)
+
+ # Iterate over every line in the current file.
+ open (PSFILE, "<$psfile") || die "${progname}: $! ($psfile)\n";
+ while (my $oneline=<PSFILE>) {
+ next if $oneline=~/^\%/;
+ next if $oneline=~/set/; # Fortunately, "set" never occurs on "good" lines.
+ my @arglist; # Arguments to current PostScript function
+
+ # Iterate over every token in the current line.
+ TOKENLOOP:
+ foreach my $token (split " ", $oneline) {
+ # Number: Round and push on the argument list.
+ $token =~ /^[-.\d]+$/ && do {
+ push @arglist, prec ($&);
+ next TOKENLOOP;
+ };
+
+ # curveto: Convert to vhcurveto, hvcurveto, or rrcurveto.
+ $token eq "curveto" && do {
+ my ($dx1, $dy1) = ($arglist[0] - $cpx,
+ $arglist[1] - $cpy);
+ my ($dx1n, $dx1d) = frac_approx ($dx1);
+ my ($dy1n, $dy1d) = frac_approx ($dy1);
+ $cpx += $dx1n / $dx1d;
+ $cpy += $dy1n / $dy1d;
+
+ my ($dx2, $dy2) = ($arglist[2] - $cpx,
+ $arglist[3] - $cpy);
+ my ($dx2n, $dx2d) = frac_approx ($dx2);
+ my ($dy2n, $dy2d) = frac_approx ($dy2);
+ $cpx += $dx2n / $dx2d;
+ $cpy += $dy2n / $dy2d;
+
+ my ($dx3, $dy3) = ($arglist[4] - $cpx,
+ $arglist[5] - $cpy);
+ my ($dx3n, $dx3d) = frac_approx ($dx3);
+ my ($dy3n, $dy3d) = frac_approx ($dy3);
+ $cpx += $dx3n / $dx3d;
+ $cpy += $dy3n / $dy3d;
+
+ if (!$dx1n && !$dy3n) {
+ push @fontprog, frac_string ($dy1n, $dy1d,
+ $dx2n, $dx2d,
+ $dy2n, $dy2d,
+ $dx3n, $dx3d)
+ . "vhcurveto";
+ }
+ elsif (!$dy1n && !$dx3n) {
+ push @fontprog, frac_string ($dx1n, $dx1d,
+ $dx2n, $dx2d,
+ $dy2n, $dy2d,
+ $dy3n, $dy3d)
+ . "hvcurveto";
+ }
+ else {
+ push @fontprog, frac_string ($dx1n, $dx1d,
+ $dy1n, $dy1d,
+ $dx2n, $dx2d,
+ $dy2n, $dy2d,
+ $dx3n, $dx3d,
+ $dy3n, $dy3d)
+ . "rrcurveto";
+ }
+ next TOKENLOOP;
+ };
+
+ # lineto: Convert to vlineto, hlineto, or rlineto.
+ $token eq "lineto" && do {
+ my ($dx, $dy) = ($arglist[0] - $cpx,
+ $arglist[1] - $cpy);
+ my ($dxn, $dxd) = frac_approx ($dx);
+ my ($dyn, $dyd) = frac_approx ($dy);
+ $cpx += $dxn / $dxd;
+ $cpy += $dyn / $dyd;
+
+ if (!$dxn) {
+ push @fontprog, frac_string ($dyn, $dyd)
+ . "vlineto" if $dyn;
+ }
+ elsif (!$dyn) {
+ push @fontprog, frac_string ($dxn, $dxd)
+ . "hlineto";
+ }
+ else {
+ push @fontprog, frac_string ($dxn, $dxd, $dyn, $dyd)
+ . "rlineto";
+ }
+ next TOKENLOOP;
+ };
+
+ # moveto: Convert to vmoveto, hmoveto, or rmoveto.
+ $token eq "moveto" && do {
+ my ($dx, $dy) = ($arglist[0] - $cpx,
+ $arglist[1] - $cpy);
+ my ($dxn, $dxd) = frac_approx ($dx);
+ my ($dyn, $dyd) = frac_approx ($dy);
+ $cpx += $dxn / $dxd;
+ $cpy += $dyn / $dyd;
+
+ if (!$dxn) {
+ push @fontprog, frac_string ($dyn, $dyd)
+ . "vmoveto";
+ }
+ elsif (!$dyn) {
+ push @fontprog, frac_string ($dxn, $dxd)
+ . "hmoveto";
+ }
+ else {
+ push @fontprog, frac_string ($dxn, $dxd, $dyn, $dyd)
+ . "rmoveto";
+ }
+ next TOKENLOOP;
+ };
+
+ # closepath: Output as is.
+ $token eq "closepath" && do {
+ push @fontprog, $token;
+ next TOKENLOOP;
+ };
+ }
+ }
+ close PSFILE;
+ push @fontprog, ("endchar",
+ "} ND");
+ print OUTFILE join ("\n\t", @fontprog), "\n";
+ }
+}
+
+
+# Output the final set of code for the Type 1 font.
+sub output_trailer ()
+{
+ print OUTFILE <<"ENDTRAILER";
+/.notdef {
+ 0 @{[$fontbbox[2]-$fontbbox[0]]} hsbw
+ endchar
+ } ND
+end
+end
+readonly put
+noaccess put
+dup/FontName get exch definefont pop
+mark currentfile closefile
+cleartomark
+ENDTRAILER
+}
+
+######################################################################
+
+# Parse the command line. Asterisks in the following represents
+# commands also defined by Plain Metafont.
+my %opthash = ();
+GetOptions (\%opthash,
+ "fontversion=s", # font_version
+ "comment=s", # font_comment
+ "family=s", # font_family
+ "weight=s", # font_weight
+ "fullname=s", # font_identifier (*)
+ "fixedpitch!", # font_fixed_pitch
+ "italicangle=f", # font_slant (*)
+ "underpos=f", # font_underline_position
+ "underthick=f", # font_underline_thickness
+ "name=s", # font_name
+ "uniqueid=i", # font_unique_id
+ "designsize=f", # font_size (*)
+ "encoding=s", # font_coding_scheme (*)
+ "rounding=f",
+ "bpppix=f",
+ "ffscript=s",
+ "h|help",
+ "V|version") || pod2usage(2);
+if (defined $opthash{"h"}) {
+ pod2usage(-verbose => 1,
+ -output => \*STDOUT, # Bug workaround for Pod::Usage
+ -exitval => "NOEXIT");
+ print "Please e-mail bug reports to scott+mf\@pakin.org.\n";
+ exit 1;
+}
+do {print $versionmsg; exit 1} if defined $opthash{"V"};
+pod2usage(2) if $#ARGV != 0;
+
+# Extract the filename from the command line.
+$mffile = $ARGV[0];
+my @fileparts = fileparse $mffile, ".mf";
+$filebase = $fileparts[0];
+$filedir = $fileparts[1];
+$filenoext = File::Spec->catfile ($filedir, $filebase);
+$pt1file = $filebase . ".pt1";
+$pfbfile = $filebase . ".pfb";
+
+assign_default $bpppix, $opthash{bpppix}, 0.02;
+
+# Make our first pass through the input, to set values for various options.
+$mag = 100; # Get a more precise bounding box.
+get_bboxes(1); # This might set $designsize.
+
+# Sanity-check the specified precision.
+assign_default $rounding, $opthash{rounding}, 1;
+if ($rounding<=0.0 || $rounding>1.0) {
+ die sprintf "%s: Invalid rounding amount \"%g\"; value must be a positive number no greater than 1.0\n", $progname, $rounding;
+}
+
+# Ensure that every user-definable parameter is assigned a value.
+assign_default $fontversion, $opthash{fontversion}, "001.000";
+assign_default $creationdate, scalar localtime;
+assign_default $comment, $opthash{comment}, "Font converted to Type 1 by mf2pt1, written by Scott Pakin.";
+assign_default $weight, $opthash{weight}, "Medium";
+assign_default $fixedpitch, $opthash{fixedpitch}, 0;
+assign_default $uniqueID, $opthash{uniqueid}, int(rand(1000000)) + 4000000;
+assign_default $designsize, $opthash{designsize};
+die "${progname}: a design size must be specified in $mffile or on the command line\n" if !defined $designsize;
+die "${progname}: the design size must be a positive number\n" if $designsize<=0.0;
+assign_default $underlinepos, $opthash{underpos}, -1;
+$underlinepos = round(1000*$underlinepos/$designsize);
+assign_default $underlinethick, $opthash{underthick}, 0.5;
+$underlinethick = round(1000*$underlinethick/$designsize);
+assign_default $fullname, $opthash{fullname}, $filebase;
+assign_default $familyname, $opthash{family}, $fullname;
+assign_default $italicangle, $opthash{italicangle}, 0;
+assign_default $fontname, $opthash{name}, "$familyname-$weight";
+$fontname =~ s/\s//g;
+assign_default $encoding, $opthash{encoding}, "standard";
+my $encoding_name = $encoding;
+ENCODING:
+{
+ if (-e $encoding) {
+ # Filenames take precedence over built-in encodings.
+ my @enc_array;
+ open (ENCFILE, "<$encoding") || die "${progname}: $! ($encoding)\n";
+ while (my $oneline = <ENCFILE>) {
+ $oneline =~ s/\%.*$//;
+ foreach my $word (split " ", $oneline) {
+ push @enc_array, substr($word, 1) if substr($word, 0, 1) eq "/";
+ }
+ }
+ close ENCFILE;
+ $encoding_name = substr (shift @enc_array, 1);
+ $encoding = \@enc_array;
+ last ENCODING;
+ }
+ $encoding=\@standardencoding, last ENCODING if $encoding eq "standard";
+ $encoding=\@isolatin1encoding, last ENCODING if $encoding eq "isolatin1";
+ $encoding=\@ot1encoding, last ENCODING if $encoding eq "ot1";
+ $encoding=\@t1encoding, last ENCODING if $encoding eq "t1";
+ $encoding=\@glyphname, last ENCODING if $encoding eq "asis";
+ warn "${progname}: Unknown encoding \"$encoding\"; using standard Adobe encoding\n";
+ $encoding=\@standardencoding; # Default to standard encoding
+}
+assign_default $fixedpitch, $opthash{fixedpitch}, 0;
+$fixedpitch = $fixedpitch ? "true" : "false";
+assign_default $ffscript, $opthash{ffscript};
+
+# Output the final values of all of our parameters.
+print "\n";
+print <<"PARAMVALUES";
+mf2pt1 is using the following font parameters:
+ font_version: $fontversion
+ font_comment: $comment
+ font_family: $familyname
+ font_weight: $weight
+ font_identifier: $fullname
+ font_fixed_pitch: $fixedpitch
+ font_slant: $italicangle
+ font_underline_position: $underlinepos
+ font_underline_thickness: $underlinethick
+ font_name: $fontname
+ font_unique_id: $uniqueID
+ font_size: $designsize (bp)
+ font_coding_scheme: $encoding_name
+PARAMVALUES
+ ;
+print "\n";
+
+# Scale by a factor of 1000/design size.
+$mag = 1000.0 / $designsize;
+get_bboxes(0);
+print "\n";
+
+# Output the font in disassembled format.
+open (OUTFILE, ">$pt1file") || die "${progname}: $! ($pt1file)\n";
+output_header();
+printf OUTFILE "2 index /CharStrings %d dict dup begin\n",
+ 1+scalar(grep {defined($_)} @charbbox);
+output_font_programs();
+output_trailer();
+close OUTFILE;
+unlink @charfiles;
+print "\n";
+
+# Convert from the disassembled font format to Type 1 binary format.
+if (!execute_command 0, ("t1asm", $pt1file, $pfbfile)) {
+ die "${progname}: You'll need either to install t1utils and rerun $progname or find another way to convert $pt1file to $pfbfile\n";
+ exit 1;
+}
+print "\n";
+unlink $pt1file;
+
+# Use FontForge to autohint the result.
+my $user_script = 0; # 1=script file was provided by the user; 0=created here
+if (defined $ffscript) {
+ # The user provided his own script.
+ $user_script = 1;
+}
+else {
+ # Create a FontForge script file.
+ $ffscript = $filebase . ".pe";
+ open (FFSCRIPT, ">$ffscript") || die "${progname}: $! ($ffscript)\n";
+ print FFSCRIPT <<'AUTOHINT';
+Open($1);
+SelectAll();
+RemoveOverlap();
+AddExtrema();
+Simplify(0, 2);
+CorrectDirection();
+Simplify(0, 2);
+RoundToInt();
+AutoHint();
+Generate($1);
+Quit(0);
+AUTOHINT
+ ;
+ close FFSCRIPT;
+}
+if (!execute_command 0, ("fontforge", "-script", $ffscript, $pfbfile)) {
+ warn "${progname}: You'll need to install FontForge if you want $pfbfile autohinted (not required, but strongly recommended)\n";
+}
+unlink $ffscript if !$user_script;
+print "\n";
+
+# Finish up.
+print "*** Successfully generated $pfbfile! ***\n";
+exit 0;
+
+######################################################################
+
+__END__
+
+=head1 NAME
+
+mf2pt1 - produce a PostScript Type 1 font program from a Metafont source
+
+
+=head1 SYNOPSIS
+
+mf2pt1
+[B<--help>]
+[B<--version>]
+[B<--comment>=I<string>]
+[B<--designsize>=I<number>]
+[B<--encoding>=I<encoding>]
+[B<--family>=I<name>]
+[B<-->[B<no>]B<fixedpitch>]
+[B<--fontversion>=I<MMM.mmm>]
+[B<--fullname>=I<name>]
+[B<--italicangle>=I<number>]
+[B<--name>=I<name>]
+[B<--underpos>=I<number>]
+[B<--underthick>=I<number>]
+[B<--uniqueid>=I<number>]
+[B<--weight>=I<weight>]
+[B<--rounding>=I<number>]
+[B<--bpppix>=I<number>]
+[B<--ffscript>=I<file.pe>]
+I<infile>.mf
+
+
+=head1 WARNING
+
+The B<mf2pt1> Info file is the main source of documentation for
+B<mf2pt1>. This man page is merely a brief summary.
+
+
+=head1 DESCRIPTION
+
+B<mf2pt1> facilitates producing PostScript Type 1 fonts from a
+Metafont source file. It is I<not>, as the name may imply, an
+automatic converter of arbitrary Metafont fonts to Type 1 format.
+B<mf2pt1> imposes a number of restrictions on the Metafont input. If
+these restrictions are met, B<mf2pt1> will produce valid Type 1
+output. (Actually, it produces "disassembled" Type 1; the B<t1asm>
+program from the B<t1utils> suite will convert this to a true Type 1
+font.)
+
+=head2 Usage
+
+ mf2pt1 myfont.mf
+
+=head1 OPTIONS
+
+Font parameters are best specified within a Metafont program. If
+necessary, though, command-line options can override any of these
+parameters. The B<mf2pt1> Info page, the primary source of B<mf2pt1>
+documentation, describes the following in greater detail.
+
+=over 4
+
+=item B<--help>
+
+Provide help on B<mf2pt1>'s command-line options.
+
+=item B<--version>
+
+Output the B<mf2pt1> version number, copyright, and license.
+
+=item B<--comment>=I<string>
+
+Include a font comment, usually a copyright notice.
+
+=item B<--designsize>=I<number>
+
+Specify the font design size in points.
+
+=item B<--encoding>=I<encoding>
+
+Designate the font encoding, either the name of a---typically
+F<.enc>---file which contains a PostScript font-encoding vector or one
+of C<standard> (the default), C<ot1>, C<t1>, or C<isolatin1>.
+
+=item B<--family>=I<name>
+
+Specify the font family.
+
+=item B<--fixedpitch>, B<--nofixedpitch>
+
+Assert that the font uses either monospaced (B<--fixedpitch>) or
+proportional (B<--nofixedpitch>) character widths.
+
+=item B<--fontversion>=I<MMM.mmm>
+
+Specify the font's major and minor version number.
+
+=item B<--fullname>=I<name>
+
+Designate the full font name (family plus modifiers).
+
+=item B<--italicangle>=I<number>
+
+Designate the italic angle in degrees counterclockwise from vertical.
+
+=item B<--name>=I<name>
+
+Provide the font name.
+
+=item B<--underpos>=I<number>
+
+Specify the vertical position of the underline in thousandths of the
+font height.
+
+=item B<--underthick>=I<number>
+
+Specify the thickness of the underline in thousandths of the font
+height.
+
+=item B<--uniqueid>=I<number>
+
+Specify a globally unique font identifier.
+
+=item B<--weight>=I<weight>
+
+Provide a description of the font weight (e.g., ``Heavy'').
+
+=item B<--rounding>=I<number>
+
+Specify the fraction of a font unit (0.0 < I<number> <= 1.0) to which
+to round coordinate values [default: 1.0].
+
+=item B<--bpppix>=I<number>
+
+Redefine the number of big points per pixel from 0.02 to I<number>.
+
+=item B<--ffscript>=I<file.pe>
+
+Name a script to pass to FontForge.
+
+=back
+
+
+=head1 FILES
+
+F<mf2pt1.mem> (which is generated from F<mf2pt1.mp> and F<mfplain.mp>)
+
+
+=head1 NOTES
+
+As stated in L</"WARNING">, the complete source of documentation for
+B<mf2pt1> is the Info page, not this man page.
+
+
+=head1 SEE ALSO
+
+mf(1), mpost(1), t1asm(1), fontforge(1)
+
+
+=head1 AUTHOR
+
+Scott Pakin, I<scott+mf@pakin.org>
/* define if you have sstream */
#define HAVE_SSTREAM 0
+/* define if you have boost/lambda/lambda.hpp */
+#define HAVE_BOOST_LAMBDA_LAMBDA_HPP 0
+
/* define if you have fontconfig */
#define HAVE_FONTCONFIG 0
AC_CHECK_HEADERS([assert.h grp.h libio.h pwd.h sys/stat.h wchar.h])
AC_LANG_PUSH(C++)
-AC_CHECK_HEADERS([sstream])
+AC_CHECK_HEADERS([sstream boost/lambda/lambda.hpp])
AC_LANG_POP(C++)
AC_HEADER_STAT
AC_FUNC_MEMCMP
using namespace std;
-#if HAVE_BOOST_LAMBDA
+#if HAVE_BOOST_LAMBDA_LAMBDA_HPP
#include <boost/lambda/lambda.hpp>
#endif
return find (v.begin (), v.end (), key);
}
-#if HAVE_BOOST_LAMBDA
+#if HAVE_BOOST_LAMBDA_LAMBDA_HPP
#include <boost/lambda/lambda.hpp>
using namespace boost::lambda;
template<typename T>
#include <cmath>
using namespace std;
-const Real infinity_f = INFINITY;
+const Real infinity_f =
+#ifdef INFINITY
+ INFINITY
+#else
+ HUGE_VAL
+#endif
+ ;
+
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.0"
+\version "2.11.35"
\header{
texidoc = "
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
When writing a figured bass, here's a way to specify if you want your
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
Here are shown many (all?) of the symbols that are included in
\override Staff.StaffSymbol #'line-count = #4
\transpose c c {
- \override Staff.KeySignature #'style = #'vaticana
- \override Staff.Accidental #'style = #'vaticana
+ \override Staff.KeySignature #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
+ \override Staff.Accidental #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
\override NoteHead #'style = #'vaticana.punctum
\key es \major
\clef "vaticana-fa2"
\override NoteHead #'style = #'vaticana.cephalicus
es f
- \override Staff.KeySignature #'style = #'medicaea
- \override Staff.Accidental #'style = #'medicaea
+ \override Staff.KeySignature #'glyph-name-alist = #alteration-medicaea-glyph-name-alist
+ \override Staff.Accidental #'glyph-name-alist = #alteration-medicaea-glyph-name-alist
\override Staff.Custos #'style = #'medicaea
\override NoteHead #'style = #'medicaea.punctum
\clef "medicaea-fa2"
\override NoteHead #'style = #'medicaea.rvirga
e! des! ces!
- \override Staff.KeySignature #'style = #'hufnagel
- \override Staff.Accidental #'style = #'hufnagel
+ \override Staff.KeySignature #'glyph-name-alist = #alteration-hufnagel-glyph-name-alist
+ \override Staff.Accidental #'glyph-name-alist = #alteration-hufnagel-glyph-name-alist
\override Staff.Custos #'style = #'hufnagel
\override NoteHead #'style = #'hufnagel.punctum
\clef "hufnagel-fa2"
\accepts MensuralVoice
\consists Custos_engraver
\override TimeSignature #'style = #'mensural
- \override KeySignature #'style = #'mensural
- \override Accidental #'style = #'mensural
+ \override KeySignature #'glyph-name-alist = #alteration-mensural-glyph-name-alist
+ \override Accidental #'glyph-name-alist = #alteration-mensural-glyph-name-alist
\override Custos #'style = #'mensural
\override Custos #'neutral-position = #3
\override Custos #'neutral-direction = #-1
\remove Time_signature_engraver
\override StaffSymbol #'thickness = #2.0
\override StaffSymbol #'line-count = #4
- \override KeySignature #'style = #'vaticana
- \override Accidental #'style = #'vaticana
+ \override KeySignature #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
+ \override Accidental #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
\override Custos #'style = #'vaticana
\override Custos #'neutral-position = #4
\override Custos #'neutral-direction = #-1
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
Time signatures may also be engraved in an old style.
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
This form of notation is used for the chant of the Psalms, where verses
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
Custodes may be engraved in various styles.
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.0"
+\version "2.11.35"
\header{
texidoc = "
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.0"
+\version "2.11.35"
\header{
texidoc = "
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
When writing a figured bass, here's a way to specify if you want your
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The english naming of chords (default) can be changed to german
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The property @code{chordNameExceptions} can used to store a list of
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
Clusters are a device to denote that a complete range of notes is to be
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.0"
+\version "2.11.35"
\header{
texidoc = "
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The shapeNoteStyles property gives you the ability to define various
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The \\whiteout command underlays a white box under a markup. Since
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
Individual noteheads in a chord can be modified with the @code{\\tweak}
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The appearance of slurs may be changed from solid to dotted or dashed.
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The command @code{\\clef \"treble_8\"} is equivalent to setting
@code{clefGlyph}, @code{clefPosition} (which controls the Y position of
the clef), @code{middleCPosition} and @code{clefOctavation}. A clef is
-printed when any of these properties are changed. The following
-example shows possibilities when setting properties manually.
+printed when any of these properties are changed.
+
+
+Note that changing the glyph, the position of the clef, or the
+octavation, does not in itself change the position of subsequent notes
+on the staff: the position of middle C must also be specified to do
+this. The positional parameters are relative to the staff centre line,
+positive numbers displacing upwards, counting 1 for each line and
+space. The clefOctavation value would normally be set to 7, -7, 15 or
+-15, but other values are not invalid.
+
+
+When a clef change takes place at a line break the new clef symbol is
+printed at both the end of the previous line and the beginning of the
+new line by default. If the warning clef at the end of the previous
+line in not required it can be suppressed by setting the
+explicitClefVisibility Staff property to the value @code{
+end-of-line-invisible: \\set Staff.explicitClefVisibility =
+#end-of-line-invisible } The default behaviour can be recovered with
+@code{\\unset Staff.explicitClefVisibility}
+
+
+The following examples show the possibilities when setting these
+properties manually. On the first line, the manual changes preserve the
+standard relative positioning of clefs and notes, whereas on the second
+line, they do not.
" }
{
- \set Staff.clefGlyph = #"clefs.F"
- \set Staff.clefPosition = #2
- c'4
- \set Staff.clefGlyph = #"clefs.G"
- c'4
- \set Staff.clefGlyph = #"clefs.C"
- c'4
- \set Staff.clefOctavation = #7
- c'4
- \set Staff.clefOctavation = #0
- \set Staff.clefPosition = #0
- c'4
- \clef "bass"
- c'4
- \set Staff.middleCPosition = #4
- c'4
-}
+ % The default treble clef
+ c'4
+ % The standard bass clef
+ \set Staff.clefGlyph = #"clefs.F"
+ \set Staff.clefPosition = #2
+ \set Staff.middleCPosition = #6
+ c'4
+ % The baritone clef
+ \set Staff.clefGlyph = #"clefs.C"
+ \set Staff.clefPosition = #4
+ \set Staff.middleCPosition = #4
+ c'4
+ % The standard choral tenor clef
+ \set Staff.clefGlyph = #"clefs.G"
+ \set Staff.clefPosition = #-2
+ \set Staff.clefOctavation = #-7
+ \set Staff.middleCPosition = #1
+ c'4
+ % A non-standard clef
+ \set Staff.clefPosition = #0
+ \set Staff.clefOctavation = #0
+ \set Staff.middleCPosition = #-4
+ c'4 \break
+
+ % The following clef changes do not preserve
+ % the normal relationship between notes and clefs:
+ \set Staff.clefGlyph = #"clefs.F"
+ \set Staff.clefPosition = #2
+ c'4
+ \set Staff.clefGlyph = #"clefs.G"
+ c'4
+ \set Staff.clefGlyph = #"clefs.C"
+ c'4
+ \set Staff.clefOctavation = #7
+ c'4
+ \set Staff.clefOctavation = #0
+ \set Staff.clefPosition = #0
+ c'4
+ \set Staff.middleCPosition = #4
+ c'4
+ }
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
LilyPond gives you the ability to assign different colors to any grob
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
To create blank staves, you must generate empty measures, removing also
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
In \"simple\" lead-sheets, sometimes no actual notes are written,
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.0"
+\version "2.11.35"
\header{
texidoc = "
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
LilyPond syntax can involve many unusual placements for parentheses,
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The parenthesize function is a special tweak that encloses objects in
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
Breathing signs are available in different tastes: commas (default),
%% caesura
\override BreathingSign #'text =
- #(make-musicglyph-markup "scripts.caesura")
+ #(make-musicglyph-markup "scripts.caesura.curved")
es8[ d] \breathe es[ f g f] |
es2 r4 \bar "||" \break
}
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
In order to make parts of a crescendo hairpin invisible, the following
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
A caesura is sometimes denoted with a double \"railtracks\" breath mark
c''2.
% use some scheme code to construct the symbol
\override BreathingSign #'text = #(markup #:line
- (#:musicglyph "scripts.caesura"
+ (#:musicglyph "scripts.caesura.curved"
#:translate (cons -1.75 1.6)
#:musicglyph "scripts.ufermata"
))
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
This example provides a function to typeset hairpin (de)crescendo with
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
To make the \\flageolet circle smaller you can use the following scheme
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The appearance of slurs may be changed from solid to dotted or dashed.
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
Some dynamics may involve text indications (such as \"più forte\",
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The \\startTextSpan and \\stopTextSpan commands give you the ability to
a \stopTextSpan
\revert TextSpanner #'style
- \override TextSpanner #'style = #'dashed-line
- \override TextSpanner #'edge-height = #'(1 . -2)
+ \override TextSpanner #'style = #'dashed-line \override TextSpanner #'bound-details #'left #'text = \markup { \draw-line #'(0 . 1) }
+ \override TextSpanner #'bound-details #'right #'text = \markup { \draw-line #'(0 . -2) }
+
a \startTextSpan
b c
a \stopTextSpan
texidoc = "Arrows can be applied to text-spanners and line-spanners (such as the Glissando)"
}
-\version "2.10.0"
+\version "2.11.35"
\paper {
ragged-right = ##t
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.0"
+\version "2.11.35"
\header{
texidoc = "
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
To add fingerings to tablatures, you can use a combination of
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.35"
+
+\header { texidoc = "
+You can format a tablature with letters instead of numbers - so that
+0->a, 1->b, 2->c, etc.
+
+BROKEN IN 2.11, COMMENTED OUT.
+" }
+{ c'4 }
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.0"
+\version "2.11.35"
\header{
texidoc = "
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
LilyPond makes drums input quite easy, with powerful pre-configured
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.0"
+\version "2.11.35"
\header{
texidoc = "
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.0"
+\version "2.11.35"
\header{
texidoc = "
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
Ambits can be added per voice. In that case, the ambitus must be moved
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
If you have multiple voices in a single staff and you want a single
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The shapeNoteStyles property gives you the ability to define various
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The command @code{\\clef \"treble_8\"} is equivalent to setting
@code{clefGlyph}, @code{clefPosition} (which controls the Y position of
the clef), @code{middleCPosition} and @code{clefOctavation}. A clef is
-printed when any of these properties are changed. The following
-example shows possibilities when setting properties manually.
+printed when any of these properties are changed.
+
+
+Note that changing the glyph, the position of the clef, or the
+octavation, does not in itself change the position of subsequent notes
+on the staff: the position of middle C must also be specified to do
+this. The positional parameters are relative to the staff centre line,
+positive numbers displacing upwards, counting 1 for each line and
+space. The clefOctavation value would normally be set to 7, -7, 15 or
+-15, but other values are not invalid.
+
+
+When a clef change takes place at a line break the new clef symbol is
+printed at both the end of the previous line and the beginning of the
+new line by default. If the warning clef at the end of the previous
+line in not required it can be suppressed by setting the
+explicitClefVisibility Staff property to the value @code{
+end-of-line-invisible: \\set Staff.explicitClefVisibility =
+#end-of-line-invisible } The default behaviour can be recovered with
+@code{\\unset Staff.explicitClefVisibility}
+
+
+The following examples show the possibilities when setting these
+properties manually. On the first line, the manual changes preserve the
+standard relative positioning of clefs and notes, whereas on the second
+line, they do not.
" }
{
- \set Staff.clefGlyph = #"clefs.F"
- \set Staff.clefPosition = #2
- c'4
- \set Staff.clefGlyph = #"clefs.G"
- c'4
- \set Staff.clefGlyph = #"clefs.C"
- c'4
- \set Staff.clefOctavation = #7
- c'4
- \set Staff.clefOctavation = #0
- \set Staff.clefPosition = #0
- c'4
- \clef "bass"
- c'4
- \set Staff.middleCPosition = #4
- c'4
-}
+ % The default treble clef
+ c'4
+ % The standard bass clef
+ \set Staff.clefGlyph = #"clefs.F"
+ \set Staff.clefPosition = #2
+ \set Staff.middleCPosition = #6
+ c'4
+ % The baritone clef
+ \set Staff.clefGlyph = #"clefs.C"
+ \set Staff.clefPosition = #4
+ \set Staff.middleCPosition = #4
+ c'4
+ % The standard choral tenor clef
+ \set Staff.clefGlyph = #"clefs.G"
+ \set Staff.clefPosition = #-2
+ \set Staff.clefOctavation = #-7
+ \set Staff.middleCPosition = #1
+ c'4
+ % A non-standard clef
+ \set Staff.clefPosition = #0
+ \set Staff.clefOctavation = #0
+ \set Staff.middleCPosition = #-4
+ c'4 \break
+
+ % The following clef changes do not preserve
+ % the normal relationship between notes and clefs:
+ \set Staff.clefGlyph = #"clefs.F"
+ \set Staff.clefPosition = #2
+ c'4
+ \set Staff.clefGlyph = #"clefs.G"
+ c'4
+ \set Staff.clefGlyph = #"clefs.C"
+ c'4
+ \set Staff.clefOctavation = #7
+ c'4
+ \set Staff.clefOctavation = #0
+ \set Staff.clefPosition = #0
+ c'4
+ \set Staff.middleCPosition = #4
+ c'4
+ }
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
In music that contains many occurrences of the same sequence of notes
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.35"
+
+\header { texidoc = "
+This example shows prelude in C major of Bach's Well-Tempered Klavier
+1, but coded using Scheme functions to avoid typing work.
+
+BROKEN (?) IN 2.11, COMMENTED OUT.
+" }
+
+{ c'4 }
+++ /dev/null
-%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
-
-\header { texidoc = "
-This example shows prelude in C major of WTK1, but coded using Scheme
-functions to avoid typing work.
-" }
-
-\version "2.10.0"
-
-\include "deutsch.ly"
-#(define (transform music)
- (let* ((es (ly:music-property music 'elements))
- (n (ly:music-property music 'name)))
- (if (not (equal? n 'SequentialMusic))
- (ly:warning "transform needs SequentialMusic, got ~a" n)
- (begin
- (let recurse ((elts es))
- (if (not (equal? elts '()))
- (begin
- ((trans (ly:music-property (cadr elts) 'elements)) (car
-elts))
- (set-cdr! elts (cddr elts))
- (recurse (cdr elts))
- )))))
- music
- ))
-
-#(define ((trans pitches) music)
- (let* ((es (ly:music-property music 'elements))
- (e (ly:music-property music 'element))
- (p (ly:music-property music 'pitch)))
-
- (if (pair? es)
- (ly:music-set-property!
- music 'elements
- (map (trans pitches) es)))
-
- (if (ly:music? e)
- (ly:music-set-property!
- music 'element
- ((trans pitches) e)))
-
- (if (ly:pitch? p)
- (let* ((o (ly:pitch-octave p))
- (n (ly:pitch-notename p))
- (i (+ (* 7 o) n))
- (pes (ly:music-property (list-ref pitches i) 'elements))
- (pnew (ly:music-property (car pes) 'pitch))
- )
- (ly:music-set-property! music 'pitch pnew)
- ))
- music))
-
-
-
-
-
-
-
-pat = \transpose c c' \repeat unfold 2 {
- << { \context Staff = "up" {r8 e16 f g e f g } }
- { \context Staff = "down" <<
- \context Voice = "vup" { \stemUp \tieUp r16 d8.~d4 }
- \context Voice = "vdwn" { \stemDown c2 }
- >> }
- >>
-}
-
-enda = { r8 f,16 a, c f c a, \stemUp c \change Staff = down
- a, f, a, f, d, f, d, \change Staff = up \stemNeutral
- r8 g16 h d' f' d' h d' h g h d f e\prall d <e g c'>1^\fermata \bar
-"|."
-}
-endb = {\stemUp \tieUp r16 c,8.~c,4~c,2 r16 h,,8.~h,,4~h,,2 c,1 \bar
-"|."}
-endc = {\stemDown \tieDown c,,2~c,, c,,~c,, c,,1_\fermata }
-
-\score {
- \transpose c c' \context PianoStaff <<
- \new Staff = "up" { \clef "G" }
- \new Staff = "down" { \clef "F" }
- { \applyMusic #transform {
- \pat {c e g c' e' }
- \pat {c d a d' f' }
- }
- % Etc, we get the idea now
- }
- >>
-}
-
-
-
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
In early XXth century works, starting with Schönberg, Berg and Webern
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
This Scheme-based snippet allows you to generate 32 random notes (or as
}
-\version "2.11.6"
+\version "2.11.35"
%{
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The commonly used @code{\\key} command sets the context property
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
In accordance with standard typesetting rules, a natural sign is
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
When the key signature changes, natural signs are automatically printed
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
There is a way to enforce enharmonic modifications for notes in order
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\header {
+ texidoc = "By adding @code{Volta_engraver}, repeat brackets
+ can be put over staves other than the topmost one in a score."
+}
+
+\version "2.11.36"
+
+vmus = {
+ \repeat volta 2 c1 \alternative { d e }
+}
+
+\relative c'' <<
+ \new StaffGroup <<
+ \context Staff \vmus
+ \new Staff \vmus
+ >>
+ \new StaffGroup <<
+ \new Staff \with { \consists Volta_engraver }
+ \vmus
+ \new Staff \vmus
+ >>
+>>
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.0"
+\version "2.11.35"
\header{
texidoc = "
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
-
-\header { texidoc = "
-By setting @code{voltaOnThisStaff}, repeat brackets can be put over
-staves other than the topmost one in a score.
-" }
-
-\layout {
- ragged-right = ##t
+\header {
+ texidoc = "By adding @code{Volta_engraver}, repeat brackets
+ can be put over staves other than the topmost one in a score."
}
+\version "2.11.36"
+
vmus = {
\repeat volta 2 c1 \alternative { d e }
}
\new Staff \vmus
>>
\new StaffGroup <<
- \new Staff <<
- \set Staff.voltaOnThisStaff = ##t
- \vmus >>
+ \new Staff \with { \consists Volta_engraver }
+ \vmus
\new Staff \vmus
>>
>>
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.11.23"
+\version "2.11.35"
\header{ texidoc = "
@unnumbered Introduction
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
LilyPond syntax can involve many unusual placements for parentheses,
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
LilyPond makes drums input quite easy, with powerful pre-configured
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
You can alter the number of stems in a beam. In this example, two sets
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
Lilypond can subdivide beams automatically. Set the property
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
In time signature 2/2 or 4/4 the beam are @code{Â Â Â Â Â _____ Â Â Â Â
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
By default, beams can't be printed across line breaks. Here's a way to
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The measureLength variable, together with measurePosition, determines
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
This form of notation is used for the chant of the Psalms, where verses
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
Odd 20th century time signatures (such as \"5/8\") can often be played
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The Scheme function @code{set-time-signature}, in combination with the
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
Default behaviour of tuplet-bracket visibility is to print a bracket
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
Though the set-time-signature thing was not the most essential here, it
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
In \"simple\" lead-sheets, sometimes no actual notes are written,
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.0"
+\version "2.11.35"
\header{
texidoc = "
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
Individual noteheads in a chord can be modified with the @code{\\tweak}
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
Clusters are a device to denote that a complete range of notes is to be
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The part combiner tool ( \\partcombine command ) allows you to combine
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.0"
+\version "2.11.35"
\header{
texidoc = "
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
Ambits can be added per voice. In that case, the ambitus must be moved
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
You can add (possibly temporarily) an extra staff after the beginning
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
When adding a new Staff at a line break, LilyPond will unfortunately
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The number of lines in a staff may changed by overriding
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
In order to change staff sizes, both @code{staff-space} and
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The command @code{\\clef \"treble_8\"} is equivalent to setting
@code{clefGlyph}, @code{clefPosition} (which controls the Y position of
the clef), @code{middleCPosition} and @code{clefOctavation}. A clef is
-printed when any of these properties are changed. The following
-example shows possibilities when setting properties manually.
+printed when any of these properties are changed.
+
+
+Note that changing the glyph, the position of the clef, or the
+octavation, does not in itself change the position of subsequent notes
+on the staff: the position of middle C must also be specified to do
+this. The positional parameters are relative to the staff centre line,
+positive numbers displacing upwards, counting 1 for each line and
+space. The clefOctavation value would normally be set to 7, -7, 15 or
+-15, but other values are not invalid.
+
+
+When a clef change takes place at a line break the new clef symbol is
+printed at both the end of the previous line and the beginning of the
+new line by default. If the warning clef at the end of the previous
+line in not required it can be suppressed by setting the
+explicitClefVisibility Staff property to the value @code{
+end-of-line-invisible: \\set Staff.explicitClefVisibility =
+#end-of-line-invisible } The default behaviour can be recovered with
+@code{\\unset Staff.explicitClefVisibility}
+
+
+The following examples show the possibilities when setting these
+properties manually. On the first line, the manual changes preserve the
+standard relative positioning of clefs and notes, whereas on the second
+line, they do not.
" }
{
- \set Staff.clefGlyph = #"clefs.F"
- \set Staff.clefPosition = #2
- c'4
- \set Staff.clefGlyph = #"clefs.G"
- c'4
- \set Staff.clefGlyph = #"clefs.C"
- c'4
- \set Staff.clefOctavation = #7
- c'4
- \set Staff.clefOctavation = #0
- \set Staff.clefPosition = #0
- c'4
- \clef "bass"
- c'4
- \set Staff.middleCPosition = #4
- c'4
-}
+ % The default treble clef
+ c'4
+ % The standard bass clef
+ \set Staff.clefGlyph = #"clefs.F"
+ \set Staff.clefPosition = #2
+ \set Staff.middleCPosition = #6
+ c'4
+ % The baritone clef
+ \set Staff.clefGlyph = #"clefs.C"
+ \set Staff.clefPosition = #4
+ \set Staff.middleCPosition = #4
+ c'4
+ % The standard choral tenor clef
+ \set Staff.clefGlyph = #"clefs.G"
+ \set Staff.clefPosition = #-2
+ \set Staff.clefOctavation = #-7
+ \set Staff.middleCPosition = #1
+ c'4
+ % A non-standard clef
+ \set Staff.clefPosition = #0
+ \set Staff.clefOctavation = #0
+ \set Staff.middleCPosition = #-4
+ c'4 \break
+
+ % The following clef changes do not preserve
+ % the normal relationship between notes and clefs:
+ \set Staff.clefGlyph = #"clefs.F"
+ \set Staff.clefPosition = #2
+ c'4
+ \set Staff.clefGlyph = #"clefs.G"
+ c'4
+ \set Staff.clefGlyph = #"clefs.C"
+ c'4
+ \set Staff.clefOctavation = #7
+ c'4
+ \set Staff.clefOctavation = #0
+ \set Staff.clefPosition = #0
+ c'4
+ \set Staff.middleCPosition = #4
+ c'4
+ }
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
To create blank staves, you must generate empty measures, removing also
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The commonly used @code{\\key} command sets the context property
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.0"
+\version "2.11.35"
\header{
texidoc = "
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
Problem: How to know which MidiInstrument would be best for your
composition? Solution: A Lilypond demo file.
" }
-%\version "2.11.31"
+%\version "2.11.35"
basemelodie = { c'4. \mf g c'16 b' c'' d'' | e'' d'' e'' f'' g''4 g'''4 r | r1 }
melodie = { \tempo 4 = 150 \basemelodie }
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.0"
+\version "2.11.35"
\header{
texidoc = "
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
This snippets shows you how to bring the lyrics line closer to the
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
Instrument names are generally printed at the left side of the staves.
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
You can specify different horizontal alignment for your lyrics, by
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The \\whiteout command underlays a white box under a markup. Since
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
This example provides a function to typeset hairpin (de)crescendo with
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
Some dynamics may involve text indications (such as \"più forte\",
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The part combiner tool ( \\partcombine command ) allows you to combine
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
The \\startTextSpan and \\stopTextSpan commands give you the ability to
a \stopTextSpan
\revert TextSpanner #'style
- \override TextSpanner #'style = #'dashed-line
- \override TextSpanner #'edge-height = #'(1 . -2)
+ \override TextSpanner #'style = #'dashed-line \override TextSpanner #'bound-details #'left #'text = \markup { \draw-line #'(0 . 1) }
+ \override TextSpanner #'bound-details #'right #'text = \markup { \draw-line #'(0 . -2) }
+
a \startTextSpan
b c
a \stopTextSpan
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.12"
+\version "2.11.35"
\header { texidoc = "
A demonstration of all headers.
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.11.25"
+\version "2.11.35"
\header {
texidoc = "Text that can spread over pages is entered with the
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.0"
+\version "2.11.35"
%% Edit this file using a Unicode aware editor, such as GVIM, GEDIT, Emacs
%% Do not edit this file; it is auto-generated from LSR!
-\version "2.10.0"
+\version "2.11.35"
\header{
texidoc = "
# old
-SUBDIRS += ancient chords connecting contemporary education expressive
-SUBDIRS += guitar parts repeats spacing staff text vocal scheme other
+SUBDIRS += connecting contemporary education
+SUBDIRS += parts spacing scheme
SUBDIRS += engravers nonmusic instrument
SUBDIRS += real-music
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.35"
+
+\header { texidoc = "
+You can format a tablature with letters instead of numbers - so that
+0->a, 1->b, 2->c, etc.
+
+BROKEN IN 2.11, COMMENTED OUT.
+" }
+{ c'4 }
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.35"
+
+\header { texidoc = "
+This example shows prelude in C major of Bach's Well-Tempered Klavier
+1, but coded using Scheme functions to avoid typing work.
+
+BROKEN (?) IN 2.11, COMMENTED OUT.
+" }
+
+{ c'4 }
--- /dev/null
+\header {
+ texidoc = "By adding @code{Volta_engraver}, repeat brackets
+ can be put over staves other than the topmost one in a score."
+}
+
+\version "2.11.36"
+
+vmus = {
+ \repeat volta 2 c1 \alternative { d e }
+}
+
+\relative c'' <<
+ \new StaffGroup <<
+ \context Staff \vmus
+ \new Staff \vmus
+ >>
+ \new StaffGroup <<
+ \new Staff \with { \consists Volta_engraver }
+ \vmus
+ \new Staff \vmus
+ >>
+>>
--- /dev/null
+\header {
+ texidoc = "By adding @code{Volta_engraver}, repeat brackets
+ can be put over staves other than the topmost one in a score."
+}
+
+\version "2.11.36"
+
+vmus = {
+ \repeat volta 2 c1 \alternative { d e }
+}
+
+\relative c'' <<
+ \new StaffGroup <<
+ \context Staff \vmus
+ \new Staff \vmus
+ >>
+ \new StaffGroup <<
+ \new Staff \with { \consists Volta_engraver }
+ \vmus
+ \new Staff \vmus
+ >>
+>>
\layout { ragged-right = ##t }
-onestaff = \new Staff\relative c'' {
- \set Staff.shortInstrumentName = instr
- \set Staff.instrumentName = instrument \mark "B"
- c1 \mark "A" \break c2 c2 \break
-}
-
-grstaff = \relative c''
+\relative c''
\context GrandStaff <<
\new Staff {
\new Staff { c1 c2 }
>>
-
-\score {\grstaff}
-
--- /dev/null
+\header {
+
+ texidoc = "Stem directions influence positioning of whole note
+ tremolo beams."
+
+}
+
+\version "2.11.36"
+\paper{
+ ragged-right = ##t
+}
+
+\relative {
+ \stemDown
+ \repeat tremolo 16 {d,32 a'32 }
+}
\header{
texidoc=" Clefs with @code{full-size-change} should be typeset in
-full size. For octaviated clefs, the ``8'' should appear closely above
-or below the clef respectively."
+full size."
}
--- /dev/null
+
+\header {
+ texidoc = "Grace notes at the end of an expression don't cause crashes."
+ }
+
+\version "2.11.35"
+
+{ e' \acciaccatura << e'8 \\ cis' >> }
+++ /dev/null
-#!/usr/bin/env python
-
-notes = "CDEFGAB"
-alterations = [-1, 0, 1]
-
-def print_note (octave, note, alteration):
- print " <note>\n <pitch>\n <step>%s</step>" % notes[note]
- if alteration <> 0:
- print " <alter>%s</alter>" % alteration
- print " <octave>%s</octave>\n </pitch>\n <duration>1</duration>\n <voice>1</voice>\n <type>quarter</type>\n </note>" % octave
-
-
-print """<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.0 Partwise//EN"
- "http://www.musicxml.org/dtds/partwise.dtd">
-<score-partwise>
- <movement-title>Various piches and interval sizes</movement-title>
- <part-list>
- <score-part id="P1">
- <part-name>MusicXML Part</part-name>
- </score-part>
- </part-list>
- <!--=========================================================-->
- <part id="P1">
- <measure number="1">
- <attributes>
- <divisions>1</divisions>
- <key>
- <fifths>0</fifths>
- <mode>major</mode>
- </key>
- <time symbol="common">
- <beats>2</beats>
- <beat-type>4</beat-type>
- </time>
- <clef>
- <sign>G</sign>
- <line>2</line>
- </clef>
- </attributes>
-"""
-
-start_octave = 5
-
-for octave in (start_octave, start_octave+1):
- for note in (0,1,2,3,4,5,6):
- for alteration in alterations:
- if octave == start_octave and note == 0 and alteration == -1:
- continue
- print_note (octave, note, alteration)
-# if octave == start_octave and note == 0 and alteration == 0:
-# continue
- print_note (start_octave-(octave-start_octave)-(1-(7-note)/7), (7-note)%7, -alteration)
-
-print """ </measure>
- </part>
-</score-partwise>
-"""
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/env python
-
-notes = "CDEFGAB"
-alterations = [-1, 0, 1]
-
-def print_measure (nr, fifth, mode, atts = "", final = ""):
- print """ <measure number="%s">
- <attributes>
-%s <key>
- <fifths>%s</fifths>
- <mode>%s</mode>
- </key>
- </attributes>
- <note>
- <pitch>
- <step>C</step>
- <octave>4</octave>
- </pitch>
- <duration>2</duration>
- <voice>1</voice>
- <type>half</type>
- </note>
-%s </measure>""" % (nr, atts, fifth, mode, final)
-
-first_atts = """ <divisions>1</divisions>
- <time symbol="common">
- <beats>2</beats>
- <beat-type>4</beat-type>
- </time>
- <clef>
- <sign>G</sign>
- <line>2</line>
- </clef>
-"""
-
-final_barline = """ <barline location="right">
- <bar-style>light-heavy</bar-style>
- </barline>
-"""
-
-print """<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.0 Partwise//EN"
- "http://www.musicxml.org/dtds/partwise.dtd">
-<score-partwise>
- <movement-title>Different Key signatures</movement-title>
- <part-list>
- <score-part id="P1">
- <part-name>MusicXML Part</part-name>
- </score-part>
- </part-list>
- <!--=========================================================-->
- <part id="P1">
-"""
-
-max_range = 11
-measure = 0
-for fifth in range(-max_range, max_range+1):
- measure += 1
- if fifth == -max_range:
- print_measure (measure, fifth, "major", first_atts)
- else:
- print_measure (measure, fifth, "major")
- measure += 1
- if fifth == max_range:
- print_measure (measure, fifth, "minor", "", final_barline)
- else:
- print_measure (measure, fifth, "minor")
-
-
-print """ </part>
-</score-partwise>
-"""
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/env python
-
-notes = "CDEFGAB"
-alterations = [-1, 0, 1]
-
-def print_measure (nr, beats, type, params = "", attr = "", barline = ""):
- print """ <measure number="%s">
- <attributes>
-%s <time %s>
- <beats>%s</beats>
- <beat-type>%s</beat-type>
- </time>
- </attributes>
- <note>
- <pitch>
- <step>C</step>
- <octave>5</octave>
- </pitch>
- <duration>1</duration>
- <voice>1</voice>
- <type>quarter</type>
- </note>
-%s </measure>""" % (nr, attr, params, beats, type, barline)
-
-first_atts = """ <divisions>1</divisions>
- <key>
- <fifths>0</fifths>
- <mode>major</mode>
- </key>
- <time symbol="common">
- <beats>2</beats>
- <beat-type>4</beat-type>
- </time>
- <clef>
- <sign>G</sign>
- <line>2</line>
- </clef>
-"""
-
-final_barline = """ <barline location="right">
- <bar-style>light-heavy</bar-style>
- </barline>
-"""
-
-print """<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.0 Partwise//EN"
- "http://www.musicxml.org/dtds/partwise.dtd">
-<score-partwise>
- <movement-title>Different time signatures</movement-title>
- <part-list>
- <score-part id="P1">
- <part-name>MusicXML Part</part-name>
- </score-part>
- </part-list>
- <!--=========================================================-->
- <part id="P1">
-"""
-
-measure = 1
-
-print_measure (measure, 2, 2, " symbol=\"common\"", first_atts)
-measure += 1
-
-print_measure (measure, 4, 4, " symbol=\"common\"")
-measure += 1
-
-print_measure (measure, 2, 2)
-measure += 1
-
-print_measure (measure, 3, 2)
-measure += 1
-
-print_measure (measure, 2, 4)
-measure += 1
-
-print_measure (measure, 3, 4)
-measure += 1
-
-print_measure (measure, 4, 4)
-measure += 1
-
-print_measure (measure, 5, 4)
-measure += 1
-
-print_measure (measure, 3, 8)
-measure += 1
-
-print_measure (measure, 6, 8)
-measure += 1
-
-print_measure (measure, 12, 8, "", "", final_barline)
-measure += 1
-
-print """ </part>
-</score-partwise>
-"""
\ No newline at end of file
#include "engraver.hh"
+#include "accidental-placement.hh"
#include "axis-group-interface.hh"
#include "item.hh"
#include "note-head.hh"
#include "pointer-group-interface.hh"
#include "protected-scm.hh"
#include "side-position-interface.hh"
+#include "separation-item.hh"
#include "staff-symbol-referencer.hh"
#include "stream-event.hh"
Item *group_;
Drul_array<Item *> heads_;
Drul_array<Item *> accidentals_;
+ Drul_array<Stream_event *> causes_;
Pitch_interval pitch_interval_;
bool is_typeset_;
int start_c0_;
accidentals_[d]->self_scm ());
Axis_group_interface::add_element (group_, heads_[d]);
Axis_group_interface::add_element (group_, accidentals_[d]);
- Side_position_interface::add_support (accidentals_[d], heads_[d]);
}
while (flip (&d) != DOWN);
if (nr && nr->in_event_class ("note-event"))
{
Pitch pitch = *unsmob_pitch (nr->get_property ("pitch"));
- pitch_interval_.add_point (pitch);
+ Drul_array<bool> expands = pitch_interval_.add_point (pitch);
+ if (expands[UP])
+ causes_[UP] = nr;
+ if (expands[DOWN])
+ causes_[DOWN] = nr;
}
}
{
if (ambitus_ && !pitch_interval_.is_empty ())
{
+ Grob * accidental_placement =
+ make_item ("AccidentalPlacement",
+ accidentals_[DOWN]->self_scm ());
+
Direction d = DOWN;
do
{
Pitch p = pitch_interval_[d];
+ heads_[d]->set_property ("cause", causes_[d]->self_scm());
heads_[d]->set_property ("staff-position",
scm_from_int (start_c0_
+ p.steps ()));
{
accidentals_[d]->set_property ("alteration", ly_rational2scm (p.get_alteration ()));
}
+ Separation_item::add_conditional_item (heads_[d], accidental_placement);
+ Accidental_placement::add_accidental (accidental_placement, accidentals_[d]);
}
while (flip (&d) != DOWN);
Pointer_group_interface::add_grob (ambitus_, ly_symbol2scm ("note-heads"), heads_[DOWN]);
Pointer_group_interface::add_grob (ambitus_, ly_symbol2scm ("note-heads"), heads_[UP]);
+ Axis_group_interface::add_element (group_, accidental_placement);
}
else
{
{
SCM details = him->get_property ("details");
- /*
- TODO: put in define-grobs.scm
+ /*
+ TODO: The default values should be copied to define-grobs.scm.
*/
INTER_QUANT_PENALTY = get_detail (details, ly_symbol2scm ("inter-quant-penalty"), 1000.0);
SECONDARY_BEAM_DEMERIT = get_detail (details, ly_symbol2scm ("secondary-beam-demerit"), 10.0);
/*
Calculations are relative to a unit-scaled staff, i.e. the quants are
divided by the current staff_space.
-
*/
Real ss = Staff_symbol_referencer::staff_space (me);
Real thickness = Beam::get_thickness (me) / ss;
going to REGION_SIZE == 2, yields another 0.6 second with
wtk1-fugue2.
-
(result indexes between 70 and 575) ? --hwn.
*/
Grob *stem = first_normal_stem (me);
/*
- ugh: stems[0] case happens for chord tremolo.
+ This happens for chord tremolos.
*/
- dir = to_dir ((stem ? stem : stems[0])->get_property ("default-direction"));
+ if (!stem)
+ stem = stems[0];
+
+ if (is_direction (stem->get_property_data ("direction")))
+ dir = to_dir (stem->get_property_data ("direction"));
+ else
+ dir = to_dir (stem->get_property ("default-direction"));
}
}
}
+Interval
+Beam::no_visible_stem_positions (Grob *me, Interval default_value)
+{
+ extract_grob_set (me, "stems", stems);
+ if (stems.empty ())
+ return default_value;
+
+ Interval head_positions;
+ Slice multiplicity;
+ for (vsize i = 0; i < stems.size(); i++)
+ {
+ head_positions.unite (Stem::head_positions (stems[i]));
+ multiplicity.unite (Stem::beam_multiplicity (stems[i]));
+ }
+
+ Direction dir = get_grob_direction (me);
+ Real y = head_positions[dir]
+ * 0.5 * Staff_symbol_referencer::staff_space (me)
+ + dir * get_beam_translation (me) * (multiplicity.length () + 1);
+
+ y /= Staff_symbol_referencer::staff_space (me);
+ return Interval (y,y);
+}
+
/*
Compute a first approximation to the beam slope.
int count = normal_stem_count (me);
Interval pos (0,0);
if (count < 1)
- return ly_interval2scm (pos);
+ return ly_interval2scm (no_visible_stem_positions (me, pos));
vector<Real> x_posns;
extract_grob_set (me, "normal-stems", stems);
for normal beams, but for tremolo beams it looks silly otherwise.
*/
if (gap
- && !Stem::is_invisible (s))
+ && !Stem::is_invisible (s))
stem_y += thick * 0.5 * get_grob_direction (s);
/*
vector<string> dirs;
- dirs.push_back (lilypond_datadir + "/fonts/otf/");
- dirs.push_back (lilypond_datadir + "/fonts/type1/");
+ /* Extra trailing slash suddenly breaks fontconfig (fc-cache 2.5.0)
+ on windows. */
+ dirs.push_back (lilypond_datadir + "/fonts/otf");
+ dirs.push_back (lilypond_datadir + "/fonts/type1");
for (vsize i = 0; i < dirs.size (); i++)
{
static Real get_thickness (Grob *me);
static void connect_beams (Grob *me);
static vector<Beam_segment> get_beam_segments (Grob *me_grob, Grob **common);
+ static Interval no_visible_stem_positions (Grob *me, Interval default_value);
DECLARE_SCHEME_CALLBACK (rest_collision_callback, (SCM element, SCM prev_off));
DECLARE_SCHEME_CALLBACK (print, (SCM));
public:
Pitch_interval ();
Pitch_interval (Pitch, Pitch);
- void add_point (Pitch);
+ Drul_array<bool> add_point (Pitch);
bool is_empty () const;
};
public:
Pitch_lexicographic_interval ();
Pitch_lexicographic_interval (Pitch, Pitch);
- void add_point (Pitch);
+ Drul_array<bool> add_point (Pitch);
bool is_empty () const;
};
return type;
}
-<INITIAL,chords,lyrics,figures,notes>{BOM_UTF8} {
+ /* Use the trailing context feature. Otherwise, the BOM will not be
+ found if the file starts with an identifier definition. */
+<INITIAL,chords,lyrics,figures,notes>{BOM_UTF8}/.* {
if (this->lexloc->line_number () != 1 || this->lexloc->column_number () != 0)
{
LexerError (_ ("stray UTF-8 BOM encountered").c_str ());
return at (LEFT) > at (RIGHT);
}
-void
+Drul_array<bool>
Pitch_interval::add_point (Pitch p)
{
+ Drul_array<bool> expansions(false,false);
if (at (LEFT).tone_pitch () > p.tone_pitch ())
- at (LEFT) = p;
+ {
+ at (LEFT) = p;
+ expansions [LEFT] = true;
+ }
if (at (RIGHT).tone_pitch () < p.tone_pitch ())
- at (RIGHT) = p;
+ {
+ at (RIGHT) = p;
+ expansions [RIGHT] = true;
+ }
+ return expansions;
}
return at (LEFT) > at (RIGHT);
}
-void
+Drul_array<bool>
Pitch_lexicographic_interval::add_point (Pitch p)
{
+ Drul_array<bool> expansions(false,false);
if (at (LEFT) > p)
- at (LEFT) = p;
+ {
+ at (LEFT) = p;
+ expansions [LEFT] = true;
+ }
if (at (RIGHT) < p)
- at (RIGHT) = p;
+ {
+ at (RIGHT) = p;
+ expansions [RIGHT] = true;
+ }
+ return expansions;
}
{
Rod r;
Spanner *sp = dynamic_cast<Spanner *> (me);
-
-
System *root = get_root_system (me);
- vector<Item*> cols (root->broken_col_range (sp->get_bound (LEFT)->get_column (),
- sp->get_bound (RIGHT)->get_column ()));
+ Drul_array<Item*> bounds (sp->get_bound (LEFT),
+ sp->get_bound (RIGHT));
+ if (!bounds[LEFT] || !bounds[RIGHT])
+ return SCM_UNSPECIFIED;
+
+ vector<Item*> cols (root->broken_col_range (bounds[LEFT]->get_column (),
+ bounds[RIGHT]->get_column ()));
if (cols.size ())
{
}
void
-recurse_over_translators (Context *c, Translator_method ptr, Translator_group_method tg_ptr, Direction dir)
+recurse_over_translators (Context *c, Translator_method ptr,
+ Translator_group_method tg_ptr, Direction dir)
{
Translator_group *tg
= dynamic_cast<Translator_group *> (c->implementation ());
CONVERT_LY = $(script-dir)/convert-ly.py
LILYPOND_BOOK = $(script-dir)/lilypond-book.py
-## ugh : fix me, input/new/pitches
-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)/new/pitches
+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/
## override from cmd line to speed up.
ANTI_ALIAS_FACTOR=2
include $(config_make)
include $(depth)/make/toplevel-version.make
+
+#
+# suggested settings
+#
+# CPU_COUNT=2 ## for SMP/Multicore machine
+#
+-include $(depth)/local.make
+
MICRO_VERSION=$(PATCH_LEVEL)
BUILD_VERSION=1
charwx := charwd;
charwy := 0;
- % additions for mf2pt1
+ % additions for mf2pt1 (`bbox' is called `glyph_dimensions' starting
+ % with version 2.4.2)
if known bp_per_pixel:
special "% MF2PT1: bbox "
& to_bp (-b) & " "
& to_bp (-d) & " "
& to_bp (w) & " "
& to_bp (h);
+ special "% MF2PT1: glyph_dimensions "
+ & to_bp (-b) & " "
+ & to_bp (-d) & " "
+ & to_bp (w) & " "
+ & to_bp (h);
special "% MF2PT1: font_size " & decimal designsize;
special "% MF2PT1: font_slant " & decimal font_slant_;
--- /dev/null
+%%%%
+%%%% MF2PT1.MP, by Scott Pakin, scott+mf@pakin.org
+%%%%
+%%%% This file is used to dump a special version of MetaPost with:
+%%%% mpost -progname=mpost -ini mf2pt1 \\dump
+%%%%
+%%%% To pretty-print this file, you'll need LaTeX and the mftinc package
+%%%% (available from CTAN).
+%%%%
+
+%%%% ==================================================================== %%%%
+%%%% mf2pt1 %%%%
+%%%% Copyright (C) 2007 Scott Pakin %%%%
+%%%% %%%%
+%%%% This program may be distributed and/or modified under the conditions %%%%
+%%%% of the LaTeX Project Public License, either version 1.3c of this %%%%
+%%%% license or (at your option) any later version. %%%%
+%%%% %%%%
+%%%% The latest version of this license is in: %%%%
+%%%% %%%%
+%%%% http://www.latex-project.org/lppl.txt %%%%
+%%%% %%%%
+%%%% and version 1.3c or later is part of all distributions of LaTeX %%%%
+%%%% version 2006/05/20 or later. %%%%
+%%%% ==================================================================== %%%%
+
+input mfplain;
+
+%%% addto makepath makepen
+%%% length clockwise counterclockwise
+%%% scaled dashed withcolor
+
+%% \begin{explaincode}
+%% Enable a \MF\ file to determine if it's being built with
+%% \texttt{mf2pt1}.
+%% \end{explaincode}
+
+newinternal ps_output;
+ps_output := 1;
+
+
+%% \begin{explaincode}
+%% The following was taken right out of \texttt{mfplain.mp}. The \mfcomment
+% |def| and the |special|s at the end
+%% are the sole additions. Normally, MetaPost outputs a tight bounding
+%% box around the character in its PostScript output. The purpose of the
+%% first \mfcomment
+% |special|
+%% is to pass \texttt{mf2pt1} a bounding box that includes the proper
+%% surrounding whitespace. The purpose of the second special is to
+%% provide \texttt{mf2pt1} with a default PostScript font name.
+%% \end{explaincode}
+
+def beginchar(expr c,w_sharp,h_sharp,d_sharp) =
+ begingroup
+ charcode:=if known c: byte c else: 0 fi;
+ charwd:=w_sharp; charht:=h_sharp; chardp:=d_sharp;
+ w:=charwd*pt; h:=charht*pt; d:=chardp*pt;
+ charic:=0; clearxy; clearit; clearpen; scantokens extra_beginchar;
+
+ def to_bp (expr num) = decimal (ceiling (num*bp_per_pixel)) enddef;
+ special "% MF2PT1: glyph_dimensions 0 " & to_bp (-d) & " " & to_bp(w) & " " & to_bp(h);
+ special "% MF2PT1: font_size " & decimal designsize;
+ special "% MF2PT1: font_slant " & decimal font_slant_;
+ special "% MF2PT1: charwd " & decimal charwd; % Must come after the |font_size| |special|
+ for fvar = "font_identifier", "font_coding_scheme", "font_version",
+ "font_comment", "font_family", "font_weight", "font_unique_id",
+ "font_name":
+ if known scantokens (fvar & "_"):
+ special "% MF2PT1: " & fvar & " " & scantokens (fvar & "_");
+ fi;
+ endfor;
+ for fvar = "font_underline_position", "font_underline_thickness":
+ if known scantokens (fvar & "_"):
+ special "% MF2PT1: " & fvar & " " &
+ scantokens ("decimal " & fvar & "_");
+ fi;
+ endfor;
+ special "% MF2PT1: font_fixed_pitch " &
+ (if font_fixed_pitch_: "1" else: "0" fi);
+enddef;
+
+
+%% \begin{explaincode}
+%% Enable a character to specify explicitly the PostScript glyph
+%% name associated with it.
+%% \end{explaincode}
+def glyph_name expr name =
+ special "% MF2PT1: glyph_name " & name;
+enddef;
+
+
+%% \begin{explaincode}
+%% Store the value of \mfcomment
+% |font_slant_|, so we can recall it at each |beginchar|.
+%% \end{explaincode}
+
+font_slant_ := 0;
+
+def font_slant expr x =
+ font_slant_ := x;
+ fontdimen 1: x
+enddef;
+
+
+%% \begin{explaincode}
+%% Redefine \mfcomment
+% |bpppix_|, the number of ``big'' points per pixel. \mfcomment
+% This in turn redefines |mm|, |in|, |pt|, and other derived units.
+%% \end{explaincode}
+
+def bpppix expr x =
+ bpppix_ := x;
+ mm := 2.83464 / bpppix_;
+ pt := 0.99626 / bpppix_;
+ dd := 1.06601 / bpppix_;
+ bp := 1 / bpppix_;
+ cm := 28.34645 / bpppix_;
+ pc := 11.95517 / bpppix_;
+ cc := 12.79213 / bpppix_;
+ in := 72 / bpppix_;
+ hppp := pt;
+ vppp := pt;
+enddef;
+
+
+%% \begin{explaincode}
+%% Define a bunch of PostScript font parameters to be used by
+%% \texttt{mf2pt1.pl}. Default values are specified in
+%% \texttt{mf2pt1.pl}, not here.
+%% \end{explaincode}
+
+forsuffixes fvar = font_version, font_comment, font_family, font_weight,
+ font_name, font_unique_id:
+ scantokens ("string " & str fvar & "_;");
+ scantokens ("def " & str fvar & " expr x = " & str fvar & "_ := x enddef;");
+endfor;
+
+forsuffixes fvar = font_underline_position, font_underline_thickness:
+ scantokens ("numeric " & str fvar & "_;");
+ scantokens ("def " & str fvar & " expr x = " & str fvar & "_ := x enddef;");
+endfor;
+
+boolean font_fixed_pitch_;
+font_fixed_pitch_ := false;
+def font_fixed_pitch expr x = font_fixed_pitch_ := x enddef;
+
+
+%% \begin{explaincode}
+%% We'd like to be able to use calligraphic pens. Normally, MetaPost's
+%% output routine does all the work for us of converting these to filled
+%% PostScript paths. The only exception occurs for paths drawn using a
+%% pen that was transformed from \mfcomment
+% |pencircle|. MetaPost outputs these paths as stroked PostScript
+%% paths. The following code tricks MetaPost into using a filled path
+%% for \mfcomment
+% |pencircle| by replacing the primitive |pencircle| pen with a
+%% non-primitive approximation. Note that we use a 20-gon for our circle
+%% instead of a diamond, so we get better results from \mfcomment
+% |draw|.
+%% \end{explaincode}
+
+pen fakepencircle, mfplain_pencircle;
+mfplain_pencircle := pencircle;
+fakepencircle := makepen (for deg=0 step 360/20 until 359:
+ (0.5 cosd deg, 0.5 sind deg)--
+ endfor cycle);
+save pencircle;
+pen pencircle;
+pencircle := fakepencircle;
+
+
+%% \begin{explaincode}
+%% Return \mfcomment
+% |true| if a path is cyclic, |false| otherwise.
+%% \end{explaincode}
+
+def is_cyclic expr cpath =
+ (point 0 of cpath = point (length cpath) of cpath)
+enddef;
+
+
+%% \begin{explaincode}
+%% Determine the direction of a path which doesn't intersect
+%% itself. \mfcomment
+% Returns |true| if the curve is clockwise, |false| if
+%% counterclockwise. For non-cyclic paths the result is not
+%% predictable.
+%% \bigskip
+%%
+%% The \mfcomment
+% |crossproduct|, |makeline|, and |is_clockwise| functions were
+%% provided by Werner Lemberg.
+%% \bigskip
+%%
+%% The algorithm used is quite simple:
+%%
+%% \begin{itemize}
+%% \item Find a point~$P$ on the path which has a non-zero direction.
+%%
+%% \item Construct a ray of ``infinite'' length, starting in the
+%% vicinity of~$P$ which intersects the path at this point.
+%%
+%% \item Use \mfcomment
+% |intersectiontimes| to find the intersection. If the direction of
+%% the path at this point is (near) zero, or if we have a grazing
+%% intersection, get a new ray.
+%%
+%% \item Shorten the ray so that it starts right after the
+%% intersection. Repeat the previous step until no intersection is
+%% found. Then go back to the last intersection and compare the path's
+%% direction with the direction of the ray. According to the
+%% \emph{nonzero winding number} rule we have found a clockwise
+%% oriented path if it crosses the ray from left to right.
+%% \end{itemize}
+%%
+%% This method completely avoids any problems with the geometry of
+%% B\'{e}zier curves. If problems arise, a different ray is tried.
+%% Since it isn't necessary to analyze the whole path it runs quite fast
+%% in spite of using \mfcomment
+% |intersectiontimes| which is a slow MetaPost command.
+%% \end{explaincode}
+
+vardef crossproduct (expr u, v) =
+ save u_, v_;
+ pair u_, v_;
+
+ u_ := unitvector u;
+ v_ := unitvector v;
+
+ abs (xpart u_ * ypart v_ - ypart u_ * xpart v_)
+enddef;
+
+vardef makeline primary p =
+ save start, loop, d, n;
+ pair start, d;
+
+ loop := 0;
+ for i = 0.5 step 1 until length p - 0.5:
+ n := uniformdeviate 0.9 - 0.45 + i; % Add some randomness to get different lines for each function call.
+ start := point n of p;
+ d := direction n of p;
+ if d <> (0, 0):
+ loop := 1;
+ fi;
+ exitif loop = 1;
+ endfor;
+
+ if loop = 0:
+ errmessage ("Cannot find a starting point on path for orientation test");
+ fi;
+
+ d := unitvector (d rotated (uniformdeviate 160 + 10)); % Again, some added randomness
+
+ % Construct a line which intersects the path at least once.
+ start - eps * d
+ -- infinity * d
+enddef;
+
+vardef is_clockwise primary p =
+ save line, cut, cut_new, res, line_dir, tangent_dir;
+ path line;
+ pair cut, cut_new, line_dir, tangent_dir;
+
+ res := 1;
+
+ line := makeline p;
+ line_dir := direction 0 of line;
+
+ % Find the outermost intersection.
+ cut := (0, 0);
+ forever:
+ cut_new := line intersectiontimes p;
+ exitif cut_new = (-1, -1);
+
+ % Compute a new line if we have a strange intersection.
+ tangent_dir := direction (ypart cut_new) of p;
+ if abs tangent_dir < eps:
+ % The vector is zero or too small.
+ line := makeline p;
+ line_dir := direction 0 of line;
+ elseif crossproduct (tangent_dir, line_dir) < 0.02:
+ % Grazing intersection
+ line := makeline p;
+ line_dir := direction 0 of line;
+ else:
+ % Try again.
+ cut := cut_new;
+ line := subpath (xpart cut + eps, infinity) of line;
+ fi;
+ endfor;
+
+ tangent_dir := direction (ypart cut) of p;
+ res := (angle tangent_dir - angle line_dir + 180) mod 360 - 180;
+
+ res < 0
+enddef;
+
+
+%% \begin{explaincode}
+%% Make a given path run clockwise or counterclockwise. \mfcomment
+% (|counterclockwise| is defined by \texttt{mfplain} but we override
+%% it here.)
+%% \end{explaincode}
+
+vardef counterclockwise primary c =
+ (if is_clockwise c: (reverse c) else: c fi)
+enddef;
+
+vardef clockwise primary c =
+ (if is_clockwise c: c else: (reverse c) fi)
+enddef;
+
+
+%% \begin{explaincode}
+%% Redefine \mfcomment
+% |fill| and |unfill| to ensure that filled paths run
+%% counterclockwise and unfilled paths run clockwise, as is required
+%% by PostScript Type~1 fonts.
+%% \end{explaincode}
+
+def fill expr c =
+ addto currentpicture contour counterclockwise c t_ pc_
+enddef;
+
+def unfill expr c =
+ addto currentpicture contour clockwise c t_ pc_ withcolor background
+enddef;
+
+
+%% \begin{explaincode}
+%% Convert \mfcomment
+% |filldraw| and |unfilldraw| to |fill| and |unfill|.
+%% \end{explaincode}
+
+let mfplain_filldraw := filldraw;
+def filldraw expr c =
+ begingroup
+ message "! Warning: Replacing filldraw with fill.";
+ fill c
+ endgroup
+enddef;
+
+let mfplain_unfilldraw := unfilldraw;
+def unfilldraw expr c =
+ begingroup
+ message "! Warning: Replacing unfilldraw with unfill.";
+ unfill c
+ endgroup
+enddef;
+
+
+%% \begin{explaincode}
+%% Return \mfcomment
+% |true| if |currentpen| looks like a |pencircle|.
+%% \end{explaincode}
+
+def using_pencircle =
+ begingroup
+ path qpath, circlepath;
+ qpath = makepath currentpen;
+ numeric circlediv;
+ circlepath = makepath pencircle;
+ circlediv = xpart (lrcorner circlepath);
+
+ (length qpath = length circlepath) and (pen_rt <> 0) and (pen_top <> 0)
+ for pp = 0 upto (length qpath)-1:
+ and ((xpart (point pp of qpath) / pen_rt,
+ ypart (point pp of qpath) / pen_top) =
+ point pp of circlepath / circlediv)
+ endfor
+ endgroup
+enddef;
+
+
+%% \begin{explaincode}
+%% If the pen looks like a circular pen, draw a nice circle. Otherwise,
+%% draw the pen as is.
+%% \end{explaincode}
+
+def drawdot expr z =
+ if using_pencircle:
+ begingroup
+ path cpath;
+ numeric clength;
+ cpath = makepath currentpen;
+ clength = length cpath;
+ fill ((point 0 of cpath)
+ ..(point clength/4 of cpath)
+ ..(point clength/2 of cpath)
+ ..(point 3*clength/4 of cpath)
+ ..cycle) shifted z t_
+ endgroup
+ else:
+ addto currentpicture contour makepath currentpen shifted z
+ t_ pc_
+ fi
+enddef;
+
+
+%% \begin{explaincode}
+%% Do the same as the above, but unfill the current pen.
+%% \end{explaincode}
+
+def undrawdot expr z =
+ if using_pencircle:
+ begingroup
+ path cpath;
+ numeric clength;
+ cpath = makepath currentpen;
+ clength = length cpath;
+ unfill ((point 0 of cpath)
+ ..(point clength/4 of cpath)
+ ..(point clength/2 of cpath)
+ ..(point 3*clength/4 of cpath)
+ ..cycle) shifted z t_
+ endgroup
+ else:
+ unfill makepath currentpen shifted z t_
+ fi
+enddef;
+
+
+%% \begin{explaincode}
+%% MetaPost renders \mfcomment
+% |draw| with a filled curve.
+%% Hence, we need to ensure the orientation is correct (i.e.,
+%% counterclockwise). Unfortunately, we have no way to check for
+%% overlap, and it's fairly common for MetaPost to output
+%% self-overlapping curve outlines, even if the curve itself has no
+%% overlap.
+%% \end{explaincode}
+
+def draw expr p =
+ addto currentpicture
+ if picture p:
+ also p
+ elseif is_cyclic p:
+ doublepath counterclockwise p t_ withpen currentpen
+ else:
+ if is_clockwise (p--cycle):
+ doublepath (reverse p) t_ withpen currentpen
+ else:
+ doublepath p t_ withpen currentpen
+ fi
+ fi
+ pc_
+enddef;
+
+def undraw expr p =
+ addto currentpicture
+ if picture p:
+ also p
+ elseif is_cyclic p:
+ doublepath clockwise p t_ withpen currentpen
+ else:
+ if is_clockwise (p--cycle):
+ doublepath p t_ withpen currentpen
+ else:
+ doublepath (reverse p) t_ withpen currentpen
+ fi
+ fi
+ pc_ withcolor background
+enddef;
(staff-padding . 1.0)
(padding . 0.5)
(minimum-length . 1.0)
+ (style . dashed-line)
(dash-fraction . 0.3)
(edge-height . (0 . 1.2))
(direction . ,UP)
"Ideal distance between `line' reference position and `next-line'
reference position. If next-line is #f, return #f."
(and next-line
- (max 0
- (+ (- (+ (interval-end (paper-system-staff-extents next-line))
- (if ignore-padding 0 (line-next-padding line next-line layout)))
- (interval-start (paper-system-staff-extents line)))
- (line-next-space line next-line layout)))))
+ (max (+ (max 0 (- (+ (interval-end (paper-system-staff-extents next-line))
+ (if ignore-padding 0 (line-next-padding line next-line layout)))
+ (interval-start (paper-system-staff-extents line))))
+ (line-next-space line next-line layout))
+ (line-minimum-distance line next-line layout ignore-padding))))
(define (first-line-position line layout)
"Position of the first line on page"
open (self.basename () + '.txt', 'w').write ('image of music')
def relevant_contents (self, ly):
- return re.sub (r'\\(version|sourcefileline)[^\n]*\n', '', ly)
+ return re.sub (r'\\(version|sourcefileline|sourcefilename)[^\n]*\n', '', ly)
def ly_is_outdated (self):
base = self.basename ()
+++ /dev/null
-GNUmakefile
-autom4te.cache
-configure
-config.cache
-config.h
-config.log
-config.make
-config.status