@end ignore
+@item
+Context modifications (@code{\with} blocks) can be stored in variables and
+inserted into contexts or other @code{\with} blocks:
+@lilypond[quote,verbatim]
+coloredheads = \with { \override NoteHead #'color = #red }
+noclef = \with { \remove "Clef_engraver" }
+\score {
+ \new Staff {
+ \new Voice \with { \coloredheads } \relative c' { c4 e g c }
+ }
+ \layout {
+ \context { \Staff
+ \noclef
+ }
+ }
+}
+@end lilypond
+
@item
A half-open articulation was added:
@lilypond[quote,relative=2]
@example
git commit -m "Release: update news." Documentation/web/
git push origin
-git checkout master
-git merge release/unstable
@end example
@item (optional) Check that lilypond builds from scratch in an
@item Upload GUB by running:
@example
-make lilypond-upload LILYPOND_BRANCH=master LILYPOND_REPO_URL=git://git.sv.gnu.org/lilypond.git
+make lilypond-upload LILYPOND_BRANCH=release/unstable LILYPOND_REPO_URL=git://git.sv.gnu.org/lilypond.git
@end example
@noindent
files. You should now be able to modify the source files using
your normal text editor.
+@knownissues
+
+The @qq{Get source} button does not fetch the entire history of
+the git repository, so utilities like @command{gitk} will only
+be able to display the most recent additions. As you continue to
+work with @command{lily-git}, the @qq{Update source} button will take
+any new additions and add it to whatever is currently in your repository's
+history.
+
@subsubheading New local commit
You can go back and make changes to the most recent commit with
the @qq{Amend previous commit} button. This is useful if a
-mistake is found after you've clicked the @qq{New local commit}
-button. To amend the most recent commit, edit the source files as
-needed and click the button. The earlier version of the commit is
-not saved, but is replaced by the new one.
-
-Note that this does not update patch files; if you have a patch
-file from an earlier version of the commit, you will need to make
-another patch set when using this feature. The old patch file is
-not saved, but is replaced by the new one.
+mistake is found after you have clicked the @qq{New local commit}
+button.
+
+To amend the most recent commit, re-edit the source files as
+needed and then click the @qq{Amend previous commit} button. The
+earlier version of the commit is not saved, but is replaced by the
+new one.
+
+Note that this does not update the patch @strong{files}; if you
+have a patch file from an earlier version of the commit, you will
+need to make another patch set when using this feature. The old
+patch file will not be saved, but will be replaced by the new one
+after you click on @qq{Make patch set}.
@subsubheading Make patch set
#!/bin/sh
GIT=$HOME/src/lilypond
DEST=$HOME/lilypond/trusted-scripts
-diff -u $DEST/website.make $GIT/website.make
+diff -u $DEST/website.make $GIT/make/website.make
diff -u $DEST/lilypond-texi2html.init $GIT/Documentation/lilypond-texi2html.init
diff -u $DEST/extract_texi_filenames.py $GIT/scripts/build/extract_texi_filenames.py
diff -u $DEST/create-version-itexi.py $GIT/scripts/build/create-version-itexi.py
#!/bin/sh
GIT=$HOME/src/lilypond
DEST=$HOME/lilypond/trusted-scripts
-cp $GIT/website.make $DEST/website.make
+cp $GIT/make/website.make $DEST/website.make
cp $GIT/Documentation/lilypond-texi2html.init $DEST/lilypond-texi2html.init
cp $GIT/scripts/build/extract_texi_filenames.py $DEST/extract_texi_filenames.py
cp $GIT/scripts/build/create-version-itexi.py $DEST/create-version-itexi.py
As it has much more audience, the website should be translated before
the documentation; see @ref{Translating the documentation}.
+
+In addition to the normal documentation translation practices,
+there are a few additional things to note:
+
+@itemize
+
+@item
+Build the website with:
+
+@example
+make website
+@end example
+
+@noindent
+however, please note that this command is not designed for being
+run multiple times. If you see unexpected output (mainly the page
+footers getting all messed up), then delete your
+@file{out-website} directory and run @code{make website} again.
+
+@item
+Some of the translation infrastructure is defined in python files;
+you must look at the @code{### translation data} sections in:
+
+@example
+scripts/build/create-weblinks-itexi.py
+scripts/build/website_post.py
+@end example
+
+@item
+Translations are not included by default in @code{make website}.
+To test your translation, edit the @code{WEB_LANGS} line in
+@file{make/website.make}. Do not submit a patch to add your language
+to this file unless @code{make website} completes with less than 5
+warnings.
+
+@item
+Links to manuals are done with macros like
+@code{@@manualDevelLearningSplit}. To get translated links, you
+must change that to @code{@@manualDevelLearningSplit-es} (for
+es/Spanish translations, for example).
+
+@end itemize
+
+
+
@headitem Para descargar
@item
-@doctarballDevel
+@doctarballDevel-es
@end ifset
@end multitable
LilyPond es un sistema de grabado musical @strong{basado en texto}.
¡Lea esto primero!
-@item @ifWebLinks{@manualStableLearningSplitNoName,@rlearningnamed{Top,Aprendizaje}}
+@item @ifWebLinks{@manualStableLearningSplitNoName-es,@rlearningnamed{Top,Aprendizaje}}
una introducción a LilyPond amable e @qq{imprescindible}.
@details{Aprendizaje}
-@item @ifWebLinks{@manualStableGlossarySplitNoName,@rglosnamed{Top,Glosario}}
+@item @ifWebLinks{@manualStableGlossarySplitNoName-es,@rglosnamed{Top,Glosario}}
@emph{(lectura opcional)} términos musicales y traducciones.
@details{Glosario}
-@item @ifWebLinks{@manualStableEssaySplitNoName,@ressaynamed{Top,Ensayo}}
+@item @ifWebLinks{@manualStableEssaySplitNoName-es,@ressaynamed{Top,Ensayo}}
@emph{(lectura opcional)} la información de trasfondo sobre grabado musical.
@details{Ensayo}
@itemize
-@item @ifWebLinks{@manualStableNotationSplitNoName,@rusernamed{Top,Notación}}
+@item @ifWebLinks{@manualStableNotationSplitNoName-es,@rusernamed{Top,Notación}}
referencia de la sintaxis.
@details{Notación}
-@item @ifWebLinks{@manualStableUsageSplitNoName,@rprogramnamed{Top,Utilización}}
+@item @ifWebLinks{@manualStableUsageSplitNoName-es,@rprogramnamed{Top,Utilización}}
cómo ejecutar los programas.
@details{Utilización}
-@item @ifWebLinks{@manualStableSnippetsSplitNoName,@rlsrnamed{Top,Fragmentos}}
+@item @ifWebLinks{@manualStableSnippetsSplitNoName-es,@rlsrnamed{Top,Fragmentos}}
trucos y consejos cortos.
@details{Fragmentos}
este documento.
@details{Web}
-@item @ifWebLinks{@manualStableChangesSplitNoName,@rchangesnamed{Top,Cambios}}
+@item @ifWebLinks{@manualStableChangesSplitNoName-es,@rchangesnamed{Top,Cambios}}
¿qué hay de nuevo?
@details{Cambios}
-@item @ifWebLinks{@manualStableExtendingSplitNoName,@rextendnamed{Top,Extender}}
+@item @ifWebLinks{@manualStableExtendingSplitNoName-es,@rextendnamed{Top,Extender}}
trucos interesantes.
@details{Extender}
-@item @ifWebLinks{@manualStableInternalsSplitNoName,@rinternalsnamed{Top,Funcionamiento interno}}
+@item @ifWebLinks{@manualStableInternalsSplitNoName-es,@rinternalsnamed{Top,Funcionamiento interno}}
referencia sobre el trucaje.
@details{Funcionamiento interno}
@docLinks{Cambios, changes,
@rchangesnamed{Top,Cambios},
- @manualStableChangesSplit,
- @manualStableChangesBig, 6 KB,
- @manualStableChangesPdf, 200 KB}
+ @manualStableChangesSplit-es,
+ @manualStableChangesBig-es, 6 KB,
+ @manualStableChangesPdf-es, 200 KB}
@divEnd
@docLinks{Extender, extending,
@rextendnamed{Top,Extender},
- @manualStableExtendingSplit,
- @manualStableExtendingBig, 200 KB,
- @manualStableExtendingPdf, 400 KB}
+ @manualStableExtendingSplit-es,
+ @manualStableExtendingBig-es, 200 KB,
+ @manualStableExtendingPdf-es, 400 KB}
@divEnd
@docLinks{Funcionamiento interno, internals,
@rinternalsnamed{Top,Funcionamiento interno},
- @manualStableInternalsSplit,
- @manualStableInternalsBig, 2.5 MB,
- @manualStableInternalsPdf, 2.8 MB}
+ @manualStableInternalsSplit-es,
+ @manualStableInternalsBig-es, 2.5 MB,
+ @manualStableInternalsPdf-es, 2.8 MB}
@divEnd
@divClass{keep-bullets}
@itemize
-@item @doctarballStable
+@item @doctarballStable-es
@end itemize
@c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
@c This file is part of web.texi
@ignore
- Translation of GIT committish: dee4f5842abe7e7f638485b7b36e9e0dffa56b3e
+ Translation of GIT committish: c650e54334b64e0e9fd534ee13742f6c07257637
When revising a translation, copy the HEAD committish of the
version that you are working on. For details, see the Contributors'
@unnumberedsec Fonctionnalités
@translationof Features
+@ignore
@help{on voudrait une tentative enthousiaste
d'incitation à essayer LilyPond. Les avertissements sur l'écriture de
la musique sous forme de texte attendront le cours express, ils n'ont
@uref{http://lilypond.org/web/about/features} et
@uref{http://lilypond.org/web/switch/tour} et
@uref{http://lilypond.org/web/switch/advantages}
-
+@end ignore
@subheading Pourquoi passer à LilyPond ?
@c Frankly, a node just for redirecting the reader just after a reading
@c direction paragraph is a bit dense, I'd really like to merge this
@c node into the previous paragraph. -JM
+
@node Contexte
@unnumberedsec Contexte
@translationof Background
@divClass{column-center-bottom}
@subheading Et ensuite ?
-Vous êtes désormais prêt(e) à @ref{Download,télécharger LilyPond}. Si
+Vous êtes désormais prêt(e) à @ref{Téléchargement,télécharger LilyPond}. Si
vous n'êtes toujours pas convaincu(e), examinez les @ref{Facilités
d'édition}.
@divClass{column-center-top}
@subheading Autres programmes qui exportent du code LilyPond
-@ignore
-TODO: change url back to full adress, to make it readable in printouts -ch
-@end ignore
-
-@help mettre de l'ordre dans cette liste, vérifier les liens, etc.
@subsubheading Environnements graphiques
@itemize
@item
-@uref{http://@/noteedit@/.berlios@/.de,NoteEdit}
-qui importe du @uref{http://@/www@/.musicxml@/.com/xml@/.html,MusicXML}
+@uref{http://noteedit.berlios.de,NoteEdit}
+qui importe du @uref{http://www.musicxml.com/xml.html,MusicXML}
@item
-@uref{http://@/www@/.rosegardenmusic@/.com,Rosegarden},
+@uref{http://www.rosegardenmusic.com,Rosegarden},
qui importe du MIDI
@item
@uref{http://vsr.informatik.tu-chemnitz.de/staff/jan/nted/nted.xhtml,NtEd},
-qui a une fonction d'export expérimentale pour LilyPond.
+qui a une fonction expérimentale d'export pour LilyPond.
@item
@uref{http://www.tuxguitar.com.ar/,TuxGuitar} peut exporter du code LilyPond.
@item
@uref{http://canorus.org,Canorus} peut également exporter vers LilyPond,
mais est encore au stade de développement bêta. Les testeurs sont les
bienvenus.
+@uref{http://lilycomp.sourceforge.net,LilyComp} permet de saisir
+graphiquement des notes. Il fonctionne comme un pavé numérique
+permettant de produire de la notation LilyPond.
@end itemize
@subsubheading Outils en ligne de commande
@itemize
@item
-@uref{http://www@/.volny@/.cz/smilauer/rumor/rumor@/.html,Rumor}, un
+@uref{http://www.volny.cz/smilauer/rumor/rumor.html,Rumor}, un
convertisseur monophonique temps-réel MIDI vers LilyPond.
@item
-@uref{http://nicolas@/.sceaux@/.free@/.fr/lilypond/lyqi@/.html,lyqi}, un mode
-Emacs majeur.
+@uref{http://nicolas.sceaux.free.fr/lilypond/lyqi.html,lyqi}, un mode
+majeur pour Emacs.
@item
@uref{http://@/common-lisp@/.net/project/fomus/,FOMUS},
un bibliothèque LISP de génération de notation musicale.
@subsubheading Step 2. Compile (with LilyPad)
From the same menus, select
-@w{@code{Compile > Tyepset}}.
+@w{@code{Compile > Typeset}}.
@sourceimage{Learning_Macos_Typeset_menu,,,}
@subsubheading Ontwikkeling
-@ref{Ontwikkeling, Download @versionDevel}
+@c community.itexi met `Ontwikkeling' is nog niet vertaald
+@ref{Development, Download @versionDevel}
-@ref{Ontwikkeling, Handleidingen @versionDevel}
+@ref{Development, Handleidingen @versionDevel}
@divEnd
@end ifset
@ref{Oude downloads}:
oude versies
-@item @ref{Ontwikkeling}:
+@c community.itexi met `Ontwikkeling' is nog niet vertaald
+@item @ref{Development}:
meest recente ontwikkelversie
@end itemize
Their corresponding output appears as follows:
@lilypond[verbatim,quote,relative=2]
-c4-^ c-+ c-- c-|
-c4-> c-. c2-_
+c4-^ c-+ c-- c-|
+c4-> c-. c2-_
@end lilypond
The rules for the default placement of articulations are defined
in @ref{Formatting text}.
@lilypond[verbatim,quote]
-roundF = \markup { \center-align \concat { \bold { \italic ( }
+roundF = \markup {
+ \center-align \concat { \bold { \italic ( }
\dynamic f \bold { \italic ) } } }
boxF = \markup { \bracket { \dynamic f } }
\relative c' {
\relative c' {
c4_\roundFdynamic\< d e f
g,1~_\boxFdynamic\>
- g
- g'~\mfEspressDynamic
- g
+ g1
+ g'1~\mfEspressDynamic
+ g1
}
@end lilypond
@lilypond[verbatim,quote,relative=2]
c2-\bendAfter #+4
c2-\bendAfter #-4
+c2-\bendAfter #+6.5
+c2-\bendAfter #-6.5
c2-\bendAfter #+8
c2-\bendAfter #-8
@end lilypond
@lilypond[quote,ragged-right,verbatim]
music = \relative c' {
< a\3 \deadNote c\2 a'\1 >4
- < b\3 \deadNote d\2 b'\1 >4
- < c\3 \deadNote e\2 c'\1 >8
+ < b\3 \deadNote d\2 b'\1 >
+ < c\3 \deadNote e\2 c'\1 >
\deadNotesOn
- \times 2/3 { g16\3 b\2 e\1 }
+ \times 2/3 { g8 b e }
\deadNotesOff
- < a,\3 c\2 e\1 >4
+ < a,\3 c\2 e\1 >1
}
\new StaffGroup <<
\new Staff {
@funindex \displayLilyMusic
Displaying a music expression in LilyPond notation can be
-done using the music function @code{\displayLilyMusic}. For example,
+done with the music function @code{\displayLilyMusic} but only when
+using the command line. For example,
@example
@{
@{ a,4 cis e fis g @}
@end example
-By default, LilyPond will print these messages to the console along
-with all the other messages. To split up these messages and save
-the results of @code{\display@{STUFF@}}, redirect the output to
-a file.
-
-@c TODO What happens under Windows?
+By default, LilyPond will print these messages to the console
+along with all the other LilyPond compilation messages. To split
+up these messages and save the results of @code{\display@{STUFF@}},
+redirect the output to a file.
@example
lilypond file.ly >display.txt
@end example
@noindent
-where @code{duration} is the rhythmic length of the interval
-before the start of the first complete measure:
+where @code{duration} is the rhythmic length of the remaining
+interval of the current measure before the start of the next.
@lilypond[quote,verbatim,relative=2]
\partial 4 e4 |
a2. c,4 |
@end lilypond
-The partial measure can be any duration less than a full measure:
+The partial measure can be any duration less than the full measure:
@lilypond[quote,verbatim,relative=2]
\partial 8*3 c8 d e |
a2. c,4 |
@end lilypond
-Internally, @code{\partial} is translated into
+Internally, @code{\partial @var{duration}} is translated into:
@example
-\set Timing.measurePosition = -@var{duration}
+\set Timing.measurePosition -@var{duration}
+@end example
+
+For example, @code{\partial 8*3} becomes:
+
+@example
+\set Timing.measurePosition = #(ly:make-moment -3 8)
@end example
-@noindent
The property @code{measurePosition} contains a rational number
indicating how much of the measure has passed at this point. Note
-that this is set to a negative number by the @code{\partial}
-command: i.e., @code{\partial 4} is internally translated to
-@code{-4}, meaning @qq{there is a quarter note left in the measure.}
-
+that this is set to a negative number by the @code{\partial} command:
+i.e., @code{\partial 4} is internally translated to @code{-4}, meaning
+@qq{there is a quarter note left in the measure.}
@seealso
Music Glossary:
Internal Reference:
@rinternals{Timing_translator}.
-
@knownissues
The @code{\partial} command is intended to be used only at the
beginning of a piece. If you use it after the beginning, some
-odd warnings may occur.
+odd warnings or effects may occur, in this case use
+@code{\set Timing.measurePosition} instead.
@node Unmetered music
@unnumberedsubsubsec Unmetered music
over 1500 pieces of classical sheet music for free download, and
the main showcase of LilyPond scores.
+@c don't make this "Mutopia" a link, since that looks silly.
+@item
+@uref{http://etudeapp.com, Etude}, @qq{sheet music on steroids} is
+an iPhone app which displays piano music engraved with LilyPond,
+including many pieces from Mutopia. The app includes a virtual
+piano keyboard showing which keys to press to help beginners learn
+how to read sheet music.
+
@item
@uref{http://www.adoromusicpub.com/, Adoro Music Publishing},
high-quality scores of sacred music, available for immediate
@c DO NOT WRITE BETWEEN THESE LINES
@c DO NOT WRITE BETWEEN THESE LINES
+@newsItem
+@subsubheading LilyPond 2.13.17 released! @emph{April 2, 2010}
+
+We are happy to announce the release of LilyPond 2.13.17. This
+release includes bugfixes for 4 critical issues. However, 15
+critical issues still remain, so this release is intended for
+developers only.
+@newsEnd
+
@newsItem
@subsubheading LilyPond 2.13.16 released! @emph{March 15, 2010}
RELEASE_OUT_FILES = $(RELEASE_FILES:%=$(outdir)/%)
OUT_DIST_FILES += $(RELEASE_OUT_FILES)
EXTRA_DIST_FILES = VERSION .gitignore .mailmap \
- $(README_FILES) $(SCRIPTS) $(IN_FILES) website.make
+ $(README_FILES) $(SCRIPTS) $(IN_FILES)
INSTALLATION_DIR=$(local_lilypond_datadir)
INSTALLATION_FILES=$(config_make) VERSION
website:
$(MAKE) config_make=$(config_make) \
top-src-dir=$(top-src-dir) \
- -f $(top-src-dir)/website.make \
+ -f $(top-src-dir)/make/website.make \
website
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=13
-PATCH_LEVEL=17
+PATCH_LEVEL=18
MY_PATCH_LEVEL=
VERSION_STABLE=2.12.3
-VERSION_DEVEL=2.13.16
+VERSION_DEVEL=2.13.17
--- /dev/null
+\version "2.13.18"
+
+\header {
+texidoc = "Context modifications can be stored into a variable as a
+\with object. They can be later inserted directly into a context definition."
+}
+
+% Some sample modifications to be inserted into a \with block later on
+ctxmod = \with {
+ \remove "Time_signature_engraver"
+ \consists "Ambitus_engraver"
+ \override StaffSymbol #'line-count = 4
+}
+
+music = \relative c'' { \key fis \minor c1 d e }
+
+\score { <<
+ \new Staff { \music}
+ >>
+ \layout {
+ \context { \Staff
+ \ctxmod
+ \override NoteHead #'style = #'petrucci
+ }
+ }
+}
+
+
+\score { <<
+ \new Staff { \music}
+ >>
+ \layout {
+ \context { \Staff
+ \override StaffSymbol #'line-count = 3
+ \override NoteHead #'style = #'petrucci
+ }
+ % Should override the above definitions, but not reset others
+ \context { \Staff
+ \ctxmod
+ }
+ }
+}
+
--- /dev/null
+\version "2.13.18"
+
+\header {
+texidoc = "Context modifications can be stored into a variable as a
+\with object. They can be later inserted into another \with block."
+}
+
+% Some sample modifications to be inserted into a \with block later on
+ctxmod = \with {
+ \remove "Time_signature_engraver"
+ \consists "Ambitus_engraver"
+ \override StaffSymbol #'line-count = 4
+}
+
+music = \relative c'' { \key fis \minor c1 d e }
+
+\score { <<
+ % No modifications:
+ \new Staff { \music }
+ % Some context modifications manually written in a \with block
+ \new Staff \with {
+ \remove "Time_signature_engraver"
+ \consists "Ambitus_engraver"
+ \override StaffSymbol #'line-count = 4
+ } { \music }
+ % The same mods as direct value of \with
+ \new Staff \with \ctxmod { \music }
+ % Mods as part of a \with block
+ \new Staff \with { \ctxmod } { \music }
+ % Mods before a context mod in a with block are working:
+ \new Staff \with {
+ \remove "Clef_engraver"
+ \ctxmod
+ } { \music }
+ % Mods before and after a context mod in a with block are working:
+ \new Staff \with {
+ \remove "Clef_engraver"
+ \ctxmod
+ \remove "Key_engraver"
+ } { \music }
+ % Mods can be inserted instead of a \with block (i.e. \with is not required)
+ \new Staff \ctxmod { \music }
+ \new Staff { \music }
+>>
+}
--- /dev/null
+\version "2.13.18"
+
+\header {
+ texidoc = "The compression factor of a duration identifier is
+correctly accounted for by the parser."
+}
+
+% looks like a whole note, has duration of half note
+wholeHalved = #(ly:make-duration 0 0 1 2)
+
+
+\displayMusic \relative c' {
+ c\wholeHalved c |
+ c\wholeHalved. c4 |
+}
-\version "2.13.10"
+\version "2.13.18"
\header {
texidoc =
\layout {
ragged-right = ##t
\context {
- \RemoveEmptyDrumStaffContext
+ \DrumStaff
+ \RemoveEmptyStaves
}
}
--- /dev/null
+\version "2.13.18"
+
+\header { texidoc =
+
+ "Inserting the harakiri settings globally into the Staff context should
+not erase previous settings to the Staff context.
+"
+
+}
+
+\layout {
+ ragged-right= ##t
+ \context {
+ \Staff
+ \override StaffSymbol #'line-count = 4
+ \consists "Ambitus_engraver"
+ \remove "Clef_engraver"
+ }
+}
+
+% Old \RemoveEmptyStaffContext: Will erase previous settings...
+\score {
+ <<
+ \new Staff \relative c'' { c4 c c c \break s1 \break c4 c c c \break c c c c}
+ \new Staff \relative c'' { d4 d d d s1 s1 s1 }
+ \new Staff \relative c'' { e4 e e e s1 e4 e e e s1 }
+ >>
+ \layout {
+ \context { \RemoveEmptyStaffContext }
+ }
+}
+
+% New \RemoveEmptyStaves settings: Preserves previous settings...
+\score {
+ <<
+ \new Staff \relative c'' { c4 c c c \break s1 \break c4 c c c \break c c c c}
+ \new Staff \relative c'' { d4 d d d s1 s1 s1 }
+ \new Staff \relative c'' { e4 e e e s1 e4 e e e s1 }
+ >>
+ \layout {
+ \context { \Staff \RemoveEmptyStaves }
+ }
+}
-\version "2.13.10"
+\version "2.13.18"
\header {
texidoc = "Staves, RhythmicStaves, TabStaves and DrumStaves
\new TabStaff \repeat percent 4 { c1 }
\new DrumStaff \drummode { \repeat percent 4 { hh1 } }
\new RhythmicStaff \repeat percent 4 { c'1 }
->>
+>>
\layout {
- \context { \RemoveEmptyStaffContext }
- \context { \RemoveEmptyRhythmicStaffContext }
- \context { \RemoveEmptyDrumStaffContext }
- \context { \RemoveEmptyTabStaffContext }
- }
-
+ \context { \Staff \RemoveEmptyStaves }
+ \context { \RhythmicStaff \RemoveEmptyStaves }
+ \context { \DrumStaff \RemoveEmptyStaves }
+ \context { \TabStaff \RemoveEmptyStaves }
+}
-\version "2.12.0"
+\version "2.13.18"
\header { texidoc =
\layout {
ragged-right= ##t
\context {
- \RemoveEmptyStaffContext
+ \Staff
+ \RemoveEmptyStaves
}
}
-\version "2.13.10"
+\version "2.13.18"
\header {
texidoc =
\layout {
ragged-right= ##t
\context {
- \RemoveEmptyRhythmicStaffContext
+ \RhythmicStaff
+ \RemoveEmptyStaves
}
}
-\version "2.13.10"
+\version "2.13.18"
\header {
texidoc =
\layout {
ragged-right= ##t
\context {
- \RemoveEmptyTabStaffContext
+ \TabStaff
+ \RemoveEmptyStaves
}
}
--- /dev/null
+/*
+ This file is part of LilyPond, the GNU music typesetter.
+
+ Copyright (C) 2010 Jan Nieuwenhuizen <janneke@gnu.org>
+ Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "context.hh"
+#include "context-mod.hh"
+
+LY_DEFINE (ly_get_context_mods,
+ "ly:get-context-mods",
+ 1, 0, 0, (SCM contextmod),
+ "Returns the list of context modifications stored in @var{contextmod}.")
+{
+ Context_mod *tr = unsmob_context_mod (contextmod);
+ LY_ASSERT_SMOB (Context_mod, contextmod, 1);
+ return tr->get_mods ();
+}
+
+LY_DEFINE (ly_add_context_mod,
+ "ly:add-context-mod",
+ 2, 0, 0, (SCM contextmods, SCM modification),
+ "Adds the given context @var{modification} to the list @var{contextmods} of context modifications.")
+{
+ Context_mod *ctxmod = unsmob_context_mod (contextmods);
+ LY_ASSERT_SMOB (Context_mod, contextmods, 1);
+ ctxmod->add_context_mod (modification);
+ return SCM_UNSPECIFIED;
+}
+
--- /dev/null
+/*
+ This file is part of LilyPond, the GNU music typesetter.
+
+ Copyright (C) 2010 Reinhold Kainhofer <reinhold@kainhofer.com>
+
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "context-mod.hh"
+
+Context_mod::Context_mod ()
+{
+ mods_ = SCM_EOL;
+}
+
+Context_mod::Context_mod (Context_mod const &s)
+{
+ mods_ = s.mods_;
+}
+
+#include "ly-smobs.icc"
+IMPLEMENT_SIMPLE_SMOBS (Context_mod);
+IMPLEMENT_DEFAULT_EQUAL_P (Context_mod);
+
+int
+Context_mod::print_smob (SCM smob, SCM port, scm_print_state*)
+{
+ Context_mod *me = (Context_mod *) SCM_CELL_WORD_1 (smob);
+
+ scm_puts ("#<Context_mod ", port);
+ scm_display (me->mods_, port);
+ scm_puts (">", port);
+ return 1;
+}
+
+SCM
+Context_mod::mark_smob (SCM smob)
+{
+ ASSERT_LIVE_IS_ALLOWED ();
+
+ Context_mod *me = (Context_mod *) SCM_CELL_WORD_1 (smob);
+
+ scm_gc_mark (me->mods_);
+ return me->mods_;
+}
+
+void
+Context_mod::add_context_mod (SCM mod)
+{
+ mods_ = scm_cons (mod, mods_);
+}
+
+void
+Context_mod::add_context_mods (SCM mods)
+{
+ for (SCM m = mods; scm_is_pair (m); m = scm_cdr (m))
+ add_context_mod (scm_car (m));
+}
+
+SCM
+Context_mod::get_mods () const
+{
+ return scm_reverse (mods_);
+}
+
--- /dev/null
+/*
+ This file is part of LilyPond, the GNU music typesetter.
+
+ Copyright (C) 2010 Reinhold Kainhofer <reinhold@kainhofer.com>
+
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/**
+ * context-mod.hh
+ * Implement a structure to store context modifications to be inserted
+ * at some later point
+ */
+
+#ifndef CONTEXT_MOD_HH
+#define CONTEXT_MOD_HH
+
+#include "lily-proto.hh"
+#include "smobs.hh"
+#include "virtual-methods.hh"
+
+
+/*
+ Modifications for an interpretation context as given in the
+ input.
+*/
+struct Context_mod
+{
+private:
+ SCM mods_;
+public:
+ void add_context_mod (SCM);
+ void add_context_mods (SCM);
+
+ VIRTUAL_COPY_CONSTRUCTOR (Context_mod, Context_mod);
+
+ SCM get_mods () const;
+
+ Context_mod ();
+ Context_mod (Context_mod const &);
+ DECLARE_SIMPLE_SMOBS (Context_mod);
+};
+
+DECLARE_UNSMOB (Context_mod, context_mod);
+
+#endif /* CONTEXT_MOD_HH */
+
class Column_x_positions;
class Context;
class Context_def;
+class Context_mod;
class Context_specced_music;
class Dispatcher;
class Dot_column;
--- /dev/null
+/*
+ This file is part of LilyPond, the GNU music typesetter.
+
+ Copyright (C) 2010 Nicolas Sceaux <nicolas.sceaux@free.fr>
+
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "note-column.hh"
+#include "lily-guile.hh"
+#include "grob.hh"
+
+LY_DEFINE (ly_note_column_accidentals, "ly:note-column-accidentals",
+ 1, 0, 0, (SCM note_column),
+ "Return the @code{AccidentalPlacement} grob from @var{note_column}"
+ "if any, or @code{SCM_EOL} otherwise.")
+{
+ Grob *grob = unsmob_grob (note_column);
+ LY_ASSERT_SMOB (Grob, note_column, 1);
+ Grob *acc = Note_column::accidentals (grob);
+ if (acc)
+ return acc->self_scm ();
+ return SCM_EOL;
+}
+
+LY_DEFINE (ly_note_column_dot_column, "ly:note-column-dot-column",
+ 1, 0, 0, (SCM note_column),
+ "Return the @code{DotColumn} grob from @var{note_column}"
+ "if any, or @code{SCM_EOL} otherwise.")
+{
+ Grob *grob = unsmob_grob (note_column);
+ LY_ASSERT_SMOB (Grob, note_column, 1);
+ Grob *dot_column = Note_column::dot_column (grob);
+ if (dot_column)
+ return dot_column->self_scm ();
+ return SCM_EOL;
+}
}
/*
- Return the first Accidentals grob that we find in a note-head.
+ Return the first AccidentalPlacement grob that we find in a note-head.
*/
Grob *
Note_column::accidentals (Grob *me)
if (dots)
return dots->get_parent (X_AXIS);
}
-
+
return 0;
}
#include "book.hh"
#include "context-def.hh"
+#include "context-mod.hh"
#include "dimensions.hh"
#include "file-path.hh"
#include "input.hh"
%token <scm> CHORD_MODIFIER
%token <scm> CHORD_REPETITION
%token <scm> CONTEXT_DEF_IDENTIFIER
+%token <scm> CONTEXT_MOD_IDENTIFIER
%token <scm> DRUM_PITCH
%token <scm> DURATION_IDENTIFIER
%token <scm> EVENT_IDENTIFIER
%type <scm> chord_body_element
%type <scm> command_element
%type <scm> command_event
+%type <scm> context_modification
%type <scm> context_change
%type <scm> direction_less_event
%type <scm> direction_reqd_event
| DIGIT {
$$ = scm_from_int ($1);
}
+ | context_modification {
+ $$ = $1;
+ }
;
context_def_spec_block:
| context_def_spec_body context_mod {
unsmob_context_def ($$)->add_context_mod ($2);
}
+ | context_def_spec_body context_modification {
+ Context_def *td = unsmob_context_def ($$);
+ SCM new_mods = unsmob_context_mod ($2)->get_mods ();
+ for (SCM m = new_mods; scm_is_pair (m); m = scm_cdr (m)) {
+ td->add_context_mod (scm_car (m));
+ }
+ }
;
| context_change
;
+context_modification:
+ WITH { PARSER->lexer_->push_initial_state (); } '{' context_mod_list '}'
+ {
+ PARSER->lexer_->pop_state ();
+ $$ = $4;
+ }
+ | WITH CONTEXT_MOD_IDENTIFIER
+ {
+ $$ = $2;
+ }
+ | CONTEXT_MOD_IDENTIFIER
+ {
+ $$ = $1;
+ }
+ ;
+
optional_context_mod:
- /**/ { $$ = SCM_EOL; }
- | WITH { PARSER->lexer_->push_initial_state (); }
- '{' context_mod_list '}'
- {
- PARSER->lexer_->pop_state ();
- $$ = $4;
- }
- ;
+ /**/ {
+ $$ = SCM_EOL;
+ }
+ | context_modification
+ {
+ $$ = $1;
+ }
+ ;
context_mod_list:
- /* */ { $$ = SCM_EOL; }
- | context_mod_list context_mod {
- $$ = scm_cons ($2, $1);
- }
- ;
+ /**/ {
+ $$ = Context_mod ().smobbed_copy ();
+ }
+ | context_mod_list context_mod {
+ unsmob_context_mod ($1)->add_context_mod ($2);
+ }
+ | context_mod_list CONTEXT_MOD_IDENTIFIER {
+ Context_mod *md = unsmob_context_mod ($2);
+ if (md)
+ unsmob_context_mod ($1)->add_context_mods (md->get_mods ());
+ }
+ ;
composite_music:
prefix_composite_music { $$ = $1; }
$$ = run_music_function (PARSER, $1);
}
| CONTEXT simple_string optional_id optional_context_mod music {
- $$ = MAKE_SYNTAX ("context-specification", @$, $2, $3, $5, $4, SCM_BOOL_F);
+ Context_mod *ctxmod = unsmob_context_mod ($4);
+ SCM mods = SCM_EOL;
+ if (ctxmod)
+ mods = ctxmod->get_mods ();
+ $$ = MAKE_SYNTAX ("context-specification", @$, $2, $3, $5, mods, SCM_BOOL_F);
}
| NEWCONTEXT simple_string optional_id optional_context_mod music {
- $$ = MAKE_SYNTAX ("context-specification", @$, $2, $3, $5, $4, SCM_BOOL_T);
+ Context_mod *ctxmod = unsmob_context_mod ($4);
+ SCM mods = SCM_EOL;
+ if (ctxmod)
+ mods = ctxmod->get_mods ();
+ $$ = MAKE_SYNTAX ("context-specification", @$, $2, $3, $5, mods, SCM_BOOL_T);
}
| TIMES fraction music {
PARSER->lexer_->pop_state ();
}
| mode_changing_head_with_context optional_context_mod grouped_music_list {
- $$ = MAKE_SYNTAX ("context-specification", @$, $1, SCM_EOL, $3, $2, SCM_BOOL_T);
+ Context_mod *ctxmod = unsmob_context_mod ($2);
+ SCM mods = SCM_EOL;
+ if (ctxmod)
+ mods = ctxmod->get_mods ();
+ $$ = MAKE_SYNTAX ("context-specification", @$, $1, SCM_EOL, $3, mods, SCM_BOOL_T);
if ($1 == ly_symbol2scm ("ChordNames"))
{
$$ = MAKE_SYNTAX ("unrelativable-music", @$, $$);
| DURATION_IDENTIFIER dots {
Duration *d = unsmob_duration ($1);
Duration k (d->duration_log (), d->dot_count () + $2);
+ k = k.compressed (d->factor ());
*d = k;
$$ = $1;
}
} else if (scm_is_number (sid)) {
*destination = sid;
return NUMBER_IDENTIFIER;
- } else if (unsmob_context_def (sid)) {
- Context_def *def= unsmob_context_def (sid)->clone ();
+ } else if (unsmob_context_def (sid)) {
+ Context_def *def= unsmob_context_def (sid)->clone ();
+
+ *destination = def->self_scm ();
+ def->unprotect ();
- *destination = def->self_scm ();
- def->unprotect ();
+ return CONTEXT_DEF_IDENTIFIER;
+ } else if (unsmob_context_mod (sid)) {
+ *destination = unsmob_context_mod (sid)->smobbed_copy ();
- return CONTEXT_DEF_IDENTIFIER;
+ return CONTEXT_MOD_IDENTIFIER;
} else if (unsmob_score (sid)) {
Score *score = new Score (*unsmob_score (sid));
*destination = score->self_scm ();
}
-RemoveEmptyStaffContext = \context {
- \Staff
+RemoveEmptyStaves = \with {
\remove "Axis_group_engraver"
\consists "Hara_kiri_engraver"
\override Beam #'auto-knee-gap = #'()
\override VerticalAxisGroup #'remove-empty = ##t
}
-AncientRemoveEmptyStaffContext = \context {
-%% why not add by default?
-
- \RemoveEmptyStaffContext
- \accepts "VaticanaVoice"
- \accepts "GregorianTranscriptionVoice"
- \accepts "MensuralVoice"
-}
\context {
\type "Score_engraver"
printKeyCancellation = ##f
}
+
+%% Keep the old definitions in here for compatibility (they erase previous
+%% settings to the corresponding context!).
+%% For new scores, one should simply insert the \RemoveEmptyStaves settings
+%% into the desired context. That's just as easy, requires only one line more
+%% (the \*Staff), but preserves previous context mods.
+%% TODO: DEPRECATED_2.13.17, remove at some point in the future
+RemoveEmptyStaffContext = \context {
+ \Staff
+ \RemoveEmptyStaves
+}
+
+AncientRemoveEmptyStaffContext = \context {
+ \VaticanaStaff
+ \RemoveEmptyStaves
+}
+
RemoveEmptyDrumStaffContext = \context {
\DrumStaff
- \remove "Axis_group_engraver"
- \override VerticalAxisGroup #'remove-empty = ##t
- \consists "Hara_kiri_engraver"
+ \RemoveEmptyStaves
}
RemoveEmptyRhythmicStaffContext = \context {
\RhythmicStaff
- \remove "Axis_group_engraver"
- \override VerticalAxisGroup #'remove-empty = ##t
- \consists "Hara_kiri_engraver"
+ \RemoveEmptyStaves
}
RemoveEmptyTabStaffContext = \context {
\TabStaff
- \remove "Axis_group_engraver"
- \override VerticalAxisGroup #'remove-empty = ##t
- \consists "Hara_kiri_engraver"
+ \RemoveEmptyStaves
}
+%%%% -*- Mode: Scheme -*-
+
%%%% This file is part of LilyPond, the GNU music typesetter.
%%%%
%%%% Copyright (C) 2003--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
%%%% You should have received a copy of the GNU General Public License
%%%% along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
-% -*-Scheme-*-
-
\version "2.12.0"
%% keep these two together
afterGraceFraction = #(cons 6 8)
afterGrace =
-#(define-music-function
- (parser location main grace)
- (ly:music? ly:music?)
- (_i "Create @var{grace} note(s) after a @var{main} music expression.")
- (let*
- ((main-length (ly:music-length main))
- (fraction (ly:parser-lookup parser 'afterGraceFraction)))
-
- (make-simultaneous-music
- (list
- main
- (make-sequential-music
- (list
-
- (make-music 'SkipMusic
- 'duration (ly:make-duration
- 0 0
- (* (ly:moment-main-numerator main-length)
- (car fraction))
- (* (ly:moment-main-denominator main-length)
- (cdr fraction)) ))
- (make-music 'GraceMusic
- 'element grace)))))))
+#(define-music-function (parser location main grace) (ly:music? ly:music?)
+ (_i "Create @var{grace} note(s) after a @var{main} music expression.")
+ (let ((main-length (ly:music-length main))
+ (fraction (ly:parser-lookup parser 'afterGraceFraction)))
+ (make-simultaneous-music
+ (list
+ main
+ (make-sequential-music
+ (list
+
+ (make-music 'SkipMusic
+ 'duration (ly:make-duration
+ 0 0
+ (* (ly:moment-main-numerator main-length)
+ (car fraction))
+ (* (ly:moment-main-denominator main-length)
+ (cdr fraction))))
+ (make-music 'GraceMusic
+ 'element grace)))))))
%% music identifiers not allowed at top-level,
applyContext =
#(define-music-function (parser location proc) (procedure?)
- (_i "Modify context properties with Scheme procedure @var{proc}.")
- (make-music 'ApplyContext
- 'origin location
- 'procedure proc))
+ (_i "Modify context properties with Scheme procedure @var{proc}.")
+ (make-music 'ApplyContext
+ 'origin location
+ 'procedure proc))
applyMusic =
#(define-music-function (parser location func music) (procedure? ly:music?)
(_i"Apply procedure @var{func} to @var{music}.")
- (func music))
+ (func music))
applyOutput =
#(define-music-function (parser location ctx proc) (symbol? procedure?)
- (_i "Apply function @code{proc} to every layout object in context @code{ctx}")
- (make-music 'ApplyOutputEvent
- 'origin location
- 'procedure proc
- 'context-type ctx))
+ (_i "Apply function @code{proc} to every layout object in context @code{ctx}")
+ (make-music 'ApplyOutputEvent
+ 'origin location
+ 'procedure proc
+ 'context-type ctx))
appoggiatura =
#(def-grace-function startAppoggiaturaMusic stopAppoggiaturaMusic
- (_i "Create an appoggiatura from @var{music}"))
+ (_i "Create an appoggiatura from @var{music}"))
% for regression testing purposes.
assertBeamQuant =
#(define-music-function (parser location l r) (pair? pair?)
- (_i "Testing function: check whether the beam quants @var{l} and @var{r} are correct")
- (make-grob-property-override 'Beam 'positions
- (ly:make-simple-closure
- (ly:make-simple-closure
- (append
- (list chain-grob-member-functions `(,cons 0 0))
- (check-quant-callbacks l r))))))
+ (_i "Testing function: check whether the beam quants @var{l} and @var{r} are correct")
+ (make-grob-property-override 'Beam 'positions
+ (ly:make-simple-closure
+ (ly:make-simple-closure
+ (append
+ (list chain-grob-member-functions `(,cons 0 0))
+ (check-quant-callbacks l r))))))
% for regression testing purposes.
assertBeamSlope =
#(define-music-function (parser location comp) (procedure?)
- (_i "Testing function: check whether the slope of the beam is the same as @code{comp}")
- (make-grob-property-override 'Beam 'positions
- (ly:make-simple-closure
- (ly:make-simple-closure
- (append
- (list chain-grob-member-functions `(,cons 0 0))
- (check-slope-callbacks comp))))))
+ (_i "Testing function: check whether the slope of the beam is the same as @code{comp}")
+ (make-grob-property-override 'Beam 'positions
+ (ly:make-simple-closure
+ (ly:make-simple-closure
+ (append
+ (list chain-grob-member-functions `(,cons 0 0))
+ (check-slope-callbacks comp))))))
autochange =
#(define-music-function (parser location music) (ly:music?)
- (_i "Make voices that switch between staves automatically")
- (make-autochange-music parser music))
+ (_i "Make voices that switch between staves automatically")
+ (make-autochange-music parser music))
balloonGrobText =
#(define-music-function (parser location grob-name offset text)
- (symbol? number-pair? markup?)
- (_i "Attach @var{text} to @var{grob-name} at offset @var{offset}
-use like @code{\\once})")
- (make-music 'AnnotateOutputEvent
- 'symbol grob-name
- 'X-offset (car offset)
- 'Y-offset (cdr offset)
- 'text text))
+ (symbol? number-pair? markup?)
+ (_i "Attach @var{text} to @var{grob-name} at offset @var{offset}
+ (use like @code{\\once})")
+ (make-music 'AnnotateOutputEvent
+ 'symbol grob-name
+ 'X-offset (car offset)
+ 'Y-offset (cdr offset)
+ 'text text))
balloonText =
#(define-music-function (parser location offset text) (number-pair? markup?)
- (_i "Attach @var{text} at @var{offset} (use like @code{\\tweak})")
- (make-music 'AnnotateOutputEvent
- 'X-offset (car offset)
- 'Y-offset (cdr offset)
- 'text text))
+ (_i "Attach @var{text} at @var{offset} (use like @code{\\tweak})")
+ (make-music 'AnnotateOutputEvent
+ 'X-offset (car offset)
+ 'Y-offset (cdr offset)
+ 'text text))
bar =
#(define-music-function (parser location type) (string?)
- (_i "Insert a bar line of type @var{type}")
+ (_i "Insert a bar line of type @var{type}")
(context-spec-music
(make-property-set 'whichBar type)
'Timing))
barNumberCheck =
#(define-music-function (parser location n) (integer?)
- (_i "Print a warning if the current bar number is not @var{n}.")
+ (_i "Print a warning if the current bar number is not @var{n}.")
(make-music 'ApplyContext
'origin location
'procedure
(lambda (c)
- (let*
- ((cbn (ly:context-property c 'currentBarNumber)))
+ (let ((cbn (ly:context-property c 'currentBarNumber)))
(if (and (number? cbn) (not (= cbn n)))
- (ly:input-message location "Barcheck failed got ~a expect ~a"
+ (ly:input-message location
+ "Barcheck failed got ~a expect ~a"
cbn n))))))
bendAfter =
#(define-music-function (parser location delta) (real?)
- (_i "Create a fall or doit of pitch interval @var{delta}.")
- (make-music 'BendAfterEvent
- 'delta-step delta))
+ (_i "Create a fall or doit of pitch interval @var{delta}.")
+ (make-music 'BendAfterEvent
+ 'delta-step delta))
bookOutputName =
#(define-music-function (parser location newfilename) (string?)
- (_i "Direct output for the current book block to @var{newfilename}.")
- (set! book-filename newfilename)
- (make-music 'SequentialMusic 'void #t))
+ (_i "Direct output for the current book block to @var{newfilename}.")
+ (set! book-filename newfilename)
+ (make-music 'SequentialMusic 'void #t))
bookOutputSuffix =
#(define-music-function (parser location newsuffix) (string?)
- (_i "Set the output filename suffix for the current book block to
+ (_i "Set the output filename suffix for the current book block to
@var{newsuffix}.")
- (set! book-output-suffix newsuffix)
- (make-music 'SequentialMusic 'void #t))
+ (set! book-output-suffix newsuffix)
+ (make-music 'SequentialMusic 'void #t))
%% why a function?
breathe =
#(define-music-function (parser location) ()
- (_i "Insert a breath mark.")
- (make-music 'EventChord
- 'origin location
- 'elements (list (make-music 'BreathingEvent))))
+ (_i "Insert a breath mark.")
+ (make-music 'EventChord
+ 'origin location
+ 'elements (list (make-music 'BreathingEvent))))
clef =
#(define-music-function (parser location type) (string?)
- (_i "Set the current clef to @var{type}.")
+ (_i "Set the current clef to @var{type}.")
(make-clef-set type))
cueDuring =
#(define-music-function
- (parser location what dir main-music) (string? ly:dir? ly:music?)
- (_i "Insert contents of quote @var{what} corresponding to @var{main-music},
+ (parser location what dir main-music) (string? ly:dir? ly:music?)
+ (_i "Insert contents of quote @var{what} corresponding to @var{main-music},
in a CueVoice oriented by @var{dir}.")
- (make-music 'QuoteMusic
- 'element main-music
- 'quoted-context-type 'Voice
- 'quoted-context-id "cue"
- 'quoted-music-name what
- 'quoted-voice-direction dir
- 'origin location))
+ (make-music 'QuoteMusic
+ 'element main-music
+ 'quoted-context-type 'Voice
+ 'quoted-context-id "cue"
+ 'quoted-music-name what
+ 'quoted-voice-direction dir
+ 'origin location))
displayLilyMusic =
#(define-music-function (parser location music) (ly:music?)
- (_i "Display the LilyPond input representation of @var{music}
+ (_i "Display the LilyPond input representation of @var{music}
to the console.")
(newline)
(display-lily-music music parser)
displayMusic =
#(define-music-function (parser location music) (ly:music?)
- (_i "Display the internal representation of @var{music} to the console.")
+ (_i "Display the internal representation of @var{music} to the console.")
(newline)
(display-scheme-music music)
music)
endSpanners =
#(define-music-function (parser location music) (ly:music?)
- (_i "Terminate the next spanner prematurely after exactly one note without the need of a specific end spanner.")
+ (_i "Terminate the next spanner prematurely after exactly one note
+without the need of a specific end spanner.")
(if (eq? (ly:music-property music 'name) 'EventChord)
- (let*
- ((elts (ly:music-property music 'elements))
- (start-span-evs (filter (lambda (ev)
- (and (music-has-type ev 'span-event)
- (equal? (ly:music-property ev 'span-direction)
- START)))
- elts))
- (stop-span-evs
- (map (lambda (m)
- (let* ((c (music-clone m)))
- (set! (ly:music-property c 'span-direction) STOP)
- c))
- start-span-evs))
- (end-ev-chord (make-music 'EventChord
- 'elements stop-span-evs))
- (total (make-music 'SequentialMusic
- 'elements (list music
- end-ev-chord))))
+ (let* ((elts (ly:music-property music 'elements))
+ (start-span-evs (filter (lambda (ev)
+ (and (music-has-type ev 'span-event)
+ (equal? (ly:music-property ev 'span-direction)
+ START)))
+ elts))
+ (stop-span-evs
+ (map (lambda (m)
+ (let ((c (music-clone m)))
+ (set! (ly:music-property c 'span-direction) STOP)
+ c))
+ start-span-evs))
+ (end-ev-chord (make-music 'EventChord
+ 'elements stop-span-evs))
+ (total (make-music 'SequentialMusic
+ 'elements (list music
+ end-ev-chord))))
total)
(ly:input-message location (_ "argument endSpanners is not an EventChord: ~a" music))))
featherDurations=
#(define-music-function (parser location factor argument) (ly:moment? ly:music?)
- (_i "Adjust durations of music in @var{argument} by rational @var{factor}. ")
- (let*
- ((orig-duration (ly:music-length argument))
- (multiplier (ly:make-moment 1 1)))
+ (_i "Adjust durations of music in @var{argument} by rational @var{factor}.")
+ (let ((orig-duration (ly:music-length argument))
+ (multiplier (ly:make-moment 1 1)))
(music-map
(lambda (mus)
(< 0 (ly:moment-main-denominator (ly:music-length mus))))
(begin
(ly:music-compress mus multiplier)
- (set! multiplier (ly:moment-mul factor multiplier)))
- )
+ (set! multiplier (ly:moment-mul factor multiplier))))
mus)
argument)
(parser location name) (string?)
(_i "Switch instrument to @var{name}, which must be predefined with
@code{\\addInstrumentDefinition}.")
- (let*
- ((handle (assoc name instrument-definitions))
- (instrument-def (if handle (cdr handle) '()))
- )
+ (let* ((handle (assoc name instrument-definitions))
+ (instrument-def (if handle (cdr handle) '())))
(if (not handle)
(ly:input-message location "No such instrument: ~a" name))
keepWithTag =
-#(define-music-function
- (parser location tag music) (symbol? ly:music?)
- (_i "Include only elements of @var{music} that are tagged with @var{tag}.")
- (music-filter
- (lambda (m)
- (let* ((tags (ly:music-property m 'tags))
- (res (memq tag tags)))
- (or
- (eq? tags '())
- res)))
- music))
+#(define-music-function (parser location tag music) (symbol? ly:music?)
+ (_i "Include only elements of @var{music} that are tagged with @var{tag}.")
+ (music-filter
+ (lambda (m)
+ (let* ((tags (ly:music-property m 'tags))
+ (res (memq tag tags)))
+ (or
+ (eq? tags '())
+ res)))
+ music))
killCues =
-#(define-music-function
- (parser location music)
- (ly:music?)
+#(define-music-function (parser location music) (ly:music?)
(_i "Remove cue notes from @var{music}.")
(music-map
(lambda (mus)
(if (and (string? (ly:music-property mus 'quoted-music-name))
(string=? (ly:music-property mus 'quoted-context-id "") "cue"))
(ly:music-property mus 'element)
- mus)) music))
+ mus))
+ music))
label =
#(define-music-function (parser location label) (symbol?)
- (_i "Create @var{label} as a bookmarking label")
+ (_i "Create @var{label} as a bookmarking label.")
(make-music 'EventChord
'page-marker #t
'page-label label
makeClusters =
-#(define-music-function
- (parser location arg) (ly:music?)
- (_i "Display chords in @var{arg} as clusters")
- (music-map note-to-cluster arg))
+#(define-music-function (parser location arg) (ly:music?)
+ (_i "Display chords in @var{arg} as clusters.")
+ (music-map note-to-cluster arg))
musicMap =
#(define-music-function (parser location proc mus) (procedure? ly:music?)
- (_i "Apply @var{proc} to @var{mus} and all of the music it contains.")
- (music-map proc mus))
+ (_i "Apply @var{proc} to @var{mus} and all of the music it contains.")
+ (music-map proc mus))
%% because music identifiers are not allowed at top-level.
noPageBreak =
#(define-music-function (location parser) ()
- (_i "Forbid a page break. May be used at toplevel (ie between scores or
+ (_i "Forbid a page break. May be used at toplevel (i.e., between scores or
markups), or inside a score.")
(make-music 'EventChord
'page-marker #t
noPageTurn =
#(define-music-function (location parser) ()
- (_i "Forbid a page turn. May be used at toplevel (ie between scores or
+ (_i "Forbid a page turn. May be used at toplevel (i.e., between scores or
markups), or inside a score.")
(make-music 'EventChord
'page-marker #t
octaveCheck =
#(define-music-function (parser location pitch-note) (ly:music?)
- (_i "octave check")
-
+ (_i "Octave check.")
(make-music 'RelativeOctaveCheck
'origin location
- 'pitch (pitch-of-note pitch-note)
- ))
+ 'pitch (pitch-of-note pitch-note)))
-ottava = #(define-music-function (parser location octave) (number?)
- (_i "set the octavation ")
- (make-ottava-set octave))
+ottava =
+#(define-music-function (parser location octave) (number?)
+ (_i "Set the octavation.")
+ (make-ottava-set octave))
overrideBeamSettings =
#(define-music-function
- (parser location
- context time-signature rule-type grouping-rule)
- (symbol? pair? symbol? pair?)
+ (parser location context time-signature rule-type grouping-rule)
+ (symbol? pair? symbol? pair?)
- (_i "Override beamSettings in @var{context}
+ (_i "Override beamSettings in @var{context}
for time signatures of @var{time-signature} and rules of type
@var{rule-type} to have a grouping rule alist
@var{grouping-rule}.
@var{beam-type} is @code{*}, grouping is in units of the denominator
of @var{time-signature}.")
- ;; TODO -- add warning if largest value of grouping is
- ;; greater than time-signature.
+ ;; TODO -- add warning if largest value of grouping is
+ ;; greater than time-signature.
-#{
-#(override-beam-setting
- $time-signature $rule-type $grouping-rule $context)
-#})
+ #{
+ #(override-beam-setting
+ $time-signature $rule-type $grouping-rule $context)
+ #})
overrideProperty =
#(define-music-function (parser location name property value)
(_i "Set @var{property} to @var{value} in all grobs named @var{name}.
The @var{name} argument is a string of the form @code{\"Context.GrobName\"}
-or @code{\"GrobName\"}")
+or @code{\"GrobName\"}.")
- (let*
- ((name-components (string-split name #\.))
- (context-name 'Bottom)
- (grob-name #f))
+ (let ((name-components (string-split name #\.))
+ (context-name 'Bottom)
+ (grob-name #f))
(if (> 2 (length name-components))
(set! grob-name (string->symbol (car name-components)))
%% because music identifiers are not allowed at top-level.
pageBreak =
#(define-music-function (location parser) ()
- (_i "Force a page break. May be used at toplevel (i.e. between scores or
+ (_i "Force a page break. May be used at toplevel (i.e., between scores or
markups), or inside a score.")
(make-music 'EventChord
'page-marker #t
parallelMusic =
#(define-music-function (parser location voice-ids music) (list? ly:music?)
- (_i "Define parallel music sequences, separated by '|' (bar check signs),
+ (_i "Define parallel music sequences, separated by '|' (bar check signs),
and assign them to the identifiers provided in @var{voice-ids}.
@var{voice-ids}: a list of music identifiers (symbols containing only letters)
C = { e e | f f | }
@end verbatim
")
- (let* ((voices (apply circular-list (make-list (length voice-ids) (list))))
- (current-voices voices)
- (current-sequence (list)))
- ;;
- ;; utilities
- (define (push-music m)
- "Push the music expression into the current sequence"
- (set! current-sequence (cons m current-sequence)))
- (define (change-voice)
- "Stores the previously built sequence into the current voice and
+ (let* ((voices (apply circular-list (make-list (length voice-ids) (list))))
+ (current-voices voices)
+ (current-sequence (list)))
+ ;;
+ ;; utilities
+ (define (push-music m)
+ "Push the music expression into the current sequence"
+ (set! current-sequence (cons m current-sequence)))
+ (define (change-voice)
+ "Stores the previously built sequence into the current voice and
change to the following voice."
- (list-set! current-voices 0 (cons (make-music 'SequentialMusic
- 'elements (reverse! current-sequence))
- (car current-voices)))
- (set! current-sequence (list))
- (set! current-voices (cdr current-voices)))
- (define (bar-check? m)
- "Checks whether m is a bar check."
- (eq? (ly:music-property m 'name) 'BarCheck))
- (define (music-origin music)
- "Recursively search an origin location stored in music."
- (cond ((null? music) #f)
- ((not (null? (ly:music-property music 'origin)))
- (ly:music-property music 'origin))
- (else (or (music-origin (ly:music-property music 'element))
- (let ((origins (remove not (map music-origin
- (ly:music-property music 'elements)))))
- (and (not (null? origins)) (car origins)))))))
- ;;
- ;; first, split the music and fill in voices
- (map-in-order (lambda (m)
- (push-music m)
- (if (bar-check? m) (change-voice)))
- (ly:music-property music 'elements))
- (if (not (null? current-sequence)) (change-voice))
- ;; un-circularize `voices' and reorder the voices
- (set! voices (map-in-order (lambda (dummy seqs)
- (reverse! seqs))
- voice-ids voices))
- ;;
- ;; set origin location of each sequence in each voice
- ;; for better type error tracking
- (for-each (lambda (voice)
- (for-each (lambda (seq)
- (set! (ly:music-property seq 'origin)
- (or (music-origin seq) location)))
- voice))
- voices)
- ;;
- ;; check sequence length
- (apply for-each (lambda* (#:rest seqs)
- (let ((moment-reference (ly:music-length (car seqs))))
- (for-each (lambda (seq moment)
- (if (not (equal? moment moment-reference))
- (ly:music-message seq
- "Bars in parallel music don't have the same length")))
- seqs (map-in-order ly:music-length seqs))))
- voices)
- ;;
- ;; bind voice identifiers to the voices
- (map (lambda (voice-id voice)
- (ly:parser-define! parser voice-id
- (make-music 'SequentialMusic
- 'origin location
- 'elements voice)))
- voice-ids voices))
- ;; Return an empty sequence. this function is actually a "void" function.
- (make-music 'SequentialMusic 'void #t))
+ (list-set! current-voices 0 (cons (make-music 'SequentialMusic
+ 'elements (reverse! current-sequence))
+ (car current-voices)))
+ (set! current-sequence (list))
+ (set! current-voices (cdr current-voices)))
+ (define (bar-check? m)
+ "Checks whether m is a bar check."
+ (eq? (ly:music-property m 'name) 'BarCheck))
+ (define (music-origin music)
+ "Recursively search an origin location stored in music."
+ (cond ((null? music) #f)
+ ((not (null? (ly:music-property music 'origin)))
+ (ly:music-property music 'origin))
+ (else (or (music-origin (ly:music-property music 'element))
+ (let ((origins (remove not (map music-origin
+ (ly:music-property music 'elements)))))
+ (and (not (null? origins)) (car origins)))))))
+ ;;
+ ;; first, split the music and fill in voices
+ (map-in-order (lambda (m)
+ (push-music m)
+ (if (bar-check? m) (change-voice)))
+ (ly:music-property music 'elements))
+ (if (not (null? current-sequence)) (change-voice))
+ ;; un-circularize `voices' and reorder the voices
+ (set! voices (map-in-order (lambda (dummy seqs)
+ (reverse! seqs))
+ voice-ids voices))
+ ;;
+ ;; set origin location of each sequence in each voice
+ ;; for better type error tracking
+ (for-each (lambda (voice)
+ (for-each (lambda (seq)
+ (set! (ly:music-property seq 'origin)
+ (or (music-origin seq) location)))
+ voice))
+ voices)
+ ;;
+ ;; check sequence length
+ (apply for-each (lambda* (#:rest seqs)
+ (let ((moment-reference (ly:music-length (car seqs))))
+ (for-each (lambda (seq moment)
+ (if (not (equal? moment moment-reference))
+ (ly:music-message seq
+ "Bars in parallel music don't have the same length")))
+ seqs (map-in-order ly:music-length seqs))))
+ voices)
+ ;;
+ ;; bind voice identifiers to the voices
+ (map (lambda (voice-id voice)
+ (ly:parser-define! parser voice-id
+ (make-music 'SequentialMusic
+ 'origin location
+ 'elements voice)))
+ voice-ids voices))
+ ;; Return an empty sequence. This function is actually a "void" function.
+ (make-music 'SequentialMusic 'void #t))
parenthesize =
#(define-music-function (parser loc arg) (ly:music?)
(_i "Tag @var{arg} to be parenthesized.")
(if (memq 'event-chord (ly:music-property arg 'types))
- ; arg is an EventChord -> set the parenthesize property on all child notes and rests
- (map
- (lambda (ev)
- (if (or (memq 'note-event (ly:music-property ev 'types))
- (memq 'rest-event (ly:music-property ev 'types)))
- (set! (ly:music-property ev 'parenthesize) #t)))
- (ly:music-property arg 'elements))
- ; No chord, simply set property for this expression:
- (set! (ly:music-property arg 'parenthesize) #t))
+ ;; arg is an EventChord -> set the parenthesize property
+ ;; on all child notes and rests
+ (map
+ (lambda (ev)
+ (if (or (memq 'note-event (ly:music-property ev 'types))
+ (memq 'rest-event (ly:music-property ev 'types)))
+ (set! (ly:music-property ev 'parenthesize) #t)))
+ (ly:music-property arg 'elements))
+ ;; No chord, simply set property for this expression:
+ (set! (ly:music-property arg 'parenthesize) #t))
arg)
partcombine =
#(define-music-function (parser location part1 part2) (ly:music? ly:music?)
- (_i "Take the music in @var{part1} and @var{part2} and typeset so that they share a staff.")
+ (_i "Take the music in @var{part1} and @var{part2} and typeset so
+that they share a staff.")
(make-part-combine-music parser
(list part1 part2)))
main-note))
quoteDuring =
-#(define-music-function
- (parser location what main-music)
- (string? ly:music?)
+#(define-music-function (parser location what main-music) (string? ly:music?)
(_i "Indicate a section of music to be quoted. @var{what} indicates the name
of the quoted voice, as specified in an @code{\\addQuote} command.
@var{main-music} is used to indicate the length of music to be quoted;
'origin location))
removeWithTag =
-#(define-music-function
- (parser location tag music) (symbol? ly:music?)
- (_i "Remove elements of @var{music} that are tagged with @var{tag}.")
- (music-filter
- (lambda (m)
- (let* ((tags (ly:music-property m 'tags))
- (res (memq tag tags)))
- (not res)))
- music))
+#(define-music-function (parser location tag music) (symbol? ly:music?)
+ (_i "Remove elements of @var{music} that are tagged with @var{tag}.")
+ (music-filter
+ (lambda (m)
+ (let* ((tags (ly:music-property m 'tags))
+ (res (memq tag tags)))
+ (not res)))
+ music))
resetRelativeOctave =
-#(define-music-function
- (parser location reference-note)
- (ly:music?)
- (_i "Set the octave inside a \\relative section.")
+#(define-music-function (parser location reference-note) (ly:music?)
+ (_i "Set the octave inside a \\relative section.")
- (let*
- ((notes (ly:music-property reference-note 'elements))
- (pitch (ly:music-property (car notes) 'pitch)))
+ (let* ((notes (ly:music-property reference-note 'elements))
+ (pitch (ly:music-property (car notes) 'pitch)))
- (set! (ly:music-property reference-note 'elements) '())
- (set! (ly:music-property reference-note
- 'to-relative-callback)
- (lambda (music last-pitch)
- pitch))
+ (set! (ly:music-property reference-note 'elements) '())
+ (set! (ly:music-property reference-note 'to-relative-callback)
+ (lambda (music last-pitch)
+ pitch))
- reference-note))
+ reference-note))
revertBeamSettings =
#(define-music-function
- (parser location
- context time-signature rule-type)
- (symbol? pair? symbol?)
+ (parser location context time-signature rule-type)
+ (symbol? pair? symbol?)
- (_i "Revert beam settings in @var{context} for time signatures of
+ (_i "Revert beam settings in @var{context} for time signatures of
@var{time-signature} and groups of type
@var{group-type}. @var{group-type} can be @code{end}
or @code{subdivide}.")
-#{
- #(revert-beam-setting $time-signature $rule-type $context)
-#})
+ #{
+ #(revert-beam-setting $time-signature $rule-type $context)
+ #})
rightHandFinger =
#(define-music-function (parser location finger) (number-or-string?)
scaleDurations =
-#(define-music-function (parser location fraction music) (number-pair? ly:music?)
+#(define-music-function (parser location fraction music)
+ (number-pair? ly:music?)
(_i "Multiply the duration of events in @var{music} by @var{fraction}.")
(ly:music-compress music
(ly:make-moment (car fraction) (cdr fraction))))
(_i "Set the beat grouping in the current time signature to
@var{grouping}.")
(define (default-group-setting c)
- (let* ((context-time-signature
- (ly:context-property c 'timeSignatureFraction))
- (time-signature (if (null? context-time-signature)
- '(4 . 4)
- context-time-signature)))
- (override-property-setting
- c
- 'beamSettings
- (list time-signature 'end)
- (list (cons '* grouping)))))
+ (let* ((context-time-signature
+ (ly:context-property c 'timeSignatureFraction))
+ (time-signature (if (null? context-time-signature)
+ '(4 . 4)
+ context-time-signature)))
+ (override-property-setting
+ c
+ 'beamSettings
+ (list time-signature 'end)
+ (list (cons '* grouping)))))
(context-spec-music
- (make-apply-context default-group-setting)
- 'Score))
+ (make-apply-context default-group-setting)
+ 'Score))
shiftDurations =
-#(define-music-function (parser location dur dots arg) (integer? integer? ly:music?)
+#(define-music-function (parser location dur dots arg)
+ (integer? integer? ly:music?)
(_i "Scale @var{arg} up by a factor of @var{2^dur*(2-(1/2)^dots)}.")
(music-map
(_i "Set the system stretch, by reading the 'system-stretch property of
the `parameters' assoc list.")
#{
- \overrideProperty #"Score.NonMusicalPaperColumn"
- #'line-break-system-details
- #$(list (cons 'alignment-extra-space (cdr (assoc 'system-stretch parameters)))
- (cons 'system-Y-extent (cdr (assoc 'system-Y-extent parameters))))
+ \overrideProperty #"Score.NonMusicalPaperColumn"
+ #'line-break-system-details
+ #$(list (cons 'alignment-extra-space (cdr (assoc 'system-stretch parameters)))
+ (cons 'system-Y-extent (cdr (assoc 'system-Y-extent parameters))))
#})
styledNoteHeads =
-#(define-music-function
- (parser location style heads music)
+#(define-music-function (parser location style heads music)
(symbol? list-or-symbol? ly:music?)
(_i "Set @var{heads} in @var{music} to @var{style}.")
(style-note-heads heads style music))
+
+
tabChordRepetition =
#(define-music-function (parser location) ()
(_i "Include the string information in a chord repetition.")
(make-music 'SequentialMusic 'void #t))
tag =
-#(define-music-function (parser location tag arg)
- (symbol? ly:music?)
+#(define-music-function (parser location tag arg) (symbol? ly:music?)
(_i "Add @var{tag} to the @code{tags} property of @var{arg}.")
transposedCueDuring =
#(define-music-function
- (parser location what dir pitch-note main-music)
- (string? ly:dir? ly:music? ly:music?)
+ (parser location what dir pitch-note main-music)
+ (string? ly:dir? ly:music? ly:music?)
- (_i "Insert notes from the part @var{what} into a voice called @code{cue},
+ (_i "Insert notes from the part @var{what} into a voice called @code{cue},
using the transposition defined by @var{pitch-note}. This happens
simultaneously with @var{main-music}, which is usually a rest. The
argument @var{dir} determines whether the cue notes should be notated
as a first or second voice.")
- (make-music 'QuoteMusic
- 'element main-music
- 'quoted-context-type 'Voice
- 'quoted-context-id "cue"
- 'quoted-music-name what
- 'quoted-voice-direction dir
- 'quoted-transposition (pitch-of-note pitch-note)
- 'origin location))
+ (make-music 'QuoteMusic
+ 'element main-music
+ 'quoted-context-type 'Voice
+ 'quoted-context-id "cue"
+ 'quoted-music-name what
+ 'quoted-voice-direction dir
+ 'quoted-transposition (pitch-of-note pitch-note)
+ 'origin location))
transposition =
#(define-music-function (parser location pitch-note) (ly:music?)
(context-spec-music
(make-property-set 'instrumentTransposition
(ly:pitch-negate (pitch-of-note pitch-note)))
- 'Staff))
+ 'Staff))
tweak =
#(define-music-function (parser location sym val arg)
withMusicProperty =
-#(define-music-function (parser location sym val music) (symbol? scheme? ly:music?)
+#(define-music-function (parser location sym val music)
+ (symbol? scheme? ly:music?)
(_i "Set @var{sym} to @var{val} in @var{music}.")
(set! (ly:music-property music sym) val)
%% shape note heads
-aikenHeads = \set shapeNoteStyles = #'#(do re mi fa #f la ti)
-sacredHarpHeads = \set shapeNoteStyles = #'#(fa #f la fa #f la mi)
+aikenHeads = \set shapeNoteStyles = #'#(do re mi fa sol la ti)
+sacredHarpHeads = \set shapeNoteStyles = #'#(fa sol la fa sol la mi)
%% shifts
--- /dev/null
+################################################################
+# website (without the rest of the docs)
+
+################################################################
+##### SECURITY -- check these values for lilypond.org #########
+################################################################
+ifeq ($(WEBSITE_ONLY_BUILD),1)
+ ### for lilypond.org
+ TOP_SRC_DIR=$(HOME)/src/lilypond
+ TRUSTED_DIR=$(HOME)/lilypond/trusted-scripts
+ top-src-dir=$(TOP_SRC_DIR)
+ depth=.
+ trusted-dir=$(TRUSTED_DIR)
+ script-dir=$(trusted-dir)
+ texi2html-init-file=$(trusted-dir)/lilypond-texi2html.init
+ top-htaccess=$(trusted-dir)/lilypond.org.htaccess
+ dir-htaccess=$(trusted-dir)/website-dir.htaccess
+ TEXI2HTML_PROGRAM=$(HOME)/usr/bin/texi2html
+ EXAMPLES=$(HOME)/media/ly-examples/
+ PICTURES=$(HOME)/media/pictures
+else
+ ### for normal git
+ script-dir=$(top-src-dir)/scripts/build/
+ texi2html-init-file=$(top-src-dir)/Documentation/lilypond-texi2html.init
+ top-htaccess=$(top-src-dir)/Documentation/web/server/lilypond.org.htaccess
+ dir-htaccess=$(top-src-dir)/Documentation/web/server/website-dir.htaccess
+ include $(config_make)
+ # I assume this is run from top-build-dir
+ EXAMPLES=Documentation/web/ly-examples/out-www/
+ PICTURES=Documentation/pictures/out-www/
+endif
+
+
+################################################################
+OUT=out-website
+
+### only update this when the language compiles correctly!
+#WEB_LANGS = es fr nl
+WEB_LANGS = es
+
+TEXI2HTML=ONLY_WEB=1 TOP_SRC_DIR=$(top-src-dir) DEPTH=$(depth) PERL_UNICODE=SD $(TEXI2HTML_PROGRAM)
+
+EXTRACT_TEXI_FILENAMES=python $(script-dir)/extract_texi_filenames.py
+CREATE_VERSION=python $(script-dir)/create-version-itexi.py
+CREATE_WEBLINKS=python $(script-dir)/create-weblinks-itexi.py
+MASS_LINK=python $(script-dir)/mass-link.py
+WEB_POST=python $(script-dir)/website_post.py
+
+SERVER_FILES=$(top-src-dir)/Documentation/web/server/
+
+# don't include web
+MANUALS=$(wildcard $(top-src-dir)/Documentation/*.tely)
+MANUALS+=$(top-src-dir)/Documentation/contributor.texi
+
+website-test:
+ echo $(TEXI2HTML)
+
+website-version:
+ mkdir -p $(OUT)
+ $(CREATE_VERSION) $(top-src-dir) > $(OUT)/version.itexi
+ $(CREATE_WEBLINKS) $(top-src-dir) > $(OUT)/weblinks.itexi
+
+website-xrefs: website-version
+ $(EXTRACT_TEXI_FILENAMES) -I $(top-src-dir)/Documentation/ \
+ -I $(OUT) -o $(OUT) --split=node \
+ $(top-src-dir)/Documentation/web.texi
+ # normal manuals
+ for m in $(MANUALS); do \
+ b=`basename "$$m" .texi`; \
+ d=`basename "$$b" .tely`; \
+ $(EXTRACT_TEXI_FILENAMES) \
+ -I $(top-src-dir)/Documentation/ \
+ -I $(top-src-dir)/Documentation/"$$d"/ \
+ -I $(OUT) -o $(OUT) "$$m" ; \
+ done
+ # translations
+ for l in $(WEB_LANGS); do \
+ $(EXTRACT_TEXI_FILENAMES) \
+ -I $(top-src-dir)/Documentation/ \
+ -I $(top-src-dir)/Documentation/"$$l" \
+ -I $(OUT) -o $(OUT) --split=node \
+ $(top-src-dir)/Documentation/"$$l"/web.texi ;\
+ for m in $(MANUALS); do \
+ n=`echo "$$m" | sed 's/Documentation/Documentation\/'$$l'/'` ; \
+ b=`basename "$$n" .texi`; \
+ d=`basename "$$b" .tely`; \
+ if [ -e "$$n" ] ; then \
+ $(EXTRACT_TEXI_FILENAMES) \
+ -I $(top-src-dir)/Documentation/ \
+ -I $(top-src-dir)/Documentation/"$$l" \
+ -I $(top-src-dir)/Documentation/"$$l"/"$$d"/ \
+ -I $(OUT) -o $(OUT) "$$n" ; \
+ fi ; \
+ done; \
+ done;
+
+
+
+website-texinfo: website-version website-xrefs
+ $(TEXI2HTML) --prefix=index \
+ --split=section \
+ --I=$(top-src-dir)/Documentation/ \
+ --I=$(OUT) \
+ --init-file=$(texi2html-init-file) \
+ -D web_version \
+ --output=$(OUT)/website/ \
+ $(top-src-dir)/Documentation/web.texi
+ # translations
+ for l in $(WEB_LANGS); do \
+ $(TEXI2HTML) --prefix=index \
+ --split=section \
+ --I=$(top-src-dir)/Documentation/"$$l" \
+ --I=$(top-src-dir)/Documentation/ \
+ --I=$(OUT) \
+ --lang="$$l" \
+ --init-file=$(texi2html-init-file) \
+ -D web_version \
+ --output=$(OUT)/"$$l" \
+ $(top-src-dir)/Documentation/"$$l"/web.texi ; \
+ find $(OUT)/$$l/ -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | sed 's!$(OUT)/'$$l'/!!g' | xargs $(MASS_LINK) --prepend-suffix .$$l hard $(OUT)/$$l/ $(OUT)/website/ ; \
+ done
+
+
+website-css:
+ cp $(top-src-dir)/Documentation/css/*.css $(OUT)/website/
+
+website-pictures:
+ mkdir -p $(OUT)/website/pictures/
+ cp $(PICTURES)/* $(OUT)/website/pictures/
+ ln -sf website/pictures $(OUT)/pictures
+
+website-examples:
+ mkdir -p $(OUT)/website/ly-examples
+ cp $(EXAMPLES)/* $(OUT)/website/ly-examples
+
+web-post:
+ $(WEB_POST) $(OUT)/website/
+
+website: website-texinfo website-css website-pictures website-examples web-post
+ cp $(SERVER_FILES)/favicon.ico $(OUT)/website/
+ cp $(SERVER_FILES)/robots.txt $(OUT)/website/
+ cp $(top-htaccess) $(OUT)/.htaccess
+ cp $(dir-htaccess) $(OUT)/website/.htaccess
+
+
save solfa_base_notewidth;
solfa_base_notewidth# := black_notehead_width#;
-solfa_whole_width := whole_notehead_width# / black_notehead_width#;
-solfa_half_width := half_notehead_width# / black_notehead_width#;
+solfa_whole_width := 1.0;
+solfa_half_width := 1.0;
solfa_quarter_width := 1.0;
def draw_do_head (expr width_factor, dir) =
fet_endchar;
+def draw_sol_head (expr filled) =
+ draw_outside_ellipse (1.53 - puff_up_factor / 3.0, 34, 0.66, 0.17);
+ if not filled:
+ undraw_inside_ellipse (3.25, 33, 0.81, 2.5 stafflinethickness#);
+ fi
+ draw_staff (-2, 2, 0);
+enddef;
+
+fet_beginchar ("Whole solhead", "s0sol");
+ draw_sol_head ( false);
+fet_endchar;
+
+
+fet_beginchar ("Half solhead", "s1sol");
+ draw_sol_head ( false);
+fet_endchar;
+
+
+fet_beginchar ("Quart solhead", "s2sol");
+ draw_sol_head ( true);
+fet_endchar;
+
+
+
+
+
def draw_la_head (expr width_factor) =
set_char_box (0, width_factor * solfa_base_notewidth#,
0.5 solfa_noteheight#, 0.5 solfa_noteheight#);
_ ("Unify fetaNumber and fetaDynamic encodings"))
def conv(str):
return re.sub(r'\bfeta(Number|Dynamic)', 'fetaText', str)
-
+
+@rule ((2, 13, 18),
+ _ ("\RemoveEmpty*StaffContext -> \*Staff \RemoveEmptyStaves"))
+def conv(str):
+ str = re.sub (r"\\RemoveEmpty(|Drum|Rhythmic|Tab)StaffContext",
+ r"\\\1Staff \\RemoveEmptyStaves",
+ str);
+ str = re.sub (r"\\AncientRemoveEmptyStaffContext",
+ r"\\VaticanaStaff \\RemoveEmptyStaves",
+ str);
+ return str
+
# Guidelines to write rules (please keep this at the end of this file)
#
# - keep at most one rule per version; if several conversions should be done,
(*indent*)
(first op)
(second op)))
- (reverse operations)))
+ operations))
(*indent*)))
(parameterize ((*current-context* ctype))
(music->lily-string music parser)))))
(repeat-count ,integer? "Do a @code{\\repeat} how often?")
(span-direction ,ly:dir? "Does this start or stop a spanner?")
- (span-type ,string? "What kind of spanner should be created? E.g. ligature
-for ligatures, or text or hairpin for (de-)crescendi.
-
-TODO: Consider making type into symbol.")
- (span-text ,string? "The displayed text for text spanners (e.g. cresc.)")
+ (span-type ,symbol? "What kind of dynamic spanner should be created?
+Options are @code{'text} and @code{'hairpin}.")
+ (span-text ,markup? "The displayed text for dynamic text spanners
+(e.g., cresc.)")
(split-list ,list? "Splitting moments for part combiner.")
(start-callback ,procedure? "Function to compute the negative length
of starting grace notes. This property can only be defined as initializer
in a part.")
(tempo-unit ,ly:duration? "The unit for the metronome count.")
(text ,markup? "Markup expression to be printed.")
- (text-type ,symbol?
- "Particular type of text script (e.g., finger, dynamic).")
(to-relative-callback ,procedure? "How to transform a piece of music
to relative pitches.")
(tonic ,ly:pitch? "Base of the scale.")
(LigatureEvent
. ((description . "Start or end a ligature.")
- (span-type . ligature)
(types . (general-music span-event ligature-event event))
))
;; Make a function that checks score element for being of a specific type.
(define-public (make-type-checker symbol)
(lambda (elt)
- (not (eq? #f (memq symbol (ly:grob-property elt 'interfaces))))))
+ (grob::has-interface elt symbol)))
(define-public ((outputproperty-compatibility func sym val) grob g-context ao-context)
(if (func grob)
# items.
langs = ['', 'es']
+# FIXME: `grep -nH -B1 translationof Documentation/<lang>/web/*'
+# gives us the correct node names.
translations = {
'es': {
'Source': 'Código fuente',
- 'Learning': 'Aprendizaj',
+ 'Learning': 'Aprendizaje',
'Music glossary': 'Glosario',
- 'Essay': 'a',
- 'Notation': 'b',
- 'Usage': 'c',
- 'Snippets': 'd',
- 'Web': 'e',
- 'Changes': 'f',
- 'Extending': 'g',
- 'Internals': 'h',
+ 'Essay': 'Ensayo',
+ 'Notation': 'Notación',
+ 'Usage': 'Utilización',
+ 'Snippets': 'Fragmentos',
+ 'Web': 'Web',
+ 'Changes': 'Cambios',
+ 'Extending': 'Extensión',
+ 'Internals': 'Funcionamiento interno',
'Contributor': 'Guía del colaborador',
# keep the spaces!
- ' (split HTML)': ' (muchas páginas HTML)',
- ' (big HTML)': ' (como una sola página HTML enorme)',
+ ' (split HTML)': ' (HTML seccionado)',
+ ' (big HTML)': ' (HTML monolítico)',
- 'Regression tests for ': 'aa ',
- 'PDF of regtests for ': 'bb ',
- 'MusicXML Regression tests for ': 'cc ',
- 'PDF of MusicXML regtests for ': 'dd ',
+ 'Regression tests for ': 'Pruebas de regresión para ',
+ 'PDF of regtests for ': 'Pruebas en PDF para ',
+ 'MusicXML Regression tests for ': 'Pruebas de regresión de MusicXML para ',
+ 'PDF of MusicXML regtests for ': 'Pruebas de MusicXML en PDF para ',
- 'Doc tarball for ': 'ee ',
- ' (did not exist in 2.12)': ' (existes la nottes e 2.12)',
+ 'Doc tarball for ': 'Tarball de la documentación para ',
+ ' (did not exist in 2.12)': ' (no existía en la versión 2.12)',
},
'fr': {
'Learning': 'Apprener?',
'Music glossary': 'Lizes ici pour les motes?',
},
+ 'nl': {
+ 'Source': 'Broncode',
+
+ 'Learning': 'Beginnen',
+ 'Music glossary': 'Terminologie',
+ 'Essay': 'Essay',
+ 'Notation': 'Notatie',
+ 'Usage': 'Gebruik',
+ 'Snippets': 'Snippers',
+ 'Web': 'Web',
+ 'Changes': 'Veranderingen',
+ 'Extending': 'Uitbreidingen',
+ 'Internals': 'Internals',
+ 'Contributor': 'Contributor',
+
+# keep the spaces!
+ ' (split HTML)': ' (opgesplitste HTML)',
+ ' (big HTML)': ' (grote pagina HTML)',
+
+ 'Regression tests for ': 'Regressietesten voor ',
+ 'PDF of regtests for ': 'PDF van regressietesten voor ',
+ 'MusicXML Regression tests for ': 'MusicXML regressietesten voor ',
+ 'PDF of MusicXML regtests for ': 'MusicXML regressietesten voor ',
+
+ 'Doc tarball for ': 'Tarball met documentation voor ',
+ ' (did not exist in 2.12)': ' (bestond nog niet in 2.12)',
+ },
}
def make_manual_links(name, version, lang):
+ """Here is where all the macros manualStableLearningSplit,
+ manualStableLearningBig, manualStableLearningSplitNoName, etc. are
+ created on the fly. Hopefully this documentation string will help
+ others a bit while grepping for those.
+ """
for m in manuals:
manual = m
# TODO: this is a stupid way of doing it
newurl = url + '/index.html'
make_ver_link(macroLang("manual"+name+mshort+'SplitNoName',lang),
newurl,
- manual.capitalize())
+ getTrans(manual.capitalize(),lang))
def make_regtest_links(name, version, lang):
ver_split = version.split('.')
import glob
import re
-###### Translation data
-lang_lookup = {
- 'fr': 'français',
- 'es': 'español',
- '': 'english'
-}
-
-lang_other_langs = {
- 'es': 'Otros idiomas: ',
- 'fr': 'Autres langues : ',
- '': 'Other languages: '
-}
+###### Translation data, move out, see create-weblinks-itexi.py
+translations = {
+ 'de': {
+ 'English': 'Deutsch',
+ 'Other languages': 'Andere Sprachen',
+ },
+ 'es': {
+ 'English': 'Español',
+ 'Other languages': 'Otros idiomas',
+ },
+ 'fr': {
+ 'English': 'Français',
+ 'Other languages': 'Autres langues',
+ },
+ 'hu': {
+ 'English': 'Magyar',
+ 'Other languages': 'Más nyelvek',
+ },
+ 'ja': {
+ 'English': 'Japanese',
+ 'Other languages': '他の言語',
+ },
+ 'nl': {
+ 'English': 'Nederlands',
+ 'Other languages': 'Andere talen',
+ },
+ }
+
+# needs at least: make -C po or make- C Documentation/po
+HAVE_GETTEXT = False
+
+#### this breaks on lilypond.org
+# Keep some freakin' gettext compatibility
+#if HAVE_GETTEXT:
+# import lilylib as ly;
+# global _;_=ly._
+#else: # poor mans translation
+# def _ (string, lang=os.environ['LANG']):
+# return translations.get (lang.split ('_')[0], {}).get (string, string)
+
+#### this works on lilypond.org
+def _ (string, lang):
+ return translations.get (lang.split ('_')[0], {}).get (string, string)
+
exclude_manuals = [
'/music-glossary',
# it's a translation
lang = file_split[1]
# make sure it's a translated language
- if (not (lang == "en")):
+ if lang != "en":
langs_set.add(lang)
langs = list(langs_set)
langs.sort()
text += "." + ext
return text
-def makeFooter(filename, currentLang):
- text = "<p id=\"languages\">\n"
- text += lang_other_langs[currentLang]
- for i in range(len(langs)):
- lang = langs[i]
- if (lang == currentLang):
- continue
- text += "<a href=\""
- text += addLangExt(filename, lang, "html")
- text += "\">"
- text += lang_lookup[lang]
- text += "</a>"
- if (i < len(langs)-2):
- text += ", "
- else:
- text += ".\n"
+def makeFooter (filename, currentLang):
# TODO: add link to automatic language selection?
# still need to include this page in the new webpages somewhere
- text += "</p>\n"
- return text
+ footer = '''<p id="languages">
+%(other)s: %(lst)s.
+</p>
+'''
+ def link (lang):
+ str = '''<a href="%(file_name)s">%(language_name)s</a>'''
+ file_name = addLangExt (filename, lang, 'html')
+ language_name = _ ('English', lang)
+ return str % locals ()
+ lst = ', '.join ([link (lang) for lang in langs if lang != currentLang])
+ other = _ ('Other languages', currentLang)
+ return footer % locals ()
def getLocalHref(line):
match = re.search(r'href=[\'"]?([^\'" >]+)', line)
os.remove(file)
outfile = open(file, 'w')
- lang_footer = makeFooter(file_base, lang)
-
+ lang_footer = makeFooter (file_base, lang)
### alter file
for line in lines:
+++ /dev/null
-################################################################
-# website (without the rest of the docs)
-
-################################################################
-##### SECURITY -- check these values for lilypond.org #########
-################################################################
-ifeq ($(WEBSITE_ONLY_BUILD),1)
- ### for lilypond.org
- top-src-dir=$(HOME)/src/lilypond
- depth=.
- trusted-dir=$(HOME)/lilypond/trusted-scripts
- script-dir=$(trusted-dir)
- texi2html-init-file=$(trusted-dir)/lilypond-texi2html.init
- top-htaccess=$(trusted-dir)/lilypond.org.htaccess
- dir-htaccess=$(trusted-dir)/website-dir.htaccess
- TEXI2HTML_PROGRAM=$(HOME)/usr/bin/texi2html
- EXAMPLES=$(HOME)/media/ly-examples/
- PICTURES=$(HOME)/media/pictures
-else
- ### for normal git
- script-dir=$(top-src-dir)/scripts/build/
- texi2html-init-file=$(top-src-dir)/Documentation/lilypond-texi2html.init
- top-htaccess=$(top-src-dir)/Documentation/web/server/lilypond.org.htaccess
- dir-htaccess=$(top-src-dir)/Documentation/web/server/website-dir.htaccess
- include $(config_make)
- # I assume this is run from top-build-dir
- EXAMPLES=Documentation/web/ly-examples/out-www/
- PICTURES=Documentation/pictures/out-www/
-endif
-
-
-################################################################
-OUT=out-website
-WEB_LANGS=es
-
-
-TEXI2HTML=ONLY_WEB=1 TOP_SRC_DIR=$(top-src-dir) DEPTH=$(depth) PERL_UNICODE=SD $(TEXI2HTML_PROGRAM)
-
-EXTRACT_TEXI_FILENAMES=python $(script-dir)/extract_texi_filenames.py
-CREATE_VERSION=python $(script-dir)/create-version-itexi.py
-CREATE_WEBLINKS=python $(script-dir)/create-weblinks-itexi.py
-MASS_LINK=python $(script-dir)/mass-link.py
-WEB_POST=python $(script-dir)/website_post.py
-
-SERVER_FILES=$(top-src-dir)/Documentation/web/server/
-
-# don't include web
-MANUALS=$(wildcard $(top-src-dir)/Documentation/*.tely)
-MANUALS+=$(top-src-dir)/Documentation/contributor.texi
-
-website-test:
- echo $(TEXI2HTML)
-
-website-version:
- mkdir -p $(OUT)
- $(CREATE_VERSION) $(top-src-dir) > $(OUT)/version.itexi
- $(CREATE_WEBLINKS) $(top-src-dir) > $(OUT)/weblinks.itexi
-
-website-xrefs: website-version
- $(EXTRACT_TEXI_FILENAMES) -I $(top-src-dir)/Documentation/ \
- -I $(OUT) -o $(OUT) --split=node \
- $(top-src-dir)/Documentation/web.texi
- # normal manuals
- for m in $(MANUALS); do \
- b=`basename "$$m" .texi`; \
- d=`basename "$$b" .tely`; \
- $(EXTRACT_TEXI_FILENAMES) \
- -I $(top-src-dir)/Documentation/ \
- -I $(top-src-dir)/Documentation/"$$d"/ \
- -I $(OUT) -o $(OUT) "$$m" ; \
- done
- # translations
- for l in $(WEB_LANGS); do \
- $(EXTRACT_TEXI_FILENAMES) \
- -I $(top-src-dir)/Documentation/ \
- -I $(top-src-dir)/Documentation/"$$l" \
- -I $(OUT) -o $(OUT) --split=node \
- $(top-src-dir)/Documentation/"$$l"/web.texi ;\
- for m in $(MANUALS); do \
- n=`echo "$$m" | sed 's/Documentation/Documentation\/'$$l'/'` ; \
- b=`basename "$$n" .texi`; \
- d=`basename "$$b" .tely`; \
- if [ -e "$$n" ] ; then \
- $(EXTRACT_TEXI_FILENAMES) \
- -I $(top-src-dir)/Documentation/ \
- -I $(top-src-dir)/Documentation/"$$l" \
- -I $(top-src-dir)/Documentation/"$$l"/"$$d"/ \
- -I $(OUT) -o $(OUT) "$$n" ; \
- fi ; \
- done; \
- done;
-
-
-
-website-texinfo: website-version website-xrefs
- $(TEXI2HTML) --prefix=index \
- --split=section \
- --I=$(top-src-dir)/Documentation/ \
- --I=$(OUT) \
- --init-file=$(texi2html-init-file) \
- -D web_version \
- --output=$(OUT)/website/ \
- $(top-src-dir)/Documentation/web.texi
- # translations
- for l in $(WEB_LANGS); do \
- $(TEXI2HTML) --prefix=index \
- --split=section \
- --I=$(top-src-dir)/Documentation/"$$l" \
- --I=$(top-src-dir)/Documentation/ \
- --I=$(OUT) \
- --lang="$$l" \
- --init-file=$(texi2html-init-file) \
- -D web_version \
- --output=$(OUT)/"$$l" \
- $(top-src-dir)/Documentation/"$$l"/web.texi ; \
- find $(OUT)/$$l/ -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | sed 's!$(OUT)/'$$l'/!!g' | xargs $(MASS_LINK) --prepend-suffix .$$l hard $(OUT)/$$l/ $(OUT)/website/ ; \
- done
-
-
-website-css:
- cp $(top-src-dir)/Documentation/css/*.css $(OUT)/website/
-
-website-pictures:
- mkdir -p $(OUT)/website/pictures/
- cp $(PICTURES)/* $(OUT)/website/pictures/
- ln -sf website/pictures $(OUT)/pictures
-
-website-examples:
- mkdir -p $(OUT)/website/ly-examples
- cp $(EXAMPLES)/* $(OUT)/website/ly-examples
-
-web-post:
- $(WEB_POST) $(OUT)/website/
-
-website: website-texinfo website-css website-pictures website-examples web-post
- cp $(SERVER_FILES)/favicon.ico $(OUT)/website/
- cp $(SERVER_FILES)/robots.txt $(OUT)/website/
- cp $(top-htaccess) $(OUT)/.htaccess
- cp $(dir-htaccess) $(OUT)/website/.htaccess
-
-