Andrew Hawryluk <ahawryluk@gmail.com>
+Andrew Hawryluk <andrew@obi-wan.(none)>
Andrew Wilson <andrew@rivendale.net>
Arjan Bos <arjan.bos@hetnet.nl>
Carl D. Sorensen <carldsorensen>
Daniel Tonda Castillo <daniel.tonda@gmail.com>
Dieter Grollmann <groll-ay@bluewin.ch>
Ed Catmur <ed@capella.catmur.co.uk>
+Erik Sandberg <erik>
Erlend Aasland <erlenda>
Erlend Aasland <erlend.aasland@mac.com>
Erlend Aasland <erlenda@gmail.com>
Erlend Aasland <erlend@iMac.local>
Eyolf Østrem <eyolf@oestrem.com>
-Francisco Vila <francisco.vila@hispalinux.es>
+Francisco Vila <francisco.vila@hispalinux.es> # AKA Paco Vila
+Francisco Vila <fravd@salvia.(none)>
+Francisco Vila <fravd@salvia.org>
Francisco Vila <paconet.org@gmail.com>
-Frederic Bron <frederic.bron@m4x.org>
+Frédéric Bron <frederic.bron@m4x.org>
Graham Percival <gpercival>
+Graham Percival <gperciva@gperciva-desktop.(none)>
Graham Percival <gperciva@opihi.cs.uvic.ca>
Graham Percival <gperciva@p214-046.public.uvic.ca>
Graham Percival <gperciva@p214-056.public.uvic.ca>
Graham Percival <gperciva@tsubasa.(none)>
Graham Percival <gpermus@gmail.com>
Graham Percival <graham@percival-music.ca>
+Graham Percival <lilypond@server.kainhofer.com>
+Graham Percival <root@tsubasa.(none)>
Hajo Dezelski <dl1sdz@gmail.com>
+Han-Wen Nienhuys and Jan Nieuwenhuizen <fred> # see note below
Han-Wen Nienhuys <hanwen>
Han-Wen Nienhuys <hanwen@lilypond.org>
Han-Wen Nienhuys <hanwen@xs4all.nl>
+Han-Wen Nienhuys <uid67283> #?
Heikki Junes <hjunes>
Heikki Junes <hjunes@gmail.com>
Heikki Junes <hjunes@hjunes-laptop.(none)>
Jonathan Kulp <jon@bashtop.(none)>
Jonathan Kulp <jonlancekulp@gmail.com>
Joseph Wakeling <joseph.wakeling@webdrake.net>
+Jürgen Reuter <reuter>
+Jürgen Reuter <reuter@ipd.uka.de>
Kevin Dalley <kevin@kelphead.org>
Kieren MacMillan <kieren_macmillan@sympatico.ca>
Kurt Kroon <kroon@winfirst.com>
Maximilian Albert <cilix@daphne.(none)>
Maximilian Albert <cilix@dike.(none)>
Maximilian Albert <maximilian.albert@gmail.com>
+Maximiliano GarcÃa de Veas <maxi@intelacer.(none)>
+Maximiliano GarcÃa de Veas <mxgdvg@yahoo.it>
Michael Käppler <xmichael-k@web.de>
Michael Welsh Duggan <md5i@maru.(none)>
Milan Zamazal <pdm@brailcom.org>
Nicolas Sceaux <nicolas@robert.local>
Nicolas Sceaux <nicolas.sceaux@free.fr>
Nicolas Sceaux <nsceaux>
-Paco Vila <francisco.vila@hispalinux.es>
-Paco Vila <fravd@salvia.(none)>
-Paco Vila <fravd@salvia.org>
Patrick McCarty <pnorcks@gmail.com>
Paul Jarc <prj@po.cwru.edu>
+Pedro Kroger <kroger>
Ralph Palmer <palmeer.r.violin@gmail.com>
Ralph Palmer <palmer.r.violin@gmail.com>
Ralph Palmer <palmer.r.violin@treda.co.uk>
Rune Zedeler <rune@zedeler.dk>
Rune Zedeler <rz>
Rune Zedeler <rz@daimi.au.dk>
-Sawada Yoshiki <sawada@ubuntu.ubuntu-domain>
-Sawada Yoshiki <sawada.yoshiki@gmail.com>
Simon Bailey <binabik@gmail.com>
Simon Bailey <binabik@pc6143-c703.uibk.ac.at>
Stefan Weil <weil@mail.berlios.de>
Werner Lemberg <wl@rigel.site>
Wilbert Berendsen <lilykde@xs4all.nl>
Wilbert Berendsen <wbsoft@xs4all.nl>
+Yoshiki Sawada <sawada@ubuntu.ubuntu-domain>
+Yoshiki Sawada <sawada.yoshiki@gmail.com>
-
-
-Maximiliano <maxi@intelacer.(none)>
-Maximiliano <mxgdvg@yahoo.it>
-Lilypond GDP <lilypond@server.kainhofer.com>
-kroger <kroger>
-reuter <reuter>
-root <root@tsubasa.(none)>
-andrew <andrew@obi-wan.(none)>
-erik <erik>
-fred <fred>
-uid67283 <uid67283>
+# Note on <fred>: http://lists.gnu.org/archive/html/lilypond-devel/2009-02/msg00035.html
NAME = documentation
LANGS = $(shell $(PYTHON) $(top-src-dir)/python/langdefs.py)
MANUALS_SUBDIRS = application automated-engraving contributor essay general learning notation
-SUBDIRS = $(MANUALS_SUBDIRS) snippets logo pictures misc po css $(LANGS)
+SUBDIRS = $(MANUALS_SUBDIRS) snippets logo pictures misc po css topdocs $(LANGS)
STEPMAKE_TEMPLATES = documentation texinfo tex omf
LOCALSTEPMAKE_TEMPLATES = lilypond ly
IN_ITELY_FILES = $(call src-wildcard,snippets/*-intro.itely)
SNIPPET_LY_FILES = $(call src-wildcard,snippets/*.ly)
-EXTRA_DIST_FILES = $(call src-wildcard,*.init) $(LATEX_FILES)
+EXTRA_DIST_FILES = $(call src-wildcard,*.init) $(LATEX_FILES) \
+ search-box.html
### Out files
@settitle LilyPond Application usage
@documentencoding UTF-8
@documentlanguage en
+@afourpaper
@macro manualIntro
This file explains how to execute the programs distributed with
@documentencoding utf-8
@documentlanguage en
+@afourpaper
@finalout
@settitle LilyPond Contributor's Guide
@documentencoding UTF-8
@documentlanguage en
+@afourpaper
@macro manualIntro
This manual documents contributing to LilyPond version
exec /usr/bin/pngtopnm "$@"
@end verbatim
-On MacOS X, I use this:
+On MacOS X with fink, I use this:
@verbatim
export DYLD_LIBRARY_PATH=/sw/lib
exec /sw/bin/pngtopnm "$@"
@end verbatim
+On MacOS X with macports, you should use this:
+
+@verbatim
+export DYLD_LIBRARY_PATH=/opt/local/lib
+exec /opt/local/bin/pngtopnm "$@"
+@end verbatim
+
@node Testing LilyPond
@c and in Introduction to Git concepts
@smallexample
mkdir lilypond; cd lilypond
-git init-db
+git init
git remote add -f -t master -m master origin git://git.sv.gnu.org/lilypond.git/
git checkout -b master origin/master
@end smallexample
@smallexample
mkdir lilypond-translation; cd lilypond-translation
-git init-db
+git init
git remote add -f -t lilypond/translation -m lilypond/translation origin git://git.sv.gnu.org/lilypond.git/
git checkout -b lilypond/translation origin/lilypond/translation
@end smallexample
depth = ../..
STEPMAKE_TEMPLATES=documentation
+EXTRA_DIST_FILES = $(call src-wildcard,*.css)
include $(depth)/make/stepmake.make
ISOLANG = de
depth = ../..
-SUBDIRS = application learning notation texidocs
+SUBDIRS = application learning notation texidocs essay
STEPMAKE_TEMPLATES = documentation
LOCALSTEPMAKE_TEMPLATES = lilypond ly doc-i18n-root
-depth = ../..
+depth = ../../..
LOCALSTEPMAKE_TEMPLATES = ly
@settitle LilyPond Notation Reference
@documentencoding UTF-8
@documentlanguage en
+@afourpaper
@macro manualIntro
This essay discusses automatic music engraving functions within
STEPMAKE_TEMPLATES = documentation
LOCALSTEPMAKE_TEMPLATES = lilypond ly doc-i18n-root
+EXTRA_DIST_FILES = general.texi
+
include $(depth)/make/stepmake.make
@settitle LilyPond -- Music notation for everyone
@documentencoding UTF-8
@documentlanguage en
+@afourpaper
@set web
@include macros.itexi
@subsubheading Stable
-@ref{Download, Download 2.12.3}
+@ref{Download, Download @versionStable}
-@ref{Manuals, Manuals 2.12.3}
+@ref{Manuals, Manuals @versionStable}
@subsubheading Unstable
-@ref{Development, Download 2.13.2}
+@ref{Development, Download @versionDevel}
-@ref{Development, Manuals 2.13.2}
+@ref{Development, Manuals @versionDevel}
@divEnd
--- /dev/null
+@c -*- coding: utf-8; mode: texinfo; -*-
+@c This file is part of community.itexi and ../topdocs/AUTHORS.itexi
+
+@ignore
+
+ This file lists authors of LilyPond, and what they wrote. Each
+ list is sorted alphabetically by surname. This file lists people
+ that have contributed more than a few hours of work.
+
+ Developers are people who are (or have been) listed under the
+ "Development Team" in the THANKS, and can choose their own
+ titles. Contributors are everybody else, and simply list their
+ contributions.
+
+ Anybody who has finished doing a "main devel team" task should
+ list it under developersPrevious, even if they're still doing
+ other "main devel team" stuff. See "Graham Percival" for an
+ example.
+
+ Contributors are split into:
+ ...Core (programming)
+ ...Font (duh)
+ ...Doc (documentation and examples)
+ ...Support (building, distributions, editors,
+ lilypond-book, LSR, but *not* answering emails)
+ ...Translations (duh)
+ We might add a "general" or "other" if there's something else.
+
+
+@end ignore
+
+@macro developersCurrent
+
+@itemize
+
+@item Mats Bengtsson:
+Support guru.
+
+@item Han-Wen Nienhuys:
+Main author.
+
+@item Jan Nieuwenhuizen:
+Main author.
+
+@item @uref{http://percival-music.ca, Graham Percival}:
+Project Manager.
+
+@end itemize
+@end macro
+
+
+
+@macro developersPrevious
+
+@itemize
+@item Pedro Kroeger:
+Build meister
+
+@item Erik Sandberg:
+Bug meister
+
+@end itemize
+@end macro
+
+
+
+@macro contributorsCore
+
+@itemize
+@item Erlend Aasland:
+Color support, tablature improvements, trivial @code{\\mark} stuff,
+al-niente hairpins.
+
+@end itemize
+@end macro
+
+
+
+@macro contributorsFont
+
+@itemize
+@item @uref{http://www.juergen-reuter.de, Jürgen Reuter}:
+Ancient notation font Exact Type1 font outlines for feta,
+feta-alphabet.
+
+@end itemize
+@end macro
+
+
+
+@macro contributorsDoc
+
+@itemize
+@item @uref{http://www.s3.kth.se/~mabe/, Mats Bengtsson}:
+Example files, documentation
+
+
+@end itemize
+@end macro
+
+
+
+@macro contributorsSupport
+
+@itemize
+@item Anthony Fok:
+Debian package: @file{debian/*}.
+
+@end itemize
+@end macro
+
+
+
+@macro contributorsTranslations
+
+@itemize
+@item Bjoern Jacke:
+German glossary translations.
+
+
+@end itemize
+@end macro
+
+
+
+
+@ignore
+ OLD MATERIAL
+
+Core code:
+
+@itemize @bullet
+@item @email{erlenda@@gmail.com,Erlend Aasland}
+ Color support, tablature improvements, trivial \mark stuff,
+al-niente hairpins.
+
+@item @email{benkop@@freestart.hu,Pal Benko},
+ Ancient notation.
+@item @email{jch@@pps.jussieu.fr, Juliusz Chroboczek},
+ Type42 code.
+@item @email{david.feuer@@gmail.com, David Feuer},
+ PS output code refactoring.
+@item @email{bernard@@fong-hurley.org.uk, Bernard Hurley},
+ X11 color.
+@item @email{chris@@fluffhouse.org.uk, Chris Jackson},
+ Piano pedals, directed arpeggios.
+@item @email{heikki.junes@@hut.fi, Heikki Junes},
+ Fine tuning for quarter tones in midi output.
+@item @email{reinhold@@kainhofer.com, Reinhold Kainhofer},
+ @uref{http://reinhold.kainhofer.com},
+ Musicxml2ly development, various features and fixes.
+@item @email{m.krause@@tu-harburg.de, Michael Krause},
+ Breathing signs.
+@item @email{jiba@@tuxfamily.org, Jean-Baptiste Lamy},
+ Tablature support.
+@item @email{wl@@gnu.org, Werner Lemberg},
+ @TeX{} glue code.
+@item @email{joeneeman@@gmail.com, Joe Neeman},
+ Constrained line breaking.
+@item @email{hanwen@@xs4all.nl, Han-Wen Nienhuys},
+ @uref{http://www.xs4all.nl/~hanwen/},
+ Main author.
+
+@item @email{janneke@@gnu.org, Jan Nieuwenhuizen},
+ @uref{http://www.xs4all.nl/~jantien/},
+ Main author.
+@item @email{reuter_j@@web.de, Jürgen Reuter},
+ @uref{http://www.juergen-reuter.de},
+ Ancient notation support (mensural notation,
+ Gregorian chant notation), ambitus, clusters.
+@item @email{nicolas.sceaux@@free.fr, Nicolas Sceaux},
+ Scheme macros, \markup syntax.
+@item @email{c_sorensen@@byu.edu, Carl Sorensen},
+ Fret diagrams.
+@item @email{, Rune Zedeler},
+ Auto-accidental code, zigzag glissandi, rest bugfixes, minimum
+ fret, @code{subdivideBeams}.
+@end itemize
+
+Font
+
+@itemize @bullet
+
+@item @email{reuter_j@@web.de, Jürgen Reuter},
+ @uref{http://www.juergen-reuter.de},
+ Ancient notation font
+ Exact Type1 font outlines for feta, feta-alphabet.
+@item @email{chris@@fluffhouse.org.uk, Chris Jackson},
+ Arpeggio arrow
+@item @email{, Rune Zedeler},
+ 16th and shorter rests,
+@item @email{hanwen@@xs4all.nl, Han-Wen Nienhuys},
+ @uref{http://www.xs4all.nl/~hanwen/},
+ Main author.
+@item @email{janneke@@gnu.org, Jan Nieuwenhuizen},
+ @uref{http://www.xs4all.nl/~jantien/},
+ Main author.
+@item @email{tca@@gnu.org, Tom Cato Amundsen},
+ Accordion symbols.
+@item @email{arno@@arnowaschk.de, Arno Waschk},
+ "espressivo" mark.
+@end itemize
+
+
+Documentation and examples
+
+@itemize
+@item @email{mats.bengtsson@@s3.kth.se, Mats Bengtsson},
+ @uref{http://www.s3.kth.se/~mabe/},
+ Example files, documentation
+@item @email{heikki.junes@@hut.fi, Heikki Junes},
+ Cleanups in docs and example files.
+@item @email{john.mandereau@@free.fr, John Mandereau},
+ Internationalization.
+@item @email{scancm@@biobase.dk, Christian Mondrup},
+ Glossary.
+@item @email{hanwen@@xs4all.nl, Han-Wen Nienhuys},
+ @uref{http://www.xs4all.nl/~hanwen/},
+ Main author.
+@item @email{janneke@@gnu.org, Jan Nieuwenhuizen},
+ @uref{http://www.xs4all.nl/~jantien/},
+ Main author.
+@item @email{gpermus@@gmail.com, Graham Percival},
+ @uref{http://percival-music.ca},
+ Documentation Editor.
+@item @email{pinard@@iro.umontreal.ca, François Pinard},
+ @uref{http://www.iro.umontreal.ca/~pinard/},
+ Parts of Documentation/user/glossary*, started
+ internationalization stuff.
+@item @email{, Rune Zedeler},
+ Schumann example.
+@end itemize
+
+Support (distributions, editor support, lilypond-book)
+
+@itemize
+@item @email{foka@@debian.org, Anthony Fok},
+ Debian package: debian/*.
+@item @email{chris@@fluffhouse.org.uk, Chris Jackson},
+ Emacs mode indentation.
+@item @email{heikki.junes@@hut.fi, Heikki Junes},
+ Major Emacs- and Vim-mode updates.
+@item @email{svoboda@@cmu.edu, David Svoboda},
+ what-beat emacs module.
+@end itemize
+
+
+Translations
+
+@itemize
+@item @email{bjoern.jacke@@gmx.de, Bjoern Jacke},
+ German glossary translations.
+@item @email{nj104@@cus.cam.ac.uk, Neil Jerram},
+ Glossary translations.
+@item @email{heikki.junes@@hut.fi, Heikki Junes},
+ Finnish translations.
+@item @email{tdm@@dds.nl, Tineke de Munnik},
+ Dutch website translation.
+@item @email{august@@infran.ru, August S. Sigov},
+ Russian translation.
+@item @email{, David González},
+ Spanish glossary translations.
+@item @email{ngclaude@@123mail.org, Nicolas Grandclaude},
+ French documentation translation.
+@item @email{lolyfan@@wanadoo.fr, Jean-Charles Malahieude},
+ French translation of messages, website and documentation.
+@item @email{john.mandereau@@free.fr, John Mandereau},
+ French translation of messages, website and documentation
+@item @email{gauvainpocentek@@yahoo.fr, Gauvain Pocentek},
+ French website translation.
+@item @email{ludovicsardain@@gmail.com, Ludovic Sardain},
+ French documentation translation.
+@end itemize
+
+@end ignore
+
version that you are working on. See TRANSLATION for details.
@end ignore
+@include general/basic-authors.itexi
+
@node Community
@unnumbered Community
@node Authors
@unnumberedsec Authors
+@help{Under construction; this is not an accurate list!}
+
combo of:
http://lilypond.org/web/about/thanks
http://lilypond.org/web/switch/
+@divClass{column-left-top}
+@subheading Current Development Team
+
+@divClass{keep-bullets}
+@developersCurrent
+@divEnd
+@divEnd
+
+@divClass{column-right-top}
+@subheading Previous Development Team Positions
+
+@divClass{keep-bullets}
+@developersPrevious
+@divEnd
+@divEnd
+
+
+@divClass{column-center-bottom}
+@subheading Programming contributors
+
+@divClass{keep-bullets}
+@contributorsCore
+
+@subheading Font contributors
+
+@contributorsFont
+
+@subheading Documentation contributors
+
+@contributorsDoc
+
+@subheading Support contributors
+
+@contributorsSupport
+
+@subheading Translation contributors
+
+@contributorsTranslations
+
+@divEnd
+@divEnd
+
@node Publications
@unnumberedsec Publications
@divClass{column-center-top}
-
@subheading What we wrote
@divClass{keep-bullets}
@unnumbered Download
@divClass{heading-center}
-@heading Downloads for LilyPond 2.12.2
+@heading Downloads for LilyPond @versionStable
@divEnd
@subheading Software License
-LilyPond is published under the @ref{GPL, GNU General Public
-License}.
+LilyPond is published under the
+@ref{GPL, GNU General Public License}.
@divEnd
@item
@sourceimage{logo-linux,,,}
-@uref{http://download.linuxaudio.org/lilypond/binaries/linux-x86/lilypond-2.12.2-1.linux-x86.sh,
-Linux x86: LilyPond 2.12.2} (if in doubt, use this)
+@downloadStableLinux
+(if in doubt, use this)
@item
@sourceimage{logo-linux,,,}
-@uref{http://download.linuxaudio.org/lilypond/binaries/linux-64/lilypond-2.12.2-1.linux-64.sh,
-Linux 64-bit: LilyPond 2.12.2}
+@c @uref{http://download.linuxaudio.org/lilypond/binaries/linux-64/lilypond-@versionStable{}-1.linux-64.sh,
+@c Linux 64-bit: LilyPond @versionStable{}}
@item
@sourceimage{logo-linux,,,}
-@uref{http://download.linuxaudio.org/lilypond/binaries/linux-ppc/lilypond-2.12.2-1.linux-ppc.sh,
-Linux PPC: LilyPond 2.12.2}
+@c @uref{http://download.linuxaudio.org/lilypond/binaries/linux-ppc/lilypond-@versionStable{}-1.linux-ppc.sh,
+@c Linux PPC: LilyPond @versionStable{}}
@item
@sourceimage{logo-freebsd,,,}
-@uref{http://download.linuxaudio.org/lilypond/binaries/freebsd-x86/lilypond-2.12.2-1.freebsd-x86.sh,
-FreeBSD i386: LilyPond 2.12.2}
+@c @uref{http://download.linuxaudio.org/lilypond/binaries/freebsd-x86/lilypond-@versionStable{}-1.freebsd-x86.sh,
+@c FreeBSD i386: LilyPond @versionStable{}}
@item
@sourceimage{logo-freebsd,,,}
-@uref{http://download.linuxaudio.org/lilypond/binaries/freebsd-64/lilypond-2.12.2-1.freebsd-64.sh,
-FreeBSD amd64: LilyPond 2.12.2}
+@c @uref{http://download.linuxaudio.org/lilypond/binaries/freebsd-64/lilypond-@versionStable{}-1.freebsd-64.sh,
+@c FreeBSD amd64: LilyPond @versionStable{}}
@end itemize
@example
cd PATH-TO-DOWNLOAD-DIRECTORY
-sh lilypond-X.Y.Z-EXAMPLE.sh
+sh lilypond-@versionStable{}-OS-TYPE.sh
@end example
@subsubheading Uninstall
@item
@sourceimage{logo-macosx,,,}
-@uref{
-http://download.linuxaudio.org/lilypond/binaries/darwin-x86/lilypond-2.12.2-1.darwin-x86.tar.bz2,
-lilypond-2.12.2-1.darwin-x86.tar.bz2}
+@c @uref{
+@c http://download.linuxaudio.org/lilypond/binaries/darwin-x86/lilypond-@versionStable{}-1.darwin-x86.tar.bz2,
+@c lilypond-@versionStable{}.darwin-x86.tar.bz2}
For Intel chips (if in doubt, use this).
@item
@sourceimage{logo-macosx,,,}
-@uref{
-http://download.linuxaudio.org/lilypond/binaries/darwin-x86/lilypond-2.12.2-1.darwin-ppc.tar.bz2,
-lilypond-2.12.2-1.darwin-ppc.tar.bz2}
+@c @uref{
+@c http://download.linuxaudio.org/lilypond/binaries/darwin-x86/lilypond-@versionStable{}-1.darwin-ppc.tar.bz2,
+@c lilypond-@versionStable{}.darwin-ppc.tar.bz2}
For G3 and G4 CPUs (old Apple computers).
@end itemize
@item
@sourceimage{logo-windows,,,}
-@uref{
-http://download.linuxaudio.org/lilypond/binaries/mingw/lilypond-2.12.2-1.mingw.exe,
-lilypond-2.12.2-1.mingw-exe}
+@c @uref{
+@c http://download.linuxaudio.org/lilypond/binaries/mingw/lilypond-@versionStable{}-1.mingw.exe,
+@c lilypond-@versionStable{}.mingw-exe}
For Windows ME, NT, 2000, XP, and Vista.
@end itemize
@divClass{column-left-bottom}
@subheading Source tarball
-@uref{http://download.linuxaudio.org/lilypond/sources/v2.12/lilypond-2.12.2.tar.gz,
-lilypond-2.12.2-source.tar.bz2}
+@c FIXME link @uref{http://download.linuxaudio.org/lilypond/sources/v2.12/lilypond-@versionStable{}.tar.gz,
+@c lilypond-@versionStable{}-source.tar.bz2}
For an extensive listing of all versions (old and new), see our
@uref{http://download.linuxaudio.org/lilypond/binaries/, download
+\version "2.12.0"
{
c'4^"NO EXAMPLE HERE YET"
}
@unnumbered Manuals
@divClass{heading-center}
-@heading Documentation for LilyPond 2.12.2
+@heading Documentation for LilyPond @version
@divEnd
@settitle LilyPond Learning Manual
@documentencoding UTF-8
@documentlanguage en
+@afourpaper
@macro manualIntro
This file provides an introduction to LilyPond version
@code{grob-interface} and so is a property of all layout objects.
By default it is set to @code{#f} for all within-staff objects,
and to a numerical value appropriate to each outside-staff object
-when the object is created. The following table shows
-the default numerical values for some of the commonest
-outside-staff objects which are, by default, placed in the
-@code{Staff} or @code{Voice} contexts.
+when the object is created. The following table shows the default
+numerical values for some of the commonest outside-staff objects
+which are, by default, placed in the @code{Staff} or @code{Voice}
+contexts.
+
+@cindex spanners
+
+Note the unusual names for some of the objects: spanner objects
+are automatically created to control the vertical positioning of
+grobs which (might) start and end at different musical moments, so
+changing the @code{outside-staff-priority} of the underlying grob
+will have no effect. For example, changing
+@code{outside-staff-priority} of the @code{Hairpin} object will
+have no effect on the vertical positioning of hairpins -- you must
+change @code{outside-staff-priority} of the associated
+@code{DynamicLineSpanner} object instead. This override must be
+placed at the start of the spanner, which might include several
+linked hairpins and dynamics.
@multitable @columnfractions .3 .3 .3
@headitem Layout Object
% Start Ottava Bracket
\ottava #1
c' \startTextSpan
-% Add Dynamic Text
-c\pp
-% Add Dynamic Line Spanner
-c\<
+% Add Dynamic Text and hairpin
+c\pp\<
+c
% Add Text Script
c^Text
c c
-% Add Dynamic Text
+% Add Dynamic Text and terminate hairpin
c\ff c \stopTextSpan
% Stop Ottava Bracket
\ottava #0
@c The following should appear as music without code
@c This example should not be indexed
-@lilypond[quote,ragged-right]
+@c line-width ensures no break
+@lilypond[quote,ragged-right,line-width=5.5\in]
rhMusic = \relative c'' {
r2
c4.\( g8 |
\mergeDifferentlyDottedOn
bes2.^\markup {\bold "Moderato"} r8
<<
- {c,8[ d fis bes a] | }
+ {c,8 d fis bes a | }
\\
% Reposition the c2 to the right of the merged note
{c,8~ \once \override NoteColumn #'force-hshift = #1.0
structure in a score block, and see what LilyPond produces by
default:
-@lilypond[quote,verbatim,ragged-right]
+@c line-width ensures no break
+@lilypond[quote,verbatim,ragged-right,line-width=5.5\in]
rhMusic = \relative c'' {
r2 c4. g8 |
bes1~ |
}
@end lilypond
-All the notes are right, but the appearance is far from satisfactory.
-The tie clashes with the change in time signature, the beaming in the
-third bar is wrong, the notes are not merged together, and several
-notation elements are missing. Let's first deal with the easier
-things. We can correct the beaming by inserting a beam manually, and
-we can easily add the left hand slur and the right hand phrasing slur,
+All the notes are right, but the appearance is far from
+satisfactory. The tie clashes with the change in time signature,
+the notes are not merged together, and several notation elements
+are missing. Let's first deal with the easier things. We can
+easily add the left hand slur and the right hand phrasing slur,
since these were all covered in the Tutorial. Doing this gives:
-@lilypond[quote,verbatim,ragged-right]
+@c line-width ensures no break
+@lilypond[quote,verbatim,ragged-right,line-width=5.5\in]
rhMusic = \relative c'' {
r2 c4.\( g8 |
bes1~ |
bes2. r8
% Start polyphonic section of four voices
<<
- {c,8[ d fis bes a] | }
+ {c,8 d fis bes a | }
\\
{c,8~ c2 | }
\\
This completes bar two, giving:
-@lilypond[quote,verbatim,ragged-right]
+@c line-width ensures no break
+@lilypond[quote,verbatim,ragged-right,line-width=5.5\in]
rhMusic = \relative c'' {
r2 c4.\( g8 |
\once \override Tie #'staff-position = #3.5
bes2. r8
% Start polyphonic section of four voices
<<
- {c,8[ d fis bes a] | }
+ {c,8 d fis bes a | }
\\
{c,8~ c2 | }
\\
On to bar three and the start of the Moderato section. The tutorial
showed how to add embolded text with the @code{\markup} command, so
adding @q{Moderato} in bold is easy. But how do we merge notes in
-different voices together? This is where we need to turn to the
-Notation Reference for help. A search for @qq{merge} in the Notation
-Reference index quickly leads us to the commands for merging
+different voices together? This is where we need to turn again to
+the Notation Reference for help. A search for @qq{merge} in the
+Notation Reference index quickly leads us to the commands for merging
differently headed and differently dotted notes in @ruser{Collision
resolution}. In our example we need to merge both types of note for
the duration of the polyphonic section in bar 3, so using the
@noindent
to the end, giving:
-@lilypond[quote,verbatim,ragged-right]
+@c line-width ensures no break
+@lilypond[quote,ragged-right,line-width=5.5\in]
rhMusic = \relative c'' {
r2 c4.\( g8 |
\once \override Tie #'staff-position = #3.5
\mergeDifferentlyDottedOn
% Start polyphonic section of four voices
<<
- {c,8[ d fis bes a] | }
+ {c,8 d fis bes a | }
\\
{c,8~ c2 | }
\\
@cindex Tie, example of overriding
@cindex staff-position property, example
-@lilypond[quote,verbatim,ragged-right]
+@c line-width ensures no break
+@lilypond[quote,verbatim,ragged-right,line-width=5.5\in]
rhMusic = \relative c'' {
r2 c4.\( g8 |
\once \override Tie #'staff-position = #3.5
\mergeDifferentlyDottedOn
% Start polyphonic section of four voices
<<
- {c,8[ d fis bes a] | }
+ {c,8 d fis bes a | }
\\
% Move the c2 out of the main note column so the merge will work
{c,8~ \shiftOnn c2 | }
@cindex Stem, example of overriding
@cindex transparent property, example
-@lilypond[quote,verbatim,ragged-right]
+@c line-width ensures no break
+@lilypond[quote,verbatim,ragged-right,line-width=5.5\in]
rhMusic = \relative c'' {
r2
c4.\( g8 |
\mergeDifferentlyHeadedOn
\mergeDifferentlyDottedOn
<<
- {c,8[ d fis bes a] | }
+ {c,8 d fis bes a | }
\\
% Reposition the c2 to the right of the merged note
{c,8~ \once \override NoteColumn #'force-hshift = #1.0
@syncodeindex fn cp
@syncodeindex vr cp
-@afourpaper
-
@copying
Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009 by the authors.
@settitle Music Glossary
@documentencoding UTF-8
@documentlanguage en
+@afourpaper
@include macros.itexi
-@afourpaper
-
@c see lilypond.tely for info installation note
@dircategory LilyPond
@direntry
\override SpacingSpanner
#'base-shortest-duration = #(ly:make-moment 1 1)
\override NonMusicalPaperColumn
- #'line-break-system-details = #'((alignment-offsets . (3 0 -3 -6)))
+ #'line-break-system-details = #'((alignment-distances . (3 3)))
\override BarLine #'stencil = ##f
}
\context {
\override SpacingSpanner
#'base-shortest-duration = #(ly:make-moment 2 1)
\override NonMusicalPaperColumn
- #'line-break-system-details = #'((alignment-offsets . (3 0 -3 -6)))
+ #'line-break-system-details = #'((alignment-distances . (3 3)))
\override BarLine #'stencil = ##f
}
\context {
\override SpacingSpanner #'base-shortest-duration =
#(ly:make-moment 2 1)
\override NonMusicalPaperColumn
- #'line-break-system-details = #'((alignment-offsets . (0 -3 -6)))
+ #'line-break-system-details = #'((alignment-distances . (3 3)))
\override BarLine #'stencil = ##f
}
\context {
LOCALSTEPMAKE_TEMPLATES = lilypond ly doc-i18n-root
NO_PDF_FILES = 1
+EXTRA_DIST_FILES = general.texi
+
include $(depth)/make/stepmake.make
@settitle LilyPond Notation Reference
@documentencoding UTF-8
@documentlanguage en
+@afourpaper
@macro manualIntro
This manual provides a reference for all notation that can be
depth = ../..
+SUBDIRS = pdf
BITMAP_IMAGES = $(call src-wildcard,*.png) $(call src-wildcard,*.jpg)
EPS_ILLUSTRATIONS = $(call src-wildcard,*.eps)
PDF_DIR = $(call src-wildcard,pdf/*.pdf)
EXTRA_DIST_FILES = $(BITMAP_IMAGES) $(EPS_ILLUSTRATIONS) $(SVG_FILES)
-EXTRA_DIST_FILES += $(PDF_DIR)
OUT_PDF_IMAGES = $(EPS_ILLUSTRATIONS:%.eps=$(outdir)/%.pdf)
OUT_BITMAP_IMAGES = $(BITMAP_IMAGES:%=$(outdir)/%)
--- /dev/null
+depth = ../../../
+
+PDF_FILES = $(call src-wildcard,*.pdf)
+
+EXTRA_DIST_FILES = $(PDF_FILES)
+
+STEPMAKE_TEMPLATES = documentation
+
+include $(depth)/make/stepmake.make
+
+default:
+
@settitle LilyPond snippets
@documentencoding UTF-8
@documentlanguage en
+@afourpaper
@macro manualIntro
This document shows a selected set of LilyPond snippets from the
SUBDIRS = new
EXTRA_DIST_FILES = $(call src-wildcard,*.snippet-list) \
- $(call src-wildcard,*.ly) $(call src-wildcard,*.itely)
+ $(call src-wildcard,*.ly) $(call src-wildcard,*.itely) \
+ README
include $(depth)/make/stepmake.make
--- /dev/null
+%% Do not edit this file; it is automatically
+%% generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.13.4"
+
+\header {
+ lsrtags = "chords, fretted-strings"
+
+ texidoc = "
+Here is how to print bar chords, or half-bar chords (just uncomment the
+appropriate line for to select either one).
+
+The syntax is @code{\\bbarre #'fret_number' @{ notes @} }
+
+
+
+
+"
+ doctitle = "Bar chords notation for Guitar ( with Text Spanner)"
+} % begin verbatim
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% %%%%%%% Cut here ----- Start 'bbarred.ly'
+
+%% PostScript -------------------------------
+pScript= \markup {
+ \with-dimensions #'(0 . 0.8) #'(0 . 2.0)
+ \postscript #"
+ 0.15 setlinewidth
+ /Times-Roman findfont
+ 2.0 scalefont
+ setfont
+ (C)show %%change with B if you prefer
+ %(B)show %%change with C if you prefer
+ stroke
+ 0.7 -0.5 moveto
+ 0.7 1.7 lineto
+ stroke"
+}
+%% Span -----------------------------------
+%% Syntax: \bbarre #"text" { notes } - text = any number of box
+bbarre= #(define-music-function (barre location str music) (string? ly:music?)
+ (let ((spanned-music
+ (let ((first-element #f)
+ (last-element #f)
+ (first-found? #f))
+ (music-map (lambda (m)
+ (if (eqv? (ly:music-property m 'name) 'EventChord)
+ (begin
+ (if (not first-found?)
+ (begin
+ (set! first-found? #t)
+ (set! first-element m)))
+ (set! last-element m)))
+ m)
+ music)
+ (if first-found?
+ (begin
+ (set! (ly:music-property first-element 'elements)
+ (cons (make-music 'TextSpanEvent 'span-direction -1)
+ (ly:music-property first-element 'elements)))
+ (set! (ly:music-property last-element 'elements)
+ (cons (make-music 'TextSpanEvent 'span-direction 1)
+ (ly:music-property last-element 'elements)))))
+ music)))
+ (make-music 'SequentialMusic
+ 'origin location
+ 'elements (list #{
+ \once \override TextSpanner #'font-size = #-2
+ \once \override TextSpanner #'font-shape = #'upright
+ \once \override TextSpanner #'staff-padding = #3
+ \once \override TextSpanner #'style = #'line
+ \once \override TextSpanner #'to-barline = ##f
+ \once \override TextSpanner #'bound-details = #'((left (Y . 0) (padding . 0.25) (attach-dir . -2)) (right (Y . 0) (padding . 0.25) (attach-dir . 2)))
+ \once \override TextSpanner #'bound-details #'right #'text = \markup { \draw-line #'( 0 . -.5) }
+ \once \override TextSpanner #'bound-details #'left #'text = \markup { \pScript $str }
+%% uncomment this line for make full barred
+ % \once \override TextSpanner #'bound-details #'left #'text = \markup { "B" $str }
+ #}
+ spanned-music))))
+
+%% %%%%%%% Cut here ----- End 'bbarred.ly'
+%% Copy and change the last line for full barred. Rename in 'fbarred.ly'
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Syntaxe: \bbarre #"text" { notes } - text = any number of box
+\relative c'{ \clef "G_8" \stemUp \bbarre #"III" { <f a'>16[ c' d c d8] } }
adding-a-figured-bass-above-or-below-the-notes.ly
adding-bar-lines-to-chordnames-context.ly
avoiding-collisions-with-chord-fingerings.ly
+bar-chords-notation-for-guitar--with-text-spanner.ly
changing-chord-separator.ly
changing-the-chord-names-to-german-or-semi-german-notation.ly
changing-the-positions-of-figured-bass-alterations.ly
printing-metronome-and-rehearsal-marks-below-the-staff.ly
setting-hairpin-behavior-at-bar-lines.ly
setting-the-minimum-length-of-hairpins.ly
+showing-the-same-articulation-above-and-below-a-note-or-chord.ly
snap-pizzicato-bartok-pizzicato.ly
using-double-slurs-for-legato-chords.ly
vertical-line-as-a-baroque-articulation-mark.ly
adding-fingerings-to-a-score.ly
adding-fingerings-to-tablatures.ly
allowing-fingerings-to-be-printed-inside-the-staff.ly
+bar-chords-notation-for-guitar--with-text-spanner.ly
chordchanges-for-fretboards.ly
controlling-the-placement-of-chord-fingerings.ly
customizing-fretboard-fret-diagrams.ly
fingerings,-string-indications,-and-right-hand-fingerings.ly
flamenco-notation.ly
fret-diagrams-explained-and-developed.ly
+guitar-slides.ly
guitar-strum-rhythms.ly
how-to-change-fret-diagram-position.ly
jazz-combo-template.ly
--- /dev/null
+%% Do not edit this file; it is automatically
+%% generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.13.4"
+
+\header {
+ lsrtags = "fretted-strings"
+
+ texidoc = "
+Unlike glissandos, slides may go from an imprecise point of the
+fretboard to a specific fret. A good way to do that is to add a grace
+hidden note before the note which is actually played, as demonstrated
+in the following example.
+
+
+
+
+"
+ doctitle = "Guitar slides"
+} % begin verbatim
+
+%% Hide fret number: useful to draw slide into/from a casual point of
+%% the fretboard.
+hideFretNumber = { \once \override TabNoteHead #'transparent = ##t
+ \once \override NoteHead #'transparent = ##t
+ \once \override Stem #'transparent = ##t
+}
+
+music= \relative c' {
+ \grace { \hideFretNumber d8\2 \glissando s2 } g2\2
+ \grace { \hideFretNumber g8\2 \glissando s2 } d2 |
+
+ \grace { \hideFretNumber c,8 \glissando s } f4\5^\markup \tiny "Slide into"
+ \grace { \hideFretNumber f8 \glissando s } a4\4
+ \grace { \hideFretNumber e'8\3 \glissando s } b4\3^\markup \tiny "Slide from"
+ \grace { \hideFretNumber b'8 \glissando s2 } g4 |
+ }
+
+\score {
+ <<
+ \new Staff {
+ \music
+ }
+ \new TabStaff {
+ \music
+ }
+ >>
+}
texidoc = "
The @code{quotedEventTypes} property determines the music event types
-that are quoted. The default value is @code{(note-event rest-event)},
-which means that only notes and rests of the quoted voice appear in the
-@code{\\quoteDuring} expression. In the following example, a 16th rest
-is not quoted since @code{rest-event} is not in
+which should be quoted. The default value is @code{(note-event
+rest-event tie-event beam-event tuplet-span-event)}, which means that
+only the notes, rests, ties, beams and tuplets of the quoted voice will
+appear in the @code{\\quoteDuring} expression. In the following
+example, a 16th rest is not quoted since @code{rest-event} is not in
@code{quotedEventTypes}.
+For a list of event types, consult the @qq{Music classes} section of
+the Internals Reference.
+
"
doctitle = "Quoting another voice"
} % begin verbatim
--- /dev/null
+%% Do not edit this file; it is automatically
+%% generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.13.4"
+
+\header {
+ lsrtags = "expressive-marks, tweaks-and-overrides"
+
+ texidoc = "
+By default, LilyPond does not allow the same articulation (e.g. an
+accent, a fermata, a flageolet, etc.) to be displayed above and below a
+note. For example, c4_\\fermata^\\fermata will only show a fermata
+below. The fermata above will simply be ignored. However, one can stick
+scripts (just like fingerings) inside a chord, which means it is
+possible to have as many articulations as desired. This approach has
+the advantage that it ignores the stem and positions the articulation
+relative to the note head. This can be seen in the case of the
+flageolets in the snippet. To mimic the behaviour of scripts outside a
+chord, 'add-stem-support would be required. So, the solution is to
+write the note as a chord and add the articulations inside the <...>.
+The direction will always be above, but one can tweak this via a
+\\tweak: @code{<c-\\tweak #'direction #DOWN-\\fermata^\\fermata>}
+
+"
+ doctitle = "Showing the same articulation above and below a note or chord"
+} % begin verbatim
+
+% The same as \flageolet, just a little smaller
+smallFlageolet =
+#(let ((m (make-music 'ArticulationEvent 'articulation-type "flageolet")))
+ (ly:music-set-property! m 'tweaks
+ (acons 'font-size -2 (ly:music-property m 'tweaks)))
+ m)
+
+\relative c' {
+ s4^"wrong:"
+ c_\fermata^\fermata % The second fermata is ignored!
+ <e d'>^\smallFlageolet_\smallFlageolet
+
+ % it works only if you wrap the note inside a chord. By default,
+ % all articulations will be printed above, so you have to tweak
+ % the direction.
+ s4^"Works if written inside a chord:"
+ <e-\tweak #'direction #DOWN -\smallFlageolet d'^\smallFlageolet>
+ <e-\tweak #'direction #DOWN -\flageolet d'^\flageolet>
+ <e-\tweak #'direction #DOWN -\smallFlageolet^\smallFlageolet>
+ <e-\tweak #'direction #DOWN -\fermata^\fermata>
+}
+
rhythmic-slashes.ly
separating-key-cancellations-from-key-signature-changes.ly
setting-hairpin-behavior-at-bar-lines.ly
+showing-the-same-articulation-above-and-below-a-note-or-chord.ly
string-number-extender-lines.ly
suppressing-warnings-for-clashing-note-columns.ly
time-signature-in-parentheses.ly
@documentencoding utf-8
@documentlanguage en
@setfilename AUTHORS.info
-@settitle AUTHORS - who did what on GNU LilyPond-
+@settitle AUTHORS - who did what on GNU LilyPond
@node Top
@top
+@contents
+
+@ignore
+@include macros.itexi
+@include general/basic-authors.itexi
+
+@developersCurrent
+
+@developersPrevious
+
+@contributors
+@end ignore
+
@unnumbered AUTHORS
This file lists authors of LilyPond, and what they wrote. This list
RELEASE_FILES = ChangeLog RELEASE-COMMIT
RELEASE_OUT_FILES = $(RELEASE_FILES:%=$(outdir)/%)
OUT_DIST_FILES += $(RELEASE_OUT_FILES)
-EXTRA_DIST_FILES = VERSION .gitignore \
+EXTRA_DIST_FILES = VERSION .gitignore .mailmap \
$(README_FILES) $(SCRIPTS) $(IN_FILES)
INSTALLATION_DIR=$(local_lilypond_datadir)
INSTALLATION_FILES=$(config_make) VERSION
MINOR_VERSION=13
PATCH_LEVEL=4
MY_PATCH_LEVEL=
-
+VERSION_STABLE=2.12.2
+VERSION_DEVEL=2.13.3
-
\version "2.12.0"
-\header
-{
+
+#(ly:set-option 'warning-as-error #f)
+
+\header {
texidoc= "Quarter notes may be beamed: the beam is halted momentarily."
}
-\layout { ragged-right = ##t }
-
\relative c'' {
c8[ c4 c8] % should warn here!
}
+\version "2.12.0"
+
+#(ly:set-option 'warning-as-error #f)
+
\header {
texidoc = "Unknown clef name warning displays available clefs"
- }
+}
-
-\version "2.12.0"
{
\clef "foo"
c4
- }
+}
+\version "2.12.0"
+
+#(ly:set-option 'warning-as-error #f)
\header {
texidoc = "Grace notes at the end of an expression don't cause crashes."
- }
-
-\version "2.12.0"
+}
-{ e' \acciaccatura << e'8 \\ cis' >> }
+{ e' \acciaccatura << e'8 \\ cis' >> }
-
\version "2.12.0"
-\header {
+#(ly:set-option 'warning-as-error #f)
+
+\header {
texidoc="@cindex Grace End
Grace notes after the last note do not confuse the timing code."
-
-
}
-\layout {
- ragged-right = ##t
-}
-
-
-
\context Voice \relative c' {
-
- c4 \grace { d16[ d16] }
-
+ c4 \grace { d16[ d16] }
}
-
-
-
--- /dev/null
+\version "2.13.4"
+
+\header {
+ texidoc = "Bound padding for hairpins also works with neighboring
+@code{DynamicTextSpanner} grobs. In this case, @code{bound-padding}
+is not scaled down.
+"
+}
+
+\relative c' {
+ \override Hairpin #'to-barline = ##f
+ c2\>
+ \dimTextDim
+ c2\>
+ \dimHairpin
+ c\> c\! \break
+ \dimTextDim
+ c2\>
+ \override Hairpin #'bound-padding = #5
+ \dimHairpin
+ c2\>
+ \dimTextDim
+ c2\> c\! \break
+ \crescHairpin
+ c2\< c\<
+ c2\< c\!
+}
\version "2.12.0"
+#(ly:set-option 'warning-as-error #f)
+
\header {
texidoc = "The harp-pedal markup function does some sanity checks. All
the diagrams here violate the standard (7 pedals with divider after third), so
\version "2.12.0"
+#(ly:set-option 'warning-as-error #f)
+
\header {
texidoc = "Basic harp diagram functionality, including circled pedal boxes.
The third diagram uses an empty string, the third contains invalid characters.
-\header {
+\version "2.12.0"
- texidoc = "Reset fontname for musicglyph. For unknown glyphs, we print a warning."
+#(ly:set-option 'warning-as-error #f)
-}
+\header {
+ texidoc = "Reset fontname for musicglyph.
+For unknown glyphs, we print a warning."
-\version "2.12.0"
+}
{
- c'^\markup
- {
- \override #'(font-name . "Sans")
- { c'est un B \flat \musicglyph #"UNKNOWN-GLYPH" }
- % to get \flat, do:
- % \normal-text \flat
+ c'^\markup {
+ \override #'(font-name . "Sans") {
+ c'est un B \flat \musicglyph #"UNKNOWN-GLYPH"
+ }
+ % to get \flat, do:
+ % \normal-text \flat
}
}
\version "2.13.4"
\header{ texidoc = "In tablature, notes that are tied to are invisible
- except after a line break or within a second volta;
- here, the fret number is displayed in parentheses."
- }
+ except after a line break or within a second volta;
+ here, the fret number is displayed in parentheses.
-tietest = \relative c {
- \override Voice.StringNumber #'transparent = ##t % remove circled string numbers
- \repeat volta 2 {
- f2 ~ f4 e
- g8 g ~ g g ~ g g~ g g ~
- g1
- c1 ~ \break c2 ~ c
+ As an option, the notes that are tied to may become
+ invisible completely, even after line breaks."
+ }
+
+firstpart = \relative c {
+ f2 ~ f4 e
+ g8 g ~ g g ~ g g~ g g ~
+ g1
+}
+
+secondpart = \relative c' {
+ c1 ~ \break c2 ~ c
+}
+
+thirdpart = \relative c' {
+ \repeat volta 2 {
< c\3 e\2 g\1 >4 < c\3 e\2 g\1 > ~ < c\3 e\2 g\1 >\laissezVibrer r
c4. d8 e2 ~
+ }
+ \alternative { { e2 r } { e2\repeatTie e2^\fermata } }
+ }
+
+\context StaffGroup <<
+ \context Staff {
+ \clef "G_8"
+ \override Voice.StringNumber #'transparent = ##t % remove circled string numbers
+ \firstpart
+ \secondpart
+ \thirdpart
}
- \alternative { { e2 r } { e2\repeatTie e2^\fermata } }
- \bar "|."
-}
+ \context TabStaff {
+ \firstpart
+ \secondpart
+ \thirdpart
+ }
+>>
\context StaffGroup <<
- \context Staff <<
+ \context Staff {
\clef "G_8"
- \tietest
- >>
- \context TabStaff <<
- \tietest
- >>
+ \override Voice.StringNumber #'transparent = ##t % remove circled string numbers
+ \firstpart
+ \secondpart
+ \thirdpart
+ \secondpart
+ \thirdpart
+ }
+ \context TabStaff {
+ \hideSplitTiedTabNotes
+ \firstpart
+ \secondpart
+ \thirdpart
+ \showSplitTiedTabNotes
+ \secondpart
+ \thirdpart
+ }
>>
-
/*
- lily-guile.cc -- implement assorted Guile bindings
+ general-scheme.cc -- implement assorted Guile bindings
source file of the GNU LilyPond music typesetter
#include <cstring> /* memset */
using namespace std;
+#include "dimensions.hh"
+#include "file-name.hh"
+#include "file-path.hh"
#include "international.hh"
#include "libc-extension.hh"
#include "lily-guile.hh"
-#include "misc.hh"
-#include "warn.hh"
-#include "version.hh"
-#include "dimensions.hh"
#include "main.hh"
-#include "file-path.hh"
+#include "misc.hh"
+#include "program-option.hh"
#include "relocate.hh"
-#include "file-name.hh"
#include "string-convert.hh"
+#include "version.hh"
+#include "warn.hh"
LY_DEFINE (ly_start_environment, "ly:start-environment",
0, 0, 0, (),
LY_ASSERT_TYPE (scm_is_number, size, 2);
sz = scm_to_int (size);
}
-
+
string contents = gulp_file_to_string (ly_scm2string (name), true, sz);
return scm_from_locale_stringn (contents.c_str (), contents.length ());
}
{
LY_ASSERT_TYPE (scm_is_string, str, 1);
str = scm_simple_format (SCM_BOOL_F, str, rest);
- programming_error (ly_scm2string (str));
+
+ if (get_program_option ("warning-as-error"))
+ error (ly_scm2string (str));
+ else
+ programming_error (ly_scm2string (str));
+
return SCM_UNSPECIFIED;
}
{
LY_ASSERT_TYPE (scm_is_string, str, 1);
str = scm_simple_format (SCM_BOOL_F, str, rest);
- warning (ly_scm2string (str));
+
+ if (get_program_option ("warning-as-error"))
+ error (ly_scm2string (str));
+ else
+ warning (ly_scm2string (str));
+
return SCM_UNSPECIFIED;
}
}
LY_DEFINE (ly_assoc_get, "ly:assoc-get",
- 2, 1, 0,
- (SCM key, SCM alist, SCM default_value),
- "Return value if @var{key} in @var{alist}, else @code{default-value}"
- " (or @code{#f} if not specified).")
+ 2, 2, 0,
+ (SCM key, SCM alist, SCM default_value, SCM strict_checking),
+ "Return value if @var{key} in @var{alist}, else @var{default-value}"
+ " (or @code{#f} if not specified). If @var{strict-checking} is set"
+ " to @code{#t} and @var{key} is not in @var{alist}, a programming_error"
+ " is output.")
{
LY_ASSERT_TYPE(ly_cheap_is_list, alist, 2);
-
+
SCM handle = scm_assoc (key, alist);
if (scm_is_pair (handle))
return scm_cdr (handle);
-
+
if (default_value == SCM_UNDEFINED)
default_value = SCM_BOOL_F;
+ if (strict_checking == SCM_BOOL_T)
+ {
+ string key_string = ly_scm2string
+ (scm_object_to_string (key, SCM_UNDEFINED));
+ string default_value_string = ly_scm2string
+ (scm_object_to_string (default_value,
+ SCM_UNDEFINED));
+ programming_error ("Cannot find key `" +
+ key_string +
+ "' in alist, setting to `" +
+ default_value_string + "'.");
+ }
+
return default_value;
}
string ss = ly_scm2string (s);
replace_all (&ss, ly_scm2string (a),
ly_scm2string (b));
-
+
return ly_string2scm (ss);
}
-
+
LY_DEFINE (ly_number_2_string, "ly:number->string",
1, 0, 0, (SCM s),
"Convert @var{num} to a string without generating many decimals.")
}
LY_DEFINE (ly_chain_assoc_get, "ly:chain-assoc-get",
- 2, 1, 0, (SCM key, SCM achain, SCM val),
+ 2, 2, 0, (SCM key, SCM achain, SCM default_value, SCM strict_checking),
"Return value for @var{key} from a list of alists @var{achain}."
- " If no entry is found, return @var{val} or @code{#f} if"
- " @var{val} is not specified.")
+ " If no entry is found, return @var{default-value} or @code{#f} if"
+ " @var{default-value} is not specified. With @var{strict-checking}"
+ " set to @code{#t}, a programming_error is output in such cases.")
{
if (scm_is_pair (achain))
{
if (scm_is_pair (handle))
return scm_cdr (handle);
else
- return ly_chain_assoc_get (key, scm_cdr (achain), val);
+ return ly_chain_assoc_get (key, scm_cdr (achain), default_value);
}
- return val == SCM_UNDEFINED ? SCM_BOOL_F : val;
+
+ if (strict_checking == SCM_BOOL_T)
+ {
+ string key_string = ly_scm2string
+ (scm_object_to_string (key, SCM_UNDEFINED));
+ string default_value_string = ly_scm2string
+ (scm_object_to_string (default_value,
+ SCM_UNDEFINED));
+ programming_error ("Cannot find key `" +
+ key_string +
+ "' in achain, setting to `" +
+ default_value_string + "'.");
+ }
+
+ return default_value == SCM_UNDEFINED ? SCM_BOOL_F : default_value;
}
m = ly_scm2string (mode);
/* dup2 and (fileno (current-error-port)) do not work with mingw'c
gcc -mwindows. */
- fflush (stderr);
+ fflush (stderr);
freopen (ly_scm2string (file_name).c_str (), m.c_str (), stderr);
return SCM_UNSPECIFIED;
}
"Convert @code{FooBar_Bla} to @code{foo-bar-bla} style symbol.")
{
LY_ASSERT_TYPE (ly_is_symbol, name_sym, 1);
-
+
/*
TODO: should use strings instead?
*/
-
+
const string in = ly_symbol2string (name_sym);
string result = camel_case_to_lisp_identifier (in);
return ly_string2scm (expand_environment_variables (ly_scm2string (str)));
}
-
+
LY_DEFINE (ly_truncate_list_x, "ly:truncate-list!",
2, 0, 0, (SCM lst, SCM i),
ly_progress (scm_from_locale_string ("Unsupported SCM value for format: ~a"),
scm_list_1 (arg));
}
-
-
- return "";
+
+
+ return "";
}
LY_DEFINE (ly_format, "ly:format",
if (tilde == NPOS)
break ;
-
+
tilde ++;
char spec = format.at (tilde ++);
{
if (!scm_is_pair (rest))
{
- programming_error (string (__FUNCTION__)
+ programming_error (string (__FUNCTION__)
+ ": not enough arguments for format.");
return ly_string2scm ("");
}
-
+
SCM arg = scm_car (rest);
rest = scm_cdr (rest);
int precision = 8;
-
+
if (spec == '$')
precision = 2;
else if (isdigit (spec))
precision = spec - '0';
spec = format.at (tilde ++);
}
-
+
if (spec == 'a' || spec == 'A' || spec == 'f' || spec == '$')
results.push_back (format_single_argument (arg, precision));
else if (spec == 's' || spec == 'S')
if (s != SCM_EOL)
results.push_back (format_single_argument (s, precision));
-
+
}
}
vsize len = 0;
for (vsize i = 0; i < results.size (); i++)
len += results[i].size ();
-
+
char *result = (char*) scm_malloc (len + 1);
char *ptr = result;
for (vsize i = 0; i < results.size (); i++)
ptr += results[i].size ();
}
*ptr = '\0';
-
+
return scm_take_locale_stringn (result, len);
}
broken[RIGHT] = broken[RIGHT] && me->broken_neighbor (RIGHT);
broken[RIGHT] = broken[RIGHT] && me->broken_neighbor (RIGHT)->is_live ();
-
+
if (broken[RIGHT])
{
Spanner *next = me->broken_neighbor (RIGHT);
Use the height and thickness of the hairpin when making a circled tip
*/
bool circled_tip = ly_scm2bool (me->get_property ("circled-tip"));
- Real height = robust_scm2double (me->get_property ("height"), 0.2) *
- Staff_symbol_referencer::staff_space (me);
+ Real height = robust_scm2double (me->get_property ("height"), 0.2)
+ * Staff_symbol_referencer::staff_space (me);
/*
FIXME: 0.525 is still just a guess...
*/
Real thick = 1.0;
if (circled_tip)
thick = robust_scm2double (me->get_property ("thickness"), 1.0)
- * Staff_symbol_referencer::line_thickness (me);
+ * Staff_symbol_referencer::line_thickness (me);
do
{
else
{
bool neighbor_found = false;
- extract_grob_set (me, "adjacent-hairpins", pins);
- for (vsize i = 0; i < pins.size (); i++)
+ Spanner *adjacent;
+ extract_grob_set (me, "adjacent-spanners", neighbors);
+ for (vsize i = 0; i < neighbors.size (); i++)
{
/*
FIXME: this will fuck up in case of polyphonic
notes in other voices. Need to look at note-columns
in the current staff/voice.
*/
-
- Spanner *pin = dynamic_cast<Spanner *> (pins[i]);
- if (pin
- && (pin->get_bound (LEFT)->get_column () == b->get_column ()
- || pin->get_bound (RIGHT)->get_column () == b->get_column ()))
- neighbor_found = true;
+ adjacent = dynamic_cast<Spanner *> (neighbors[i]);
+ if (adjacent
+ && (adjacent->get_bound (-d)->get_column ()
+ == b->get_column ()))
+ {
+ neighbor_found = true;
+ break;
+ }
}
Interval e = robust_relative_extent (b, common, X_AXIS);
if (neighbor_found)
{
- /*
- Handle back-to-back hairpins with a circle in the middle
- */
- if (circled_tip && (grow_dir != d))
- x_points[d] = e.center () + d * (rad - thick / 2.0);
- /*
- If we're hung on a paper column, that means we're not
- adjacent to a text-dynamic, and we may move closer. We
- make the padding a little smaller, here.
- */
+ if (Hairpin::has_interface (adjacent))
+ {
+ /*
+ Handle back-to-back hairpins with a circle in the middle
+ */
+ if (circled_tip && (grow_dir != d))
+ x_points[d] = e.center () + d * (rad - thick / 2.0);
+ /*
+ If we're hung on a paper column, that means we're not
+ adjacent to a text-dynamic, and we may move closer. We
+ make the padding a little smaller, here.
+ */
+ else
+ x_points[d] = e.center () - d * padding / 3;
+ }
+ // Our neighbor is a dynamic text spanner, so add the
+ // same amount of padding as for text dynamics
else
- x_points[d] = e.center () - d * padding / 3;
+ x_points[d] = e[-d] - d * padding;
}
else
{
x_points[d] = e[-d];
else
x_points[d] = e[d];
-
+
Item *bound = me->get_bound (d);
if (bound->is_non_musical (bound))
- x_points[d] -= d * padding;
+ x_points[d] -= d * padding;
}
}
}
if (circled_tip)
{
Box extent (Interval (-rad, rad), Interval (-rad, rad));
-
+
/* Hmmm, perhaps we should have a Lookup::circle () method? */
Stencil circle (extent,
- scm_list_4 (ly_symbol2scm ("circle"),
- scm_from_double (rad),
- scm_from_double (thick),
- SCM_BOOL_F));
+ scm_list_4 (ly_symbol2scm ("circle"),
+ scm_from_double (rad),
+ scm_from_double (thick),
+ SCM_BOOL_F));
/*
- don't add another circle the hairpin is broken
+ don't add another circle if the hairpin is broken
*/
if (!broken[tip_dir])
mol.add_at_edge (X_AXIS, tip_dir, Stencil (circle), 0);
"A hairpin crescendo or decrescendo.",
/* properties */
- "adjacent-hairpins "
+ "adjacent-spanners "
"circled-tip "
"bound-padding "
"grow-direction "
SCM ly_offset2scm (Offset);
Offset ly_scm2offset (SCM);
SCM ly_chain_assoc (SCM key, SCM achain);
-SCM ly_chain_assoc_get (SCM key, SCM achain, SCM val);
+SCM ly_chain_assoc_get (SCM key, SCM achain, SCM default_value, SCM strict_checking = SCM_BOOL_F);
SCM ly_assoc_cdr (SCM key, SCM alist);
-SCM ly_assoc_get (SCM key, SCM alist, SCM def);
+SCM ly_assoc_get (SCM key, SCM alist, SCM default_value, SCM strict_checking = SCM_BOOL_F);
Interval ly_scm2interval (SCM);
Drul_array<Real> ly_scm2realdrul (SCM);
Slice int_list_to_slice (SCM l);
/*
new-dynamic-engraver.cc -- implement New_dynamic_engraver
-
+
source file of the GNU LilyPond music typesetter
-
+
(c) 2008--2009 Han-Wen Nienhuys <hanwen@lilypond.org>
-
*/
-
#include "engraver.hh"
-
#include "hairpin.hh"
#include "international.hh"
#include "item.hh"
virtual void finalize ();
private:
- SCM get_property_setting (Stream_event *evt, char const *evprop, char const *ctxprop);
+ SCM get_property_setting (Stream_event *evt, char const *evprop,
+ char const *ctxprop);
string get_spanner_type (Stream_event *ev);
Drul_array<Stream_event *> accepted_spanevents_drul_;
Spanner *current_spanner_;
Spanner *finished_spanner_;
-
+
Item *script_;
Stream_event *script_event_;
Stream_event *current_span_event_;
}
SCM
-New_dynamic_engraver::get_property_setting (Stream_event *evt, char const *evprop, char const *ctxprop)
+New_dynamic_engraver::get_property_setting (Stream_event *evt,
+ char const *evprop,
+ char const *ctxprop)
{
SCM spanner_type = evt->get_property (evprop);
if (spanner_type == SCM_EOL)
New_dynamic_engraver::process_music ()
{
if (current_spanner_
- && (accepted_spanevents_drul_[STOP] || script_event_ || accepted_spanevents_drul_[START]))
+ && (accepted_spanevents_drul_[STOP]
+ || script_event_
+ || accepted_spanevents_drul_[START]))
{
Stream_event *ender = accepted_spanevents_drul_[STOP];
if (!ender)
if (!ender)
ender = accepted_spanevents_drul_[START];
-
+
finished_spanner_ = current_spanner_;
announce_end_grob (finished_spanner_, ender->self_scm ());
current_spanner_ = 0;
string start_type = get_spanner_type (current_span_event_);
SCM cresc_type = get_property_setting (current_span_event_, "span-type",
- (start_type + "Spanner").c_str ());
+ (start_type + "Spanner").c_str ());
if (cresc_type == ly_symbol2scm ("text"))
{
accepted_spanevents_drul_[START]->self_scm ());
SCM text = get_property_setting (current_span_event_, "span-text",
- (start_type + "Text").c_str ());
+ (start_type + "Text").c_str ());
if (Text_interface::is_markup (text))
- {
- current_spanner_->set_property ("text", text);
- }
+ current_spanner_->set_property ("text", text);
}
else
{
}
current_spanner_ = make_spanner ("Hairpin",
current_span_event_->self_scm ());
- if (finished_spanner_)
- {
- Pointer_group_interface::add_grob (finished_spanner_,
- ly_symbol2scm ("adjacent-hairpins"),
- current_spanner_);
-
- Pointer_group_interface::add_grob (current_spanner_,
- ly_symbol2scm ("adjacent-hairpins"),
- finished_spanner_);
- }
+ }
+ if (finished_spanner_)
+ {
+ if (Hairpin::has_interface (finished_spanner_))
+ Pointer_group_interface::add_grob (finished_spanner_,
+ ly_symbol2scm ("adjacent-spanners"),
+ current_spanner_);
+ if (Hairpin::has_interface (current_spanner_))
+ Pointer_group_interface::add_grob (current_spanner_,
+ ly_symbol2scm ("adjacent-spanners"),
+ finished_spanner_);
}
}
set_nested_property (current_spanner_,
scm_list_3 (ly_symbol2scm ("bound-details"),
ly_symbol2scm ("left"),
- ly_symbol2scm ("attach-dir")
- ),
+ ly_symbol2scm ("attach-dir")),
scm_from_int (RIGHT));
-
}
}
}
-
-
void
New_dynamic_engraver::stop_translation_timestep ()
{
if (finished_spanner_ && !finished_spanner_->get_bound (RIGHT))
- finished_spanner_->set_bound (RIGHT,
- unsmob_grob (get_property ("currentMusicalColumn")));
+ finished_spanner_
+ ->set_bound (RIGHT,
+ unsmob_grob (get_property ("currentMusicalColumn")));
if (current_spanner_ && !current_spanner_->get_bound (LEFT))
- current_spanner_->set_bound (LEFT,
- unsmob_grob (get_property ("currentMusicalColumn")));
+ current_spanner_
+ ->set_bound (LEFT,
+ unsmob_grob (get_property ("currentMusicalColumn")));
script_ = 0;
script_event_ = 0;
accepted_spanevents_drul_.set (0, 0);
type = "crescendo";
else
programming_error ("unknown dynamic spanner type");
+
return type;
}
\override Slur #'stencil = ##f
\override PhrasingSlur #'stencil = ##f
%% 'tied to' fret numbers become invisible or parenthesized, respectively)
- \override Tie #'after-line-breaking = #tie::handle-tab-tie
- \override RepeatTie #'after-line-breaking = #repeat-tie::parenthesize-tab-note-head
+ \override Tie #'after-line-breaking = #tie::handle-tab-note-head
+ \override RepeatTie #'after-line-breaking = #repeat-tie::handle-tab-note-head
%% ... and all kinds of markups, spanners etc.
\override TupletBracket #'stencil = ##f
\override TupletNumber #'stencil = ##f
stemNeutral = \revert Stem #'direction
-%% tabFullNotation
+%% tablature
+% switch to full notation
tabFullNotation = {
% time signature
\revert TabStaff.TimeSignature #'stencil
\revert TabStaff.Arpeggio #'stencil
}
+%tie/repeat tie behaviour
+hideSplitTiedTabNotes = {
+ \override TabVoice.TabNoteHead #'(details tied-properties break-visibility) = #all-invisible
+ \override TabVoice.TabNoteHead #'(details tied-properties parenthesize) = ##f
+ \override TabVoice.TabNoteHead #'(details repeat-tied-properties note-head-visible) = ##f
+ \override TabVoice.TabNoteHead #'(details repeat-tied-properties parenthesize) = ##f
+}
+
+showSplitTiedTabNotes = {
+ \override TabVoice.TabNoteHead #'(details tied-properties break-visibility) = #begin-of-line-visible
+ \override TabVoice.TabNoteHead #'(details tied-properties parenthesize) = ##t
+ \override TabVoice.TabNoteHead #'(details repeat-tied-properties note-head-visible) = ##t
+ \override TabVoice.TabNoteHead #'(details repeat-tied-properties parenthesize) = ##t
+}
%% text length
TEXI2HTML_INIT = $(DOC_TEXI2HTML_INIT)
DOC_TEXI2HTML_SPLIT = --prefix=index --split=section
-# --split=node --node-files makes that translated pages have
-# translated file names, that breaks.
-## WEB_TEXI2HTML_SPLIT = --prefix=index --split=node --node-files
-WEB_TEXI2HTML_SPLIT = $(DOC_TEXI2HTML_SPLIT)
+WEB_TEXI2HTML_SPLIT = --prefix=index --split=node --node-files
TEXI2HTML_SPLIT = $(DOC_TEXI2HTML_SPLIT)
$(top-build-dir)/Documentation/$(outdir)/general/index.$(ISOLANG).html:\
TOPLEVEL_PATCH_LEVEL=$(PATCH_LEVEL)
# use to send patches, always empty for released version:
TOPLEVEL_MY_PATCH_LEVEL=$(MY_PATCH_LEVEL)
+
+# TODO: used for the website; John says that he'll rewrite this
+TOPLEVEL_VERSION_STABLE=$(VERSION_STABLE)
+TOPLEVEL_VERSION_DEVEL=$(VERSION_DEVEL)
(type-name (match-predicate obj type-p-name-alist)))
(define-public (type-name predicate)
- (let ((entry (assoc predicate type-p-name-alist)))
- (if (pair? entry) (cdr entry)
- "unknown")))
+ (assoc-get predicate type-p-name-alist "unknown"))
"Text in front of the system."
'(long-text self-alignment-X self-alignment-Y text))
+(ly:add-interface
+ 'tab-note-head-interface
+ "A note head in tablature."
+ '(details))
+
(ly:add-interface
'trill-spanner-interface
"A trill spanner."
(accidental-grob ,ly:grob? "The accidental for this note.")
(accidental-grobs ,list? "An alist with @code{(@var{notename} .
@var{groblist})} entries.")
- (adjacent-hairpins ,ly:grob-array? "An array of directly neighboring
-hairpins.")
+ (adjacent-spanners ,ly:grob-array? "An array of directly neighboring
+dynamic spanners.")
(all-elements ,ly:grob-array? "An array of all grobs in this line. Its
function is to protect objects from being garbage collected.")
(arpeggio ,ly:grob? "A pointer to an @code{Arpeggio} object.")
(TabNoteHead
. (
+ (details . ((tied-properties . ((break-visibility . ,begin-of-line-visible)
+ (parenthesize . #t)))
+ (repeat-tied-properties . ((note-head-visible . #t)
+ (parenthesize . #t)))))
(direction . ,CENTER)
(duration-log . ,note-head::calc-duration-log)
(font-series . bold)
rhythmic-grob-interface
rhythmic-head-interface
staff-symbol-referencer-interface
+ tab-note-head-interface
text-interface))))))
(TextScript
;; (newline)
(let* ((name-sym (car x))
(grob-entry (cdr x))
- (meta-entry (cdr (assoc 'meta grob-entry)))
- (class (cdr (assoc 'class meta-entry)))
+ (meta-entry (assoc-get 'meta grob-entry))
+ (class (assoc-get 'class meta-entry))
(ifaces-entry
- (cdr (assoc 'interfaces meta-entry))))
+ (assoc-get 'interfaces meta-entry)))
(cond
((eq? 'Item class)
;;;; define-markup-commands.scm -- markup commands
;;;;
;;;; source file of the GNU LilyPond music typesetter
-;;;;
+;;;;
;;;; (c) 2000--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
;;;; Jan Nieuwenhuizen <janneke@gnu.org>
;;; markup commands
;;; * each markup function should have a doc string with
-;; syntax, description and example.
+;; syntax, description and example.
(use-modules (ice-9 regex))
(half (/ thickness 2)))
(ly:make-stencil
- `(polygon ',(list
+ `(polygon ',(list
0 (/ thickness -2)
width (+ (* width slope) (/ thickness -2))
width (+ (* width slope) (/ thickness 2))
}
}
c,8. c16 c4 r
-@end lilypond"
+@end lilypond"
(let ((th (* (ly:output-def-lookup layout 'line-thickness)
thickness))
(pad (* (magstep font-size) box-padding))
"Extract the bbox from STRING, or return #f if not present."
(let*
((match (regexp-exec bbox-regexp string)))
-
+
(if match
(map (lambda (x)
(string->number (match:substring match x)))
(cdr (iota 5)))
-
+
#f)))
(define-builtin-markup-command (epsfile layout props axis size file-name)
(join-stencil (interpret-markup layout props tie-str))
)
- (interpret-markup layout
+ (interpret-markup layout
(prepend-alist-chain
'word-space
(/ (interval-length (ly:stencil-extent join-stencil X)) -3.5)
Return a list of paddings."
(cond
((null? text-widths) '())
-
+
;; special case first padding
((= (length text-widths) word-count)
- (cons
+ (cons
(- (- (/ line-width (1- word-count)) (car text-widths))
(/ (car (cdr text-widths)) 2))
(get-fill-space word-count line-width (cdr text-widths))))
(list (- (/ line-width (1- word-count))
(+ (/ (car text-widths) 2) (car (cdr text-widths)))) 0))
(else
- (cons
+ (cons
(- (/ line-width (1- word-count))
(/ (+ (car text-widths) (car (cdr text-widths))) 2))
(get-fill-space word-count line-width (cdr text-widths))))))
(line-width (or line-width (ly:output-def-lookup layout 'line-width)))
(fill-space
(cond
- ((= word-count 1)
+ ((= word-count 1)
(list
(/ (- line-width text-width) 2)
(/ (- line-width text-width) 2)))
((= word-count 2)
(list
(- line-width text-width)))
- (else
+ (else
(get-fill-space word-count line-width text-widths))))
(fill-space-normal
(map (lambda (x)
word-space
x))
fill-space))
-
+
(line-stencils (if (= word-count 1)
(list
point-stencil
empty-stencil
(stack-stencils-padding-list X
RIGHT fill-space-normal line-stencils))))
-
+
(define-builtin-markup-command (line layout props args)
(markup-list?)
align
(define (wordwrap-stencils stencils
justify base-space line-width text-dir)
- "Perform simple wordwrap, return stencil of each line."
+ "Perform simple wordwrap, return stencil of each line."
(define space (if justify
;; justify only stretches lines.
(* 0.7 base-space)
line-stencils))))
(line-word-space (cond ((not justify) space)
;; don't stretch last line of paragraph.
- ;; hmmm . bug - will overstretch the last line in some case.
+ ;; hmmm . bug - will overstretch the last line in some case.
((null? (cdr line-break))
base-space)
((null? line-stencils) 0.0)
((baseline-skip)
wordwrap-string-internal-markup-list)
"Wordwrap a string. Paragraphs may be separated with double newlines.
-
+
@lilypond[verbatim,quote]
\\markup {
\\override #'(line-width . 40)
((baseline-skip)
wordwrap-string-internal-markup-list)
"Justify a string. Paragraphs may be separated with double newlines
-
+
@lilypond[verbatim,quote]
\\markup {
\\override #'(line-width . 40)
align
()
"Wordwrap the data which has been assigned to @var{symbol}.
-
+
@lilypond[verbatim,quote]
\\header {
title = \"My title\"
align
()
"Justify the data which has been assigned to @var{symbol}.
-
+
@lilypond[verbatim,quote]
\\header {
title = \"My title\"
;;
;; TODO: should extract baseline-skip from each argument somehow..
-;;
+;;
(define-builtin-markup-command (column layout props args)
(markup-list?)
align
(define (general-column align-dir baseline mols)
"Stack @var{mols} vertically, aligned to @var{align-dir} horizontally."
-
+
(let* ((aligned-mols (map (lambda (x) (ly:stencil-aligned-to x X align-dir)) mols)))
(stack-lines -1 0.0 baseline aligned-mols)))
align
((baseline-skip))
"
-@cindex text columns, left-aligned
+@cindex text columns, left-aligned
Put @code{args} in a left-aligned column.
"
@cindex setting extent of text objects
-Set the dimensions of @var{arg} to @var{x} and@tie{}@var{y}."
+Set the dimensions of @var{arg} to @var{x} and@tie{}@var{y}."
(let* ((m (interpret-markup layout props arg)))
(ly:make-stencil (ly:stencil-expr m) x y)))
align
()
"Add padding @var{amount} all around @var{arg}.
-
+
@lilypond[verbatim,quote]
\\markup {
\\box {
other
()
"Make @var{arg} transparent.
-
+
@lilypond[verbatim,quote]
\\markup {
\\transparent {
font
()
"Decrease the font size relative to the current setting.
-
+
@lilypond[verbatim,quote]
\\markup {
\\fontsize #3.5 {
}
@end lilypond"
(interpret-markup
- layout
+ layout
(prepend-alist-chain 'font-size (magnification->font-size sz) props)
arg))
font
()
"Switch to bold font-series.
-
+
@lilypond[verbatim,quote]
\\markup {
default
font
()
"Switch to the sans serif font family.
-
+
@lilypond[verbatim,quote]
\\markup {
default
font
()
"Set font family to @code{roman}.
-
+
@lilypond[verbatim,quote]
\\markup {
\\sans \\bold {
font
()
"Set font size to default.
-
+
@lilypond[verbatim,quote]
\\markup {
\\teeny {
font
()
"Set font size to -1.
-
+
@lilypond[verbatim,quote]
\\markup {
default
font
()
"Set font size to -2.
-
+
@lilypond[verbatim,quote]
\\markup {
default
font
()
"Set font size to -3.
-
+
@lilypond[verbatim,quote]
\\markup {
default
font
()
"Set @code{font-shape} to @code{caps}
-
+
Note: @code{\\fontCaps} requires the installation and selection of
fonts which support the @code{caps} font shape."
(interpret-markup layout (prepend-alist-chain 'font-shape 'caps props) arg))
font
()
"Use a text font instead of music symbol or music alphabet font.
-
+
@lilypond[verbatim,quote]
\\markup {
\\number {
font
()
"Use @code{font-family} typewriter for @var{arg}.
-
+
@lilypond[verbatim,quote]
\\markup {
default
\\sesquisharp
}
@end lilypond"
- (interpret-markup layout props (markup #:musicglyph (assoc-get 3/4 standard-alteration-glyph-name-alist ""))))
+ (interpret-markup layout props (markup #:musicglyph (assoc-get 3/4 standard-alteration-glyph-name-alist ""))))
(define-builtin-markup-command (sharp layout props)
()
(let* ((font (ly:paper-get-font layout
(cons '((font-encoding . fetaMusic)
(font-name . #f))
-
+
props)))
(glyph (ly:font-get-glyph font glyph-name)))
(if (null? (ly:stencil-expr glyph))
other
()
"Lookup a glyph by name.
-
+
@lilypond[verbatim,quote]
\\markup {
\\override #'(font-encoding . fetaBraces) {
(define (number->markletter-string vec n)
"Double letters for big marks."
(let* ((lst (vector-length vec)))
-
+
(if (>= n lst)
(string-append (number->markletter-string vec (1- (quotient n lst)))
(number->markletter-string vec (remainder n lst)))
(num-y (interval-widen (cons center center) (abs dy)))
(is-sane (and (interval-sane? num-x) (interval-sane? num-y)))
(slash-stencil (if is-sane
- (make-line-stencil thickness
+ (make-line-stencil thickness
(car num-x) (- (interval-center num-y) dy)
(cdr num-x) (+ (interval-center num-y) dy))
#f)))
(slashed-digit-internal layout props num #f font-size thickness))
;; eyeglasses
-(define eyeglassesps
+(define eyeglassesps
"0.15 setlinewidth
-0.9 0 translate
1.1 1.1 scale
"")))
(list (if (= dir UP) "u" "d")
"s")))
-
+
(define (get-glyph-name font cands)
(if (null? cands)
""
(if (ly:stencil-empty? (ly:font-get-glyph font (car cands)))
(get-glyph-name font (cdr cands))
(car cands))))
-
+
(let* ((font (ly:paper-get-font layout (cons '((font-encoding . fetaMusic)) props)))
(size-factor (magstep font-size))
(stem-length (* size-factor (max 3 (- log 1))))
(cons (min stemy (cdr attach-off))
(max stemy (cdr attach-off)))
(/ stem-thickness 3))))
-
+
(dot (ly:font-get-glyph font "dots.dot"))
(dotwid (interval-length (ly:stencil-extent dot X)))
(dots (and (> dot-count 0)
stem-glyph)))
stem-glyph))
-(define-public log2
+(define-public log2
(let ((divisor (log 2)))
(lambda (z) (inexact->exact (/ (log z) divisor)))))
()
"
@cindex raising text
-
+
Raise @var{arg} by the distance @var{amount}.
A negative @var{amount} indicates lowering, see also @code{\\lower}.
font
((font-size 0)
(baseline-skip))
- "
+ "
@cindex superscript text
Set @var{arg} in superscript.
()
"
@cindex translating text
-
+
Translate @var{arg} relative to its surroundings. @var{offset}
is a pair of numbers representing the displacement in the X and Y axis.
()
"
@cindex placing horizontal brackets around text
-
+
Draw horizontal brackets around @var{arg}.
@lilypond[verbatim,quote]
()
"
@cindex placing vertical brackets around text
-
+
Draw vertical brackets around @var{arg}.
@lilypond[verbatim,quote]
`(delay-stencil-evaluation
,(delay (ly:stencil-expr
(let* ((table (ly:output-def-lookup layout 'label-page-table))
- (label-page (and (list? table) (assoc label table)))
- (page-number (and label-page (cdr label-page)))
+ (page-number (if (list? table)
+ (assoc-get label table)
+ #f))
(page-markup (if page-number (format "~a" page-number) default))
(page-stencil (interpret-markup layout props page-markup))
(gap (- (interval-length x-ext)
symbol 'clefOctavation)
(music 'ApplyContext
procedure ly:set-middle-C!)))))
- (let ((clef-prop+name (assoc (list ?clef-glyph ?clef-position 0)
+ (let ((clef-name (assoc-get (list ?clef-glyph ?clef-position 0)
clef-name-alist)))
- (if clef-prop+name
+ (if clef-name
(format #f "\\clef \"~a~{~a~a~}\"~a"
- (cdr clef-prop+name)
+ clef-name
(cond ((= 0 ?clef-octavation)
(list "" ""))
((> ?clef-octavation 0)
((= i dots) m)
(set! m (+ m delta)))
factor))))
+
(define moment-duration-alist (map (lambda (duration)
(cons (duration->moment duration)
duration))
(list 0 1 2 3 4))))
(define (moment->duration moment)
- (let ((result (assoc (- moment) moment-duration-alist =)))
- (and result
- (cdr result))))
+ (assoc-get (- moment) moment-duration-alist))
(define-extra-display-method ContextSpeccedMusic (expr parser)
"If `expr' is a partial measure, return \"\\partial ...\".
m)))
(define-public (make-repeated-music name)
- (let* ((handle (assoc name '(("volta" . VoltaRepeatedMusic)
- ("unfold" . UnfoldedRepeatedMusic)
- ("percent" . PercentRepeatedMusic)
- ("tremolo" . TremoloRepeatedMusic))))
- (music-name (if (pair? handle)
- (cdr handle)
- (begin
- (ly:warning (_ "unknown repeat type `~S'") name)
- (ly:warning (_ "See define-music-types.scm for supported repeats"))
- 'VoltaRepeatedMusic))))
- (make-music music-name)))
+ (let* ((repeated-music (assoc-get name '(("volta" . VoltaRepeatedMusic)
+ ("unfold" . UnfoldedRepeatedMusic)
+ ("percent" . PercentRepeatedMusic)
+ ("tremolo" . TremoloRepeatedMusic))))
+ (repeated-music-name (if repeated-music
+ repeated-music
+ (begin
+ (ly:warning (_ "unknown repeat type `~S'") name)
+ (ly:warning (_ "See define-music-types.scm for supported repeats"))
+ 'VoltaRepeatedMusic))))
+ (make-music repeated-music-name)))
;; extract ifaces, and put grob into the hash table.
(map
(lambda (x)
- (let* ((metah (assoc 'meta (cdr x)))
- (meta (cdr metah))
- (ifaces (cdr (assoc 'interfaces meta))))
+ (let* ((meta (assoc-get 'meta (cdr x)))
+ (ifaces (assoc-get 'interfaces meta)))
(map (lambda (iface)
(hashq-set!
"Given a property alist DESCRIPTION, make a documentation
node."
- (let* ((metah (assoc 'meta description))
- (meta (cdr metah))
- (name (cdr (assoc 'name meta)))
+ (let* ((meta (assoc-get 'meta description))
+ (name (assoc-get 'name meta))
;; (bla (display name))
- (ifaces (map lookup-interface (cdr (assoc 'interfaces meta))))
+ (ifaces (map lookup-interface (assoc-get 'interfaces meta)))
(ifacedoc (map ref-ify
(sort
(map (lambda (iface)
(engraver-accepts-music-types? (cdr types) grav))))
(define (engraver-doc-string engraver in-which-contexts)
- (let* ((propsr (cdr (assoc 'properties-read (ly:translator-description engraver))))
- (propsw (cdr (assoc 'properties-written (ly:translator-description engraver))))
- (accepted (cdr (assoc 'events-accepted (ly:translator-description engraver))))
+ (let* ((propsr (assoc-get 'properties-read (ly:translator-description engraver)))
+ (propsw (assoc-get 'properties-written (ly:translator-description engraver)))
+ (accepted (assoc-get 'events-accepted (ly:translator-description engraver)))
(name-sym (ly:translator-name engraver))
(name-str (symbol->string name-sym))
- (desc (cdr (assoc 'description (ly:translator-description engraver))))
+ (desc (assoc-get 'description (ly:translator-description engraver)))
(grobs (engraver-grobs engraver)))
(string-append
(apply append
(map
(lambda (x)
- (let* ((context (cdr (assoc 'context-name x)))
+ (let* ((context (assoc-get 'context-name x))
(group (assq-ref x 'group-type))
(consists (append
(if group
(list group)
'())
- (cdr (assoc 'consists x)))))
+ (assoc-get 'consists x))))
(if (member name-sym consists)
(list context)
'())))
(define (context-doc context-desc)
- (let* ((name-sym (cdr (assoc 'context-name context-desc)))
+ (let* ((name-sym (assoc-get 'context-name context-desc))
(name (symbol->string name-sym))
- (aliases (map symbol->string (cdr (assoc 'aliases context-desc))))
- (desc-handle (assoc 'description context-desc))
- (desc (if (and (pair? desc-handle) (string? (cdr desc-handle)))
- (cdr desc-handle) "(not documented)"))
-
- (accepts (cdr (assoc 'accepts context-desc)))
- (consists (cdr (assoc 'consists context-desc)))
- (props (cdr (assoc 'property-ops context-desc)))
+ (aliases (map symbol->string (assoc-get 'aliases context-desc)))
+ (desc (assoc-get 'description context-desc "(not documented"))
+ (accepts (assoc-get 'accepts context-desc))
+ (consists (assoc-get 'consists context-desc))
+ (props (assoc-get 'property-ops context-desc))
(grobs (context-grobs context-desc))
(grob-refs (map ref-ify (sort grobs ly:string-ci<?))))
grav)))
(if (eq? eg #f)
'()
- (map symbol->string (cdr (assoc 'grobs-created (ly:translator-description eg)))))))
+ (map symbol->string (assoc-get 'grobs-created (ly:translator-description eg))))))
(define (context-grobs context-desc)
(let* ((group (assq-ref context-desc 'group-type))
(if group
(list group)
'())
- (cdr (assoc 'consists context-desc))))
+ (assoc-get 'consists context-desc)))
(grobs (apply append
(map engraver-grobs consists))))
grobs))
;;;; documentation-lib.scm -- Assorted Functions for generated documentation
;;;;
;;;; source file of the GNU LilyPond music typesetter
-;;;;
+;;;;
;;;; (c) 2000--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
;;;; Jan Nieuwenhuizen <janneke@gnu.org>
(define (texi-section-command level)
- (cdr (assoc level '(
- ;; Hmm, texinfo doesn't have ``part''
- (0 . "@top")
- (1 . "@chapter")
- (2 . "@section")
- (3 . "@subsection")
- (4 . "@unnumberedsubsubsec")
- (5 . "@unnumberedsubsubsec")))))
+ (assoc-get level '(
+ ;; Hmm, texinfo doesn't have ``part''
+ (0 . "@top")
+ (1 . "@chapter")
+ (2 . "@section")
+ (3 . "@subsection")
+ (4 . "@unnumberedsubsubsec")
+ (5 . "@unnumberedsubsubsec"))))
(define (texi-appendix-section-command level)
- (cdr (assoc level '((0 . "@top")
- (1 . "@appendix")
- (2 . "@appendixsec")
- (3 . "@appendixsubsec")
- (4 . "@appendixsubsubsec")
- (5 . "@appendixsubsubsec")))))
+ (assoc-get level '((0 . "@top")
+ (1 . "@appendix")
+ (2 . "@appendixsec")
+ (3 . "@appendixsubsec")
+ (4 . "@appendixsubsubsec")
+ (5 . "@appendixsubsubsec"))))
(define (one-item->texi label-desc-pair)
"Document one (LABEL . DESC); return empty string if LABEL is empty string."
"Generate what is between @menu and @end menu."
(let ((maxwid
(apply max (map (lambda (x) (string-length (car x))) items-alist))))
-
+
(string-append
"\n@menu"
(apply string-append
(map (lambda (x)
(string-append
- (string-pad-right
+ (string-pad-right
(string-append "\n* " (car x) ":: ")
(+ maxwid 8))
(cdr x)))
(define (human-listify lst)
"Produce a textual enumeration from LST, a list of strings"
-
+
(cond
((null? lst) "none")
((null? (cdr lst)) (car lst))
(alist (if (pair? rest) (car rest) '()))
(type?-name (string->symbol
(string-append (symbol->string where) "-type?")))
- (doc-name (string->symbol
+ (doc-name (string->symbol
(string-append (symbol->string where) "-doc")))
(type (object-property sym type?-name))
(typename (type-name type))
(desc (object-property sym doc-name))
- (handle (assoc sym alist)))
+ (init-value (assoc-get sym alist)))
(if (eq? desc #f)
(ly:error (_ "cannot find description for property ~S (~S)") sym where))
-
+
(cons
(string-append "@code{" name "} "
"(" typename ")"
- (if handle
+ (if init-value
(string-append
":\n\n"
- (scm->texi (cdr handle))
+ (scm->texi init-value)
"\n\n")
""))
desc)))
#f
systems)
(for-each (lambda (system-list)
- (clip-score-systems
- (if (> count 0)
- (format "~a-~a" basename count)
- basename)
- system-list))
+ ;; filter out headers and top-level markup
+ (if (pair? system-list)
+ (clip-score-systems
+ (if (> count 0)
+ (format "~a-~a" basename count)
+ basename)
+ system-list)))
score-system-list)))
(define-public (output-preview-framework basename book scopes fields)
(define (helper key alist-list default)
(if (null? alist-list)
default
- (let* ((handle (assoc key (car alist-list))))
- (if (pair? handle)
- (append (cdr handle) (chain-assoc-get key (cdr alist-list) '()))
+ (let* ((entry (assoc-get key (car alist-list))))
+ (if entry
+ (append entry (chain-assoc-get key (cdr alist-list) '()))
(helper key (cdr alist-list) default)))))
(helper key alist-list
; and draw-barre
(dot-position
(assoc-get
- 'dot-position details default-dot-position)) ; needed for
+ 'dot-position details default-dot-position)) ; needed for
; draw-dots and draw-barre
(th
(* (ly:output-def-lookup layout 'line-thickness)
(* size (assoc-get 'xo-padding details 0.2))) ; needed only here
(parameters (fret-parse-marking-list marking-list my-fret-count))
(capo-fret (assoc-get 'capo-fret parameters 0))
- (dot-list (cdr (assoc 'dot-list parameters)))
- (xo-list (cdr (assoc 'xo-list parameters)))
- (fret-range (cdr (assoc 'fret-range parameters)))
+ (dot-list (assoc-get 'dot-list parameters))
+ (xo-list (assoc-get 'xo-list parameters))
+ (fret-range (assoc-get 'fret-range parameters))
(my-fret-count (fret-count fret-range))
- (barre-list (cdr (assoc 'barre-list parameters)))
+ (barre-list (assoc-get 'barre-list parameters))
(barre-type
(assoc-get 'barre-type details 'curved))
(fret-diagram-stencil '()))
xo-stencil 'fret orientation))
(xo-stencil-offset
(stencil-coordinate-offset
- (- diagram-fret-top
+ (- diagram-fret-top
xo-fret-offset
(* size xo-padding))
0)))
(define-public assoc-get ly:assoc-get)
+(define-public chain-assoc-get ly:chain-assoc-get)
+
(define-public (uniqued-alist alist acc)
(if (null? alist) acc
(if (assoc (caar alist) acc)
(string<? (symbol->string (car x))
(symbol->string (car y))))
-(define-public (chain-assoc-get x alist-list . default)
- "Return ALIST entry for X. Return DEFAULT (optional, else #f) if not
-found."
-
- (define (helper x alist-list default)
- (if (null? alist-list)
- default
- (let* ((handle (assoc x (car alist-list))))
- (if (pair? handle)
- (cdr handle)
- (helper x (cdr alist-list) default)))))
-
- (helper x alist-list
- (if (pair? default) (car default) #f)))
-
(define (map-alist-vals func list)
"map FUNC over the vals of LIST, leaving the keys."
(if (null? list)
(if (ly:get-option 'trace-scheme-coverage)
(coverage:enable))
-(if (ly:get-option 'warning-as-error)
- (begin
- (set! ly:warning ly:error)
- (set! ly:programming-error ly:error)))
-
(define-public parser #f)
(stats (gc-stats)))
(list (- (+ (tms:cutime t)
(tms:utime t))
- (ly:assoc-get 'gc-time-taken stats))
- (ly:assoc-get 'total-cells-allocated stats 0))))
+ (assoc-get 'gc-time-taken stats))
+ (assoc-get 'total-cells-allocated stats 0))))
(define (dump-profile base last this)
(let* ((outname (format "~a.profile" (dir-basename base ".ly")))
(format "~a ~a ~a\n"
gc-protect-stat-count
sym
- (let ((sym-stat (assoc sym stats)))
- (if sym-stat
- (cdr sym-stat)
- "?")))
+ (assoc-get sym stats "?"))
+
outfile))
'(protected-objects bytes-malloced cell-heap-size)))
(set! gc-dumping #f)
(if (eq? (current-thread) trace-thread)
#t ;; do nothing.
(let*
- ((cells (cdr (assoc 'total-cells-allocated (gc-stats))))
+ ((cells (assoc-get 'total-cells-allocated (gc-stats)))
(proc (arg-procedure args))
(time (tms:utime (times)))
(stack (extract-trace continuation)))
(set! trace-points '())
(set! continue-tracing #t)
(set! trace-count 0)
- (set! start-memory (cdr (assoc 'total-cells-allocated (gc-stats))))
+ (set! start-memory (assoc-get 'total-cells-allocated (gc-stats)))
(set! start-time (tms:utime (times)))
(install-tracepoint))
(for-each
(lambda (r)
(let*
- ((mem (- (cdr (assoc 'cells r)) start-memory))
- (proc (cdr (assoc 'proc r)))
- (stack (cdr (assoc 'stack r)))
- (time (- (cdr (assoc 'time r)) start-time)))
+ ((mem (- (assoc-get 'cells r) start-memory))
+ (proc (assoc-get 'proc r))
+ (stack (assoc-get 'stack r))
+ (time (- (assoc-get 'time r) start-time)))
(format graph-out "~a ~a\n" time mem)
(if stack
(- mem last-mem) proc)
(do
((j 0 (1+ j))
- (stack (cdr (assoc 'stack r)) stack))
+ (stack (assoc-get 'stack r) stack))
((>= j (vector-length stack)))
(format stacks-out "\t~a\n"
;;;; midi.scm -- scm midi variables and functions
;;;;
;;;; source file of the GNU LilyPond music typesetter
-;;;;
+;;;;
;;;; (c) 2000--2009 Jan Nieuwenhuizen <janneke@gnu.org>
;; define factor of total volume per dynamic marking
(define-public absolute-volume-alist '())
(set! absolute-volume-alist
- (append
+ (append
'(
("sf" . 1.00)
("fffff" . 0.95)
absolute-volume-alist))
(define-public (default-dynamic-absolute-volume s)
- (let ((entry (assoc s absolute-volume-alist)))
- (if entry
- (cdr entry))))
+ (assoc-get s absolute-volume-alist))
;; define factors of total volume of minimum and maximum volume
(define-public instrument-equalizer-alist '())
(set! instrument-equalizer-alist
- (append
+ (append
'(
("flute" . (0 . 0.7))
("oboe" . (0 . 0.7))
instrument-equalizer-alist))
(define-public (default-instrument-equalizer s)
- (let ((entry (assoc s instrument-equalizer-alist)))
- (if entry
- (cdr entry))))
+ (assoc-get s instrument-equalizer-alist))
;; (name . program+32768*(channel10 ? 1 : 0))
(define instrument-names-alist '())
returns whether the instrument should use midi channel 9
"
(let* ((inst (symbol->string instrument))
- (entry (assoc inst instrument-names-alist)))
- (and entry (>= (cdr entry) 32768))))
+ (entry (assoc-get inst instrument-names-alist)))
+ (and entry (>= entry 32768)
+ entry)))
(define-public (midi-program instrument)
"
returns the program of the instrument
"
(let* ((inst (symbol->string instrument))
- (entry (assoc inst instrument-names-alist)))
- (if entry (modulo (cdr entry) 32768) #f)))
+ (entry (assoc-get inst instrument-names-alist)))
+ (if entry
+ (modulo entry 32768)
+ #f)))
;; 90 == 90/127 == 0.71 is supposed to be the default value
;; urg: we should set this at start of track
(define-public (alterations-in-key pitch-list)
"Count number of sharps minus number of flats"
-
+
(* (apply + (map cdr pitch-list)) 2))
(ly:context-unset-property where 'ottavation)))
(let* ((offset (* -7 octavation))
- (string (cdr (assoc octavation '((2 . "15ma")
- (1 . "8va")
- (0 . #f)
- (-1 . "8vb")
- (-2 . "15mb"))))))
+ (string (assoc-get octavation '((2 . "15ma")
+ (1 . "8va")
+ (0 . #f)
+ (-1 . "8vb")
+ (-2 . "15mb")))))
(ly:context-set-property! context 'middleCOffset offset)
(ly:context-set-property! context 'ottavation string)
(ly:set-middle-C! context)))
"
(let ((meta (ly:grob-property grob 'meta)))
- (if (equal? (cdr (assoc 'name meta)) grob-name)
+ (if (equal? (assoc-get 'name meta) grob-name)
(set! (ly:grob-property grob symbol) val))))
(need-accidental #f)
(previous-alteration #f)
(from-other-octaves #f)
- (from-same-octave (ly:assoc-get pitch-handle local-key-sig))
- (from-key-sig (ly:assoc-get notename local-key-sig)))
+ (from-same-octave (assoc-get pitch-handle local-key-sig))
+ (from-key-sig (assoc-get notename local-key-sig)))
;; If no key signature match is found from localKeySignature, we may have a custom
;; type with octave-specific entries of the form ((octave . pitch) alteration)
;; instead of (pitch . alteration). Since this type cannot coexist with entries in
;; localKeySignature, try extracting from keySignature instead.
(if (equal? from-key-sig #f)
- (set! from-key-sig (ly:assoc-get pitch-handle key-sig)))
+ (set! from-key-sig (assoc-get pitch-handle key-sig)))
;; loop through localKeySignature to search for a notename match from other octaves
(let loop ((l local-key-sig))
(define-public (bar-line::calc-glyph-name grob)
(let* ((glyph (ly:grob-property grob 'glyph))
(dir (ly:item-break-dir grob))
- (result (assoc glyph bar-glyph-alist))
+ (result (assoc-get glyph bar-glyph-alist))
(glyph-name (if (= dir CENTER)
glyph
(if (and result
- (string? (index-cell (cdr result) dir)))
- (index-cell (cdr result) dir)
+ (string? (index-cell result dir)))
+ (index-cell result dir)
#f))))
glyph-name))
(define-public (bar-line::calc-break-visibility grob)
(let* ((glyph (ly:grob-property grob 'glyph))
- (result (assoc glyph bar-glyph-alist)))
+ (result (assoc-get glyph bar-glyph-alist)))
(if result
- (vector (string? (cadr result)) #t (string? (cddr result)))
+ (vector (string? (car result)) #t (string? (cdr result)))
all-invisible)))
(define-public (shift-right-at-line-begin g)
(tag (if (and cause (integer? (ly:event-property cause 'input-tag)))
(ly:event-property cause 'input-tag)
-1))
- (name (cdr (assoc 'name (ly:grob-property grob 'meta)))))
+ (name (assoc-get 'name (ly:grob-property grob 'meta))))
(apply format
(append (list "cause ~a \"~a\" ~a ~a ~a ~a\n" tag name)
;;;; paper.scm -- manipulate the paper and layout block.
;;;;
;;;; source file of the GNU LilyPond music typesetter
-;;;;
+;;;;
;;;; (c) 2004--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
(define-public (set-paper-dimension-variables mod)
(module-define! module sym val))))
(setm! 'text-font-size (* 12 factor))
-
+
(setm! 'output-scale ss)
(setm! 'fonts (make-century-schoolbook-tree factor))
(setm! 'staff-height staff-height)
(setm! 'line-thickness (calc-line-thickness ss pt))
- ;; sync with feta
+ ;; sync with feta
(setm! 'ledger-line-thickness (+ (* 0.5 pt) (/ ss 10)))
- ;; sync with feta
+ ;; sync with feta
(setm! 'blot-diameter (* 0.4 pt))
))
; maybe not necessary.
; but let's be paranoid. Maybe someone still refers to the
- ; old one.
+ ; old one.
(new-paper (ly:output-def-clone pap))
-
+
(new-scope (ly:output-def-scope new-paper)))
-
+
(if in-layout?
(ly:warning (_ "set-global-staff-size: not in toplevel scope")))
(define (internal-set-paper-size module name landscape?)
(define (swap x)
(cons (cdr x) (car x)))
-
- (let* ((entry (assoc name paper-alist))
+
+ (let* ((entry (assoc-get name paper-alist))
(is-paper? (module-defined? module 'is-paper))
(mm (eval 'mm module)))
-
+
(cond
((not is-paper?)
(ly:warning (_ "This is not a \\layout {} object, ~S") module))
- ((pair? entry)
+ (entry
- (set! entry (eval (cdr entry) module))
+ (set! entry (eval entry module))
(if landscape?
(set! entry (swap entry)))
(set-paper-dimensions module (car entry) (cdr entry))
(module-define! module 'papersizename name)
- (module-define! module 'landscape
+ (module-define! module 'landscape
(if landscape? #t #f)))
(else
(ly:warning (_ "Unknown paper size: ~a") name)))))
(module-define! scope v
(/ val scale))
- ;; spurious warnings, eg. for paper-width, paper-height.
+ ;; spurious warnings, eg. for paper-width, paper-height.
;; (ly:warning (_ "not a number, ~S = ~S " v val))
)))
-
+
dim-vars)
-
+
new-pap))
(set! oct
(* (if (equal? (match:substring match 2) "^") -1 1)
(- (string->number (match:substring match 3)) 1)))))
- (set! e (assoc clef-name supported-clefs))
- (if (pair? e)
+ (set! e (assoc-get clef-name supported-clefs))
+ (if e
(let* ((musics (map make-prop-set
- `(((symbol . clefGlyph) (value . ,(cadr e)))
+ `(((symbol . clefGlyph) (value . ,(car e)))
((symbol . middleCClefPosition)
(value . ,(+ oct
- (caddr e)
- (cdr (assoc (cadr e) c0-pitch-alist)))))
- ((symbol . clefPosition) (value . ,(caddr e)))
+ (cadr e)
+ (assoc-get (car e) c0-pitch-alist))))
+ ((symbol . clefPosition) (value . ,(cadr e)))
((symbol . clefOctavation) (value . ,(- oct))))))
(recalc-mid-C (make-music 'ApplyContext))
(seq (make-music 'SequentialMusic
;;;; part-combiner.scm -- Part combining, staff changes.
;;;;
;;;; source file of the GNU LilyPond music typesetter
-;;;;
+;;;;
;;;; (c) 2004--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
;; todo: figure out how to make module,
;; of (SYMBOL . RESULT-INDEX), which indicates where
;; said spanner was started.
(spanner-state #:init-value '() #:accessor span-state))
-
+
(define-method (write (x <Voice-state> ) file)
(display (when x) file)
(display " evs = " file)
;;
(is #:init-keyword #:voice-states #:accessor voice-states)
(synced #:init-keyword #:synced #:init-value #f #:getter synced?))
-
+
(define-method (write (x <Split-state> ) f)
(display (when x) f)
"Merge lists VS1 and VS2, containing Voice-state objects into vector
of Split-state objects, crosslinking the Split-state vector and
Voice-state objects
-"
+"
(define (helper ss-idx ss-list idx1 idx2)
(let* ((state1 (if (< idx1 (vector-length vs1)) (vector-ref vs1 idx1) #f))
(state2 (if (< idx2 (vector-length vs2)) (vector-ref vs2 idx2) #f))
(define (helper index active)
"Analyse EVS at INDEX, given state ACTIVE."
-
+
(define (analyse-tie-start active ev)
(if (equal? (ly:event-property ev 'class) 'tie-event)
(acons 'tie (split-index (vector-ref voice-state-vec index))
active)
active))
-
+
(define (analyse-tie-end active ev)
(if (equal? (ly:event-property ev 'class) 'note-event)
(assoc-remove! active 'tie)
(equal? STOP (ly:event-property ev 'span-direction))))
(assoc-remove! (assoc-remove! active 'cresc) 'decr)
active))
-
+
(define (active<? a b)
(cond ((symbol<? (car a) (car b)) #t)
((symbol<? (car b) (car b)) #f)
(else (< (cdr a) (cdr b)))))
-
+
(define (analyse-span-event active ev)
(let* ((name (ly:event-property ev 'class))
(key (cond ((equal? name 'slur-event) 'slur)
(set! (span-state (vector-ref voice-state-vec index))
(list-copy active))
(helper (1+ index) active))))
-
+
(helper 0 '()))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(define-public (recording-group-emulate music odef)
+(define-public (recording-group-emulate music odef)
"Interprets music according to odef, but stores all events in a chronological list, similar to the Recording_group_engraver in 2.8 and earlier"
(let*
((context-list '())
(now-mom (ly:make-moment 0 0))
(global (ly:make-global-context odef))
- (mom-listener (ly:make-listener
+ (mom-listener (ly:make-listener
(lambda (tev)
(set! now-mom (ly:event-property tev 'moment)))))
(new-context-listener
(listener (ly:parser-lookup parser 'partCombineListener))
(evs2 (recording-group-emulate m2 listener))
(evs1 (recording-group-emulate m1 listener)))
-
+
(set! (ly:music-property m 'elements) (list m1 m2))
(set! (ly:music-property m 'split-list)
- (if (and (assoc "one" evs1) (assoc "two" evs2))
- (determine-split-list (reverse! (cdr (assoc "one" evs1)) '())
- (reverse! (cdr (assoc "two" evs2)) '()))
- '() ))
+ (if (and (assoc "one" evs1) (assoc "two" evs2))
+ (determine-split-list (reverse! (assoc-get "one" evs1) '())
+ (reverse! (assoc-get "two" evs2) '()))
+ '()))
m))
(define-public (determine-split-list evl1 evl2)
(voice-state-vec1 (make-voice-states evl1))
(voice-state-vec2 (make-voice-states evl2))
(result (make-split-state voice-state-vec1 voice-state-vec2)))
-
+
(define (analyse-time-step result-idx)
(define (put x . index)
"Put the result to X, starting from INDEX backwards.
(begin
(set! (configuration (vector-ref result i)) x)
(put x (1- i))))))
-
+
(define (copy-state-from state-vec vs)
(define (copy-one-state key-idx)
(let* ((idx (cdr key-idx))
(previous-voice-state vs2)))
(if (and (null? (span-state vs1)) (null? (span-state vs2)))
(put 'chords)))))))))
-
+
(if (< result-idx (vector-length result))
(let* ((now-state (vector-ref result result-idx))
(vs1 (car (voice-states now-state)))
(vs2 (cdr (voice-states now-state))))
-
+
(cond ((not vs1) (put 'apart))
((not vs2) (put 'apart))
(else
(equal? active1 active2)
(equal? new-active1 new-active2))
(analyse-notes now-state)
-
+
;; active states different:
(put 'apart)))
-
+
;; go to the next one, if it exists.
(analyse-time-step (1+ result-idx)))))))
-
+
(define (analyse-a2 result-idx)
(if (< result-idx (vector-length result))
(let* ((now-state (vector-ref result result-idx))
(vs2 (cdr (voice-states now-state))))
(if (and (equal? (configuration now-state) 'chords)
vs1 vs2)
- (let ((notes1 (note-events vs1))
+ (let ((notes1 (note-events vs1))
(notes2 (note-events vs2)))
(cond ((and (= 1 (length notes1))
(= 1 (length notes2))
(= 0 (length notes2)))
(set! (configuration now-state) 'unisilence)))))
(analyse-a2 (1+ result-idx)))))
-
+
(define (analyse-solo12 result-idx)
-
+
(define (previous-config vs)
(let* ((pvs (previous-voice-state vs))
(spi (if pvs (split-index pvs) #f))
(if prev-split
(configuration prev-split)
'apart)))
-
+
(define (put-range x a b)
;; (display (list "put range " x a b "\n"))
(do ((i a (1+ i)))
((> i b) b)
(set! (configuration (vector-ref result i)) x)))
-
+
(define (put x)
;; (display (list "putting " x "\n"))
(set! (configuration (vector-ref result result-idx)) x))
-
+
(define (current-voice-state now-state voice-num)
(define vs ((if (= 1 voice-num) car cdr)
(voice-states now-state)))
(if (or (not vs) (equal? (when now-state) (when vs)))
vs
(previous-voice-state vs)))
-
+
(define (try-solo type start-idx current-idx)
"Find a maximum stretch that can be marked as solo. Only set
the mark when there are no spanners active.
;;
;; This includes rests. This isn't a problem: long rests
;; will be shared with the silent voice, and be marked
- ;; as unisilence. Therefore, long rests won't
+ ;; as unisilence. Therefore, long rests won't
;; accidentally be part of a solo.
;;
(put-range type start-idx current-idx)
(try-solo type start-idx (1+ current-idx)))))
;; try-solo
start-idx))
-
+
(define (analyse-moment result-idx)
"Analyse 'apart starting at RESULT-IDX. Return next index. "
(let* ((now-state (vector-ref result result-idx))
(equal? (when vs2) (when now-state))
(null? (previous-span-state vs2)))
(try-solo 'solo2 result-idx result-idx))
-
+
(else (1+ result-idx)))
;; analyse-moment
(1+ result-idx))))
-
+
(if (< result-idx (vector-length result))
(if (equal? (configuration (vector-ref result result-idx)) 'apart)
(analyse-solo12 (analyse-moment result-idx))
((note? object)
(let ((pitch (ly:pitch-semitones (note-pitch object))))
(format #f "~a~a~a~a"
- (cdr (assoc (modulo pitch 12) pp-pitch-names))
+ (assoc-get (modulo pitch 12) pp-pitch-names)
(let ((octave (+ (inexact->exact (floor (/ pitch 12))) 1)))
(cond
((= octave 0)
joined ; to the next note
origin
)
-
+
(defstruct rest
duration
origin
count ; number of repetitions
)
-(defstruct verse ;
+(defstruct verse ;
text ; separate text element (syllable or word)
notelist/rests ; list of note lists (slurs) and rests
(unfinished #f) ; whether to be merged with the following verse
(warning (safe-car (if (null? note-list) consumed note-list))
"Unfinished slur: ~a ~a" context consumed))
(values (reverse consumed) note-list))))
-
+
(define (consume-skip-notes skip note-list context)
;; Returns either note list (skip word defined) or rest instance (no skip word) + new note-list.
(assert (skip? skip))
(insert-lyrics! (get-lyrics (music-context-music music-context) context)
score-list context)
(debug "Final score list" score-list)))
- music-context-list)
+ music-context-list)
(extract-verses score-list)))
(let* ((semitones (ly:pitch-semitones pitch))
(octave (inexact->exact (floor (/ semitones 12))))
(tone (modulo semitones 12)))
- (format #f "~a~a" (cadr (assoc tone festival-note-mapping))
+ (format #f "~a~a" (car (assoc-get tone festival-note-mapping))
(+ octave *base-octave* *base-octave-shift*))))
(define (write-header port tempo)
(define-public guitar-seven-string-tuning '(4 -1 -5 -10 -15 -20 -25))
(define-public guitar-drop-d-tuning '(4 -1 -5 -10 -15 -22))
(define-public guitar-open-g-tuning '(2 -1 -5 -10 -17 -22))
+(define-public guitar-open-d-tuning '(2 -3 -6 -10 -15 -22))
+(define-public guitar-dadgad-tuning '(2 -3 -7 -10 -15 -22))
+(define-public guitar-lute-tuning '(4 -1 -6 -10 -15 -20))
+(define-public guitar-asus4-tuning '(4 -3 -8 -10 -15 -20))
;; bass tunings
(define-public bass-tuning '(-17 -22 -27 -32))
(define-public bass-four-string-tuning '(-17 -22 -27 -32))
(parentheses-item::calc-parenthesis-stencils grob)))
(parentheses-item::calc-parenthesis-stencils grob))))
-;; the handler for ties in tablature;; split ties yield in a parenthesized
-;; fret number, otherwise the fret number will be invisible.
-(define-public (tie::handle-tab-tie grob)
+;; the handler for ties in tablature; according to TabNoteHead #'details,
+;; the 'tied to' note is handled differently after a line break
+(define-public (tie::handle-tab-note-head grob)
(let* ((original (ly:grob-original grob))
(tied-tab-note-head (ly:spanner-bound grob RIGHT))
(siblings (if (ly:grob? original)
(if (and (>= (length siblings) 2)
(eq? (car (last-pair siblings)) grob))
- ;; tie is split -> parenthesize
- (ly:grob-set-property! tied-tab-note-head 'stencil
- (lambda (grob)
- (parenthesize-tab-note-head grob)))
+ ;; tie is split -> get TabNoteHead #'details
+ (let* ((details (ly:grob-property tied-tab-note-head 'details))
+ (tied-properties (assoc-get 'tied-properties details '()))
+ (tab-note-head-parenthesized (assoc-get 'parenthesize tied-properties #t))
+ ;; we need the begin-of-line entry in the 'break-visibility vector
+ (tab-note-head-visible
+ (vector-ref (assoc-get 'break-visibility
+ tied-properties #(#f #f #t)) 2)))
+
+ (if tab-note-head-visible
+ ;; tab note head is visible
+ (if tab-note-head-parenthesized
+ (ly:grob-set-property! tied-tab-note-head 'stencil
+ (lambda (grob)
+ (parenthesize-tab-note-head grob))))
+ ;; tab note head is invisible
+ (ly:grob-set-property! tied-tab-note-head 'transparent #t)))
;; tie is not split -> make fret number invisible
(ly:grob-set-property! tied-tab-note-head 'transparent #t))))
;; repeat ties occur within alternatives in a repeat construct;
-;; the correspondig fret numbers are shown in parentheses:
-(define-public (repeat-tie::parenthesize-tab-note-head grob)
- (let ((tied-tab-note-head (ly:grob-object grob 'note-head)))
-
- (ly:grob-set-property! tied-tab-note-head 'stencil
- (lambda (grob) (parenthesize-tab-note-head grob)))))
+;; TabNoteHead #'details handles the appearance in this case
+(define-public (repeat-tie::handle-tab-note-head grob)
+ (let* ((tied-tab-note-head (ly:grob-object grob 'note-head))
+ (details (ly:grob-property tied-tab-note-head 'details))
+ (repeat-tied-properties (assoc-get 'repeat-tied-properties details '()))
+ (tab-note-head-visible (assoc-get 'note-head-visible repeat-tied-properties #t))
+ (tab-note-head-parenthesized (assoc-get 'parenthesize repeat-tied-properties #t)))
+
+ (if tab-note-head-visible
+ ;; tab note head is visible
+ ( if tab-note-head-parenthesized
+ (ly:grob-set-property! tied-tab-note-head 'stencil
+ (lambda (grob)
+ (parenthesize-tab-note-head grob))))
+ ;; tab note head is invisible
+ (ly:grob-set-property! tied-tab-note-head 'transparent #t))))
\ No newline at end of file
if not INDENT in self.option_dict:
self.option_dict[INDENT] = '0\\mm'
- # The QUOTE pattern from ly_options only emits the `line-width'
- # keyword.
- if has_line_width and QUOTE in self.option_dict:
- if no_line_width_value:
- del self.option_dict[LINE_WIDTH]
- else:
- del self.option_dict[QUOTE]
-
def compose_ly (self, code):
if FRAGMENT in self.option_dict:
body = FRAGMENT_LY
echo '@macro version'> $@
echo $(TOPLEVEL_VERSION)>> $@
echo '@end macro'>> $@
+ echo ''>> $@
+ echo '@macro versionStable'>> $@
+ echo $(TOPLEVEL_VERSION_STABLE)>> $@
+ echo '@end macro'>> $@
+ echo ''>> $@
+ echo '@macro versionDevel'>> $@
+ echo $(TOPLEVEL_VERSION_DEVEL)>> $@
+ echo '@end macro'>> $@
+ echo ''>> $@
+ echo '@macro downloadStableLinux'>> $@
+ echo -n '@uref{http://download.linuxaudio.org/'>> $@
+ echo -n 'lilypond/binaries/linux-x86/lilypond-'>> $@
+ echo -n $(TOPLEVEL_VERSION_STABLE)>> $@
+ echo '-1.linux-x86.sh,'>> $@
+ echo -n 'Linux x86: LilyPond '>> $@
+ echo -n $(TOPLEVEL_VERSION_STABLE)>> $@
+ echo '}'>> $@
+ echo '@end macro'>> $@
.SECONDARY: $(outdir)/version.itexi $(outdir)/version.texi \
$(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep \