config.hh
-config.make
-config.status
-config.status.lineno
-config.log
-*~
-GNUmakefile
-aclocal.m4
-autom4te.cache
-configure
-*.ps
+*-midi.ly
+*-systems.tex
+*-systems.texi
+*.afm
+*.aux
*.eps
+*.log
+*.midi
+*.orig
*.pdf
-TAGS
-tags
+*.ps
+*.pyc
+*.rej
+*.svg
+*.tfm
+*~
+.dotest
.gdbinit
+.htaccess
+/.sconf_temp
+/.sconsign.dblite
+/scons.cache
?.*
-*.midi
+AUTHORS.txt
+/GNUmakefile
+INSTALL.txt
+TAGS
\#*
-lily-[0-9][0-9][0-9]*
-gcstat*.scm
-*.aux
-*.svg
-*.pyc
-*.log
-.htaccess
-*.tfm
-*.afm
-*.orig
-*.rej
-*-systems.texi
-*-systems.tex
-*-midi.ly
a.out
-.dotest
+aclocal.m4
+autom4te.cache
+config.log
+config.make
+config.status
+config.status.lineno
+configure
+gcstat*.scm
+lily-[0-9][0-9][0-9]*
+out-scons
+tags
-If you want to redistribute LilyPond, you must comply with the the GNU
+If you want to redistribute LilyPond, you must comply with the GNU
General Public License (reproduced below). This license applies to
LilyPond with the following exceptions:
depth = ..
NAME = documentation
-SUBDIRS=user bibliography pictures topdocs misc
+LANGS = fr # don't enable unpolished or broken translations
+SUBDIRS=user bibliography pictures topdocs misc po $(LANGS)
STEPMAKE_TEMPLATES=documentation texinfo tex
LOCALSTEPMAKE_TEMPLATES=lilypond ly
LILYPOND_BOOK_FLAGS=--extra-options '-e "(ly:set-option (quote internal-type-checking) \#t)"'
# cd $(outdir) rule gets bit hairy for --srcdir configure builds
txt-to-html:
$(PYTHON) $(step-bindir)/text2html.py $(OUT_TXT_FILES)
+
+ifneq ($(ISOLANG),)
+new-lang:
+ @if (( $$(file -b $(ISOLANG)) == directory )) 2>/dev/null; \
+ then echo "Error: $(ISOLANG) directory already exists. Exiting." ; \
+ exit 3 ; \
+ fi
+ mkdir -p $(ISOLANG)/user
+ cp fr/GNUmakefile $(ISOLANG)
+ cp fr/user/GNUmakefile $(ISOLANG)/user
+ sed -i -e 's/ISOLANG *= *fr/ISOLANG = $(ISOLANG)/' $(ISOLANG)/GNUmakefile $(ISOLANG)/user/GNUmakefile
+ $(PYTHON) $(depth)/buildscripts/texi-langutils.py -d $(outdir) -b "UNTRANSLATED NODE: IGNORE ME" -o doc.pot --skeleton --gettext ../user/lilypond.tely
+ mv $(outdir)/*.*tely $(ISOLANG)/user
+ msgmerge -U po/lilypond-doc.pot $(outdir)/doc.pot
+ cp po/lilypond-doc.pot po/$(ISOLANG).po
+endif
\ No newline at end of file
--- /dev/null
+ISOLANG = fr
+depth = ../..
+SUBDIRS = user
+STEPMAKE_TEMPLATES = documentation
+include $(depth)/make/stepmake.make
--- /dev/null
+ISOLANG = fr
+depth = ../../..
+LOCALSTEPMAKE_TEMPLATES = lilypond ly doclang
+include $(depth)/make/stepmake.make
+
--- /dev/null
+@node Advanced notation
+@chapter Advanced notation
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Text::
+* Preparing parts::
+* Orchestral music::
+* Contemporary notation::
+* Educational use::
+@end menu
+@node Text
+@section Text
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Text scripts::
+* Text spanners::
+* Text marks::
+* Text markup::
+* Nested scores::
+* Overview of text markup commands::
+* Font selection::
+* New dynamic marks::
+@end menu
+@node Text scripts
+@subsection Text scripts
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Text spanners
+@subsection Text spanners
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Text marks
+@subsection Text marks
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Text markup
+@subsection Text markup
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Nested scores
+@subsection Nested scores
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Overview of text markup commands
+@subsection Overview of text markup commands
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Font selection
+@subsection Font selection
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node New dynamic marks
+@subsection New dynamic marks
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Preparing parts
+@section Preparing parts
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Multi measure rests::
+* Metronome marks::
+* Rehearsal marks::
+* Bar numbers::
+* Instrument names::
+* Instrument transpositions::
+* Ottava brackets::
+* Different editions from one source::
+@end menu
+@node Multi measure rests
+@subsection Multi measure rests
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Metronome marks
+@subsection Metronome marks
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Rehearsal marks
+@subsection Rehearsal marks
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Bar numbers
+@subsection Bar numbers
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Instrument names
+@subsection Instrument names
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Instrument transpositions
+@subsection Instrument transpositions
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Ottava brackets
+@subsection Ottava brackets
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Different editions from one source
+@subsection Different editions from one source
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Orchestral music
+@section Orchestral music
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Automatic part combining::
+* Hiding staves::
+* Quoting other voices::
+* Formatting cue notes::
+* Aligning to cadenzas::
+@end menu
+@node Automatic part combining
+@subsection Automatic part combining
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Hiding staves
+@subsection Hiding staves
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Quoting other voices
+@subsection Quoting other voices
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Formatting cue notes
+@subsection Formatting cue notes
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Aligning to cadenzas
+@subsection Aligning to cadenzas
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Contemporary notation
+@section Contemporary notation
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Polymetric notation::
+* Time administration::
+* Proportional notation::
+* Clusters::
+* Special noteheads::
+* Feathered beams::
+* Improvisation::
+* Selecting notation font size::
+@end menu
+@node Polymetric notation
+@subsection Polymetric notation
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Time administration
+@subsection Time administration
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Proportional notation
+@subsection Proportional notation
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Clusters
+@subsection Clusters
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Special noteheads
+@subsection Special noteheads
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Feathered beams
+@subsection Feathered beams
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Improvisation
+@subsection Improvisation
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Selecting notation font size
+@subsection Selecting notation font size
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Educational use
+@section Educational use
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Balloon help::
+* Blank music sheet::
+* Hidden notes::
+* Shape note heads::
+* Easy Notation note heads::
+* Analysis brackets::
+* Coloring objects::
+* Parentheses::
+@end menu
+@node Balloon help
+@subsection Balloon help
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Blank music sheet
+@subsection Blank music sheet
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Hidden notes
+@subsection Hidden notes
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Shape note heads
+@subsection Shape note heads
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Easy Notation note heads
+@subsection Easy Notation note heads
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Analysis brackets
+@subsection Analysis brackets
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Coloring objects
+@subsection Coloring objects
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Parentheses
+@subsection Parentheses
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+@node Basic notation
+@chapter Basic notation
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Pitches::
+* Rhythms::
+* Multiple notes at once::
+* Staff notation::
+* Connecting notes::
+* Expressive marks::
+* Repeats::
+@end menu
+@node Pitches
+@section Pitches
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Normal pitches::
+* Accidentals::
+* Cautionary accidentals::
+* Micro tones::
+* Notes names in other languages::
+* Relative octaves::
+* Octave check::
+* Transpose::
+* Rests::
+* Skips::
+@end menu
+@node Normal pitches
+@subsection Normal pitches
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Accidentals
+@subsection Accidentals
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Cautionary accidentals
+@subsection Cautionary accidentals
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Micro tones
+@subsection Micro tones
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Notes names in other languages
+@subsection Notes names in other languages
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Relative octaves
+@subsection Relative octaves
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Octave check
+@subsection Octave check
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Transpose
+@subsection Transpose
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Rests
+@subsection Rests
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Skips
+@subsection Skips
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Rhythms
+@section Rhythms
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Durations::
+* Augmentation dots::
+* Tuplets::
+* Scaling durations::
+* Bar check::
+* Barnumber check::
+* Automatic note splitting::
+@end menu
+@node Durations
+@subsection Durations
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Augmentation dots
+@subsection Augmentation dots
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Tuplets
+@subsection Tuplets
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Scaling durations
+@subsection Scaling durations
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Bar check
+@subsection Bar check
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Barnumber check
+@subsection Barnumber check
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Automatic note splitting
+@subsection Automatic note splitting
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Multiple notes at once
+@section Multiple notes at once
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Chords::
+* Stems::
+* Basic polyphony::
+* Explicitly instantiating voices::
+* Collision Resolution::
+@end menu
+@node Chords
+@subsection Chords
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Stems
+@subsection Stems
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Basic polyphony
+@subsection Basic polyphony
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Explicitly instantiating voices
+@subsection Explicitly instantiating voices
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Collision Resolution
+@subsection Collision Resolution
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Staff notation
+@section Staff notation
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Clef::
+* Key signature::
+* Time signature::
+* Partial measures::
+* Bar lines::
+* Unmetered music::
+* System start delimiters::
+* Staff symbol::
+* Writing music in parallel::
+@end menu
+@node Clef
+@subsection Clef
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Key signature
+@subsection Key signature
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Time signature
+@subsection Time signature
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Partial measures
+@subsection Partial measures
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Bar lines
+@subsection Bar lines
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Unmetered music
+@subsection Unmetered music
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node System start delimiters
+@subsection System start delimiters
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Staff symbol
+@subsection Staff symbol
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Writing music in parallel
+@subsection Writing music in parallel
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Connecting notes
+@section Connecting notes
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Ties::
+* Slurs::
+* Phrasing slurs::
+* Laissez vibrer ties::
+* Automatic beams::
+* Manual beams::
+* Grace notes::
+@end menu
+@node Ties
+@subsection Ties
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Slurs
+@subsection Slurs
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Phrasing slurs
+@subsection Phrasing slurs
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Laissez vibrer ties
+@subsection Laissez vibrer ties
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Automatic beams
+@subsection Automatic beams
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Manual beams
+@subsection Manual beams
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Grace notes
+@subsection Grace notes
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Expressive marks
+@section Expressive marks
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Articulations::
+* Fingering instructions::
+* Dynamics::
+* Breath marks::
+* Trills::
+* Glissando::
+* Arpeggio::
+* Falls and doits::
+@end menu
+@node Articulations
+@subsection Articulations
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Fingering instructions
+@subsection Fingering instructions
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Dynamics
+@subsection Dynamics
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Breath marks
+@subsection Breath marks
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Trills
+@subsection Trills
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Glissando
+@subsection Glissando
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Arpeggio
+@subsection Arpeggio
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Falls and doits
+@subsection Falls and doits
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Repeats
+@section Repeats
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Repeat types::
+* Repeat syntax::
+* Repeats and MIDI::
+* Manual repeat commands::
+* Tremolo repeats::
+* Tremolo subdivisions::
+* Measure repeats::
+@end menu
+@node Repeat types
+@subsection Repeat types
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Repeat syntax
+@subsection Repeat syntax
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Repeats and MIDI
+@subsection Repeats and MIDI
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Manual repeat commands
+@subsection Manual repeat commands
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Tremolo repeats
+@subsection Tremolo repeats
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Tremolo subdivisions
+@subsection Tremolo subdivisions
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Measure repeats
+@subsection Measure repeats
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+@node Changing defaults
+@chapter Changing defaults
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Automatic notation::
+* Interpretation contexts::
+* The \override command::
+@end menu
+@node Automatic notation
+@section Automatic notation
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Automatic accidentals::
+* Setting automatic beam behavior::
+@end menu
+@node Automatic accidentals
+@subsection Automatic accidentals
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Setting automatic beam behavior
+@subsection Setting automatic beam behavior
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Interpretation contexts
+@section Interpretation contexts
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Contexts explained::
+* Creating contexts::
+* Changing context properties on the fly::
+* Modifying context plug-ins::
+* Layout tunings within contexts::
+* Changing context default settings::
+* Defining new contexts::
+@end menu
+@node Contexts explained
+@subsection Contexts explained
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Creating contexts
+@subsection Creating contexts
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Changing context properties on the fly
+@subsection Changing context properties on the fly
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Modifying context plug-ins
+@subsection Modifying context plug-ins
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Layout tunings within contexts
+@subsection Layout tunings within contexts
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Changing context default settings
+@subsection Changing context default settings
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Defining new contexts
+@subsection Defining new contexts
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node The \override command
+@section The \override command
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Constructing a tweak::
+* Navigating the program reference::
+* Layout interfaces::
+* Determining the grob property::
+* Objects connected to the input::
+* \set vs. \override::
+* Difficult tweaks::
+@end menu
+@node Constructing a tweak
+@subsection Constructing a tweak
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Navigating the program reference
+@subsection Navigating the program reference
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Layout interfaces
+@subsection Layout interfaces
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Determining the grob property
+@subsection Determining the grob property
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Objects connected to the input
+@subsection Objects connected to the input
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node \set vs. \override
+@subsection \set vs. \override
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Difficult tweaks
+@subsection Difficult tweaks
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+@node Cheat sheet
+@appendix Cheat sheet
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+@node Converting from other formats
+@chapter Converting from other formats
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Invoking midi2ly::
+* Invoking etf2ly::
+* Invoking musicxml2ly::
+* Invoking abc2ly::
+* Generating LilyPond files::
+@end menu
+@node Invoking midi2ly
+@section Invoking
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Invoking etf2ly
+@section Invoking
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Invoking musicxml2ly
+@section Invoking
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Invoking abc2ly
+@section Invoking
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Generating LilyPond files
+@section Generating LilyPond files
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+@node Instrument-specific notation
+@chapter Instrument-specific notation
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Piano music::
+* Chord names::
+* Vocal music::
+* Rhythmic music::
+* Guitar::
+* Bagpipe::
+* Ancient notation::
+* Other instrument specific notation::
+@end menu
+@node Piano music
+@section Piano music
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Automatic staff changes::
+* Manual staff switches::
+* Pedals::
+* Staff switch lines::
+* Cross staff stems::
+@end menu
+@node Automatic staff changes
+@subsection Automatic staff changes
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Manual staff switches
+@subsection Manual staff switches
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Pedals
+@subsection Pedals
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Staff switch lines
+@subsection Staff switch lines
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Cross staff stems
+@subsection Cross staff stems
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Chord names
+@section Chord names
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Introducing chord names::
+* Chords mode::
+* Printing chord names::
+@end menu
+@node Introducing chord names
+@subsection Introducing chord names
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Chords mode
+@subsection Chords mode
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Printing chord names
+@subsection Printing chord names
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Vocal music
+@section Vocal music
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Setting simple songs::
+* Entering lyrics::
+* Hyphens and extenders::
+* The Lyrics context::
+* Melismata::
+* Another way of entering lyrics::
+* Flexibility in placement::
+* Spacing lyrics::
+* More about stanzas::
+* Ambitus::
+* Other vocal issues::
+@end menu
+@node Setting simple songs
+@subsection Setting simple songs
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Entering lyrics
+@subsection Entering lyrics
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Hyphens and extenders
+@subsection Hyphens and extenders
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node The Lyrics context
+@subsection The Lyrics context
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Melismata
+@subsection Melismata
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Another way of entering lyrics
+@subsection Another way of entering lyrics
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Flexibility in placement
+@subsection Flexibility in placement
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Lyrics to multiple notes of a melisma::
+* Divisi lyrics::
+* Switching the melody associated with a lyrics line::
+* Specifying melismata within the lyrics::
+* Lyrics independent of notes::
+@end menu
+@node Lyrics to multiple notes of a melisma
+@subsubsection Lyrics to multiple notes of a melisma
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Divisi lyrics
+@subsubsection Divisi lyrics
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Switching the melody associated with a lyrics line
+@subsubsection Switching the melody associated with a lyrics line
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Specifying melismata within the lyrics
+@subsubsection Specifying melismata within the lyrics
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Lyrics independent of notes
+@subsubsection Lyrics independent of notes
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Spacing lyrics
+@subsection Spacing lyrics
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node More about stanzas
+@subsection More about stanzas
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Ambitus
+@subsection Ambitus
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Other vocal issues
+@subsection Other vocal issues
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Rhythmic music
+@section Rhythmic music
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Showing melody rhythms::
+* Entering percussion::
+* Percussion staves::
+* Ghost notes::
+@end menu
+@node Showing melody rhythms
+@subsection Showing melody rhythms
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Entering percussion
+@subsection Entering percussion
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Percussion staves
+@subsection Percussion staves
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Ghost notes
+@subsection Ghost notes
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Guitar
+@section Guitar
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* String number indications::
+* Tablatures basic::
+* Non-guitar tablatures::
+* Banjo tablatures::
+* Fret diagrams::
+* Right hand fingerings::
+* Other guitar issues::
+@end menu
+@node String number indications
+@subsection String number indications
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Tablatures basic
+@subsection Tablatures basic
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Non-guitar tablatures
+@subsection Non-guitar tablatures
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Banjo tablatures
+@subsection Banjo tablatures
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Fret diagrams
+@subsection Fret diagrams
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Right hand fingerings
+@subsection Right hand fingerings
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Other guitar issues
+@subsection Other guitar issues
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Bagpipe
+@section Bagpipe
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Bagpipe definitions::
+* Bagpipe example::
+@end menu
+@node Bagpipe definitions
+@subsection Bagpipe definitions
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Bagpipe example
+@subsection Bagpipe example
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Ancient notation
+@section Ancient notation
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Ancient note heads::
+* Ancient accidentals::
+* Ancient rests::
+* Ancient clefs::
+* Ancient flags::
+* Ancient time signatures::
+* Ancient articulations::
+* Custodes::
+* Divisiones::
+* Ligatures::
+* Gregorian Chant contexts::
+* Mensural contexts::
+* Musica ficta accidentals::
+* Figured bass::
+@end menu
+@node Ancient note heads
+@subsection Ancient note heads
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Ancient accidentals
+@subsection Ancient accidentals
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Ancient rests
+@subsection Ancient rests
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Ancient clefs
+@subsection Ancient clefs
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Ancient flags
+@subsection Ancient flags
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Ancient time signatures
+@subsection Ancient time signatures
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Ancient articulations
+@subsection Ancient articulations
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Custodes
+@subsection Custodes
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Divisiones
+@subsection Divisiones
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Ligatures
+@subsection Ligatures
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* White mensural ligatures::
+* Gregorian square neumes ligatures::
+@end menu
+@node White mensural ligatures
+@subsubsection White mensural ligatures
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Gregorian square neumes ligatures
+@subsubsection Gregorian square neumes ligatures
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Gregorian Chant contexts
+@subsection Gregorian Chant contexts
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Mensural contexts
+@subsection Mensural contexts
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Musica ficta accidentals
+@subsection Musica ficta accidentals
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Figured bass
+@subsection Figured bass
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Other instrument specific notation
+@section Other instrument specific notation
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Artificial harmonics (strings)::
+@end menu
+@node Artificial harmonics (strings)
+@subsection Artificial harmonics (strings)
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+@node Introduction
+@chapter Introduction
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Engraving::
+* Automated engraving::
+* What symbols to engrave?::
+* Music representation::
+* Example applications::
+* About this manual::
+@end menu
+@node Engraving
+@section Engraving
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Automated engraving
+@section Automated engraving
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node What symbols to engrave?
+@section What symbols to engrave?
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Music representation
+@section Music representation
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Example applications
+@section Example applications
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node About this manual
+@section About this manual
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+@node LilyPond-book
+@chapter
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* An example of a musicological document::
+* Integrating LaTeX and music::
+* Integrating Texinfo and music::
+* Integrating HTML and music::
+* Integrating DocBook and music::
+* Music fragment options::
+* Invoking lilypond-book::
+* Filename extensions::
+* Many quotes of a large score::
+* Inserting LilyPond output into other programs::
+@end menu
+@node An example of a musicological document
+@section An example of a musicological document
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Integrating LaTeX and music
+@section Integrating La
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Integrating Texinfo and music
+@section Integrating Texinfo and music
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Integrating HTML and music
+@section Integrating HTML and music
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Integrating DocBook and music
+@section Integrating DocBook and music
+
+UNTRANSLATED NODE: IGNORE ME
+
+@unnumberedsubsec Common conventions
+@unnumberedsubsec Including a LilyPond file
+@unnumberedsubsec Including LilyPond code
+@unnumberedsubsec Processing the DocBook document
+@node Music fragment options
+@section Music fragment options
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Invoking lilypond-book
+@section Invoking
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Filename extensions
+@section Filename extensions
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Many quotes of a large score
+@section Many quotes of a large score
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Inserting LilyPond output into other programs
+@section Inserting LilyPond output into other programs
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+\input texinfo @c -*- coding: utf-8; mode: texinfo; -*-
+@setfilename lilypond.info
+@settitle GNU LilyPond
+@iftex
+@afourpaper
+@end iftex
+
+@c don't remove this comment.
+@ignore
+@omfcreator Han-Wen Nienhuys, Jan Nieuwenhuizen and Graham Percival
+@omfdescription User manual of the LilyPond music engraving system
+@omftype user manual
+@omfcategory Applications|Publishing
+@omflanguage French
+@end ignore
+
+@documentlanguage fr
+@documentencoding UTF-8
+
+@syncodeindex fn cp
+@syncodeindex ky cp
+@syncodeindex pg cp
+@syncodeindex tp cp
+@syncodeindex vr cp
+
+@finalout
+
+@titlepage
+@title GNU LilyPond
+@subtitle Le système de gravure musicale
+@author L'équipe de développement de LilyPond
+
+
+Copyright @copyright{} 1999--2006 by the authors
+
+@quotation
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections.
+A copy of the license is included in the section entitled ``GNU
+Free Documentation License''.
+@end quotation
+
+@vskip 20pt
+
+@lilypond[raggedright]
+\score {
+ \context Lyrics {
+ \override Score.RehearsalMark #'self-alignment-X = #LEFT
+ \override Score.RehearsalMark #'font-size = #-2
+ \mark #(ly:export (string-append
+ "(Pour LilyPond version " (lilypond-version) ")"))
+ s2
+ }
+ \layout {
+ indent = 0.0\pt
+ }
+}
+@end lilypond
+
+@end titlepage
+
+
+@ifnottex
+Ce fichier documente GNU LilyPond.
+
+Copyright @copyright{} 1999--2006 by the authors
+
+@quotation
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections.
+A copy of the license is included in the section entitled ``GNU
+Free Documentation License''.
+@end quotation
+@end ifnottex
+
+
+@ifnottex
+@node Top
+@top GNU LilyPond --- The music typesetter
+@c HJJ: Info needs `@top', which is a synonym for `@unnumbered' in TeX.
+
+Ce document est le manuel de l'utilisateur pour GNU LilyPond 2.8.X.
+@ifhtml
+(Allez au bas de la page pour voir le numéro de version exact).
+@end ifhtml
+
+@cindex web site
+@cindex URL
+
+Vous pouvez obtenir plus d'informations sur
+@uref{http://@/www@/.lilypond@/.org/}. Ce site contient des copies en
+ligne de ce manuel, ainsi qu'une documentation supplémentaire.
+
+@ignore
+@include dedication.itely
+@end ignore
+
+@menu
+Manuel d'apprentissage
+
+* Preface::
+* Introduction:: quoi, pourquoi comment.
+* Tutorial:: un tutoriel d'introduction.
+* Putting it all together:: explication plus détaillée des concepts de LilyPond.
+* Working on LilyPond projects:: traite de l'utilisation quotidienne.
+* Tweaking output:: introduction aux retouches de mise en forme.
+
+Manuel de référence
+
+* Basic notation:: notation musicale standard.
+* Instrument-specific notation::
+* Advanced notation:: notation plus rarement utilisée.
+* Changing defaults:: retoucher la mise en forme.
+* Non-musical notation:: aspects autres que la notation musicale.
+* Spacing issues:: mise en page de la musique sur le papier.
+* Interfaces for programmers:: utilisation avancée.
+
+Utilisation du programme
+
+* Running LilyPond:: mode d'emploi.
+* LilyPond-book:: intégrer texte et musique.
+* Converting from other formats:: conversion vers le format source lilypond.
+
+Annexes
+
+* Literature list:: ouvrages de référence sur la notation musicale.
+* Scheme tutorial:: programmer au sein de LilyPond.
+* Notation manual tables:: tables et diagrammes.
+* Example templates:: modèles prêts à l'emploi.
+* Cheat sheet:: résumé de la syntaxe de LilyPond.
+* GNU Free Documentation License:: licence de ce document.
+* LilyPond command index::
+* LilyPond index::
+
+@end menu
+@end ifnottex
+
+@contents
+
+
+@include macros.itexi
+@include preface.itely
+@include introduction.itely
+@include tutorial.itely
+@include putting.itely
+@include working.itely
+@include tweaks.itely
+
+
+@include basic-notation.itely
+@include instrument-notation.itely
+@include advanced-notation.itely
+@include changing-defaults.itely
+@include non-music.itely
+@include spacing.itely
+@include programming-interface.itely
+
+@include running.itely
+@include lilypond-book.itely
+@include converters.itely
+
+
+@include literature.itely
+@include scheme-tutorial.itely
+@include notation-appendices.itely
+@include templates.itely
+@include cheatsheet.itely
+@include fdl.itexi
+
+@node LilyPond command index
+@appendix LilyPond command index
+
+@printindex ky
+
+@node LilyPond index
+@appendix LilyPond index
+
+@printindex cp
+
+@bye
--- /dev/null
+@node Literature list
+@appendix Literature list
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+@node Non-musical notation
+@chapter Non-musical notation
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Input files::
+* Titles and headers::
+* MIDI output::
+* Displaying LilyPond notation::
+* Skipping corrected music::
+@end menu
+@node Input files
+@section Input files
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* File structure (introduction)::
+* Multiple scores in a book::
+* Extracting fragments of notation::
+* File structure::
+* A single music expression::
+* Including LilyPond files::
+* Text encoding::
+@end menu
+@node File structure (introduction)
+@subsection File structure (introduction)
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Multiple scores in a book
+@subsection Multiple scores in a book
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Extracting fragments of notation
+@subsection Extracting fragments of notation
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node File structure
+@subsection File structure
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node A single music expression
+@subsection A single music expression
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Including LilyPond files
+@subsection Including LilyPond files
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Text encoding
+@subsection Text encoding
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Titles and headers
+@section Titles and headers
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Creating titles::
+* Custom titles::
+@end menu
+@node Creating titles
+@subsection Creating titles
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Custom titles
+@subsection Custom titles
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node MIDI output
+@section MIDI output
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Creating MIDI files::
+* MIDI block::
+* MIDI instrument names::
+@end menu
+@node Creating MIDI files
+@subsection Creating MIDI files
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node MIDI block
+@subsection MIDI block
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node MIDI instrument names
+@subsection MIDI instrument names
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Displaying LilyPond notation
+@section Displaying LilyPond notation
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Skipping corrected music
+@section Skipping corrected music
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+@node Notation manual tables
+@appendix Notation manual tables
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Chord name chart::
+* MIDI instruments::
+* List of colors::
+* The Feta font::
+@end menu
+@node Chord name chart
+@appendixsec Chord name chart
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node MIDI instruments
+@appendixsec MIDI instruments
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node List of colors
+@appendixsec List of colors
+
+UNTRANSLATED NODE: IGNORE ME
+
+@subsubheading Normal colors
+@subsubheading X color names
+@subsubheading Color Names without a numerical suffix:
+@subsubheading Color names with a numerical suffix
+@subsubheading Grey Scale
+@node The Feta font
+@appendixsec The Feta font
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+@node Preface
+@unnumbered Preface
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+@node Interfaces for programmers
+@chapter Interfaces for programmers
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Music functions::
+* Programmer interfaces::
+* Building complicated functions::
+* Markup programmer interface::
+* Contexts for programmers::
+* Scheme procedures as properties::
+@end menu
+@node Music functions
+@section Music functions
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Overview of music functions::
+* Simple substitution functions::
+* Paired substitution functions::
+* Mathematics in functions::
+* Void functions::
+@end menu
+@node Overview of music functions
+@subsection Overview of music functions
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Simple substitution functions
+@subsection Simple substitution functions
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Paired substitution functions
+@subsection Paired substitution functions
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Mathematics in functions
+@subsection Mathematics in functions
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Void functions
+@subsection Void functions
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Programmer interfaces
+@section Programmer interfaces
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Input variables and Scheme::
+* Internal music representation::
+@end menu
+@node Input variables and Scheme
+@subsection Input variables and Scheme
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Internal music representation
+@subsection Internal music representation
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Building complicated functions
+@section Building complicated functions
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Displaying music expressions::
+* Music properties::
+* Doubling a note with slurs (example)::
+* Adding articulation to notes (example)::
+@end menu
+@node Displaying music expressions
+@subsection Displaying music expressions
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Music properties
+@subsection Music properties
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Doubling a note with slurs (example)
+@subsection Doubling a note with slurs (example)
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Adding articulation to notes (example)
+@subsection Adding articulation to notes (example)
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Markup programmer interface
+@section Markup programmer interface
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Markup construction in Scheme::
+* How markups work internally::
+* New markup command definition::
+@end menu
+@node Markup construction in Scheme
+@subsection Markup construction in Scheme
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node How markups work internally
+@subsection How markups work internally
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node New markup command definition
+@subsection New markup command definition
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Contexts for programmers
+@section Contexts for programmers
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Context evaluation::
+* Running a function on all layout objects::
+@end menu
+@node Context evaluation
+@subsection Context evaluation
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Running a function on all layout objects
+@subsection Running a function on all layout objects
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Scheme procedures as properties
+@section Scheme procedures as properties
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+@node Putting it all together
+@chapter Putting it all together
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Extending the templates::
+* How LilyPond files work::
+* Score is a single musical expression::
+@end menu
+@node Extending the templates
+@section Extending the templates
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node How LilyPond files work
+@section How LilyPond files work
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Score is a single musical expression
+@section Score is a single musical expression
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+@node Running LilyPond
+@chapter Running LilyPond
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Invoking lilypond::
+* Notes for the MacOS X app::
+* Updating files with convert-ly::
+* Reporting bugs::
+* Error messages::
+* Editor support::
+* Point and click::
+@end menu
+@node Invoking lilypond
+@section Invoking lilypond
+
+UNTRANSLATED NODE: IGNORE ME
+
+@subsection Command line options
+@subsection Environment variables
+@node Notes for the MacOS X app
+@section Notes for the MacOS X app
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Updating files with convert-ly
+@section Updating with
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Reporting bugs
+@section Reporting bugs
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Error messages
+@section Error messages
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Editor support
+@section Editor support
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Point and click
+@section Point and click
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+@node Scheme tutorial
+@appendix Scheme tutorial
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+@node Spacing issues
+@chapter Spacing issues
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Paper and pages::
+* Music layout::
+* Vertical spacing::
+* Horizontal spacing::
+* Breaks::
+* Displaying spacing::
+@end menu
+@node Paper and pages
+@section Paper and pages
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Paper size::
+* Page formatting::
+@end menu
+@node Paper size
+@subsection Paper size
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Page formatting
+@subsection Page formatting
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Music layout
+@section Music layout
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Setting global staff size::
+* Score layout::
+@end menu
+@node Setting global staff size
+@subsection Setting global staff size
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Score layout
+@subsection Score layout
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Vertical spacing
+@section Vertical spacing
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Vertical spacing inside a system::
+* Vertical spacing of piano staves::
+* Vertical spacing between systems::
+* Controlling spacing of individual systems::
+* Two-pass vertical spacing::
+@end menu
+@node Vertical spacing inside a system
+@subsection Vertical spacing inside a system
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Vertical spacing of piano staves
+@subsection Vertical spacing of piano staves
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Vertical spacing between systems
+@subsection Vertical spacing between systems
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Controlling spacing of individual systems
+@subsection Controlling spacing of individual systems
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Two-pass vertical spacing
+@subsection Two-pass vertical spacing
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Horizontal spacing
+@section Horizontal Spacing
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Horizontal spacing overview::
+* New spacing area::
+* Changing horizontal spacing::
+* Line length::
+@end menu
+@node Horizontal spacing overview
+@subsection Horizontal spacing overview
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node New spacing area
+@subsection New spacing area
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Changing horizontal spacing
+@subsection Changing horizontal spacing
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Line length
+@subsection Line length
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Breaks
+@section Breaks
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Line breaking::
+* Page breaking::
+* Optimal page breaking::
+* Optimal page turning::
+@end menu
+@node Line breaking
+@subsection Line breaking
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Page breaking
+@subsection Page breaking
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Optimal page breaking
+@subsection Optimal page breaking
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Optimal page turning
+@subsection Optimal page turning
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Displaying spacing
+@section Displaying spacing
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+@node Example templates
+@appendix Example templates
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Single staff::
+* Piano templates::
+* String quartet::
+* Vocal ensembles::
+* Ancient notation templates::
+* Jazz combo::
+* Lilypond-book templates::
+@end menu
+@node Single staff
+@appendixsec Single staff
+
+UNTRANSLATED NODE: IGNORE ME
+
+@appendixsubsec Notes only
+@appendixsubsec Notes and lyrics
+@appendixsubsec Notes and chords
+@appendixsubsec Notes, lyrics, and chords.
+@node Piano templates
+@appendixsec Piano templates
+
+UNTRANSLATED NODE: IGNORE ME
+
+@appendixsubsec Solo piano
+@appendixsubsec Piano and melody with lyrics
+@appendixsubsec Piano centered lyrics
+@appendixsubsec Piano centered dynamics
+@node String quartet
+@appendixsec String quartet
+
+UNTRANSLATED NODE: IGNORE ME
+
+@appendixsubsec String quartet
+@appendixsubsec String quartet parts
+@node Vocal ensembles
+@appendixsec Vocal ensembles
+
+UNTRANSLATED NODE: IGNORE ME
+
+@appendixsubsec SATB vocal score
+@appendixsubsec SATB vocal score and automatic piano reduction
+@node Ancient notation templates
+@appendixsec Ancient notation templates
+
+UNTRANSLATED NODE: IGNORE ME
+
+@appendixsubsec Transcription of mensural music
+@appendixsubsec Gregorian transcription template
+@node Jazz combo
+@appendixsec Jazz combo
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Lilypond-book templates
+@appendixsec Lilypond-book templates
+
+UNTRANSLATED NODE: IGNORE ME
+
+@appendixsubsec LaTeX
+@appendixsubsec Texinfo
--- /dev/null
+@c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
+@c This file is part of lilypond.tely
+
+@c TODO:
+@c * more details about running lilypond; error messages,
+@c compiling/viewing (emacs?)
+@c * where to go from First steps+More basics?
+
+@c wherever possible, do not include index entries here; the
+@c index should point to stuff in the reference manual. -gp
+
+@c Your first LilyPond score in 10 minutes?
+
+@node Tutorial
+@chapter Tutorial
+
+Ce tutoriel commence par une courte introduction au langage utilisé
+par LilyPond pour représenter la musique. Après ce premier contact,
+nous verrons comment produire une partition à imprimer. Vous serez
+alors capable de créer et d'imprimer vos propres partitions.
+
+@ifhtml
+Beaucoup de gens apprennent à utiliser les programmes en les essayant
+et en bidouillant avec. C'est également possible avec LilyPond. Si
+vous cliquez sur une image dans la version HTML de ce manuel, vous
+verrez exactement le code LilyPond utilisé pour générer cette image.
+Essayez sur cette image
+
+@lilypond[fragment,quote,ragged-right,relative=2]
+c-\markup { \bold \huge { Click here. } }
+@end lilypond
+@end ifhtml
+
+En copiant et en collant l'intégralité du code dans un fichier test,
+vous aurez un modèle comme base pour expérimenter. Si vous
+apprenez de cette façon, vous aurez probablement envie d'imprimer ou
+de créer un lien vers
+@ifhtml
+la
+@end ifhtml
+@ref{Cheat sheet}, tableau qui répertorie les commandes usuelles
+pour une consultation rapide.
+
+@menu
+* First steps::
+* Running LilyPond for the first time::
+* More about pitches::
+* Entering ties::
+* Automatic and manual beams::
+* Octave entry::
+* Music expressions explained::
+* More staves::
+* Adding articulation marks to notes::
+* Combining notes into chords::
+* Advanced rhythmic commands::
+* Commenting input files::
+* Printing lyrics::
+* A lead sheet::
+* Adding titles::
+* Single staff polyphony::
+* Piano staves::
+* Organizing larger pieces::
+* An orchestral part::
+* After the tutorial::
+@end menu
+
+
+@node First steps
+@section First steps
+
+Le premier exemple montre comment écrire la partition la plus
+élémentaire qui soit, une gamme (@rglos{scale}). Une @rglos{note} peut
+être entrée en tapant son nom, de @samp{a} à @samp{g}. Donc si vous
+entrez
+
+@example
+@{
+c d e f g a b
+@}
+@end example
+
+@noindent
+le résultat ressemblera à
+
+@lilypond[fragment,quote,notime,relative=1]
+c d e f g a b
+@end lilypond
+
+@c DIV specific
+Il est aussi possible d'utiliser les noms de notes français @samp{do
+re mi fa sol la si}, en insérant au début du fichier la ligne
+@samp{\include "catalan.ly"}
+@c END DIV
+
+Tout extrait de code LilyPond doit être entouré d'une @{paire
+d'accolades@}. Bien que la plupart des exemples de ce manuel n'en
+comportent pas, ne les oubliez pas dans vos compositions !
+
+De plus, de nombreux exemples utilisent le mode @code{relative}. Ceci
+est expliqué à la section @ref{Octave entry} ; sachez dès à présent
+que certains exemples devraient être libellés sous la forme
+@code{\relative @{ @emph{...musique...} @}}.
+De nombreux exemples ont aussi été compressés horizontalement pour
+économiser de la place, grace à la commande
+@code{\paper @{ragged-right = ##t @}}.
+
+@cindex Case sensitive
+Enfin, LilyPond est sensible à la casse. @code{ @{ c d e @} } est
+un code valide ; @code{ @{ C D E @} } produira un message d'erreur.
+
+La durée (@rglos{duration}) d'une note est spécifiée par un nombre
+qui suit le nom de cette note : @samp{1} pour une ronde (@rglos{whole
+note}), @samp{2} pour une blanche (@rglos{half note}), @samp{4} pour
+une noire (@rglos{quarter note}) et ainsi de suite.
+
+@example
+a1 a2 a4 a16 a32
+@end example
+
+@lilypond[fragment,quote,notime,relative=2]
+\set Staff.autoBeaming = ##f
+{ a1 a2 a4 a16 a32 s16_" " }
+@end lilypond
+
+Si aucune durée n'est spécifiée, la dernière durée entrée est utilisée
+pour les notes suivantes. La valeur implicite de la première note
+dans les fichiers sources de la partition est la noire :
+
+@example
+a a8 a a2 a
+@end example
+
+@lilypond[fragment,quote,notime,relative=2]
+{ a a8 a a2 a s16_" " }
+@end lilypond
+
+
+On saisit un silence (@rglos{rest}) tout comme une note, mais avec le
+caractère @samp{r}
+
+@example
+r2 r4 r8 r16
+@end example
+
+@lilypond[fragment,quote,notime]
+r2 r4 r8 r16 s16_" "
+@end lilypond
+
+Ajouter un point @samp{.} après une durée permet d'obtenir une note
+pointée (@rglos{dotted note})
+
+@example
+a2. a4 a8. a16
+@end example
+
+@lilypond[fragment,quote,notime,relative=1]
+{ a2. a4 a8. a16 s16_" " }
+@end lilypond
+
+La métrique (@rglos{time signature}) est définie par
+la commande @code{\time}
+
+@example
+\time 3/4
+\time 6/8
+\time 4/4
+@end example
+
+@c A clef here may lead to confusion, remove it.
+@lilypond[fragment,quote]
+\override Staff.Clef #'transparent = ##t
+\time 3/4
+s4_" "
+\time 6/8
+s4_" "
+\time 4/4
+s16_" "
+@end lilypond
+
+La @rglos{clef} est définie par la commande @code{\clef}
+
+@example
+\clef treble
+\clef bass
+\clef alto
+\clef tenor
+@end example
+
+@lilypond[fragment,quote,notime]
+\clef treble
+s4_" "
+\clef bass
+s4_" "
+\clef alto
+s4_" "
+\clef tenor
+s16_" "
+@end lilypond
+
+Pensez bien à encadrer les notes et les commandes avec des accolades
+@code{@{@tie{}@dots{}@tie{}@}} pour pouvoir obtenir un résultat
+imprimable.
+
+@lilypond[fragment,quote,noindent,verbatim]
+\time 3/4
+\clef bass
+c2 e4 g2.
+f4 e d c2 r4
+@end lilypond
+
+Pour plus d'informations sur
+
+@quotation
+@table @asis
+@item la définition des hauteurs et des durées
+voir
+@ref{Pitches}, et @ref{Durations}.
+@item les clefs
+voir @ref{Clef}
+@item les silences
+voir @ref{Rests}.
+@item la métrique et autres commandes liées au temps
+voir @ref{Time signature}.
+@end table
+@end quotation
+
+
+@node Running LilyPond for the first time
+@section Running LilyPond for the first time
+
+@c cheesy title to avoid clash with chapter name.
+
+Dans la section précédente, nous avons vu quelles sortes d'éléments
+peut contenir un fichier LilyPond. Dans cette section nous
+expliquerons quelles commandes exécuter et comment voir ou imprimer le
+résultat de LilyPond. Si vous n'avez jamais utilisé
+LilyPond, voulez tester votre installation ou souhaitez compiler
+vous-même un fichier d'exemple, lisez cette section.
+
+@unnumberedsubsec MacOS X
+
+Si vous double-cliquez sur LilyPond.app, un fichier d'exemple sera
+ouvert. Sauvegardez-le, par exemple, sous @file{test.ly} sur votre
+bureau, et traitez-le ensuite avec la commande du menu
+@samp{Compile > Typeset File}.
+Le fichier PDF résultant est alors affiché sur votre écran.
+
+Prenez note que le premier démarrage prend une minute ou deux ,
+car toutes les polices systèmes doivent être d'abord analysées.
+
+@unnumberedsubsec Windows
+
+Sous Windows, démarrez un éditeur de texte @footnote{N'importe quel
+éditeur simple ou orienté programmation, qui prend en charge le
+codage de caractères UTF-8, fera l'affaire, par exemple
+Notepad. N'utilisez pas de traitement de texte car ceux-ci insèrent
+des codes de formatage qui posent problème à LilyPond.} et saisissez
+
+@verbatim
+@{ c'4 e' g' @}
+@end verbatim
+
+Enregistrez le sur le bureau sous @file{test.ly} et vérifiez bien
+qu'il ne s'appelle pas @file{test.ly.TXT}. Double-cliquez sur le
+fichier @file{test.ly} pour le traiter et afficher le fichier
+PDF résultant.
+
+
+@unnumberedsubsec Unix
+
+Commencez par ouvrir une fenêtre de terminal et un éditeur de
+texte. Par exemple, vous pouvez ouvrir un xterm et exécuter
+@code{joe}. @footnote{Des fichiers de macros pour les fans de VIM et un
+@code{LilyPond-mode} pour les fans d'Emacs existent. S'ils ne sont pas
+encore installés, consultez le fichier @file{INSTALL.txt}.} Dans votre
+éditeur, entrez le texte suivant et sauvegardez le fichier sous
+@file{test.ly}
+
+@verbatim
+@{ c'4 e' g' @}
+@end verbatim
+
+@noindent
+Pour traiter @file{test.ly}, procédez comme ceci :
+
+@example
+lilypond test.ly
+@end example
+
+@noindent
+Vous verrez quelque chose ressemblant à :
+
+@example
+lilypond test.ly
+GNU LilyPond 2.10.0
+Processing `test.ly'
+Parsing...
+Interpreting music... [1]
+Preprocessing graphical objects...
+Calculating line breaks... [2]
+Layout output to `test.ps'...
+Converting to `test.pdf'...
+@end example
+
+@c DIV specific
+Suivant votre installation, les messages peuvent être traduits.
+@c END DIV
+
+@cindex DVI file
+@cindex Viewing music
+@cindex xdvi
+@noindent
+Le résultat est le fichier @file{test.pdf} que vous pouvez imprimer ou
+visualiser avec les outils standards de votre système d'exploitation.
+@footnote{Si votre système ne dispose pas des outils nécessaires,
+vous pouvez essayer
+@uref{http://@/www@/.cs@/.wisc@/.edu/@/~ghost/,Ghostscript}, un
+programme pour voir et imprimer les fichiers PDF et PostScript.}
+
+@node More about pitches
+@section More about pitches
+
+Un dièse (@rglos{sharp}) s'obtient en ajoutant @samp{is} au nom de la
+note, un bémol (@rglos{flat}) en ajoutant @samp{es}. Comme vous pouvez
+vous y attendre, un double dièse ou double bémol est obtenu en
+ajoutant @samp{isis} ou @samp{eses}@footnote{Cette syntaxe est dérivée
+de la convention de dénomination des notes dans les langues nordiques
+et germaniques, comme l'allemand ou le hollandais.}.
+
+@c DIV specific
+Si vous utilisez la commande @samp{\include "catalan.ly"} pour entrer
+les noms de notes français au lieu des noms hollandais, il faudra
+ajouter un @samp{d} pour un dièse, et un @samp{b} pour un bèmol. Le
+double dièse et le double bémol s'obtiennent en ajoutant
+respectivement @samp{dd} et @samp{bb}
+@c END DIV
+
+@example
+cis1 ees fisis aeses
+@end example
+
+@lilypond[fragment,quote,notime]
+\set Score.timing = ##f
+\transpose c c' { cis1 ees fisis aeses s16_" " }
+@end lilypond
+
+@cindex key signature, setting
+L'armure est déterminée par la commande @code{\key}, suivie d'une
+hauteur puis de @code{\major} (majeur) ou @code{\minor} (mineur) :
+
+@example
+\key d \major
+g1
+\key c \minor
+g
+@end example
+
+@lilypond[fragment,quote,notime,fragment]
+\key d \major
+g'1
+\key c \minor
+g'
+@end lilypond
+
+@noindent
+La combinaison de l'armure et des hauteurs de note -- y compris les
+altérations -- permet de déterminer dans quel cas afficher les
+altérations accidentelles. Cette fonctionnalité est souvent source de
+confusion pour les nouveaux utilisateurs, aussi expliquons-la en
+détail.
+
+
+LilyPond fait une nette distinction entre le contenu musical et la
+mise en forme. L'altération d'une note -- bémol, bécarre ou dièse --
+fait partie de sa hauteur, et donc du contenu musical. La présence
+d'une altération accidentelle -- un @emph{signe} bémol, bécarre ou
+dièse -- devant la note correspondante est une question de mise en
+page. La mise en page est un processus qui obéit à des règles ; les
+altérations accidentelles sont donc automatiquement imprimées suivant
+ces règles. Les hauteurs de note appartiennent à la musique que vous
+entrez, et comme vous êtes sensé(e) entrer ce que vous voulez entendre,
+LilyPond, qui n'est chargé que de la gravure, ne les choisit pas à
+votre place.
+
+Dans cet exemple
+
+@lilypond[quote,notime,fragment]
+\key d \major
+d' cis' fis'
+@end lilypond
+
+@noindent
+si aucune note n'a d'altération accidentelle, vous devez
+cependant entrer
+
+@example
+\key d \major
+d cis fis
+@end example
+
+@noindent
+Le code @samp{d} ne veut pas dire « imprimer un point noir juste
+en-dessous de la portée. » Cela signifie plutôt : « une note ayant la
+hauteur ré naturel. » Avec l'armure de la bémol majeur, ce ré sera flanqué
+d'un bécarre accidentel.
+
+@lilypond[quote,notime,fragment,relative=1,verbatim]
+\key as \major
+d
+@end lilypond
+
+Ajouter explicitement toutes les altérations requiert un peu plus
+d'effort dans la phase de saisie, mais avec l'avantage que la
+transposition en sera facilitée. De plus les altérations accidentelles
+peuvent être imprimées suivant plusieurs conventions. Regardez
+@ref{Automatic accidentals} pour connaître la manière dont les
+altérations accidentelles peuvent être imprimées suivant différentes
+règles.
+
+
+Pour plus d'informations sur
+
+@quotation
+@table @asis
+@item les altérations accidentelles
+voir @ref{Automatic accidentals}.
+
+@item les armures
+voir @ref{Key signature}.
+@end table
+@end quotation
+
+@node Entering ties
+@section Entering ties
+
+@cindex tie
+Une liaison de prolongation@footnote{parfois aussi appelée liaison de
+tenue.} (@rglos{tie}) est créée en ajoutant un tilde @samp{~} à
+la suite de la première note liée.
+
+@lilypond[quote,notime,fragment,verbatim,relative=3]
+g4~ g a2~ a4
+@end lilypond
+
+Pour plus d'informations sur les liaisons de prolongation, voir @ref{Ties}.
+
+
+
+@node Automatic and manual beams
+@section Automatic and manual beams
+
+@cindex beams, by hand
+Toutes les ligatures@footnote{parfois appelées aussi liens de croches}
+(@rglos{beam}), sont dessinées automatiquement :
+
+@lilypond[quote,fragment,relative=2,verbatim]
+a8 ais d es r d
+@end lilypond
+
+@noindent
+Si l'emplacement des barres ne vous convient pas, vous pouvez
+les entrer à la main. Marquer la première note à être attachée d'un
+@samp{[} et la dernière d'un @samp{]}.
+
+@lilypond[quote,fragment,relative=2,verbatim]
+a8[ ais] d[ es r d]
+@end lilypond
+
+Pour plus d'informations sur les ligatures, voir @ref{Manual beams}.
+
+
+Voici comment se comportent ensemble armures, altérations
+accidentelles et liaisons :
+
+@lilypond[fragment,quote,noindent,line-width=50\staff-space,verbatim]
+\relative c'' {
+ \time 4/4
+ \key g \minor
+ \clef treble
+ r4 r8 a8 gis4 b
+ a8 d4.~ d e,8
+ fis4 fis8 fis8 eis4 a8 gis~
+ gis2 r2
+}
+@end lilypond
+
+@cindex accidentals
+
+
+@noindent
+Il y a plusieurs points intéressants à noter dans cet exemple. Les
+barres de mesure et les liens de croches sont dessinés
+automatiquement. Les sauts de ligne sont calculés automatiquement ;
+peu importe où se situent les sauts de ligne dans le fichier source.
+Enfin, l'ordre dans lequel la métrique, l'armure et les changements de
+clefs sont saisis n'a pas d'importance : dans la sortie imprimable,
+ils sont organisés suivant les conventions standard de notation.
+
+
+
+@node Octave entry
+@section Octave entry
+
+
+@c Tim wants to move this quotes example just before the: quotes-do not-work
+@c score, but we'd need to remove quotes from the other two (key and
+@c tie) examples...
+
+@c better to have this just before the `octaves are bad' snipped
+@c but we'd need to remove the ', from \key and tie
+Pour hausser une note d'une octave, ajoutez une apostrophe @code{'} au
+nom de la note ; pour la baisser d'une octave, ajoutez une virgule
+@code{,}. Le do central (entre la clef de sol et la clef de fa) est
+@code{c'}
+
+@lilypond[quote,notime,fragment,verbatim]
+c'4 c'' c''' \clef bass c c,
+@end lilypond
+
+Un exemple de l'utilisation des apostrophes dans ce fragment de Mozart :
+
+@lilypond[quote,ragged-right,fragment,verbatim]
+\key a \major
+\time 6/8
+cis''8. d''16 cis''8 e''4 e''8
+b'8. cis''16 b'8 d''4 d''8
+@end lilypond
+
+@noindent
+Cet exemple montre qu'il faut beaucoup d'apostrophes pour écrire de la
+musique dans un registre aigu. Ceci rend le fichier moins lisible, et
+c'est une source d'erreurs. La solution consiste à utiliser le mode
+d'« octaves relatives ». C'est la façon la plus commode de copier de
+la musique existante.
+
+En mode relatif, une note sans signe d'octaviation -- @code{'} ou
+@code{,} après le nom de la note -- est interprétée de manière à ce
+qu'elle soit la plus proche de la note précédente. Par exemple,
+@samp{c f} monte, alors que @samp{c g} descend.
+
+Pour utiliser le mode relatif, ajoutez @code{\relative} avant le
+morceau de musique. La première hauteur de note est choisie
+relativement en fonction du do central -- c'est-à-dire @code{c'}.
+
+
+
+@lilypond[quote,notime,fragment,verbatim]
+\relative {
+ c' f c g c
+}
+@end lilypond
+
+
+Puisque la plus grande partie de la musique utilise de petits
+intervalles, les pièces peuvent être écrites en mode relatif sans
+pratiquement utiliser de signes d'octavation. L'exemple précédent est
+entré comme
+
+@lilypond[quote,ragged-right,verbatim]
+\relative {
+ \key a \major
+ \time 6/8
+ cis'8. d16 cis8 e4 e8
+ b8. cis16 b8 d4 d8
+}
+@end lilypond
+
+@c needed better, maybe even redundant explanation
+@c added another example below.
+@c grappig: Pa vond het heel logies, en slim toen-i eenmaal begreep.
+@c in eerste instantie drong het `relative' niet door zonder extra uitleg.
+Les intervalles plus grands qu'une quarte sont produits en ajoutant
+les signes d'octavation :
+
+@lilypond[quote,notime,verbatim,fragment]
+\relative c {
+ c'' f, f c' c g' c,
+}
+@end lilypond
+
+En résumé, apostrophes et virgules ne déterminent pas la hauteur
+absolue d'une note dans le mode @code{\relative}. Au lieu de cela, la
+hauteur de la note est relative à la précédente, et modifier l'octave
+d'une seule note changera l'octave de toutes les notes suivantes.
+
+Pour plus d'information sur les octaves relatives, voir
+@ref{Relative octaves}, et @ref{Octave check}.
+
+
+@node Music expressions explained
+@section Music expressions explained
+
+
+Dans les fichiers source LilyPond, la musique est représentée par ce qu'on
+appelle des @emph{expressions musicales}. Nous en avons déjà vu dans
+les quelques exemples précédents ; une seule note constitue une
+expression musicale :
+
+@lilypond[fragment,quote,verbatim,relative=3]
+a4
+@end lilypond
+
+Mettre un groupe de notes entre accolades crée une nouvelle expression
+musicale :
+
+@lilypond[fragment,quote,verbatim,relative=3]
+{ a4 g4 }
+@end lilypond
+
+Placer une séquence d'expressions musicales -- des notes par exemple
+-- entre accolades signifie qu'elles doivent être jouées
+successivement, les unes après les autres. Le résultat est une
+expression, qui peut elle-même être regroupée séquentiellement avec
+d'autres expressions. Ici, l'expression de l'exemple précédent est
+combinée à deux notes :
+
+@lilypond[fragment,quote,verbatim,relative=3]
+{ { a4 g } f g }
+@end lilypond
+
+Cette technique est utile pour de la musique non monophonique. Pour
+entrer une musique avec plusieurs voix ou plusieurs portées, nous
+pouvons aussi combiner en parallèle les expressions. Deux voix qui doivent être
+jouées en même temps, sont entrées comme une combinaison simultanée de
+deux expression. Une expression musicale « simultanée » est formée en
+entourant les expressions entre @code{<<} et @code{>>}. Dans l'exemple
+suivant, trois expressions (contenant chacune deux notes distinctes) sont
+combinées simultanément.
+
+@lilypond[fragment,quote,verbatim,relative=3]
+<<
+ { a4 g }
+ { f e }
+ { d b }
+>>
+@end lilypond
+
+Ce mécanisme est similaire au formules mathématiques : une grosse formule
+est créée en assemblant plusieurs petites formules. Ces types
+de formules, appelées expressions, ont une définition récursive, de
+telle sorte que vous pouvez fabriquer des expressions
+arbitrairement longues et complexes. Par exemple,
+
+@example
+1
+
+1 + 2
+
+(1 + 2) * 3
+
+((1 + 2) * 3) / (4 * 5)
+@end example
+
+@cindex expression
+@cindex music expression
+Ceci est une suite d'expressions, où chacune est contenue dans la
+suivante. Les expressions les plus simples sont les nombres, et de
+plus grandes expressions sont produites en combinant des expressions
+avec des opérateurs -- comme @samp{+}, @samp{*} et @samp{/} -- et des
+parenthèses. Tout comme les expressions mathématiques, les expressions
+musicales peuvent être imbriquées avec une profondeur arbitraire, ce
+qui est nécessaire pour de la musique complexe comme des partitions
+polyphoniques.
+
+Notez que l'exemple suivant ne comporte qu'une seule portée,
+contrairement à l'exemple précédent qui contenait trois portées
+séparées. C'est parce que l'exemple commence par une note seule. Pour
+déterminer le nombre de portées, LilyPond regarde le premier élément
+qui n'est pas une accolade. Si c'est une seule note, il y a une portée
+; si c'est une expression simultanée, il y aura plus d'une portée.
+
+@lilypond[fragment,quote,verbatim,relative=2]
+{
+ c <<c e>>
+ << { e f } { c <<b d>> } >>
+}
+@end lilypond
+
+Il est facile de s'y perdre avec des fichiers musicaux comprenant de nombreuses
+imbrications, tant pour leur création que pour leur maintenance. Une
+convention permet d'éviter cette confusion : l'indentation. Pour
+entrer un fichier avec de prfondes imbrications d'accolades et de
+crochets, il est d'usage d'avoir recours à une indentation qui indique
+le niveau de profondeur. Formater la musique d'une telle manière en
+facilite la lecture et vous aide à insérer le bon nombre d'accolades
+fermant les expressions. Par exemple,
+
+@example
+<<
+ @{
+ @dots{}
+ @}
+ @{
+ @dots{}
+ @}
+>>
+@end example
+
+Certains éditeurs disposent d'un mode spécifique pour saisir des
+fichiers LilyPond, qui peut vous aider à indenter le fichier source.
+Voir la section @ref{Editor support} pour plus d'informations.
+
+@node More staves
+@section More staves
+
+Pour créer plus d'une portée, chaque partie de la musique constituant
+une portée est entrée en la faisant précéder de
+@code{\new Staff}. Ces éléments @code{Staff} sont combinés en parallèle avec
+@code{<<} et @code{>>}, comme
+
+@lilypond[quote,fragment,verbatim]
+<<
+ \new Staff { \clef treble c'' }
+ \new Staff { \clef bass c }
+>>
+@end lilypond
+
+
+La commande @code{\new} introduit un « contexte de notation ». Un
+contexte de notation est un environnement dans lequel les événements
+musicaux -- comme les notes ou les commandes @code{\clef} -- sont
+interprétés. Pour des pièces simples, ces contextes sont créés
+automatiquement. Pour des pièces plus complexes, il est préférable de
+spécifier explicitement les contextes. Cela assure que chaque fragment
+aura sa propre portée.
+
+Il existe différents types de contextes. Les contextes @code{Staff}
+(portée), @code{Voice} (voix) et @code{Score} (partition) gèrent la
+notation de la mélodie, alors que @code{Lyrics} gère les paroles et
+@code{ChordNames} imprime le nom des accords.
+
+En termes de syntaxe, faire précéder une expression musicale de
+@code{\new} crée une plus grosse expression musicale. En reprenant la
+comparaison, cela ressemble au signe « moins » en mathématiques. La formule
+@math{(4+5)} est une expression, donc @math{-(4+5)} est une plus grosse
+expression.
+
+Nous pouvons maintenant écrire un morceau à deux portées :
+
+@c TODO: (c) status of this Paul McCartney (?) song (let's all stand together)
+
+@lilypond[fragment,quote,verbatim,ragged-right]
+\relative <<
+ \new Staff {
+ \time 3/4
+ \clef treble
+
+ e'2 d4 c2 b4 a8[ a]
+ b[ b] g[ g] a2.
+ }
+ \new Staff {
+ \clef bass
+ c,,2 e4 g2.
+ f4 e d c2.
+ }
+>>
+@end lilypond
+
+Pour plus d'informations sur les contextes, voir leur description à
+@ref{Interpretation contexts}.
+
+
+
+@node Adding articulation marks to notes
+@section Adding articulation marks to notes
+
+@cindex articulation
+@cindex accents
+@cindex staccato
+
+Les articulations standard peuvent être ajoutées à une note en
+utilisant un tiret (@samp{-}) et un caractère :
+
+@lilypond[fragment,quote,verbatim,relative=2]
+c-. c-- c-> c-^ c-+ c-_
+@end lilypond
+
+@cindex fingering
+De la même manière, des indications de doigté peuvent être ajoutées à
+une note en utilisant un tiret (@samp{-}) et le chiffre à écrire :
+
+@lilypond[fragment,quote,verbatim,relative=2]
+c-3 e-5 b-2 a-1
+@end lilypond
+
+Articulations et doigtés sont habituellement placés automatiquement,
+mais vous pouvez spécifier une direction en utilisant @samp{^} (en haut)
+ou @samp{_} (en bas). Vous pouvez aussi utiliser plusieurs articulations
+sur la même note. Dans la plupart des cas, cependant, il est mieux de
+laisser LilyPond déterminer l'emplacement de l'articulation.
+
+@lilypond[fragment,quote,verbatim,relative=2]
+c_-^1 d^. f^4_2-> e^-_+
+@end lilypond
+
+Les signes de nuances sont obtenus en ajoutant à la note les noms des nuances,
+précédées d'un anti-slash @samp{\} :
+
+@lilypond[fragment,quote,verbatim,relative=2]
+c\ff c\mf
+@end lilypond
+
+@cindex dynamics
+@cindex decrescendo
+@cindex crescendo
+
+Crescendi et decrescendi débutent avec les commandes @code{\<} et
+@code{\>}. Ils se terminent soit par une nuance d'arrivée, par exemple @code{\f},
+soit par la commande @code{\!} :
+
+@lilypond[fragment,quote,verbatim,relative=2]
+c2\< c2\ff\> c2 c2\!
+@end lilypond
+
+
+
+@cindex slur
+
+Une liaison d'articulation (@rglos{slur}) est une courbe tracée
+au-dessus de plusieurs notes. Elle indique un jeu legato. Les notes de
+départ et d'arrivée sont suivies respectivement par @samp{(} et
+@samp{)} :
+
+@lilypond[fragment,quote,fragment,relative=2,verbatim]
+d4( c16) cis( d e c cis d) e( d4)
+@end lilypond
+
+@cindex slurs versus ties
+Une liaison d'articulation ressemble à une liaison de
+prolongation (@rglos{tie}),
+mais a une signification différente. Une liaison de prolongation fait
+durer la première note plus longtemps, et ne peut être utilisée que
+sur une paire de notes de même hauteur. Ces deux types de liaison
+peuvent être imbriqués :
+
+@lilypond[quote,fragment,relative=2]
+c2~( c8 fis fis4 ~ fis2 g2)
+@end lilypond
+
+@cindex phrasing slurs
+Une liaison de phrasé peut être entrée avec @code{\(} et @code{\)},
+vous pouvez donc avoir simultanément une liaison d'articulation et une
+liaison de phrasé. Vous ne pouvez pas avoir de liaisons d'articulation
+simultanées ni de liaisons de phrasé simultanées.
+
+@lilypond[quote,fragment,relative=2,verbatim]
+a8(\( ais b c) cis2 b'2 a4 cis, c\)
+@end lilypond
+
+
+Pour plus d'informations sur les
+
+@quotation
+@table @asis
+@item doigtés
+voir @ref{Fingering instructions}.
+@item articulations
+voir @ref{Articulations}.
+@item liaisons d'articulation
+voir @ref{Slurs}.
+@item liaisons de phrasé
+voir @ref{Phrasing slurs}.
+@item nuances
+voir @ref{Dynamics}.
+@end table
+@end quotation
+
+
+@node Combining notes into chords
+@section Combining notes into chords
+
+@cindex chords
+Des accords peuvent être produits en entourant les hauteurs de note
+avec les angles gauche et droit -- @samp{<} et @samp{>} --
+
+@lilypond[quote,relative=1,fragment,verbatim]
+r4 <c e g>4 <c f a>8
+@end lilypond
+
+
+Vous pouvez combiner les indications comme les liaisons et les liens de
+croches avec les accords. Ils doivent cependant être placés en
+dehors des angles :
+
+@lilypond[quote,relative=1,fragment,verbatim]
+r4 <c e g>8[ <c f a>]~ <c f a>
+@end lilypond
+
+@example
+r4 <c e g>8\>( <c e g> <c e g> <c f a>\!)
+@end example
+
+@lilypond[quote,relative=1,fragment]
+\slurUp
+r4 <c e g>8\>( <c e g> <c e g> <c f a>\!)
+@end lilypond
+
+
+@node Advanced rhythmic commands
+@section Advanced rhythmic commands
+
+@cindex pickup
+@cindex anacruse
+@cindex partial measure
+Une levée est entrée avec le mot-clé @code{\partial}. Il est suivi par
+une durée : @code{\partial 4} est une levée d'une noire et
+@code{\partial 8} d'une croche.
+
+@lilypond[quote,relative=2,verbatim,fragment]
+\partial 8
+f8 c2 d e
+@end lilypond
+
+@cindex tuplets
+@cindex triplets
+Les n-olets sont créés avec le mot-clef @code{\times}. Celui-ci prend
+deux arguments : une fraction et une expression musicale. La durée des
+notes de l'expression musicale est multipliée par la fraction. Les
+notes d'un triolet durent les deux tiers du temps de leur notation
+réelle, cette fraction est donc de 2/3 pour les triolets :
+
+@lilypond[quote,relative=1,verbatim,fragment]
+\times 2/3 { f8 g a }
+\times 2/3 { c r c }
+@end lilypond
+
+@cindex grace notes
+@cindex acciaccatura
+Des notes d'ornement sont produites en préfixant une expression musicale
+avec le mot-clé @code{\appoggiatura} ou @code{\acciaccatura} :
+@cindex appoggiatura
+@cindex acciaccatura
+
+@lilypond[quote,relative=2,verbatim,fragment]
+c4 \appoggiatura b16 c4
+c4 \acciaccatura b16 c4
+@end lilypond
+
+@noindent
+
+Pour plus d'informations sur les
+
+@quotation
+@table @asis
+@item ornementations
+voir @ref{Grace notes},
+@item n-olets
+voir @ref{Tuplets},
+@item mesures incomplètes (levées)
+voir @ref{Partial measures}.
+@end table
+@end quotation
+
+
+@node Commenting input files
+@section Commenting input files
+
+@cindex comments
+@cindex line comment
+@cindex block comment
+Un commentaire est une remarque à l'attention du lecteur du fichier
+source ; il est ignoré lors de l'analyse du fichier, et n'a donc
+aucun effet sur la sortie imprimable. Il existe deux types
+de commentaires. Le symbole pourcent @samp{%} introduit un commentaire
+d'une ligne : après @code{%}, le reste de la ligne est ignoré. Un bloc de
+commentaire marque une section entière dans le fichier d'entrée. Tout ce
+qui est à l'intérieur de @code{%@{} et @code{%@}} est ignoré. Le fragment
+suivant montre les utilisations possible des commentaires :
+
+@example
+% mélodie de "ah vous dirais-je maman"
+ c4 c g' g a a g2
+
+%@{
+ Cette ligne, et les notes ci-dessous
+ sont ignorées, puisque'elles sont dans
+ un bloc de commentaire.
+
+ f f e e d d c2
+%@}
+@end example
+
+@c TODO post-2.6 reorg
+@c This is good info, but I wouldn't call it a comment. IMO it should
+@c be moved somewhere else.
+
+@cindex versioning
+
+Il y a une déclaration particulière qui est une sorte de commentaire. La
+déclaration @code{\version} stipule le numéro de la version de LilyPond
+pour laquelle le fichier a été écrit. Pour donner à un fichier la version
+2.10.0, utilisez
+
+@example
+\version "2.10.0"
+@end example
+
+@noindent
+Cette annotation permet de faciliter les prochaines mises à jour de
+LilyPond. Les changements dans la syntaxe sont gérés avec un
+programme spécial, @file{convert-ly} -- voir
+@ref{Updating files with convert-ly} -- et il utilise @code{\version}
+pour déterminer les règles de conversion à appliquer au fichier.
+
+
+@node Printing lyrics
+@section Printing lyrics
+@cindex lyrics
+
+@c TODO: (c) status of the Queen fragment.
+
+@cindex Lyrics
+@cindex Songs
+Les paroles sont entrées en séparant chaque syllable par un espace :
+
+@example
+I want to break free
+@end example
+
+Voyons la mélodie
+
+@lilypond[quote,verbatim,fragment,ragged-right]
+\relative {
+ r4 c \times 2/3 { f g g }
+ \times 2/3 { g4( a2) }
+}
+@end lilypond
+
+Les paroles peuvent être associées à ces notes en les combinant avec le
+mot-clé @code{\addlyrics}
+
+@lilypond[quote,verbatim,fragment,ragged-right]
+<<
+ \relative {
+ r4 c \times 2/3 { f g g }
+ \times 2/3 { g4( a2) }
+ }
+ \addlyrics { I want to break free }
+>>
+@end lilypond
+
+@cindex melisma
+@cindex extender line
+@c synonyms?
+Cette mélodie se termine sur un mélisme (@rglos{melisma}),
+c'est-à-dire qu'une seule syllable (« free ») correspond à plus d'une
+note. Ceci est indiqué avec une @emph{ligne d'extension}. Elle est
+entrée avec deux caractères souligné (@code{_}), c'est-à-dire
+
+@example
+@{ I want to break free __ @}
+@end example
+
+@lilypond[fragment,quote,ragged-right]
+<<
+ \relative {
+ r4 c \times 2/3 { f g g }
+ \times 2/3 { g4( a2) }
+ }
+ \addlyrics { I want to break free __ }
+>>
+@end lilypond
+
+De la même manière, les séparations syllabiques d'un mot peuvent être entrées
+avec deux tirets (@code{-}), ce qui produit un tiret centré entre les deux
+syllabes :
+
+@example
+A -- le gri -- a
+@end example
+
+@c no ragged-right here, because otherwise the hypens get lost.
+@lilypond[fragment,quote]
+<<
+ \relative {
+ \time 2/4
+ f4 f c' c
+ }
+ \addlyrics { A -- le gri -- a }
+>>
+@end lilypond
+
+Plus de possibilités, comme celle d'ajouter plusieurs lignes de
+paroles en dessous d'une même mélodie sont exposées à
+@ref{Vocal music}.
+
+
+@node A lead sheet
+@section A lead sheet
+
+@cindex Lead sheets
+@cindex chords
+@cindex chord names
+
+@c TODO: revise this, \chords { } is shorter and more intuitive.
+
+Dans la musique de variété, il est courant d'indiquer l'accompagnement
+par le nom des accords. De tels accords peuvent être entrés comme les
+notes :
+
+@lilypond[quote,verbatim,ragged-right]
+\chordmode { c2 f4. g8 }
+@end lilypond
+
+@noindent
+Maintenant, chaque hauteur est lue comme la base de l'accord à la
+place de la note. Ce mode est activé avec @code{\chordmode}.
+
+Les autres accords peuvent être créés en ajoutant des modifiacteurs après
+deux points. L'exemple suivant montre quelques modificateurs usuels :
+
+@lilypond[quote,verbatim,ragged-right]
+\chordmode { c2 f4:m g4:maj7 gis1:dim7 }
+@end lilypond
+
+Pour la musique improvisée, les accords ne sont pas imprimés sur des
+portées mais comme des lignes à part entière. Ceci s'obtient en
+utilisant @code{\chords} à la place de @code{\chordmode}. La même
+syntaxe sera utilisée que dans le cas de@code{\chordmode}, mais le
+rendu des notes interviendra dans un contexte de @code{ChordNames},
+avec le résultat suivant
+
+@lilypond[quote,verbatim,ragged-right]
+\chords { c2 f4.:m g4.:maj7 gis8:dim7 }
+@end lilypond
+
+@cindex lead sheet
+Une fois assemblés, les accords, paroles et mélodie forment une
+partition de chanson :
+
+@example
+<<
+ \chords @{ @emph{les accords} @}
+ @emph{la mélodie}
+ \addlyrics @{ @emph{le texte} @}
+>>
+@}
+@end example
+
+@lilypond[quote,ragged-right]
+<<
+ \chords { r2 c:sus4 f }
+ \relative {
+ r4 c' \times 2/3 { f g g }
+ \times 2/3 { g4( a2) }
+ }
+ \addlyrics { I want to break free __ }
+>>
+@end lilypond
+
+Une liste complète de modificateurs et d'autres options de
+mise en forme se trouve à la section @ref{Chords}.
+
+
+@node Adding titles
+@section Adding titles
+
+Les informations bibliographiques sont entrées dans un bloc séparé, le
+bloc d'en-tête (@code{\header}). Le nom du morceau, son compositeur, etc., sont
+définis dans @code{\header@{@tie{}@dots{}@tie{}@}}.
+Le bloc @code{\header} est habituellement placé en début de fichier.
+Par exemple,
+
+@example
+\header @{
+ title = "Miniature"
+ composer = "Igor Stravinsky"
+@}
+
+@{ @dots{} @}
+@end example
+
+
+Quand le fichier est traité, le titre et le compositeur sont imprimés
+en haut de la partition. Vous trouverez plus d'informations sur les
+titres à @ref{Creating titles}.
+
+
+@node Single staff polyphony
+@section Single staff polyphony
+
+@cindex polyphony
+@cindex multiple voices
+@cindex voices, more -- on a staff
+Quand différentes lignes mélodiques sont combinées sur une seule et
+même portée, elle sont imprimées comme des voix polyphoniques ; chaque
+voix a ses propre hampes@footnote{familièrement appelées queues de
+note.}, liaisons et ligatures, la voix supérieure ayant les hampes
+vers le haut, la voix inférieure vers le bas.
+
+Ce type de partition est réalisé en entrant chaque voix comme
+une séquence (avec @code{@{...@}}), en combinant simultanément les
+voix et en les séparant par @code{\\} :
+
+@lilypond[quote,verbatim,relative=2,fragment]
+<< { a4 g2 f4~ f4 } \\
+ { r4 g4 f2 f4 } >>
+@end lilypond
+
+Pour l'écriture de musique polyphonique, les silences invisibles
+(spacer rests) s'avèrent bien pratiques ; ce sont des silences qui ne
+s'impriment pas. Ils sont utiles pour remplir des voix qui,
+temporairement, ne jouent rien. On peut voir ici le même exemple avec
+un silence espace invisible (@code{s}) à la place d'un silence normal
+(@code{r}) :
+
+@lilypond[quote,verbatim,relative=2,fragment]
+<< { a4 g2 f4~ f4 } \\
+ { s4 g4 f2 f4 } >>
+@end lilypond
+
+@noindent
+Encore une fois, ces expressions peuvent s'imbriquer arbitrairement :
+
+@lilypond[quote,fragment,verbatim,relative=2,fragment]
+<<
+ \new Staff <<
+ { a4 g2 f4~ f4 } \\
+ { s4 g4 f2 f4 }
+ >>
+ \new Staff <<
+ \clef bass
+ { <c g>1 ~ <c g>4 } \\
+ { e,,4 d e2 ~ e4}
+ >>
+>>
+@end lilypond
+
+Plus de fonctionnalités sur l'écriture polyphonique sont décrites à la
+section @ref{Basic polyphony} du manuel.
+
+
+@node Piano staves
+@section Piano staves
+
+@cindex staff switch, manual
+@cindex cross staff voice, manual
+La musique pour piano s'écrit avec deux portées reliées par une
+accolade. Imprimer ce type de portée revient au même que dans l'exemple de
+musique polyphonique (@ref{More staves}),
+
+@example
+<< \new Staff @{ @dots{} @}
+ \new Staff @{ @dots{} @} >>
+@end example
+
+@noindent
+mais maintenant cette expression entière doit être interprétée dans un
+contexte @code{PianoStaff}
+
+@example
+\new PianoStaff << \new Staff @dots{} >>
+@end example
+
+Voici un petit exemple :
+
+@lilypond[quote,verbatim,relative=1,fragment]
+\new PianoStaff <<
+ \new Staff { \time 2/4 c4 c g' g }
+ \new Staff { \clef bass c,, c' e c }
+>>
+@end lilypond
+
+Plus d'informations sur le formatage de la musique pour piano sont
+données à @ref{Piano music}.
+
+
+@node Organizing larger pieces
+@section Organizing larger pieces
+
+Lorsqu'on combine tous les éléments étudiés plus haut pour produire
+des fichiers plus volumineux, les blocs @code{\score} deviennent
+beaucoup plus gros parce que les expressions musicales sont plus
+longues et, dans le cas des pièces polyphoniques, profondément
+imbriquées. De telles expressions imposantes finissent par devenir peu
+maniables.
+
+En utilisant des variables, appelées également identificateurs, il est
+possible de découper des expressions musicales complexes. Un identificateur
+se définit comme
+
+@example
+MusiqueToto = @{ @dots{} @}
+@end example
+
+@noindent
+Le contenu de l'expression musicale @code{MusiqueToto}, peut être
+utilisé plus loin en faisant précéder son nom d'un anti-slash, c'est-à-dire
+@code{\MusiqueToto}. Dans l'exemple suivant, un motif de deux notes est
+répété deux fois en utilisant la substitution par une variable :
+
+@lilypond[quote,ragged-right,verbatim,nofragment]
+seufzer = {
+ e'4( dis'4)
+}
+{ \seufzer \seufzer }
+@end lilypond
+
+Le nom d'un identificateur ne doit comporter que des caractères
+alphabétiques non accentués, aucun nombre ni tiret. On doit le définir
+en dehors de toute expression musicale.
+
+Il est possible d'utiliser des variables de types variés.
+Par exemple,
+
+@example
+largeur = 4.5\cm
+nom = "Wendy"
+papierACinq = \paper @{ paperheight = 21.0 \cm @}
+@end example
+
+En fonction de son contenu, l'identificateur peut être utilisé à différents
+endroits. L'exemple suivant utilise la variable précédente :
+
+@example
+\paper @{
+ \papierACinq
+ line-width = \largeur
+@}
+@{ c4^\nom @}
+@end example
+
+Vous trouverez plus d'informations sur les usages possibles des
+identificateurs dans le manuel technique, section
+@ref{Input variables and Scheme}.
+@c fixme: the ref is too technical.
+
+
+@node An orchestral part
+@section An orchestral part
+
+Pour la musique d'orchestre, toute la musique est imprimée deux fois.
+Une partie séparée pour chaque pupitre, et un conducteur pour le chef.
+Recourir à des identifiants permet de s'épargner un double travail. La
+musique est entrée une seule fois, et enregistrée dans une variable. Le
+contenu de ces variables sera utilisé pour générer à la fois la
+partie d'instrument et le conducteur.
+
+Définir les notes dans un fichier à part est très pratique. Par
+exemple, supposons que le fichier @file{musique-cor.ly} contienne la
+partie d'un duo cor/@/basson :
+
+@example
+notesCor = \relative c @{
+ \time 2/4
+ r4 f8 a cis4 f e d
+@}
+@end example
+
+@noindent
+Puis, une partie individuelle est créée en mettant ce qui suit dans
+un fichier
+
+@example
+\include "musique-cor.ly"
+\header @{
+ instrument = "Cor en fa"
+@}
+
+@{
+ \transpose f c' \notesCor
+@}
+@end example
+
+La ligne
+
+@example
+\include "musique-cor.ly"
+@end example
+
+@noindent
+indique à LilyPond de lire le contenu de @file{musique-cor.ly} à cet
+endroit dans le fichier, ainsi @code{notesCor} est défini pour ce qui
+suivra. La commande @code{\transpose f@tie{}c'} indique que
+l'argument, en l'occurence @code{\notesCor}, doit être transposé d'une
+quinte ascendante. Le son entendu @samp{fa} correspond à la note écrite
+@code{do'}, ce qui correspond bien à la transpostion d'un cor en
+fa. La transposition peut être constatée dans la sortie suivante :
+
+@lilypond[quote,ragged-right]
+\transpose f c' \relative c {
+ \time 2/4
+ r4 f8 a cis4 f e d
+}
+@end lilypond
+
+Dans la musique d'ensemble, il arrive souvent qu'une des voix ne joue
+pas pendant plusieurs mesures. Ceci est spécifié par un silence
+spécial, le silence multi-mesures (mesures à compter). Il est saisi
+par une lettre capitale @samp{R} suivie d'une durée (@code{1}@tie{}pour une
+ronde, @code{2}@tie{}pour une blanche, etc.). En multipliant la durée, on
+peut construire des silences plus longs. Par exemple, ce silence dure
+3@tie{}mesures à 2/4
+
+@example
+R2*3
+@end example
+
+Pour l'impression de parties séparées, ces silences multi-mesures doivent être
+condensés. On peut l'obtenir en réglant une variable d'exécution
+
+@example
+\set Score.skipBars = ##t
+@end example
+
+@noindent
+Cette commande règle la propriété @code{skipBars} dans le contexte
+@code{Score} à vrai (@code{##t}). En faisant précéder la musique plus haut
+du silence et de cette option, on obtient
+
+@lilypond[quote,ragged-right]
+\transpose f c' \relative c {
+ \time 2/4
+ \set Score.skipBars = ##t
+ R2*3
+ r4 f8 a cis4 f e d
+}
+@end lilypond
+
+
+On crée le conducteur en combinant toutes les parties. En
+supposant que l'autre voix soit dans l'expression @code{notesBasson} du fichier
+@file{musique-basson.ly}, le conducteur est composé des commandes
+
+@example
+\include "musique-cor.ly"
+\include "musique-basson.ly"
+
+<<
+ \new Staff \notesCor
+ \new Staff \notesBasson
+>>
+@end example
+
+@noindent
+donnant pour résultat
+
+@lilypond[quote,ragged-right]
+\relative c <<
+ \new Staff {
+ \time 2/4 R2*3
+ r4 f8 a cis4 f e d
+ }
+ \new Staff {
+ \clef bass
+ r4 d,8 f | gis4 c | b bes |
+ a8 e f4 | g d | gis f
+ }
+>>
+@end lilypond
+
+De plus amples informations sur la gestion des parties et conducteurs
+se trouvent dans le manuel de notation, section @ref{Orchestral music}.
+
+Le réglage des variables d'exécution (« propriétés ») est abordé dans
+@ref{Changing context properties on the fly}.
+
+
+@node After the tutorial
+@section After the tutorial
+
+Après avoir parcouru ce tutoriel, vous devriez vous essayer à écrire
+un morceau ou deux. Commencez par copier l'un des modèles types (@ref{Example
+templates}) et ajoutez-y des notes. Si vous voulez employer une notation que
+vous n'avez pas trouvé dans le tutoriel, consultez la référence de
+notation, en commençant par la @ref{Basic notation}. Si vous désirez écrire pour un
+ensemble instrumental non couvert par les @ref{Example templates},
+lisez la section @ref{Extending the templates}.
+
+Après avoir écrit quelques pièces courtes, lisez les chapitres 3 à 5
+du manuel d'apprentissage. Rien ne s'oppose à ce que vous consultiez dès à
+présent les autres chapitres, bien sûr ! Néanmoins, le reste du manuel
+de l'utilisateur part du principe que vous avez déjà bien assimilé la
+syntaxe de LilyPond. Vous pouvez toujours survoler le reste du manuel,
+et y revenir plus tard après avoir acquis de l'expérience.
+
--- /dev/null
+@node Tweaking output
+@chapter Tweaking output
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Moving objects::
+* Fixing overlapping notation::
+* Common tweaks::
+* Default files::
+* Fitting music onto fewer pages::
+* Advanced tweaks with Scheme::
+@end menu
+@node Moving objects
+@section Moving objects
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Fixing overlapping notation
+@section Fixing overlapping notation
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Common tweaks
+@section Common tweaks
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Default files
+@section Default files
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Fitting music onto fewer pages
+@section Fitting music onto fewer pages
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Advanced tweaks with Scheme
+@section Advanced tweaks with Scheme
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+@node Working on LilyPond projects
+@chapter Working on LilyPond projects
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* Suggestions for writing LilyPond files::
+* Saving typing with identifiers and functions::
+* Style sheets::
+* Updating old files::
+* Troubleshooting (taking it all apart)::
+@end menu
+@node Suggestions for writing LilyPond files
+@section Suggestions for writing LilyPond files
+
+UNTRANSLATED NODE: IGNORE ME
+
+@menu
+* General suggestions::
+* Typesetting existing music::
+* Large projects::
+@end menu
+@node General suggestions
+@subsection General suggestions
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Typesetting existing music
+@subsection Typesetting existing music
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Large projects
+@subsection Large projects
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Saving typing with identifiers and functions
+@section Saving typing with identifiers and functions
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Style sheets
+@section Style sheets
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Updating old files
+@section Updating old files
+
+UNTRANSLATED NODE: IGNORE ME
+
+@node Troubleshooting (taking it all apart)
+@section Troubleshooting (taking it all apart)
+
+UNTRANSLATED NODE: IGNORE ME
+
--- /dev/null
+depth = ../..
+
+STEPMAKE_TEMPLATES=podir
+
+include $(depth)/make/stepmake.make
+
+doc-localedir=$(outdir)
+DOMAIN=lilypond-doc
+
+messages: $(MO_FILES)
+ for i in $(CATALOGS); do \
+ mkdir -p $(doc-localedir)/$$i/LC_MESSAGES; \
+ cp $(outdir)/$$i.mo $(doc-localedir)/$$i/LC_MESSAGES/$(DOMAIN).mo; \
+ done
+
+po-update:
+ $(PYTHON) $(depth)/buildscripts/texi-langutils.py -d $(outdir) -o doc.pot --gettext ../$(depth)/Documentation/user/lilypond.tely
+ msgmerge -U lilypond-doc.pot $(outdir)/doc.pot
+ for i in $(CATALOGS); do \
+ msgmerge -U $$i.po lilypond-doc.pot; \
+ done
--- /dev/null
+# translation of fr.po to Français
+# translation of LilyPond documentation
+# Copyright (C) 2006 Han-Wen Nienhuys, Jan Nieuwenhuizen
+# This file is distributed under the same license as the lilypond package.
+#
+# John Mandereau <john.mandereau@free.fr>, 2006.
+msgid ""
+msgstr ""
+"Project-Id-Version: fr\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-11-19 10:23+0100\n"
+"PO-Revision-Date: 2006-11-25 16:47+0100\n"
+"Last-Translator: John Mandereau <john.mandereau@free.fr>\n"
+"Language-Team: Français <lilypond-user-fr@gnu.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+
+msgid "Top"
+msgstr "Sommaire"
+
+msgid "GNU LilyPond --- The music typesetter"
+msgstr "GNU LilyPond -- le système de gravure musicale"
+
+msgid "LilyPond command index"
+msgstr "Index des commandes LilyPond"
+
+msgid "LilyPond index"
+msgstr "Index de LilyPond"
+
+msgid "Bugs"
+msgstr "Bogues"
+
+msgid "See also"
+msgstr "Voir aussi"
+
+msgid "Predefined commands"
+msgstr "Commandes prédéfinies"
+
+msgid "Commonly tweaked properties"
+msgstr "Propriétés couramment ajustées"
+
+msgid "Preface"
+msgstr "Préface"
+
+msgid "Introduction"
+msgstr "Introduction"
+
+msgid "Engraving"
+msgstr "Gravure"
+
+msgid "Automated engraving"
+msgstr "Gravure automatisée"
+
+msgid "What symbols to engrave?"
+msgstr "Quels signes graver ?"
+
+msgid "Music representation"
+msgstr "Représentation de la musique"
+
+msgid "Example applications"
+msgstr "Exemples d'applications"
+
+msgid "About this manual"
+msgstr "À propos de ce manuel"
+
+msgid "Tutorial"
+msgstr "Tutoriel"
+
+msgid "First steps"
+msgstr "Premiers pas"
+
+msgid "Running LilyPond for the first time"
+msgstr "Lancer LilyPond pour la première fois"
+
+msgid "MacOS X"
+msgstr "MacOS X"
+
+msgid "Windows"
+msgstr "Windows"
+
+msgid "Unix"
+msgstr "Unix"
+
+msgid "More about pitches"
+msgstr "Les hauteurs en détail"
+
+msgid "Entering ties"
+msgstr "Liaisons de durée"
+
+msgid "Automatic and manual beams"
+msgstr "Barres de ligature automatiques et manuelles"
+
+msgid "Octave entry"
+msgstr "Saisie des octaves"
+
+msgid "Music expressions explained"
+msgstr "Les expressions musicales en clair"
+
+msgid "More staves"
+msgstr "Plus de portées"
+
+msgid "Adding articulation marks to notes"
+msgstr "Ajout de signes d'articulation"
+
+msgid "Combining notes into chords"
+msgstr "Combinaison de notes en accords"
+
+msgid "Advanced rhythmic commands"
+msgstr "Commandes rythmiques avancées"
+
+msgid "Commenting input files"
+msgstr "Commenter un fichier source"
+
+msgid "Printing lyrics"
+msgstr "Imprimer des paroles"
+
+msgid "A lead sheet"
+msgstr "Partition d'une chanson"
+
+msgid "Adding titles"
+msgstr "Ajout de titres"
+
+msgid "Single staff polyphony"
+msgstr "Polyphonie sur une portée"
+
+msgid "Piano staves"
+msgstr "Double portée"
+
+msgid "Organizing larger pieces"
+msgstr "Comment organiser de plus grandes pièces"
+
+msgid "An orchestral part"
+msgstr "Partitions d'orchestre"
+
+msgid "After the tutorial"
+msgstr "Après le tutoriel"
+
+msgid "Putting it all together"
+msgstr ""
+
+msgid "Extending the templates"
+msgstr ""
+
+msgid "How LilyPond files work"
+msgstr ""
+
+msgid "Score is a single musical expression"
+msgstr ""
+
+msgid "Working on LilyPond projects"
+msgstr ""
+
+msgid "Suggestions for writing LilyPond files"
+msgstr ""
+
+msgid "General suggestions"
+msgstr ""
+
+msgid "Typesetting existing music"
+msgstr ""
+
+msgid "Large projects"
+msgstr ""
+
+msgid "Saving typing with identifiers and functions"
+msgstr ""
+
+msgid "Style sheets"
+msgstr ""
+
+msgid "Updating old files"
+msgstr ""
+
+msgid "Troubleshooting (taking it all apart)"
+msgstr ""
+
+msgid "Tweaking output"
+msgstr ""
+
+msgid "Moving objects"
+msgstr ""
+
+msgid "Fixing overlapping notation"
+msgstr ""
+
+msgid "Common tweaks"
+msgstr ""
+
+msgid "Default files"
+msgstr ""
+
+msgid "Fitting music onto fewer pages"
+msgstr ""
+
+msgid "Advanced tweaks with Scheme"
+msgstr ""
+
+msgid "Basic notation"
+msgstr ""
+
+msgid "Pitches"
+msgstr ""
+
+msgid "Normal pitches"
+msgstr ""
+
+msgid "Accidentals"
+msgstr ""
+
+msgid "Cautionary accidentals"
+msgstr ""
+
+msgid "Micro tones"
+msgstr ""
+
+msgid "Notes names in other languages"
+msgstr ""
+
+msgid "Relative octaves"
+msgstr ""
+
+msgid "Octave check"
+msgstr ""
+
+msgid "Transpose"
+msgstr ""
+
+msgid "Rests"
+msgstr ""
+
+msgid "Skips"
+msgstr ""
+
+msgid "Rhythms"
+msgstr ""
+
+msgid "Durations"
+msgstr ""
+
+msgid "Augmentation dots"
+msgstr ""
+
+msgid "Tuplets"
+msgstr ""
+
+msgid "Scaling durations"
+msgstr ""
+
+msgid "Bar check"
+msgstr ""
+
+msgid "Barnumber check"
+msgstr ""
+
+msgid "Automatic note splitting"
+msgstr ""
+
+msgid "Multiple notes at once"
+msgstr ""
+
+msgid "Chords"
+msgstr ""
+
+msgid "Stems"
+msgstr ""
+
+msgid "Basic polyphony"
+msgstr ""
+
+msgid "Explicitly instantiating voices"
+msgstr ""
+
+msgid "Collision Resolution"
+msgstr ""
+
+msgid "Staff notation"
+msgstr ""
+
+msgid "Clef"
+msgstr ""
+
+msgid "Key signature"
+msgstr ""
+
+msgid "Time signature"
+msgstr ""
+
+msgid "Partial measures"
+msgstr ""
+
+msgid "Bar lines"
+msgstr ""
+
+msgid "Unmetered music"
+msgstr ""
+
+msgid "System start delimiters"
+msgstr ""
+
+msgid "Staff symbol"
+msgstr ""
+
+msgid "Writing music in parallel"
+msgstr ""
+
+msgid "Connecting notes"
+msgstr ""
+
+msgid "Ties"
+msgstr ""
+
+msgid "Slurs"
+msgstr ""
+
+msgid "Phrasing slurs"
+msgstr ""
+
+msgid "Laissez vibrer ties"
+msgstr ""
+
+msgid "Automatic beams"
+msgstr ""
+
+msgid "Manual beams"
+msgstr ""
+
+msgid "Grace notes"
+msgstr ""
+
+msgid "Expressive marks"
+msgstr ""
+
+msgid "Articulations"
+msgstr ""
+
+msgid "Fingering instructions"
+msgstr ""
+
+msgid "Dynamics"
+msgstr ""
+
+msgid "Breath marks"
+msgstr ""
+
+msgid "Trills"
+msgstr ""
+
+msgid "Glissando"
+msgstr ""
+
+msgid "Arpeggio"
+msgstr ""
+
+msgid "Falls and doits"
+msgstr ""
+
+msgid "Repeats"
+msgstr ""
+
+msgid "Repeat types"
+msgstr ""
+
+msgid "Repeat syntax"
+msgstr ""
+
+msgid "Repeats and MIDI"
+msgstr ""
+
+msgid "Manual repeat commands"
+msgstr ""
+
+msgid "Tremolo repeats"
+msgstr ""
+
+msgid "Tremolo subdivisions"
+msgstr ""
+
+msgid "Measure repeats"
+msgstr ""
+
+msgid "Instrument-specific notation"
+msgstr ""
+
+msgid "Piano music"
+msgstr ""
+
+msgid "Automatic staff changes"
+msgstr ""
+
+msgid "Manual staff switches"
+msgstr ""
+
+msgid "Pedals"
+msgstr ""
+
+msgid "Staff switch lines"
+msgstr ""
+
+msgid "Cross staff stems"
+msgstr ""
+
+msgid "Chord names"
+msgstr ""
+
+msgid "Introducing chord names"
+msgstr ""
+
+msgid "Chords mode"
+msgstr ""
+
+msgid "Printing chord names"
+msgstr ""
+
+msgid "Vocal music"
+msgstr ""
+
+msgid "Setting simple songs"
+msgstr ""
+
+msgid "Entering lyrics"
+msgstr ""
+
+msgid "Hyphens and extenders"
+msgstr ""
+
+msgid "The Lyrics context"
+msgstr ""
+
+msgid "Melismata"
+msgstr ""
+
+msgid "Another way of entering lyrics"
+msgstr ""
+
+msgid "Flexibility in placement"
+msgstr ""
+
+msgid "Lyrics to multiple notes of a melisma"
+msgstr ""
+
+msgid "Divisi lyrics"
+msgstr ""
+
+msgid "Switching the melody associated with a lyrics line"
+msgstr ""
+
+msgid "Specifying melismata within the lyrics"
+msgstr ""
+
+msgid "Lyrics independent of notes"
+msgstr ""
+
+msgid "Spacing lyrics"
+msgstr ""
+
+msgid "More about stanzas"
+msgstr ""
+
+msgid "Ambitus"
+msgstr ""
+
+msgid "Other vocal issues"
+msgstr ""
+
+msgid "Rhythmic music"
+msgstr ""
+
+msgid "Showing melody rhythms"
+msgstr ""
+
+msgid "Entering percussion"
+msgstr ""
+
+msgid "Percussion staves"
+msgstr ""
+
+msgid "Ghost notes"
+msgstr ""
+
+msgid "Guitar"
+msgstr ""
+
+msgid "String number indications"
+msgstr ""
+
+msgid "Tablatures basic"
+msgstr ""
+
+msgid "Non-guitar tablatures"
+msgstr ""
+
+msgid "Banjo tablatures"
+msgstr ""
+
+msgid "Fret diagrams"
+msgstr ""
+
+msgid "Right hand fingerings"
+msgstr ""
+
+msgid "Other guitar issues"
+msgstr ""
+
+msgid "Bagpipe"
+msgstr ""
+
+msgid "Bagpipe definitions"
+msgstr ""
+
+msgid "Bagpipe example"
+msgstr ""
+
+msgid "Ancient notation"
+msgstr ""
+
+msgid "Ancient note heads"
+msgstr ""
+
+msgid "Ancient accidentals"
+msgstr ""
+
+msgid "Ancient rests"
+msgstr ""
+
+msgid "Ancient clefs"
+msgstr ""
+
+msgid "Ancient flags"
+msgstr ""
+
+msgid "Ancient time signatures"
+msgstr ""
+
+msgid "Ancient articulations"
+msgstr ""
+
+msgid "Custodes"
+msgstr ""
+
+msgid "Divisiones"
+msgstr ""
+
+msgid "Ligatures"
+msgstr ""
+
+msgid "White mensural ligatures"
+msgstr ""
+
+msgid "Gregorian square neumes ligatures"
+msgstr ""
+
+msgid "Gregorian Chant contexts"
+msgstr ""
+
+msgid "Mensural contexts"
+msgstr ""
+
+msgid "Musica ficta accidentals"
+msgstr ""
+
+msgid "Figured bass"
+msgstr ""
+
+msgid "Other instrument specific notation"
+msgstr ""
+
+msgid "Artificial harmonics (strings)"
+msgstr ""
+
+msgid "Advanced notation"
+msgstr ""
+
+msgid "Text"
+msgstr ""
+
+msgid "Text scripts"
+msgstr ""
+
+msgid "Text spanners"
+msgstr ""
+
+msgid "Text marks"
+msgstr ""
+
+msgid "Text markup"
+msgstr ""
+
+msgid "Nested scores"
+msgstr ""
+
+msgid "Overview of text markup commands"
+msgstr ""
+
+msgid "Font selection"
+msgstr ""
+
+msgid "New dynamic marks"
+msgstr ""
+
+msgid "Preparing parts"
+msgstr ""
+
+msgid "Multi measure rests"
+msgstr ""
+
+msgid "Metronome marks"
+msgstr ""
+
+msgid "Rehearsal marks"
+msgstr ""
+
+msgid "Bar numbers"
+msgstr ""
+
+msgid "Instrument names"
+msgstr ""
+
+msgid "Instrument transpositions"
+msgstr ""
+
+msgid "Ottava brackets"
+msgstr ""
+
+msgid "Different editions from one source"
+msgstr ""
+
+msgid "Orchestral music"
+msgstr ""
+
+msgid "Automatic part combining"
+msgstr ""
+
+msgid "Hiding staves"
+msgstr ""
+
+msgid "Quoting other voices"
+msgstr ""
+
+msgid "Formatting cue notes"
+msgstr ""
+
+msgid "Aligning to cadenzas"
+msgstr ""
+
+msgid "Contemporary notation"
+msgstr ""
+
+msgid "Polymetric notation"
+msgstr ""
+
+msgid "Time administration"
+msgstr ""
+
+msgid "Proportional notation"
+msgstr ""
+
+msgid "Clusters"
+msgstr ""
+
+msgid "Special noteheads"
+msgstr ""
+
+msgid "Feathered beams"
+msgstr ""
+
+msgid "Improvisation"
+msgstr ""
+
+msgid "Selecting notation font size"
+msgstr ""
+
+msgid "Educational use"
+msgstr ""
+
+msgid "Balloon help"
+msgstr ""
+
+msgid "Blank music sheet"
+msgstr ""
+
+msgid "Hidden notes"
+msgstr ""
+
+msgid "Shape note heads"
+msgstr ""
+
+msgid "Easy Notation note heads"
+msgstr ""
+
+msgid "Analysis brackets"
+msgstr ""
+
+msgid "Coloring objects"
+msgstr ""
+
+msgid "Parentheses"
+msgstr ""
+
+msgid "Changing defaults"
+msgstr ""
+
+msgid "Automatic notation"
+msgstr ""
+
+msgid "Automatic accidentals"
+msgstr ""
+
+msgid "Setting automatic beam behavior"
+msgstr ""
+
+msgid "Interpretation contexts"
+msgstr ""
+
+msgid "Contexts explained"
+msgstr ""
+
+msgid "Creating contexts"
+msgstr ""
+
+msgid "Changing context properties on the fly"
+msgstr ""
+
+msgid "Modifying context plug-ins"
+msgstr ""
+
+msgid "Layout tunings within contexts"
+msgstr ""
+
+msgid "Changing context default settings"
+msgstr ""
+
+msgid "Defining new contexts"
+msgstr ""
+
+msgid "The \\override command"
+msgstr ""
+
+msgid "Constructing a tweak"
+msgstr ""
+
+msgid "Navigating the program reference"
+msgstr ""
+
+msgid "Layout interfaces"
+msgstr ""
+
+msgid "Determining the grob property"
+msgstr ""
+
+msgid "Objects connected to the input"
+msgstr ""
+
+msgid "\\set vs. \\override"
+msgstr ""
+
+msgid "Difficult tweaks"
+msgstr ""
+
+msgid "Non-musical notation"
+msgstr ""
+
+msgid "Input files"
+msgstr ""
+
+msgid "File structure (introduction)"
+msgstr ""
+
+msgid "Multiple scores in a book"
+msgstr ""
+
+msgid "Extracting fragments of notation"
+msgstr ""
+
+msgid "File structure"
+msgstr ""
+
+msgid "A single music expression"
+msgstr ""
+
+msgid "Including LilyPond files"
+msgstr ""
+
+msgid "Text encoding"
+msgstr ""
+
+msgid "Titles and headers"
+msgstr ""
+
+msgid "Creating titles"
+msgstr ""
+
+msgid "Custom titles"
+msgstr ""
+
+msgid "MIDI output"
+msgstr ""
+
+msgid "Creating MIDI files"
+msgstr ""
+
+msgid "MIDI block"
+msgstr ""
+
+msgid "MIDI instrument names"
+msgstr ""
+
+msgid "Displaying LilyPond notation"
+msgstr ""
+
+msgid "Skipping corrected music"
+msgstr ""
+
+msgid "Spacing issues"
+msgstr ""
+
+msgid "Paper and pages"
+msgstr ""
+
+msgid "Paper size"
+msgstr ""
+
+msgid "Page formatting"
+msgstr ""
+
+msgid "Music layout"
+msgstr ""
+
+msgid "Setting global staff size"
+msgstr ""
+
+msgid "Score layout"
+msgstr ""
+
+msgid "Vertical spacing"
+msgstr ""
+
+msgid "Vertical spacing inside a system"
+msgstr ""
+
+msgid "Vertical spacing of piano staves"
+msgstr ""
+
+msgid "Vertical spacing between systems"
+msgstr ""
+
+msgid "Controlling spacing of individual systems"
+msgstr ""
+
+msgid "Two-pass vertical spacing"
+msgstr ""
+
+msgid "Horizontal spacing"
+msgstr ""
+
+msgid "Horizontal Spacing"
+msgstr ""
+
+msgid "Horizontal spacing overview"
+msgstr ""
+
+msgid "New spacing area"
+msgstr ""
+
+msgid "Changing horizontal spacing"
+msgstr ""
+
+msgid "Line length"
+msgstr ""
+
+msgid "Breaks"
+msgstr ""
+
+msgid "Line breaking"
+msgstr ""
+
+msgid "Page breaking"
+msgstr ""
+
+msgid "Optimal page breaking"
+msgstr ""
+
+msgid "Optimal page turning"
+msgstr ""
+
+msgid "Displaying spacing"
+msgstr ""
+
+msgid "Interfaces for programmers"
+msgstr ""
+
+msgid "Music functions"
+msgstr ""
+
+msgid "Overview of music functions"
+msgstr ""
+
+msgid "Simple substitution functions"
+msgstr ""
+
+msgid "Paired substitution functions"
+msgstr ""
+
+msgid "Mathematics in functions"
+msgstr ""
+
+msgid "Void functions"
+msgstr ""
+
+msgid "Programmer interfaces"
+msgstr ""
+
+msgid "Input variables and Scheme"
+msgstr ""
+
+msgid "Internal music representation"
+msgstr ""
+
+msgid "Building complicated functions"
+msgstr ""
+
+msgid "Displaying music expressions"
+msgstr ""
+
+msgid "Music properties"
+msgstr ""
+
+msgid "Doubling a note with slurs (example)"
+msgstr ""
+
+msgid "Adding articulation to notes (example)"
+msgstr ""
+
+msgid "Markup programmer interface"
+msgstr ""
+
+msgid "Markup construction in Scheme"
+msgstr ""
+
+msgid "How markups work internally"
+msgstr ""
+
+msgid "New markup command definition"
+msgstr ""
+
+msgid "Contexts for programmers"
+msgstr ""
+
+msgid "Context evaluation"
+msgstr ""
+
+msgid "Running a function on all layout objects"
+msgstr ""
+
+msgid "Scheme procedures as properties"
+msgstr ""
+
+msgid "Running LilyPond"
+msgstr ""
+
+msgid "Invoking lilypond"
+msgstr ""
+
+msgid "Command line options"
+msgstr ""
+
+msgid "Environment variables"
+msgstr ""
+
+msgid "Notes for the MacOS X app"
+msgstr ""
+
+msgid "Updating files with convert-ly"
+msgstr ""
+
+msgid "Updating with"
+msgstr ""
+
+msgid "Reporting bugs"
+msgstr ""
+
+msgid "Error messages"
+msgstr ""
+
+msgid "Editor support"
+msgstr ""
+
+msgid "Point and click"
+msgstr ""
+
+msgid "LilyPond-book"
+msgstr ""
+
+msgid "An example of a musicological document"
+msgstr ""
+
+msgid "Integrating LaTeX and music"
+msgstr ""
+
+msgid "Integrating La"
+msgstr ""
+
+msgid "Integrating Texinfo and music"
+msgstr ""
+
+msgid "Integrating HTML and music"
+msgstr ""
+
+msgid "Integrating DocBook and music"
+msgstr ""
+
+msgid "Common conventions"
+msgstr ""
+
+msgid "Including a LilyPond file"
+msgstr ""
+
+msgid "Including LilyPond code"
+msgstr ""
+
+msgid "Processing the DocBook document"
+msgstr ""
+
+msgid "Music fragment options"
+msgstr ""
+
+msgid "Invoking lilypond-book"
+msgstr ""
+
+msgid "Invoking"
+msgstr ""
+
+msgid "Filename extensions"
+msgstr ""
+
+msgid "Many quotes of a large score"
+msgstr ""
+
+msgid "Inserting LilyPond output into other programs"
+msgstr ""
+
+msgid "Converting from other formats"
+msgstr ""
+
+msgid "Invoking midi2ly"
+msgstr ""
+
+msgid "Invoking etf2ly"
+msgstr ""
+
+msgid "Invoking musicxml2ly"
+msgstr ""
+
+msgid "Invoking abc2ly"
+msgstr ""
+
+msgid "Generating LilyPond files"
+msgstr ""
+
+msgid "Literature list"
+msgstr ""
+
+msgid "Scheme tutorial"
+msgstr ""
+
+msgid "Notation manual tables"
+msgstr ""
+
+msgid "Chord name chart"
+msgstr ""
+
+msgid "MIDI instruments"
+msgstr ""
+
+msgid "List of colors"
+msgstr ""
+
+msgid "Normal colors"
+msgstr ""
+
+msgid "X color names"
+msgstr ""
+
+msgid "Color Names without a numerical suffix:"
+msgstr ""
+
+msgid "Color names with a numerical suffix"
+msgstr ""
+
+msgid "Grey Scale"
+msgstr ""
+
+msgid "The Feta font"
+msgstr ""
+
+msgid "Example templates"
+msgstr ""
+
+msgid "Single staff"
+msgstr ""
+
+msgid "Notes only"
+msgstr ""
+
+msgid "Notes and lyrics"
+msgstr ""
+
+msgid "Notes and chords"
+msgstr ""
+
+msgid "Notes, lyrics, and chords."
+msgstr ""
+
+msgid "Piano templates"
+msgstr ""
+
+msgid "Solo piano"
+msgstr ""
+
+msgid "Piano and melody with lyrics"
+msgstr ""
+
+msgid "Piano centered lyrics"
+msgstr ""
+
+msgid "Piano centered dynamics"
+msgstr ""
+
+msgid "String quartet"
+msgstr ""
+
+msgid "String quartet parts"
+msgstr ""
+
+msgid "Vocal ensembles"
+msgstr ""
+
+msgid "SATB vocal score"
+msgstr ""
+
+msgid "SATB vocal score and automatic piano reduction"
+msgstr ""
+
+msgid "Ancient notation templates"
+msgstr ""
+
+msgid "Transcription of mensural music"
+msgstr ""
+
+msgid "Gregorian transcription template"
+msgstr ""
+
+msgid "Jazz combo"
+msgstr ""
+
+msgid "Lilypond-book templates"
+msgstr ""
+
+msgid "LaTeX"
+msgstr ""
+
+msgid "Texinfo"
+msgstr ""
+
+msgid "Cheat sheet"
+msgstr ""
+
+msgid "GNU Free Documentation License"
+msgstr ""
+
+msgid "ADDENDUM: How to use this License for your documents"
+msgstr ""
+
+msgid "Up:"
+msgstr "Haut :"
+
+msgid "Next:"
+msgstr "Suivant :"
+
+msgid "Previous:"
+msgstr "Précédent :"
+
+msgid "Appendix"
+msgstr "Annexe"
+
--- /dev/null
+# translation of LilyPond documentation
+# Copyright (C) 2006 Han-Wen Nienhuys, Jan Nieuwenhuizen
+# This file is distributed under the same license as the lilypond package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-11-19 10:23+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Top"
+msgstr ""
+
+msgid "GNU LilyPond --- The music typesetter"
+msgstr ""
+
+msgid "LilyPond command index"
+msgstr ""
+
+msgid "LilyPond index"
+msgstr ""
+
+msgid "Bugs"
+msgstr ""
+
+msgid "See also"
+msgstr ""
+
+msgid "Predefined commands"
+msgstr ""
+
+msgid "Commonly tweaked properties"
+msgstr ""
+
+msgid "Preface"
+msgstr ""
+
+msgid "Introduction"
+msgstr ""
+
+msgid "Engraving"
+msgstr ""
+
+msgid "Automated engraving"
+msgstr ""
+
+msgid "What symbols to engrave?"
+msgstr ""
+
+msgid "Music representation"
+msgstr ""
+
+msgid "Example applications"
+msgstr ""
+
+msgid "About this manual"
+msgstr ""
+
+msgid "Tutorial"
+msgstr ""
+
+msgid "First steps"
+msgstr ""
+
+msgid "Running LilyPond for the first time"
+msgstr ""
+
+msgid "MacOS X"
+msgstr ""
+
+msgid "Windows"
+msgstr ""
+
+msgid "Unix"
+msgstr ""
+
+msgid "More about pitches"
+msgstr ""
+
+msgid "Entering ties"
+msgstr ""
+
+msgid "Automatic and manual beams"
+msgstr ""
+
+msgid "Octave entry"
+msgstr ""
+
+msgid "Music expressions explained"
+msgstr ""
+
+msgid "More staves"
+msgstr ""
+
+msgid "Adding articulation marks to notes"
+msgstr ""
+
+msgid "Combining notes into chords"
+msgstr ""
+
+msgid "Advanced rhythmic commands"
+msgstr ""
+
+msgid "Commenting input files"
+msgstr ""
+
+msgid "Printing lyrics"
+msgstr ""
+
+msgid "A lead sheet"
+msgstr ""
+
+msgid "Adding titles"
+msgstr ""
+
+msgid "Single staff polyphony"
+msgstr ""
+
+msgid "Piano staves"
+msgstr ""
+
+msgid "Organizing larger pieces"
+msgstr ""
+
+msgid "An orchestral part"
+msgstr ""
+
+msgid "After the tutorial"
+msgstr ""
+
+msgid "Putting it all together"
+msgstr ""
+
+msgid "Extending the templates"
+msgstr ""
+
+msgid "How LilyPond files work"
+msgstr ""
+
+msgid "Score is a single musical expression"
+msgstr ""
+
+msgid "Working on LilyPond projects"
+msgstr ""
+
+msgid "Suggestions for writing LilyPond files"
+msgstr ""
+
+msgid "General suggestions"
+msgstr ""
+
+msgid "Typesetting existing music"
+msgstr ""
+
+msgid "Large projects"
+msgstr ""
+
+msgid "Saving typing with identifiers and functions"
+msgstr ""
+
+msgid "Style sheets"
+msgstr ""
+
+msgid "Updating old files"
+msgstr ""
+
+msgid "Troubleshooting (taking it all apart)"
+msgstr ""
+
+msgid "Tweaking output"
+msgstr ""
+
+msgid "Moving objects"
+msgstr ""
+
+msgid "Fixing overlapping notation"
+msgstr ""
+
+msgid "Common tweaks"
+msgstr ""
+
+msgid "Default files"
+msgstr ""
+
+msgid "Fitting music onto fewer pages"
+msgstr ""
+
+msgid "Advanced tweaks with Scheme"
+msgstr ""
+
+msgid "Basic notation"
+msgstr ""
+
+msgid "Pitches"
+msgstr ""
+
+msgid "Normal pitches"
+msgstr ""
+
+msgid "Accidentals"
+msgstr ""
+
+msgid "Cautionary accidentals"
+msgstr ""
+
+msgid "Micro tones"
+msgstr ""
+
+msgid "Notes names in other languages"
+msgstr ""
+
+msgid "Relative octaves"
+msgstr ""
+
+msgid "Octave check"
+msgstr ""
+
+msgid "Transpose"
+msgstr ""
+
+msgid "Rests"
+msgstr ""
+
+msgid "Skips"
+msgstr ""
+
+msgid "Rhythms"
+msgstr ""
+
+msgid "Durations"
+msgstr ""
+
+msgid "Augmentation dots"
+msgstr ""
+
+msgid "Tuplets"
+msgstr ""
+
+msgid "Scaling durations"
+msgstr ""
+
+msgid "Bar check"
+msgstr ""
+
+msgid "Barnumber check"
+msgstr ""
+
+msgid "Automatic note splitting"
+msgstr ""
+
+msgid "Multiple notes at once"
+msgstr ""
+
+msgid "Chords"
+msgstr ""
+
+msgid "Stems"
+msgstr ""
+
+msgid "Basic polyphony"
+msgstr ""
+
+msgid "Explicitly instantiating voices"
+msgstr ""
+
+msgid "Collision Resolution"
+msgstr ""
+
+msgid "Staff notation"
+msgstr ""
+
+msgid "Clef"
+msgstr ""
+
+msgid "Key signature"
+msgstr ""
+
+msgid "Time signature"
+msgstr ""
+
+msgid "Partial measures"
+msgstr ""
+
+msgid "Bar lines"
+msgstr ""
+
+msgid "Unmetered music"
+msgstr ""
+
+msgid "System start delimiters"
+msgstr ""
+
+msgid "Staff symbol"
+msgstr ""
+
+msgid "Writing music in parallel"
+msgstr ""
+
+msgid "Connecting notes"
+msgstr ""
+
+msgid "Ties"
+msgstr ""
+
+msgid "Slurs"
+msgstr ""
+
+msgid "Phrasing slurs"
+msgstr ""
+
+msgid "Laissez vibrer ties"
+msgstr ""
+
+msgid "Automatic beams"
+msgstr ""
+
+msgid "Manual beams"
+msgstr ""
+
+msgid "Grace notes"
+msgstr ""
+
+msgid "Expressive marks"
+msgstr ""
+
+msgid "Articulations"
+msgstr ""
+
+msgid "Fingering instructions"
+msgstr ""
+
+msgid "Dynamics"
+msgstr ""
+
+msgid "Breath marks"
+msgstr ""
+
+msgid "Trills"
+msgstr ""
+
+msgid "Glissando"
+msgstr ""
+
+msgid "Arpeggio"
+msgstr ""
+
+msgid "Falls and doits"
+msgstr ""
+
+msgid "Repeats"
+msgstr ""
+
+msgid "Repeat types"
+msgstr ""
+
+msgid "Repeat syntax"
+msgstr ""
+
+msgid "Repeats and MIDI"
+msgstr ""
+
+msgid "Manual repeat commands"
+msgstr ""
+
+msgid "Tremolo repeats"
+msgstr ""
+
+msgid "Tremolo subdivisions"
+msgstr ""
+
+msgid "Measure repeats"
+msgstr ""
+
+msgid "Instrument-specific notation"
+msgstr ""
+
+msgid "Piano music"
+msgstr ""
+
+msgid "Automatic staff changes"
+msgstr ""
+
+msgid "Manual staff switches"
+msgstr ""
+
+msgid "Pedals"
+msgstr ""
+
+msgid "Staff switch lines"
+msgstr ""
+
+msgid "Cross staff stems"
+msgstr ""
+
+msgid "Chord names"
+msgstr ""
+
+msgid "Introducing chord names"
+msgstr ""
+
+msgid "Chords mode"
+msgstr ""
+
+msgid "Printing chord names"
+msgstr ""
+
+msgid "Vocal music"
+msgstr ""
+
+msgid "Setting simple songs"
+msgstr ""
+
+msgid "Entering lyrics"
+msgstr ""
+
+msgid "Hyphens and extenders"
+msgstr ""
+
+msgid "The Lyrics context"
+msgstr ""
+
+msgid "Melismata"
+msgstr ""
+
+msgid "Another way of entering lyrics"
+msgstr ""
+
+msgid "Flexibility in placement"
+msgstr ""
+
+msgid "Lyrics to multiple notes of a melisma"
+msgstr ""
+
+msgid "Divisi lyrics"
+msgstr ""
+
+msgid "Switching the melody associated with a lyrics line"
+msgstr ""
+
+msgid "Specifying melismata within the lyrics"
+msgstr ""
+
+msgid "Lyrics independent of notes"
+msgstr ""
+
+msgid "Spacing lyrics"
+msgstr ""
+
+msgid "More about stanzas"
+msgstr ""
+
+msgid "Ambitus"
+msgstr ""
+
+msgid "Other vocal issues"
+msgstr ""
+
+msgid "Rhythmic music"
+msgstr ""
+
+msgid "Showing melody rhythms"
+msgstr ""
+
+msgid "Entering percussion"
+msgstr ""
+
+msgid "Percussion staves"
+msgstr ""
+
+msgid "Ghost notes"
+msgstr ""
+
+msgid "Guitar"
+msgstr ""
+
+msgid "String number indications"
+msgstr ""
+
+msgid "Tablatures basic"
+msgstr ""
+
+msgid "Non-guitar tablatures"
+msgstr ""
+
+msgid "Banjo tablatures"
+msgstr ""
+
+msgid "Fret diagrams"
+msgstr ""
+
+msgid "Right hand fingerings"
+msgstr ""
+
+msgid "Other guitar issues"
+msgstr ""
+
+msgid "Bagpipe"
+msgstr ""
+
+msgid "Bagpipe definitions"
+msgstr ""
+
+msgid "Bagpipe example"
+msgstr ""
+
+msgid "Ancient notation"
+msgstr ""
+
+msgid "Ancient note heads"
+msgstr ""
+
+msgid "Ancient accidentals"
+msgstr ""
+
+msgid "Ancient rests"
+msgstr ""
+
+msgid "Ancient clefs"
+msgstr ""
+
+msgid "Ancient flags"
+msgstr ""
+
+msgid "Ancient time signatures"
+msgstr ""
+
+msgid "Ancient articulations"
+msgstr ""
+
+msgid "Custodes"
+msgstr ""
+
+msgid "Divisiones"
+msgstr ""
+
+msgid "Ligatures"
+msgstr ""
+
+msgid "White mensural ligatures"
+msgstr ""
+
+msgid "Gregorian square neumes ligatures"
+msgstr ""
+
+msgid "Gregorian Chant contexts"
+msgstr ""
+
+msgid "Mensural contexts"
+msgstr ""
+
+msgid "Musica ficta accidentals"
+msgstr ""
+
+msgid "Figured bass"
+msgstr ""
+
+msgid "Other instrument specific notation"
+msgstr ""
+
+msgid "Artificial harmonics (strings)"
+msgstr ""
+
+msgid "Advanced notation"
+msgstr ""
+
+msgid "Text"
+msgstr ""
+
+msgid "Text scripts"
+msgstr ""
+
+msgid "Text spanners"
+msgstr ""
+
+msgid "Text marks"
+msgstr ""
+
+msgid "Text markup"
+msgstr ""
+
+msgid "Nested scores"
+msgstr ""
+
+msgid "Overview of text markup commands"
+msgstr ""
+
+msgid "Font selection"
+msgstr ""
+
+msgid "New dynamic marks"
+msgstr ""
+
+msgid "Preparing parts"
+msgstr ""
+
+msgid "Multi measure rests"
+msgstr ""
+
+msgid "Metronome marks"
+msgstr ""
+
+msgid "Rehearsal marks"
+msgstr ""
+
+msgid "Bar numbers"
+msgstr ""
+
+msgid "Instrument names"
+msgstr ""
+
+msgid "Instrument transpositions"
+msgstr ""
+
+msgid "Ottava brackets"
+msgstr ""
+
+msgid "Different editions from one source"
+msgstr ""
+
+msgid "Orchestral music"
+msgstr ""
+
+msgid "Automatic part combining"
+msgstr ""
+
+msgid "Hiding staves"
+msgstr ""
+
+msgid "Quoting other voices"
+msgstr ""
+
+msgid "Formatting cue notes"
+msgstr ""
+
+msgid "Aligning to cadenzas"
+msgstr ""
+
+msgid "Contemporary notation"
+msgstr ""
+
+msgid "Polymetric notation"
+msgstr ""
+
+msgid "Time administration"
+msgstr ""
+
+msgid "Proportional notation"
+msgstr ""
+
+msgid "Clusters"
+msgstr ""
+
+msgid "Special noteheads"
+msgstr ""
+
+msgid "Feathered beams"
+msgstr ""
+
+msgid "Improvisation"
+msgstr ""
+
+msgid "Selecting notation font size"
+msgstr ""
+
+msgid "Educational use"
+msgstr ""
+
+msgid "Balloon help"
+msgstr ""
+
+msgid "Blank music sheet"
+msgstr ""
+
+msgid "Hidden notes"
+msgstr ""
+
+msgid "Shape note heads"
+msgstr ""
+
+msgid "Easy Notation note heads"
+msgstr ""
+
+msgid "Analysis brackets"
+msgstr ""
+
+msgid "Coloring objects"
+msgstr ""
+
+msgid "Parentheses"
+msgstr ""
+
+msgid "Changing defaults"
+msgstr ""
+
+msgid "Automatic notation"
+msgstr ""
+
+msgid "Automatic accidentals"
+msgstr ""
+
+msgid "Setting automatic beam behavior"
+msgstr ""
+
+msgid "Interpretation contexts"
+msgstr ""
+
+msgid "Contexts explained"
+msgstr ""
+
+msgid "Creating contexts"
+msgstr ""
+
+msgid "Changing context properties on the fly"
+msgstr ""
+
+msgid "Modifying context plug-ins"
+msgstr ""
+
+msgid "Layout tunings within contexts"
+msgstr ""
+
+msgid "Changing context default settings"
+msgstr ""
+
+msgid "Defining new contexts"
+msgstr ""
+
+msgid "The \\override command"
+msgstr ""
+
+msgid "Constructing a tweak"
+msgstr ""
+
+msgid "Navigating the program reference"
+msgstr ""
+
+msgid "Layout interfaces"
+msgstr ""
+
+msgid "Determining the grob property"
+msgstr ""
+
+msgid "Objects connected to the input"
+msgstr ""
+
+msgid "\\set vs. \\override"
+msgstr ""
+
+msgid "Difficult tweaks"
+msgstr ""
+
+msgid "Non-musical notation"
+msgstr ""
+
+msgid "Input files"
+msgstr ""
+
+msgid "File structure (introduction)"
+msgstr ""
+
+msgid "Multiple scores in a book"
+msgstr ""
+
+msgid "Extracting fragments of notation"
+msgstr ""
+
+msgid "File structure"
+msgstr ""
+
+msgid "A single music expression"
+msgstr ""
+
+msgid "Including LilyPond files"
+msgstr ""
+
+msgid "Text encoding"
+msgstr ""
+
+msgid "Titles and headers"
+msgstr ""
+
+msgid "Creating titles"
+msgstr ""
+
+msgid "Custom titles"
+msgstr ""
+
+msgid "MIDI output"
+msgstr ""
+
+msgid "Creating MIDI files"
+msgstr ""
+
+msgid "MIDI block"
+msgstr ""
+
+msgid "MIDI instrument names"
+msgstr ""
+
+msgid "Displaying LilyPond notation"
+msgstr ""
+
+msgid "Skipping corrected music"
+msgstr ""
+
+msgid "Spacing issues"
+msgstr ""
+
+msgid "Paper and pages"
+msgstr ""
+
+msgid "Paper size"
+msgstr ""
+
+msgid "Page formatting"
+msgstr ""
+
+msgid "Music layout"
+msgstr ""
+
+msgid "Setting global staff size"
+msgstr ""
+
+msgid "Score layout"
+msgstr ""
+
+msgid "Vertical spacing"
+msgstr ""
+
+msgid "Vertical spacing inside a system"
+msgstr ""
+
+msgid "Vertical spacing of piano staves"
+msgstr ""
+
+msgid "Vertical spacing between systems"
+msgstr ""
+
+msgid "Controlling spacing of individual systems"
+msgstr ""
+
+msgid "Two-pass vertical spacing"
+msgstr ""
+
+msgid "Horizontal spacing"
+msgstr ""
+
+msgid "Horizontal Spacing"
+msgstr ""
+
+msgid "Horizontal spacing overview"
+msgstr ""
+
+msgid "New spacing area"
+msgstr ""
+
+msgid "Changing horizontal spacing"
+msgstr ""
+
+msgid "Line length"
+msgstr ""
+
+msgid "Breaks"
+msgstr ""
+
+msgid "Line breaking"
+msgstr ""
+
+msgid "Page breaking"
+msgstr ""
+
+msgid "Optimal page breaking"
+msgstr ""
+
+msgid "Optimal page turning"
+msgstr ""
+
+msgid "Displaying spacing"
+msgstr ""
+
+msgid "Interfaces for programmers"
+msgstr ""
+
+msgid "Music functions"
+msgstr ""
+
+msgid "Overview of music functions"
+msgstr ""
+
+msgid "Simple substitution functions"
+msgstr ""
+
+msgid "Paired substitution functions"
+msgstr ""
+
+msgid "Mathematics in functions"
+msgstr ""
+
+msgid "Void functions"
+msgstr ""
+
+msgid "Programmer interfaces"
+msgstr ""
+
+msgid "Input variables and Scheme"
+msgstr ""
+
+msgid "Internal music representation"
+msgstr ""
+
+msgid "Building complicated functions"
+msgstr ""
+
+msgid "Displaying music expressions"
+msgstr ""
+
+msgid "Music properties"
+msgstr ""
+
+msgid "Doubling a note with slurs (example)"
+msgstr ""
+
+msgid "Adding articulation to notes (example)"
+msgstr ""
+
+msgid "Markup programmer interface"
+msgstr ""
+
+msgid "Markup construction in Scheme"
+msgstr ""
+
+msgid "How markups work internally"
+msgstr ""
+
+msgid "New markup command definition"
+msgstr ""
+
+msgid "Contexts for programmers"
+msgstr ""
+
+msgid "Context evaluation"
+msgstr ""
+
+msgid "Running a function on all layout objects"
+msgstr ""
+
+msgid "Scheme procedures as properties"
+msgstr ""
+
+msgid "Running LilyPond"
+msgstr ""
+
+msgid "Invoking lilypond"
+msgstr ""
+
+msgid "Command line options"
+msgstr ""
+
+msgid "Environment variables"
+msgstr ""
+
+msgid "Notes for the MacOS X app"
+msgstr ""
+
+msgid "Updating files with convert-ly"
+msgstr ""
+
+msgid "Updating with"
+msgstr ""
+
+msgid "Reporting bugs"
+msgstr ""
+
+msgid "Error messages"
+msgstr ""
+
+msgid "Editor support"
+msgstr ""
+
+msgid "Point and click"
+msgstr ""
+
+msgid "LilyPond-book"
+msgstr ""
+
+msgid "An example of a musicological document"
+msgstr ""
+
+msgid "Integrating LaTeX and music"
+msgstr ""
+
+msgid "Integrating La"
+msgstr ""
+
+msgid "Integrating Texinfo and music"
+msgstr ""
+
+msgid "Integrating HTML and music"
+msgstr ""
+
+msgid "Integrating DocBook and music"
+msgstr ""
+
+msgid "Common conventions"
+msgstr ""
+
+msgid "Including a LilyPond file"
+msgstr ""
+
+msgid "Including LilyPond code"
+msgstr ""
+
+msgid "Processing the DocBook document"
+msgstr ""
+
+msgid "Music fragment options"
+msgstr ""
+
+msgid "Invoking lilypond-book"
+msgstr ""
+
+msgid "Invoking"
+msgstr ""
+
+msgid "Filename extensions"
+msgstr ""
+
+msgid "Many quotes of a large score"
+msgstr ""
+
+msgid "Inserting LilyPond output into other programs"
+msgstr ""
+
+msgid "Converting from other formats"
+msgstr ""
+
+msgid "Invoking midi2ly"
+msgstr ""
+
+msgid "Invoking etf2ly"
+msgstr ""
+
+msgid "Invoking musicxml2ly"
+msgstr ""
+
+msgid "Invoking abc2ly"
+msgstr ""
+
+msgid "Generating LilyPond files"
+msgstr ""
+
+msgid "Literature list"
+msgstr ""
+
+msgid "Scheme tutorial"
+msgstr ""
+
+msgid "Notation manual tables"
+msgstr ""
+
+msgid "Chord name chart"
+msgstr ""
+
+msgid "MIDI instruments"
+msgstr ""
+
+msgid "List of colors"
+msgstr ""
+
+msgid "Normal colors"
+msgstr ""
+
+msgid "X color names"
+msgstr ""
+
+msgid "Color Names without a numerical suffix:"
+msgstr ""
+
+msgid "Color names with a numerical suffix"
+msgstr ""
+
+msgid "Grey Scale"
+msgstr ""
+
+msgid "The Feta font"
+msgstr ""
+
+msgid "Example templates"
+msgstr ""
+
+msgid "Single staff"
+msgstr ""
+
+msgid "Notes only"
+msgstr ""
+
+msgid "Notes and lyrics"
+msgstr ""
+
+msgid "Notes and chords"
+msgstr ""
+
+msgid "Notes, lyrics, and chords."
+msgstr ""
+
+msgid "Piano templates"
+msgstr ""
+
+msgid "Solo piano"
+msgstr ""
+
+msgid "Piano and melody with lyrics"
+msgstr ""
+
+msgid "Piano centered lyrics"
+msgstr ""
+
+msgid "Piano centered dynamics"
+msgstr ""
+
+msgid "String quartet"
+msgstr ""
+
+msgid "String quartet parts"
+msgstr ""
+
+msgid "Vocal ensembles"
+msgstr ""
+
+msgid "SATB vocal score"
+msgstr ""
+
+msgid "SATB vocal score and automatic piano reduction"
+msgstr ""
+
+msgid "Ancient notation templates"
+msgstr ""
+
+msgid "Transcription of mensural music"
+msgstr ""
+
+msgid "Gregorian transcription template"
+msgstr ""
+
+msgid "Jazz combo"
+msgstr ""
+
+msgid "Lilypond-book templates"
+msgstr ""
+
+msgid "LaTeX"
+msgstr ""
+
+msgid "Texinfo"
+msgstr ""
+
+msgid "Cheat sheet"
+msgstr ""
+
+msgid "GNU Free Documentation License"
+msgstr ""
+
+msgid "ADDENDUM: How to use this License for your documents"
+msgstr ""
+
+msgid "Up:"
+msgstr ""
+
+msgid "Next:"
+msgstr ""
+
+msgid "Previous:"
+msgstr ""
+
+msgid "Appendix"
+msgstr ""
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},
Main author.
@item @email{gpermus@@gmail.com, Graham Percival},
@uref{http://percival-music.ca},
- Documenation Editor.
+ Documentation Editor.
@item @email{pinard@@iro.umontreal.ca, François Pinard},
@uref{http://www.iro.umontreal.ca/~pinard/},
Parts of Documentation/user/glossary*, started
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.
-@item @email{lilyfan@@wanadoo.fr, Jean-Charles Malahieude}
- French translation
+ 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
+
@bye
@end ignore
+@item Tablature now supports harmonics and slides,
+
+@lilypond[fragment,ragged-right,relative=1]
+\new TabVoice
+{
+ <c g'\harmonic> d\2\glissando e\2
+}
+@end lilypond
+
+This feature was sponsored by Mike Amundsen
+
+@item Horizontal spacing now follows object outlines more
+accurately. This allows tighter horizontal spacing.
+
+@lilypond[fragment,ragged-right]
+{
+ \stemUp c''4...*1/2
+ ceses'!
+}
+@end lilypond
+
+
+@item Objects that belong outside of the staff are
+now positioned automatically to avoid collisions.
+
+@lilypond[fragment,ragged-right,relative=1]
+ c''
+ \once \override TextScript #'self-alignment-X = #CENTER
+ a,^"this doesn't collide with the c"
+ b^"this goes above the previous markup"
+ a8_"this goes below the dynamic"
+ a\f
+@end lilypond
+
+@item Staves are spaced vertically using a skyline algorithm. This helps to avoid
+uneven vertical spacing.
+
+@lilypond[ragged-right]
+
+%% todo: fix 'landscape PDF.
+#(set-default-paper-size "a6" )
+\header {
+ tagline = ##f
+}
+
+\book {
+ \score {
+ {
+ a,,1 | a'4 b' c'' d'' \break
+ \repeat unfold 2 {a' b' c'' d''} | b''''1
+ }
+ }
+}
+@end lilypond
@end itemize
@section Versioning
-LilyPond uses a versioning scheme similar to the Linux kernel. In a
-version "x.y.z", an even second number 'y' denotes a stable version.
-For development versions 'y' is odd.
+LilyPond uses a versioning scheme that easily identifies stable and
+development releases. In a version "x.y.z", an even second number 'y'
+denotes a stable version. For development versions 'y' is odd.
@section Downloading
for sending bugreports.
@item @uref{http://mail.gnu.org/mailman/listinfo/lilypond-cvs,lilypond-cvs@@gnu.org}
- for commit messages from the CVS repository, and log files from the
+ for log files from the
autobuild.
@end itemize
$(outdir)/lilypond.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
$(outdir)/%.png: %.png
- convert -geometry 50x50% $< $@
+ convert -depth 8 -geometry 50x50% $< $@
$(outdir)/%.png: %.eps
gs -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=$@ -sDEVICE=png16m -dEPSCrop -dNOPAUSE -f $< -c quit
$(outdir)/%.pdf: %.png
- convert $< $@
+ convert -depth 8 $< $@
$(outdir)/%.pdf: %.eps
gs -dAutoRotatePages=/None -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ -dEPSCrop -c .setpdfwrite -f $<
local-WWW: $(HTML_FILES) $(DEEP_HTML_FILES)\
$(datafiles) $(PDF_FILES) $(source-links) info info-dir
-local-WWW-clean: deep-WWW-clean
-
-deep-WWW-clean:
- rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
-
info-dir:
$(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals music-glossary
$(outdir)/%.bib: %.bib
ln -f $< $@
-local-clean:
- rm -f fonts.aux fonts.log feta*.tfm feta*.*pk
- rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals $(outdir)/music-glossary
# lilypond.texi deps
$(top-build-dir)/mf/$(outconfbase)/feta16list.ly:
## unused
$(outdir)/interfaces.itexi: dummy
cd $(outdir) && lilypond $(top-src-dir)/ly/generate-interface-doc
-
-
-local-clean: local-delete
-
-local-delete:
- find $(outdir)/ -name 'lily-[0-9]*' | xargs rm -f
- -rm -f $(outdir)/*
}
@end lilypond
-Text can also be placed on its own, away from any @code{\score}
-block. This is primarily used in a @code{\book} (see
-@ref{Multiple scores in a book}).
+A @code{\markup} command can also be placed on its own, away from any
+@code{\score} block, see @ref{Multiple scores in a book}.
@lilypond[quote,ragged-right,verbatim]
\markup{ Here is some text. }
}
@end lilypond
-The @code{set-octavation} function also takes -1 (for 8va bassa) and 2
-(for 15ma) as arguments. Internally the function sets the properties
-@code{ottavation} (e.g., to @code{"8va"}) and
+The @code{set-octavation} function also takes -1 (for 8va bassa), 2@tie{}(for 15ma),
+and -2 (for 15ma bassa) as arguments. Internally the function sets the properties
+@code{ottavation} (e.g., to @code{"8va"} or @code{"8vb"}) and
@code{centralCPosition}. For overriding the text of the bracket, set
@code{ottavation} after invoking @code{set-octavation}, i.e.,
Another application is making ossia sections, i.e., alternative
melodies on a separate piece of staff, with help of a Frenched
-staff. See @inputfileref{input/@/test,ossia@/.ly} for an example.
+staff.
@node Quoting other voices
@subsection Proportional notation
@cindex Proportional notation
-Notes can be spaced proportional to their time-difference by
+Notes can be spaced proportionally to their time-difference by
assigning a duration to @code{proportionalNotationDuration}
@lilypond[quote,ragged-right,verbatim,relative=2,fragment]
>>
@end lilypond
+Setting this property only affects the ideal spacing between
+consecutive notes. For true proportional notation, the following
+settings are also required.
+
+@itemize @bullet
+
+@item True proportional notation requires that symbols are allowed to
+overstrike each other. That is achieved by removing the
+@internalsref{Separating_line_group_engraver} from
+@internalsref{Staff} context.
+
+@item Spacing influence of prefatory matter (clefs, bar lines, etc.)
+is removed by setting the @code{strict-note-spacing} property to
+@code{#t} in @internalsref{SpacingSpanner} grob.
+
+@item Optical spacing tweaks are switched by setting
+@code{uniform-stretching} in @internalsref{SpacingSpanner} to true.
+
+
+@end itemize
+
+@seealso
+
+@inputfileref{input/@/regression,spacing-proportional/.ly}
+@inputfileref{input/@/regression,spacing-strict-notespacing/.ly}
+@inputfileref{input/@/regression,spacing-strict-spacing-grace/.ly}
+
+An example of strict proportional notation is in the
+example file @file{input/proportional.ly}.
+
@node Clusters
@subsection Clusters
The command @code{\setEasyHeads} overrides settings for the
@internalsref{NoteHead} object. To make the letters readable, it has
to be printed in a large font size. To print with a larger font, see
-@ref{Setting global staff size}.
+@ref{Setting the staff size}.
@refcommands
@end lilypond
In combination with Frenched staves, this may be used to typeset ossia
-sections. An example is in @inputfileref{input/@/test@/,ossia.ly},
-shown here
+sections. An example is shown here
@cindex ossia
and the @context{Voice} is inserted afterwards
@example
-\new Staff = down
+\context Staff = down
\new Voice @{ @dots{} \change Staff = up @dots{} @}
@end example
@end lilypond
+@refbugs
+
+When using figured bass above the staff with extender lines and
+@code{implicitBassFigures} the lines may become swapped around.
+Maintaining order consistently will be impossible when multiple figures
+have overlapping extender lines. To avoid this problem, plese
+use @code{stacking-dir} on @code{BassFigureAlignment}.
+
+
@seealso
Program reference: @internalsref{NewBassFigure},
@top GNU LilyPond --- The music typesetter
@c HJJ: Info needs `@top', which is a synonym for `@unnumbered' in TeX.
-This is the user manual for GNU LilyPond 2.8.x series.
+This is the user manual for GNU LilyPond 2.10.x series.
@ifhtml
(See the bottom of this page for the exact version number).
@end ifhtml
@funindex \book
-The movements and texts are combined together in a @code{\book} block,
-like
+All the movements and texts which appear in the same @code{.ly} file
+will normally be typeset in the form of a single output file.
@example
-\book @{
- \score @{
- @var{..}
- @}
- \markup @{
- @var{..}
- @}
- \score @{
- @var{..}
- @}
+\score @{
+ @var{..}
+@}
+\markup @{
+ @var{..}
+@}
+\score @{
+ @var{..}
@}
@end example
+However, if you want multiple output files from the same @code{.ly}
+file, then you can add multiple @code{\book} blocks, where each such
+@code{\book} block will result in a separate output. If you do not
+specify any @code{\book} block in the file, LilyPond will implicitly
+treat the full file as a single @code{\book} block, see @ref{File
+structure}. One important exception is within lilypond-book documents,
+where you explicitly have to add a @code{\book} block, otherwise only
+the first @code{\score} or @code{\markup} will appear in the output.
The header for each piece of music can be put inside the @code{\score}
block. The @code{piece} name from the header will be printed before
the top of the file is inserted.
@example
-\book @{
- \header @{
- title = "Eight miniatures"
- composer = "Igor Stravinsky"
- @}
- \score @{
- @dots{}
- \header @{ piece = "Romanze" @}
- @}
- \markup @{
- ..text of second verse..
- @}
- \markup @{
- ..text of third verse..
- @}
- \score @{
- @dots{}
- \header @{ piece = "Menuetto" @}
- @}
+\header @{
+ title = "Eight miniatures"
+ composer = "Igor Stravinsky"
+@}
+\score @{
+ @dots{}
+ \header @{ piece = "Romanze" @}
+@}
+\markup @{
+ ..text of second verse..
+@}
+\markup @{
+ ..text of third verse..
+@}
+\score @{
+ @dots{}
+ \header @{ piece = "Menuetto" @}
@}
@end example
@item
A @code{\book} block logically combines multiple movements
(i.e., multiple @code{\score} blocks) in one document. If there are
-a number of @code{\scores}, a single output file will be created
-in which all movements are concatenated.
+a number of @code{\scores}, one output file will be created for
+each @code{\book} block, in which all corresponding movements are
+concatenated. The only reason to explicitly specify @code{\book} blocks
+in a @code{.ly} file is if you wish multiple output files from a single
+input file. One exception is within lilypond-book documents, where you
+explicitly have to add a @code{\book} block if you want more than a
+single @code{\score} or @code{\markup} in the same example.
This behavior can be changed by setting the variable
@code{toplevel-book-handler} at toplevel. The default handler is
@node Creating titles
@subsection Creating titles
-Titles are created for each @code{\score} block, and over a
-@code{\book}.
+Titles are created for each @code{\score} block, and for the full input
+file (or @code{\book} block).
The contents of the titles are taken from the @code{\header} blocks.
The header block for a book supports the following
@table @code
@funindex bookTitleMarkup
@item bookTitleMarkup
- This is the title put over an entire @code{\book} block. Typically,
- it has the composer and the title of the piece
+ This is the title added at the top of the entire output document.
+Typically, it has the composer and the title of the piece
@funindex scoreTitleMarkup
@item scoreTitleMarkup
- This is the title put over a @code{\score} block within a
-@code{\book}. Typically, it has the name of the movement (@code{piece}
-field).
+ This is the title put over a @code{\score} block. Typically, it has
+the name of the movement (@code{piece} field).
@funindex oddHeaderMarkup
@item oddHeaderMarkup
@example
\score @{
@var{...music...}
- \midi @{ @}
+ \midi @{
+ \context @{
+ \Score
+ tempoWholesPerMinute = #(ly:make-moment 72 4)
+ @}
+ @}
@}
@end example
-FIXME
-
The tempo is specified using the @code{\tempo} command. In this
example the tempo of quarter notes is set to 72 beats per minute.
@ignore
-@node All context properties
+@n ode All context properties
@a ppendixsec All context properties
@i nclude context-properties.tely
-@node Layout properties
+@n ode Layout properties
@ap pendixsec Layout properties
@in clude layout-properties.tely
* Building complicated functions::
* Markup programmer interface::
* Contexts for programmers::
-* Scheme procedures as properties::
+* Scheme procedures as properties::
@end menu
* Paired substitution functions::
* Mathematics in functions::
* Void functions::
+* Overview of available music functions::
@end menu
@node Overview of music functions
\noPointAndClick % disable point and click
@end example
+@node Overview of available music functions
+@subsection Overview of available music functions
+
+@c fixme ; this should be move somewhere else?
+The following commands are music functions
+
+@include identifiers.tely
+
+
@node Programmer interfaces
@section Programmer interfaces
* Horizontal spacing::
* Breaks::
* Displaying spacing::
+* Vertical collision avoidance::
@end menu
@funindex printallheaders
@item printallheaders
-Setting this to #t will print all headers for each \score in a
-\book. Normally only the piece and opus \headers are printed.
+Setting this to #t will print all headers for each \score in the
+output. Normally only the piece and opus \headers are printed.
@funindex systemSeparatorMarkup
@item systemSeparatorMarkup
@section Music layout
@menu
-* Setting global staff size::
+* Setting the staff size::
* Score layout::
@end menu
-@node Setting global staff size
-@subsection Setting global staff size
+@node Setting the staff size
+@subsection Setting the staff size
@cindex font size, setting
@cindex staff size, setting
@funindex layout file
-To set the global staff size, use @code{set-global-staff-size}.
+To set the staff size globally for all scores in a file (or
+in a @code{book} block, to be precise), use @code{set-global-staff-size}.
@example
#(set-global-staff-size 14)
This sets the global default size to 14pt staff height and scales all
fonts accordingly.
+To set the staff size individually for each score, use
+@example
+\score@{
+ ...
+ \layout@{
+ #(layout-set-staff-size 15)
+ @}
+@}
+@end example
+
The Feta font provides musical symbols at eight different
sizes. Each font is tuned for a different staff size: at a smaller size
the font becomes heavier, to match the relatively heavier staff lines.
@end lilypond
+The @code{\newSpacingSection} command creates a new
+@internalsref{SpacingSpanner} object, and hence new @code{\override}s
+may be used in that location.
+
+
@node Changing horizontal spacing
@subsection Changing horizontal spacing
@var{b} the upper edge of the interval.
+@node Vertical collision avoidance
+@section Vertical collision avoidance
+
+@funindex outside-staff-priority
+@funindex outside-staff-padding
+@funindex outside-staff-horizontal-padding
+
+Intuitively, there are some objects in musical notation that belong
+to the staff and there are other objects that should be placed outside
+the staff. Objects belonging outside the staff include things such as
+rehearsal marks, text and dynamic markings (from now on, these will
+be called outside-staff objects). LilyPond's rule for the
+vertical placement of outside-staff objects is to place them as close
+to the staff as possible but not so close that they collide with
+another object.
+
+LilyPond uses the @code{outside-staff-priority} property to determine
+whether a grob is an outside-staff object: if @code{outside-staff-priority}
+is a number, the grob is an outside-staff object. In addition,
+@code{outside-staff-priority} tells LilyPond in which order the objects
+should be placed.
+
+First, LilyPond places all the objects that do not belong outside
+the staff. Then it sorts the outside-staff objects according to their
+@code{outside-staff-priority} (in increasing order). One by one, LilyPond
+takes the outside-staff objects and places them so that they do
+not collide with any objects that have already been placed. That
+is, if two outside-staff grobs are competing for the same space, the one
+with the lower @code{outside-staff-priority} will be placed closer to
+the staff.
+
+@lilypond[quote,ragged-right,relative=2,fragment,verbatim]
+c4_"Text"\pp
+r2.
+\once \override TextScript #'outside-staff-priority = #1
+c4_"Text"\pp % this time the text will be closer to the staff
+r2.
+% by setting outside-staff-priority to a non-number, we
+% disable the automatic collision avoidance
+\once \override TextScript #'outside-staff-priority = ##f
+\once \override DynamicLineSpanner #'outside-staff-priority = ##f
+c4_"Text"\pp % now they will collide
+@end lilypond
+
+The vertical padding between an outside-staff object and the
+previously-positioned grobs can be controlled with
+@code{outside-staff-padding}.
+
+@lilypond[quote,ragged-right,relative=2,fragment,verbatim]
+\once \override TextScript #'outside-staff-padding = #0
+a'^"This text is placed very close to the note"
+\once \override TextScript #'outside-staff-padding = #3
+c^"This text is padded away from the previous text"
+c^"This text is placed close to the previous text"
+@end lilypond
+
+By default, outside-staff objects are placed without regard to
+their horizontal distance from the previously-posititioned grobs. This
+can lead to situations in which objects are placed very close to each
+other horizontally. Setting @code{outside-staff-horizontal-padding}
+causes an object to be offset vertically so that such a situation
+doesn't occur.
+
+@lilypond[quote,ragged-right,relative=2,fragment,verbatim]
+% the markup is too close to the following note
+c2^"Text"
+c''2
+% setting outside-staff-horizontal-padding fixes this
+R1
+\once \override TextScript #'outside-staff-horizontal-padding = #1
+c,,2^"Text"
+c''2
+@end lilypond
SCRIPTS = configure autogen.sh
README_FILES = COPYING DEDICATION ROADMAP THANKS HACKING
-TOPDOC_FILES=AUTHORS README INSTALL NEWS
+TOPDOC_FILES = AUTHORS README INSTALL NEWS
TOPDOC_TXT_FILES = $(addprefix $(top-build-dir)/Documentation/topdocs/$(outdir)/,$(addsuffix .txt,$(TOPDOC_FILES)))
IN_FILES := $(call src-wildcard,*.in)
local-dist: dist-toplevel-txt-files dist-changelog
dist-changelog:
- if test -d .git ; then \
- git-whatchanged gub-2.9.29-2.. > $(distdir)/ChangeLog ; \
+ if test -d $(top-src-dir)/.git ; then \
+ cd $(top-src-dir) && git-whatchanged gub-2.9.29-2.. > $(distdir)/ChangeLog ; \
else \
- cp $(srcdir)/ChangeLog $(distdir) ; \
+ cp $(top-src-dir)/ChangeLog $(distdir) ; \
fi
default: $(outdir)/VERSION
-$(outdir)/VERSION: $(config_make)
+$(outdir)/VERSION: $(config_make) VERSION
echo $(TOPLEVEL_VERSION) > $@
dist-toplevel-txt-files:
web-ext = html midi pdf png txt ly signature
-footify = $(PYTHON) $(step-bindir)/add-html-footer.py --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION)
+# For docball, issue `make web CONTENT_NEGOTIATION='
+CONTENT_NEGOTIATION = --content-negotiation
+footify = $(PYTHON) $(step-bindir)/add-html-footer.py --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION) $(CONTENT_NEGOTIATION)
footifymail = MAILADDRESS='http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs'
cd $(top-build-dir) && find Documentation input \
$(web-ext:%=-path '*/out-www/*.%' -or) -type l \
- | grep -v 'lily-[0-9].*.pdf' \
+ | grep -v 'lily-[0-9a-f]*.*pdf' \
+ | grep -v '/fr/' \
> $(outdir)/weblist
ls $(outdir)/*.html >> $(outdir)/weblist
rm -rf $$a ; \
done \
done
- echo $(TOPLEVEL_VERSION) > $(outdir)/web-root/VERSION
tree-prefix = $(outdir)
tree-bin = $(tree-prefix)/bin
HELP_CATALOGS = $(PO_FILES:po/%.po=%)
CATALOGS = $(HELP_CATALOGS:lilypond=)
-$(tree-share-prefix)/lilypond-force link-tree: GNUmakefile
+$(tree-share-prefix)/lilypond-force link-tree: GNUmakefile $(outdir)/VERSION
# Preparing LilyPond tree for build-dir exec
cd $(top-build-dir)/$(outbase) && rm -rf bin lib share
mkdir -p $(tree-bin)
ln -s $(TOPLEVEL_VERSION) $(tree-share-prefix-current)
mkdir -p $(tree-lib-prefix)
ln -s $(TOPLEVEL_VERSION) $(tree-lib-prefix-current)
- mkdir -p $(tree-share-prefix)/dvips
mkdir -p $(tree-share-prefix)/elisp
mkdir -p $(tree-share-prefix)/fonts
mkdir -p $(tree-share-prefix)/fonts/otf
ln -s ../../../../python/$(outconfbase) python && \
ln -s $(top-src-dir)/scm && \
ln -s $(top-src-dir)/scripts scripts
- cd $(tree-share-prefix)/dvips && \
- ln -s ./../../../mf/$(outconfbase) mf-out && \
- ln -s $(top-src-dir)/ps
cd $(tree-share-prefix)/tex && \
ln -s $(top-src-dir)/tex source && \
ln -s ../../../../../tex/$(outconfbase) tex-out && \
ln -s ../../../../../../mf/$(outconfbase)/*.pfa .
TAGS.make: dummy
- etags -o $@ $(find $(srcdir) -name 'GNUmakefile*' -o -name '*.make')
-
-local-clean: build-dir-setup-clean local-web-clean
-
-local-web-clean:
- rm -rf $(outdir)/web-root/
-
-
-
-build-dir-setup-clean:
- cd $(top-build-dir) && rm -rf share
+ etags -o $@ $(find $(top-src-dir) -name 'GNUmakefile*' -o -name '*.make')
$(config_h): config.hh.in
#
bugs/ Buggy or problematic notation
mutopia/ Real music, more at www.mutopiaproject.org
no-notation/ Examples that do not produce output
- regression/ Testing of [all] features, one test per file
- templates/ Boilerplates for typical music layouts
+ regression/ Testing of features, one test per file
test/ Tips and tricks
tutorial/ Examples from the tutorial
lily/ C++ sources for LilyPond (lilypond-bin)
('scripts/', 'bin/lilypond-book'),
('scripts/', 'bin/ps2png'),
('mf', 'share/lilypond/%(ver)s/dvips/mf-out'),
- ('#ps', 'share/lilypond/%(ver)s/dvips/ps'),
('#ps/music-drawing-routines.ps',
'share/lilypond/%(ver)s/tex/music-drawing-routines.ps'),
('mf', 'share/lilypond/%(ver)s/otf'),
required = []
test_program (required, 'bash', '2.0', 'Bash', 'bash')
- test_program (required, 'gcc', '2.8', 'GNU C compiler', 'gcc')
- test_program (required, 'g++', '3.0.5', 'GNU C++ compiler', 'g++')
- test_program (required, 'guile-config', '1.6', 'GUILE development',
+ test_program (required, 'gcc', '4.0', 'GNU C compiler', 'gcc')
+ test_program (required, 'g++', '4.0.5', 'GNU C++ compiler', 'g++')
+ test_program (required, 'guile-config', '1.8', 'GUILE development',
'libguile-dev or guile-devel')
test_program (required, 'mf', '0.0', 'Metafont', 'tetex-bin')
- test_program (required, 'mftrace', '1.1.9',
+ test_program (required, 'mftrace', '1.1.19',
'mftrace (http://xs4all.nl/~hanwen/mftrace)', 'mftrace')
- test_program (required, 'potrace', '0.0', 'Potrace', 'potrace')
test_program (required, 'python', '2.1', 'Python (www.python.org)',
'python')
# Silly, and breaks with /bin/sh == dash
#test_program (optional, 'foo', '2.0', 'Foomatic tester', 'bar')
test_program (optional, 'bison', '1.25', 'Bison -- parser generator',
'bison')
- test_program (optional, 'dvips', '0.0', 'Dvips', 'tetex-bin')
test_program (optional, 'fontforge', '0.0.20050624', 'FontForge',
'fontforge')
test_program (optional, 'flex', '0.0', 'Flex -- lexer generator',
'flex')
- test_program (optional, 'guile', '1.6', 'GUILE scheme', 'guile')
+ test_program (optional, 'guile', '1.8', 'GUILE scheme', 'guile')
test_program (optional, 'gs', '8.15',
'Ghostscript PostScript interpreter',
'gs or gs-afpl or gs-esp or gs-gpl')
- test_program (optional, 'mftrace', '1.1.19', 'Metafont tracing Type1',
- 'mftrace')
- test_program (optional, 'makeinfo', '4.7', 'Makeinfo tool', 'texinfo')
+ test_program (optional, 'makeinfo', '4.8', 'Makeinfo tool', 'texinfo')
test_program (optional, 'perl', '4.0',
'Perl practical efficient readonly language', 'perl')
- #test_program (optional, 'ps2pdf', '0.0', 'Ps2pdf', 'gs')
def CheckYYCurrentBuffer (context):
context.Message ('Checking for yy_current_buffer... ')
BUILD_LILYPOND = '$absbuild/lily/$out/lilypond ${__verbose}'
BUILD_LILYPOND_BOOK = '$PYTHON $srcdir/scripts/lilypond-book.py ${__verbose}'
+if env['verbose'] and env['verbose'] != '0':
+ env['__verbose'] = ' --verbose'
+ env['set__x'] = 'set -x;'
# post-option environment-update
env.Append (
libdir_package = libdir_package,
libdir_package_version = libdir_package_version,
- # global build verbosity switch
- __verbose = ' --verbose',
-
LILYPOND = BUILD_LILYPOND,
ABC2LY = BUILD_ABC2LY,
LILYPOND_BOOK = BUILD_LILYPOND_BOOK,
LILYPOND_BOOK_FORMAT = 'texi-html',
MAKEINFO_FLAGS = '--css-include=$srcdir/Documentation/texinfo.css',
- # PYTHONPATH = ['$absbuild/python/$out'],
- TEXI2DVI_PAPERSIZE = '@afourpaper',
- TEXI2DVI_FLAGS = [ '-t$TEXI2DVI_PAPERSIZE'],
- DVIPS_PAPERSIZE = 'a4',
- DVIPS_FLAGS = ['-t$DVIPS_PAPERSIZE',
- '-u+lilypond.map',
- '-u+ec-mftrace.map'],
- PSPDF_FLAGS = ['-sPAPERSIZE=$DVIPS_PAPERSIZE'],
)
env.Append (CCFLAGS = ['-pipe', '-Wno-pmf-conversions'])
# FIXME: ParseConfig ignores -L flag?
env.Append (LINKFLAGS = ['-L/usr/X11R6/lib'])
-if env['verbose']:
- env['__verbose'] = ' --verbose'
- env['set__x'] = 'set -x;'
-
-
## Explicit target and dependencies
if 'clean' in COMMAND_LINE_TARGETS:
os.unlink (config_cache)
Exit (s)
-def symlink_tree ():
- print "BOE"
- raise urg
-
# Declare SConscript phonies
env.Alias ('minimal', config_cache)
env.BuildDir (b, d, duplicate = 0)
SConscript (os.path.join (b, 'SConscript'))
+env.Command ('tree', ['#/VERSION', '#/SConstruct'], symlink_tree)
************
+
+DEVELOPMENT TEAM
+
+Han-Wen Nienhuys - Core development
+Jan Nieuwenhuizen - Core development
+Joe Neeman - Core development
+Graham Percival - Documentation Editor and Bug Meister
+Mats Bengtsson - Support Guru
+
+
+SPONSORS
+
+Mike Amundsen
+
+
+BUG HUNTERS/SUGGESTIONS
+
+Benjamin Drung
+David Bobroff
+Cameron Horsburgh
+Maarten Hijzelendoorn
+Matthijs Frankeno
+Phillip Kirlin
+Rick Hansen
+Thomas Scharkowski
+Trevor Bača
+Werner Lemberg
+
+
+Release 2.10
+************
+
+
DEVELOPMENT TEAM
Han-Wen Nienhuys - Core development
Guido Amoruso
Heikki Junes
Joe Neeman
+John Mandereau
+
+
+TRANSLATORS
+
+Gauvain Pocentek
+Jean-Charles Malahieude
+John Mandereau
+Ludovic Sardain
+Nicolas Grandclaude
SPONSORS
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=11
-PATCH_LEVEL=0
+PATCH_LEVEL=2
MY_PATCH_LEVEL=
def add_lisp_enc_tex_ly_target (target, source, env):
base = os.path.splitext (str (target[0]))[0]
- return (target + [base + '.lisp', base + '.enc', base + '.tex',
- base + 'list.ly'],
+ return (target + [base + '.lisp', base + '.enc', base + '.tex'],
source)
def add_cff_cffps_svg (target, source, env):
--enc=${TARGET.base}.enc \
--tex=${TARGET.base}.tex \
${TARGET.base}.log'
-#--ly=${TARGET.base}list.ly \
gtable = Builder (action = a, suffix = '.otf-gtable', src_suffix = '.log',
emitter = add_lisp_enc_tex_ly_target)
env.Append (BUILDERS = {'GTABLE': gtable})
AT_COPY = Builder (action = at_copy, src_suffix = ['.in', '.py', '.sh',])
env.Append (BUILDERS = {'AT_COPY': AT_COPY})
-def at_copy_ext (target, source, env):
- n = str (source[0])
- s = open (n).read ()
- for i in atvars:
- if env.has_key (i):
- s = string.replace (s, '@%s@'% i, env[i])
- # whugh
- e = os.path.splitext (n)[1]
- t = str (target[0]) + e
- open (t, 'w').write (s)
-
-AT_COPY_EXT = Builder (action = at_copy_ext, src_suffix = ['.py', '.sh',])
-env.Append (BUILDERS = {'AT_COPY_EXT': AT_COPY_EXT})
-
-
MO = Builder (action = 'msgfmt -o $TARGET $SOURCE',
suffix = '.mo', src_suffix = '.po')
env.Append (BUILDERS = {'MO': MO})
--- /dev/null
+#!/usr/bin/python
+import sys
+import re
+import os
+
+
+full_paths = {}
+incs = {}
+inc_re = re.compile ('^#include "([^"]+)"')
+def parse_file (fn):
+ lst = []
+
+ lc = 0
+ for l in open (fn).readlines():
+ lc += 1
+ m = inc_re.search (l)
+ if m:
+ lst.append ((lc, m.group (1)))
+
+ base = os.path.split (fn)[1]
+ full_paths[base] = fn
+ incs[base] = lst
+
+
+def has_include (f, name):
+ try:
+ return name in [b for (a,b) in incs[f]]
+ except KeyError:
+ return False
+
+for a in sys.argv:
+ parse_file (a)
+
+print '-*-compilation-*-'
+for (f, lst) in incs.items ():
+ for (n, inc) in lst:
+ for (n2, inc2) in lst:
+ if has_include (inc2, inc):
+ print "%s:%d: already have %s from %s" % (full_paths[f], n,
+ inc, inc2)
+ break
+
+
+
--- /dev/null
+#!@PYTHON@
+# html-gettext.py
+
+# Usage: html-gettext.py [-o OUTDIR] LOCALEDIR LANG FILES
+#
+# -o OUTDIR specifies that output files should be written in OUTDIR
+# rather than be overwritten
+#
+# LANG
+# LOCALEDIR should contain 'lilypond-doc' message catalogs
+
+
+### DATA
+# Currently, typo_rules[LANG] only defines the HTML-coded space occuring
+# before double punctuation characters (i.e. : ; ? ! ) for LANG
+
+typo_rules = { 'fr':' ', 'default':'' }
+
+
+### PROGRAM
+
+import sys
+import re
+import os
+import string
+import gettext
+import getopt
+
+optlist, args = getopt.getopt(sys.argv[1:],'o:')
+
+outdir = '.'
+for x in optlist:
+ if x[0] == '-o':
+ outdir = x[1]
+
+if args[1] in typo_rules.keys():
+ dbl_punct_char_separator = typo_rules[args[1]]
+else:
+ dbl_punct_char_separator = typo_rules['default']
+
+t = gettext.translation('lilypond-doc', args[0], [args[1]])
+_ = t.gettext
+
+def link_gettext (m):
+ return '<link rel="' + m.group(1) + '" ' + m.group(2) + ' title="' + _(m.group(3)) + '">'
+
+def title_gettext (m):
+ return '<title>' + _(m.group(1)) + ' - ' + m.group(2) + '</title>'
+
+def a_href_gettext (m):
+ if m.group(4) == ':':
+ s = dbl_punct_char_separator + ':'
+ elif m.group(4) == None:
+ s = ''
+ return '<a ' + (m.group(1) or '') + m.group(2) + _(m.group(3)) + '</a>' + s
+
+def h_gettext (m):
+ return '<h' + m.group(1) + ' class="' + m.group(2) + '">' + \
+ (m.group(3) or '') + _(m.group(4)) + '</h' + m.group(1) + '>'
+
+for filename in args[2:]:
+ f = open (filename, 'r')
+ page = f.read ()
+ f.close()
+ page = re.sub (r'<link rel="(up|prev|next)" (.*?) title="([^"]*?)">', link_gettext, page)
+ page = re.sub (r'<title>([^<]*?) - ([^<]*?)</title>', title_gettext, page)
+ page = re.sub (r'<a ((?:rel="\w+")? ?(?:accesskey="[^"]+?" ?)?)(href="[^"]+?">)([^<]+)</a>(:)?', a_href_gettext, page)
+ page = re.sub (r'<h(\d) class="(\w+)">([\d.]+ )?([^<]+)</h\1>', h_gettext, page)
+ for w in ('Next:', 'Previous:', 'Up:'):
+ page = re.sub (w, _(w), page)
+ f = open (os.path.join (outdir, filename), 'w')
+ f.write (page)
+ f.close ()
for d in dirs:
allfiles = allfiles + find ('*.ly', d)
-allfiles = filter (lambda x: not x.endswith ('snippet-map.ly') and not re.search ('lily-[0-9]+', x), allfiles)
+allfiles = filter (lambda x: not x.endswith ('snippet-map.ly') and not re.search ('lily-[0-9a-f]+', x), allfiles)
gen_list (allfiles, outfile)
Open($1);
MergeKern($2)
+
+#
+# NCSB is broken as shipped by Fedora Core 6
+# it contains bogus ligatures TM and No in the AFM file.
+#
+# Remove the TM glyph - for want of better FF fix.
+err = SelectIf("trademark");
+if ( err > 0 )
+ Cut();
+elseif ( err == 0 )
+ Print("Could not find \"trademark\" glyph");
+elseif ( err < 0 )
+ Print("An error occurred while searching for the \"trademark\" glyph");
+endif
+
+
# Remove the No. glyph - for want of better FF fix.
err = SelectIf("afii61352");
if ( err > 0 )
--- /dev/null
+#!@PYTHON@
+# texi-langutils.py
+
+# WARNING: this script can't find files included in a different directory
+
+import sys
+import re
+import getopt
+import os
+import string
+
+optlist, texi_files = getopt.getopt(sys.argv[1:],'no:d:b:i:',['skeleton', 'gettext'])
+process_includes = not ('-n', '') in optlist # -n don't process @include's in texinfo files
+
+make_gettext = ('--gettext', '') in optlist # --gettext generate a node list from a Texinfo source
+make_skeleton = ('--skeleton', '') in optlist # --skeleton extract the node tree from a Texinfo source
+
+output_file = 'doc.pot'
+node_blurb = ''
+intro_blurb = ''
+
+for x in optlist:
+ if x[0] == '-o': # -o NAME set PO output file name to NAME
+ output_file = x[1]
+ elif x[0] == '-d': # -d DIR set working directory to DIR
+ os.chdir (x[1])
+ elif x[0] == '-b': # -b BLURB set blurb written at each node to BLURB
+ node_blurb = x[1]
+ elif x[0] == '-i': # -i BLURB set blurb written at beginning of each file to BLURB
+ intro_blurb = x[1]
+
+def process_texi (texifilename, i_blurb, n_blurb, write_skeleton, output_file=None):
+ try:
+ #print "Processing %s..." % texifilename
+ f = open (texifilename, 'r')
+ texifile = f.read ()
+ f.close ()
+ includes = []
+ if write_skeleton:
+ g = open (os.path.basename (texifilename), 'w')
+ g.write (i_blurb)
+ tutu = re.findall (r"""^(\*) +([^:
+ ]+)::[^
+ ]*?$|^@(include|menu|end menu|node|(?:unnumbered|appendix)(?:(?:sub){0,2}sec)?|top|chapter|(?:sub){0,2}section|(?:major|chap|(?:sub){0,2})heading) *([^@
+ ]*)[^
+ ]*?$""", texifile, re.M)
+ node_trigger = False
+ for item in tutu:
+ if item[0] == '*':
+ g.write ('* ' + item[1] + '::\n')
+ else:
+ g.write ('@' + item[2] + ' ' + item[3] + '\n')
+ if node_trigger:
+ g.write (n_blurb)
+ node_trigger = False
+ if not item[2] in ('include', 'menu', 'end menu'):
+ if output_file:
+ output_file.write ('_("' + item[3].strip () + '")\n')
+ node_trigger = True
+ elif item[2] == 'include':
+ includes.append(item[3])
+ g.close ()
+ elif output_file:
+ toto = re.findall (r"""^@(include|node|(?:unnumbered|appendix)(?:(?:sub){0,2}sec)?|top|chapter|(?:sub){0,2}section|(?:major|chap|(?:sub){0,2})heading) *([^@
+ ]*)[^
+ ]*?$""", texifile, re.M)
+ for item in toto:
+ if item[0] == 'include':
+ includes.append(item[1])
+ else:
+ output_file.write ('_("' + item[1].strip () + '")\n')
+ if process_includes:
+ dir = os.path.dirname (texifilename)
+ for item in includes:
+ process_texi (os.path.join (dir, item.strip ()), i_blurb, n_blurb, write_skeleton, output_file)
+ except IOError, (errno, strerror):
+ print "I/O error(%s): %s: %s" % (errno, texifilename, strerror)
+
+
+if intro_blurb != '':
+ intro_blurb += '\n\n'
+if node_blurb != '':
+ node_blurb = '\n' + node_blurb + '\n\n'
+if make_gettext:
+ node_list_filename = 'node_list'
+ node_list = open (node_list_filename, 'w')
+ for texi_file in texi_files:
+ process_texi (texi_file, intro_blurb, node_blurb, make_skeleton, node_list)
+ for word in ('Up:', 'Next:', 'Previous:', 'Appendix'):
+ node_list.write ('_("' + word + '")\n')
+ node_list.close ()
+ os.system ('xgettext -L Python --no-location -o ' + output_file + ' ' + node_list_filename)
+else:
+ for texi_file in texi_files:
+ process_texi (texi_file, intro_blurb, node_blurb, make_skeleton)
#include "file-path.hh"
-#include "std-string.hh"
-
#include <cstdio>
#include <cerrno>
#include "config.hh"
#include "international.hh"
-#include "std-string.hh"
#if !HAVE_GETTEXT
inline char *
lily_cookie_io_functions_t io_funcs);
int lily_cookie_fclose (void *);
- int lily_cookie_fprintf (void *file, char const *format, ...);
+ int lily_cookie_fprintf (void *file, char const *format, ...)
+ __attribute__ ((format (printf, 2, 3)));
int lily_cookie_putc (int c, void *file);
#ifdef __cplusplus
#include <math.h>
-#include "std-string.hh"
-
#include "flower-proto.hh"
#include "drul-array.hh"
#if ! HAVE_SNPRINTF /* GNU extension. */
int snprintf (char *str, size_t n, char const *format, ...);
+ __attribute__ ((format (printf, 3, 4)));
#endif
#if ! HAVE_VSNPRINTF /* GNU extension. */
#include <cstdarg>
using namespace std;
-#include "std-string.hh"
#include "flower-proto.hh"
/** The functor string_convert handles all conversions to/from string
static int dec2int (string dec_string);
static double dec2double (string dec_string);
static string double_string (double f, char const *fmt = 0);
- static string form_string (char const *format, ...);
+ static string form_string (char const *format, ...) __attribute__ ((format (printf, 1,2)));
static string vform_string (char const *format, va_list args);
static int hex2int (string str);
static unsigned hex2unsigned (string str);
\include "mozart-hrn3-rondo.ily"
\paper {
- between-system-padding = 0.0
between-system-space = 20 \mm
}
--- /dev/null
+
+\version "2.10.0"
+
+\version "2.10.1"
+
+\score {
+ \new DrumStaff <<
+ \drummode {
+ bd4 sn4 bd4 sn4
+ <<
+ {\voiceOne \repeat unfold 16 hh16 }
+ \new DrumVoice { \voiceTwo bd4 sn4 bd4 sn4 }
+ >> \oneVoice
+ }
+ >>
+ \layout {}
+ \midi {}
+}
\override Beam #'break-overshoot = #'(-0.5 . 1.0)
\override TupletBracket #'break-overshoot = #'(-0.5 . 1.0)
\override TupletBracket #'staff-padding = #3.5
- \override PaperColumn #'used = ##t
}
\context {
% we want over print if necessary.
include $(depth)/make/stepmake.make
TITLE=LilyPond Regression Tests
-local-clean: local-delete
-
-# use `find` together with `xargs` to avoid too long argument-lists.
-local-delete:
- $(FIND) $(outdir)/ -empty -name '*' | xargs rm -f
-
--- /dev/null
+\header {
+ texidoc = "accidentals avoid stems of other notes too."
+ }
+
+\version "2.10.1"
+
+\paper {
+ ragged-right = ##t
+ }
+\new Staff \relative <<bes' \\ a'>>
--- /dev/null
+\version "2.11.2"
+\header {
+ texidoc = "Bends avoid dots, but only if necessary."
+}
+
+\score {
+ <<
+ \new Staff \relative c' {
+ \time 4/4
+ g''4.-\bendAfter #+1
+ s8 s2
+ f4.-\bendAfter #+1
+ }
+ >>
+}
+
+\paper {
+ ragged-right = ##t
+}
--- /dev/null
+\version "2.10.1"
+
+\header {
+ texidoc = "Mixed collisions with whole notes require asymmetric shifts."
+}
+
+\layout{ragged-right=##t}
+\relative c'' {
+ <<
+ { c1 c2 s2 c1 c4 s2. }
+ \\
+ { c2 s2 c1 c4 s2. c1 }
+ >>
+}
--- /dev/null
+\header
+{
+ texidoc = "TM and No should not be changed into trademark/number symbols.
+This may happen with incorrect font versions.
+"
+}
+
+\version "2.10.0"
+
+\paper {
+ ragged-right = ##T
+}
+
+{
+ c4^"November WHITMAN"
+}
\combine "X" "+"
\combine "o" "/"
\box \column { \line { "string 1" } \line { "string 2" } }
+ " "
\italic Norsk
\super "2"
+ \circle \dynamic "p"
+ " "
\dynamic sfzp
\huge { "A" \smaller "A" \smaller \smaller "A"
\smaller \smaller \smaller "A" }
-\header {
-
- texidoc = "Demo of markup texts, using LilyPond syntax. "
+\version "2.10.0"
+\header {
+ texidoc = "Demo of markup texts, using LilyPond syntax."
}
-\version "2.10.0"
-
{
f'1-\markup {
foo
\raise #0.2 \hbracket \bold bar
- \override #'(baseline-skip . 4)
- \bracket \column { baz bazr bla }
+ \override #'(baseline-skip . 4)
+ \bracket \column {
+ baz
+ bazr
+ bla
+ }
\hspace #2.0
\override #'(font-encoding . fetaMusic) {
\lookup #"noteheads-0"
}
\semiflat
-
{ }
-
- \combine "X" "+"
+ \combine "X" "+"
\combine "o" "/"
}
g'1-\markup {
% \char-number #"abc1234abc"
- \box \column { \line { "string 1" } \line { "string 2" } }
- " "
+ \box \column {
+ \line { "string 1" }
+ \line { "string 2" }
+ \concat { "f" "i" }
+ }
+ " "
\draw-circle #1 #0.3 ##f
" "
\draw-circle #1 #0.3 ##t
--- /dev/null
+
+\version "2.10.0"
+
+\header {
+
+ texidoc = "In cue notes, Tuplet stops are handled before new tuplets
+ start."
+
+}
+
+foo = \relative {
+ \times 2/3 { c4 c c } \times 2/3 { c4 c c }
+}
+
+\addquote "foo" { \foo }
+
+\paper {
+ ragged-right = ##t
+}
+
+\new Staff
+<<
+ \new Voice \transpose c c' {
+ \override Stem #'direction = #UP
+ \foo
+ }
+ \new Voice {
+ \cueDuring #"foo" #DOWN { s1 }
+ }
+>>
+
--- /dev/null
+\header {
+ texidoc = "Grobs that have outside-staff-priority set are positioned
+using a skyline algorithm so that they don't collide with other objects."
+}
+
+\layout {ragged-right = ##t}
+
+\version "2.11.0"
+\relative c''' {
+ \override TextScript #'outside-staff-priority = #1
+ c
+ \once \override TextScript #'self-alignment-X = #CENTER
+ a,^"this doesn't collide with the c"
+ b^"this goes above the previous markup"
+ a8_"this goes below the dynamic"
+ a\f
+}
--- /dev/null
+\header {
+ texidoc = "We use a skyline algorithm to determine the distance to the next
+system instead of relying only on bounding boxes. This keeps gaps between
+systems more uniform."
+}
+
+\paper {ragged-right = ##t}
+#(set-default-paper-size "a6")
+
+\version "2.11.0"
+\book {
+ \score {
+ {
+ a,,1 | a'4 b' c'' d'' \break
+ \repeat unfold 2 {a' b' c'' d''} | b''''1
+ }
+ }
+}
--- /dev/null
+
+\header {
+
+ texidoc = "accidentals may be folded under preceding notes."
+ }
+\version "2.11.1"
+
+\paper {
+ ragged-right = ##t
+ }
+
+\relative {
+ \stemUp c''4...*1/2
+
+ ceses,,!
+ eses!
+ ceses!
+ feses!
+ ceses!
+ geses'!
+ ceses,!
+
+}
+
--- /dev/null
+\header {
+
+ texidoc = "Horizontal spacing is bounded by of the current measure length.
+This means that the 3/8 setting does not affect the whole rest spacing."
+
+}
+
+
+\version "2.11.1"
+
+\layout {
+ ragged-right = ##t
+}
+
+\score {
+ \new Staff \with {
+ \remove Separating_line_group_engraver
+ } {
+ \relative c' {
+ \override Score.SpacingSpanner #'uniform-stretching = ##t
+ \set Score.proportionalNotationDuration = #(ly:make-moment 4 25)
+ r1
+ \time 3/8 r4.
+ }
+ }
+}
--- /dev/null
+\version "2.10.0"
+
+\header
+{
+ texidoc = "Tablature may also be tuned for banjo."
+}
+
+\new TabStaff <<
+ \set TabStaff.tablatureFormat = #fret-number-tablature-format-banjo
+ \set TabStaff.stringTunings = #banjo-open-g-tuning
+ {
+ \stemDown
+ g8 d' g'\5 a b g e d' |
+ g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
+ g4
+ }
+>>
+
--- /dev/null
+\version "2.10.0"
+\header {
+
+ texidoc = "Harmonics get angled brackets in tablature"
+
+}
+
+\new TabVoice
+\relative c' {
+ <c g'\harmonic>
+}
--- /dev/null
+
+\version "2.11.0"
+
+\header {
+
+ texidoc = " Broken ties honor @code{minimum-length} also. This tie
+has a @code{minimum-length} of 5."
+
+}
+
+\relative {
+ \override Tie #'minimum-length = #5
+ f2. f16 f f f ~ | \break
+ f1
+}
+
+\paper {
+ indent = 0.0\mm
+ line-width = 40.0\mm
+}
}
%% hymn tricks
-#(define (prepend-grob-property grob-name
- grob-prop entry)
- (lambda (context)
- (let*
- ((grob-def (ly:context-property context grob-name)))
- (if (pair? grob-def)
- (ly:context-pushpop-property context grob-name grob-prop
- (cons
- entry
- (assoc-get grob-prop (car grob-def))))))))
-
-#(define (set-extra-space grob-name entry value)
- (prepend-grob-property grob-name 'space-alist
- (cons entry (cons 'extra-space value))))
-
noclefs = {
s1
\override Staff.Clef #'break-visibility =
}
setMargins = {
- %% first line left margin
- %% justified:
- %% \context Staff \applyContext #(set-extra-space 'TimeSignature 'first-note 4.5)
- %% ragged-right:
- \context Staff \applyContext #(set-extra-space 'TimeSignature 'first-note 9.5)
-
- %% next lines left margin
- \context Staff \applyContext #(set-extra-space 'KeySignature 'staff-bar 15)
+ %% \context Staff \applyContext #(set-extra-space 'TimeSignature
+ %% 'first-note -> extra-space 4.5
+
+ \override Staff.TimeSignature #'space-alist #'first-note = #'(extra-space . 9.5)
+ \override Staff.KeySignature #'space-alist #'staff-bar = #'(extra-space . 15)
+ \override Score.LeftEdge #'space-alist #'key-signature = #'(extra-space . 1)
- %% next lines small key-signature margin
- \context Staff \applyContext #(set-extra-space 'LeftEdge 'key-signature 1.0)
}
pipeSymbol = {
oneHalfNoteTime = \markup {
\override #'(baseline-skip . 0)
- \column { \line { \number "1" } \line { \smaller \smaller \note #"2" #-0.5 } }
+ \column {
+ \line { \number "1" }
+ \line { \smaller \smaller \note #"2" #-0.6 }
+ }
}
\layout {
%% Custom time signature
\override Staff.TimeSignature #'stencil = #ly:text-interface::print
\override Staff.TimeSignature #'text = #oneHalfNoteTime
+ \override Staff.TimeSignature #'style = #'()
\noclefs
\new Voice = "voice" \voice
#include "accidental-placement.hh"
#include "arpeggio.hh"
+#include "spanner.hh"
#include "context.hh"
+#include "item.hh"
#include "engraver.hh"
#include "international.hh"
#include "pitch.hh"
#include "accidental-placement.hh"
+#include "item.hh"
#include "rhythmic-head.hh"
#include "accidental-interface.hh"
#include "music.hh"
#include "note-collision.hh"
#include "note-column.hh"
-#include "pitch.hh"
#include "pointer-group-interface.hh"
#include "skyline.hh"
#include "stream-event.hh"
}
}
+vector<Grob*>
+Accidental_placement::get_break_reminder_accidentals (vector<Grob*> const &elts, Grob *left)
+{
+ vector<Grob*> br;
+ vector<Grob*> ra;
+ vector<Grob*> ret;
+
+ if (dynamic_cast<Item *> (left)->break_status_dir () != RIGHT)
+ return vector<Grob*> ();
+
+ for (vsize i = 0; i < elts.size (); i++)
+ {
+ split_accidentals (elts[i], &br, &ra);
+ ret.insert (ret.end (), br.begin (), br.end ());
+ }
+ return ret;
+}
+
/*
Accidentals are special, because they appear and disappear after
ties at will.
vector_sort (heads, less<Grob*> ());
uniq (heads);
+
+ vector<Grob *> stems;
+ for (vsize i = 0; i < heads.size (); i++)
+ {
+ if (Grob *s = Rhythmic_head::get_stem (heads[i]))
+ stems.push_back (s);
+ }
+
+ vector_sort (stems, less<Grob*> ());
+ uniq (stems);
+
common[Y_AXIS] = common_refpoint_of_array (heads, common[Y_AXIS], Y_AXIS);
+ common[Y_AXIS] = common_refpoint_of_array (stems, common[Y_AXIS], Y_AXIS);
+
+ for (vsize i = 0; i < heads.size (); i++)
+ {
+ if (Grob *s = Rhythmic_head::get_stem (heads[i]))
+ {
+ stems.push_back (s);
+ common[Y_AXIS] = s->common_refpoint (common[Y_AXIS], Y_AXIS);
+ }
+ }
+
+ vector_sort (stems, less<Grob*> ());
+ uniq (stems);
+
for (vsize i = apes.size (); i--;)
{
ape->extents_.insert (ape->extents_.end (), boxes.begin (), boxes.end ());
}
- ape->left_skyline_ = Skyline (ape->extents_, Y_AXIS, LEFT);
- ape->right_skyline_ = Skyline (ape->extents_, Y_AXIS, RIGHT);
+ ape->left_skyline_ = Skyline (ape->extents_, 0, Y_AXIS, LEFT);
+ ape->right_skyline_ = Skyline (ape->extents_, 0, Y_AXIS, RIGHT);
}
Interval total;
head_extents.push_back (Box (heads[i]->extent (common[X_AXIS], X_AXIS),
heads[i]->extent (common[Y_AXIS], Y_AXIS)));
- vector<Grob *> stems;
- for (vsize i = 0; i < heads.size (); i++)
- {
- if (Grob *s = Rhythmic_head::get_stem (heads[i]))
- stems.push_back (s);
- }
-
- vector_sort (stems, less<Grob*> ());
- uniq (stems);
for (vsize i = 0; i < stems.size (); i ++)
{
int very_large = INT_MAX;
- head_extents.push_back (Box (heads[i]->extent (common[X_AXIS], X_AXIS),
- heads[i]->pure_height (common[Y_AXIS], 0, very_large)));
+ head_extents.push_back (Box (stems[i]->extent (common[X_AXIS], X_AXIS),
+ stems[i]->pure_height (common[Y_AXIS], 0, very_large)));
}
- head_ape->left_skyline_ = Skyline (head_extents, Y_AXIS, LEFT);
+ head_ape->left_skyline_ = Skyline (head_extents, 0, Y_AXIS, LEFT);
head_ape->offset_ = 0.0;
Real padding = robust_scm2double (me->get_property ("padding"), 0.2);
}
ADD_INTERFACE (Accidental_placement,
- "accidental-placement-interface",
"Resolve accidental collisions.",
/* properties */
/*
TODO: should move avoid-slur into item?
*/
-ADD_INTERFACE (Accidental_interface, "accidental-interface",
+ADD_INTERFACE (Accidental_interface,
"a single accidental",
"accidentals "
"avoid-slur "
v.unite (Interval (where, where));
}
- /*
- TODO: support self-alignment-{Y, X}
- */
for (vsize i = 0; i < translates.size (); i++)
elems[i]->translate_axis (translates[i] - v.center (), a);
}
-/*
- Hairy function to put elements where they should be. Can be tweaked
- from the outside by setting extra-space in its
- children
-
- We assume that the children the refpoints of the children are still
- found at 0.0 -- we will fuck up with thresholds if children's
- extents are already moved to locations such as (-16, -8), since the
- dy needed to put things in a row doesn't relate to the distances
- between original refpoints.
-
- TODO: maybe we should rethink and throw out thresholding altogether.
- The original function has been taken over by
- align_to_fixed_distance ().
-*/
+/* for each grob, find its upper and lower skylines. If the grob has
+ an empty extent, delete it from the list instead. If the extent is
+ non-empty but there is no skyline available (or pure is true), just
+ create a flat skyline from the bounding box */
+static void
+get_skylines (Grob *me,
+ vector<Grob*> *const elements,
+ Axis a,
+ bool pure, int start, int end,
+ vector<Skyline_pair> *const ret)
+{
+ Grob *other_axis_common = common_refpoint_of_array (*elements, me, other_axis (a));
+ for (vsize i = elements->size (); i--;)
+ {
+ Grob *g = (*elements)[i];
+ Interval extent = g->maybe_pure_extent (g, a, pure, start, end);
+ Interval other_extent = pure ? Interval (-infinity_f, infinity_f)
+ : g->extent (other_axis_common, other_axis (a));
+ Box b = (a == X_AXIS) ? Box (extent, other_extent) : Box (other_extent, extent);
+
+ if (extent.is_empty ())
+ {
+ elements->erase (elements->begin () + i);
+ continue;
+ }
+
+ Skyline_pair skylines;
+ if (!pure
+ && Skyline_pair::unsmob (g->get_property ("skylines")))
+ skylines = *Skyline_pair::unsmob (g->get_property ("skylines"));
+ else
+ {
+ if (!pure)
+ programming_error ("no skylines for alignment-child\n");
+
+ skylines = Skyline_pair (b, 0, other_axis (a));
+ }
+
+ /* each skyline is calculated relative to (potentially) a different other_axis
+ coordinate. In order to compare the skylines effectively, we need to shift them
+ to some absolute reference point */
+ if (!pure)
+ {
+ /* this is perhaps an abuse of minimum-?-extent: maybe we should create
+ another property? But it seems that the only (current) use of
+ minimum-Y-extent is to separate vertically-aligned elements */
+ SCM min_extent = g->get_property (a == X_AXIS ? "minimum-X-extent" : "minimum-Y-extent");
+ if (is_number_pair (min_extent))
+ {
+ b[a] = ly_scm2interval (min_extent);
+ skylines.insert (b, 0, other_axis (a));
+ }
+ Real offset = g->relative_coordinate (other_axis_common, other_axis (a));
+ skylines.shift (-offset);
+ }
+
+
+ ret->push_back (skylines);
+ }
+ reverse (*ret);
+}
vector<Real>
Align_interface::get_extents_aligned_translates (Grob *me,
Direction stacking_dir = robust_scm2dir (me->get_property ("stacking-dir"),
DOWN);
- Interval threshold = robust_scm2interval (me->get_property ("threshold"),
- Interval (0, Interval::infinity ()));
+ vector<Grob*> elems (all_grobs); // writable copy
+ vector<Skyline_pair> skylines;
- vector<Interval> dims;
- vector<Grob*> elems;
+ get_skylines (me, &elems, a, pure, start, end, &skylines);
- for (vsize i = 0; i < all_grobs.size (); i++)
- {
- Interval y = all_grobs[i]->maybe_pure_extent (all_grobs[i], a, pure, start, end);
- if (!y.is_empty ())
- {
- Grob *e = dynamic_cast<Grob *> (all_grobs[i]);
-
- elems.push_back (e);
- dims.push_back (y);
- }
- }
-
- /*
- Read self-alignment-X and self-alignment-Y. This may seem like
- code duplication. (and really: it is), but this is necessary to
- prevent ugly cyclic dependencies that arise when you combine
- self-alignment on a child with alignment of children.
- */
- SCM align ((a == X_AXIS)
- ? me->get_property ("self-alignment-X")
- : me->get_property ("self-alignment-Y"));
-
- Interval total;
Real where = 0;
- Real extra_space = 0.0;
SCM extra_space_handle = scm_assq (ly_symbol2scm ("alignment-extra-space"), line_break_details);
+ Real extra_space = robust_scm2double (scm_is_pair (extra_space_handle)
+ ? scm_cdr (extra_space_handle)
+ : SCM_EOL,
+ 0.0);
- extra_space = robust_scm2double (scm_is_pair (extra_space_handle)
- ? scm_cdr (extra_space_handle)
- : SCM_EOL,
- extra_space);
-
- Real padding = robust_scm2double (me->get_property ("padding"),
- 0.0);
+ Real padding = robust_scm2double (me->get_property ("padding"), 0.0);
vector<Real> translates;
for (vsize j = 0; j < elems.size (); j++)
{
- Real dy = -dims[j][-stacking_dir];
- if (j)
- dy += dims[j - 1][stacking_dir];
-
- /*
- we want dy to be > 0
- */
- dy *= stacking_dir;
- if (j)
- dy = min (max (dy, threshold[SMALLER]), threshold[BIGGER]);
-
+ Real dy = 0;
+ if (j == 0)
+ dy = skylines[j][-stacking_dir].max_height ();
+ else
+ dy = skylines[j-1][stacking_dir].distance (skylines[j][-stacking_dir]);
where += stacking_dir * (dy + padding + extra_space / elems.size ());
- total.unite (dims[j] + where);
translates.push_back (where);
}
}
}
-
- Real center_offset = 0.0;
-
- /*
- also move the grobs that were empty, to maintain spatial order.
- */
vector<Real> all_translates;
- if (translates.size ())
+
+ if (!translates.empty ())
{
Real w = translates[0];
-
- if (scm_is_number (align))
- center_offset = total.linear_combination (scm_to_double (align));
-
for (vsize i = 0, j = 0; j < all_grobs.size (); j++)
{
if (i < elems.size () && all_grobs[j] == elems[i])
w = translates[i++];
- all_translates.push_back (w - center_offset);
+ all_translates.push_back (w);
}
}
return all_translates;
}
ADD_INTERFACE (Align_interface,
- "align-interface",
"Order grobs from top to bottom, left to right, right to left or bottom "
"to top. "
"stacking-dir "
"threshold "
);
-
-struct Foobar
-{
- bool has_interface (Grob *);
-};
-
#include "scm-hash.hh"
#include "warn.hh"
+
+Index_to_charcode_map const *
+All_font_metrics::get_index_to_charcode_map (string filename, FT_Face face)
+{
+ if (filename_charcode_maps_map_.find (filename)
+ == filename_charcode_maps_map_.end ())
+ filename_charcode_maps_map_[filename] = make_index_to_charcode_map (face);
+
+ return &filename_charcode_maps_map_[filename];
+}
+
+
All_font_metrics::All_font_metrics (string path)
{
otf_dict_ = new Scheme_hash_table;
All_font_metrics *all_fonts_global;
+LY_DEFINE (ly_reset_all_fonts, "ly:reset-all-fonts", 0, 0, 0,
+ (),
+ "Forget all about previously loaded fonts. ")
+{
+ delete all_fonts_global;
+ all_fonts_global = new All_font_metrics (global_path.to_string ());
+
+ return SCM_UNSPECIFIED;
+}
+
+
LY_DEFINE (ly_font_load, "ly:font-load", 1, 0, 0,
(SCM name),
"Load the font @var{name}. ")
return fm->self_scm ();
}
+
#include "engraver.hh"
#include "axis-group-interface.hh"
+#include "item.hh"
#include "note-head.hh"
#include "pitch-interval.hh"
#include "pointer-group-interface.hh"
return SCM_EOL;
}
-ADD_INTERFACE (Ambitus, "ambitus-interface",
+ADD_INTERFACE (Ambitus ,
"The line between note heads for a pitch range.",
/* props */
#include "side-position-interface.hh"
#include "stream-event.hh"
#include "note-column.hh"
+#include "item.hh"
#include "translator.icc"
#include "arpeggio.hh"
+#include "grob.hh"
#include "output-def.hh"
#include "stem.hh"
#include "staff-symbol-referencer.hh"
if (heads.is_empty () || heads.length () < 0.5)
{
- programming_error ("no heads for arpeggio found?");
- me->suicide ();
+ if (!to_boolean (me->get_property ("transparent")))
+ {
+ me->warning ("no heads for arpeggio found?");
+ me->suicide ();
+ }
return SCM_EOL;
}
return ly_interval2scm (arpeggio.extent (X_AXIS));
}
-ADD_INTERFACE (Arpeggio, "arpeggio-interface",
+ADD_INTERFACE (Arpeggio,
"Functions and settings for drawing an arpeggio symbol (a wavy line left to noteheads.",
/* properties */
audio_items_.push_back (l);
}
+Audio_staff::Audio_staff ()
+{
+ channel_ = -1;
+}
+
void
Audio_staff::output (Midi_stream &midi_stream, int channel)
{
#include "context.hh"
#include "direction.hh"
#include "international.hh"
+#include "music.hh"
#include "music-wrapper-iterator.hh"
class Auto_change_iterator : public Music_wrapper_iterator
#include "align-interface.hh"
#include "directional-element-interface.hh"
#include "pointer-group-interface.hh"
-#include "grob.hh"
#include "grob-array.hh"
#include "hara-kiri-group-spanner.hh"
#include "international.hh"
-#include "item.hh"
#include "paper-column.hh"
#include "paper-score.hh"
-#include "std-vector.hh"
+#include "separation-item.hh"
#include "system.hh"
#include "warn.hh"
if (end == r)
end_index = i;
}
+ if (end == INT_MAX)
+ end_index = breaks.size () - 1;
if (start_index == VPOS || end_index == VPOS)
{
return pure_group_height (me, start, end);
}
+
+MAKE_SCHEME_CALLBACK (Axis_group_interface, calc_skylines, 1);
+SCM
+Axis_group_interface::calc_skylines (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+ extract_grob_set (me, "elements", elts);
+ return skyline_spacing (me, elts).smobbed_copy ();
+}
+
+/* whereas calc_skylines calculates skylines for axis-groups with a lot of
+ visible children, combine_skylines is designed for axis-groups whose only
+ children are other axis-groups (ie. VerticalAlignment). Rather than
+ calculating all the skylines from scratch, we just merge the skylines
+ of the children.
+*/
+MAKE_SCHEME_CALLBACK (Axis_group_interface, combine_skylines, 1);
+SCM
+Axis_group_interface::combine_skylines (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+ extract_grob_set (me, "elements", elements);
+ Grob *y_common = common_refpoint_of_array (elements, me, Y_AXIS);
+
+ assert (y_common == me);
+
+ Skyline_pair ret;
+ for (vsize i = 0; i < elements.size (); i++)
+ {
+ SCM skyline_scm = elements[i]->get_property ("skylines");
+ if (Skyline_pair::unsmob (skyline_scm))
+ {
+ Real offset = elements[i]->relative_coordinate (y_common, Y_AXIS);
+ Skyline_pair other = *Skyline_pair::unsmob (skyline_scm);
+ other.raise (offset);
+ ret.merge (other);
+ }
+ }
+ return ret.smobbed_copy ();
+}
SCM
Axis_group_interface::generic_group_extent (Grob *me, Axis a)
{
+ /* trigger the callback to do skyline-spacing on the children */
+ (void) me->get_property ("skylines");
+
extract_grob_set (me, "elements", elts);
- if (a == Y_AXIS && to_boolean (me->get_property ("skyline-spacing")))
- skyline_spacing (me, elts);
Grob *common = common_refpoint_of_array (elts, me, a);
Real my_coord = me->relative_coordinate (common, a);
bool
staff_priority_less (Grob * const &g1, Grob * const &g2)
{
- int priority_1 = robust_scm2int (g1->get_property ("outside-staff-priority"), INT_MIN);
- int priority_2 = robust_scm2int (g2->get_property ("outside-staff-priority"), INT_MIN);
+ Real priority_1 = robust_scm2double (g1->get_property ("outside-staff-priority"), -infinity_f);
+ Real priority_2 = robust_scm2double (g2->get_property ("outside-staff-priority"), -infinity_f);
if (priority_1 < priority_2)
return true;
else if (priority_1 > priority_2)
return false;
- /* if there is no preference in staff priority, choose the one with the lower rank */
- int rank_1 = g1->spanned_rank_iv ()[LEFT];
- int rank_2 = g2->spanned_rank_iv ()[LEFT];
- return rank_1 < rank_2;
+ /* if there is no preference in staff priority, choose the left-most one */
+ Grob *common = g1->common_refpoint (g2, X_AXIS);
+ Real start_1 = g1->extent (common, X_AXIS)[LEFT];
+ Real start_2 = g2->extent (common, X_AXIS)[LEFT];
+ return start_1 < start_2;
}
-void
+static void
+add_boxes (Grob *me, Grob *x_common, Grob *y_common, vector<Box> *const boxes)
+{
+ /* if we are a parent, consider the children's boxes instead of mine */
+ if (Grob_array *elements = unsmob_grob_array (me->get_object ("elements")))
+ {
+ for (vsize i = 0; i < elements->size (); i++)
+ add_boxes (elements->grob (i), x_common, y_common, boxes);
+ }
+ else if (!scm_is_number (me->get_property ("outside-staff-priority")))
+ boxes->push_back (Box (me->extent (x_common, X_AXIS),
+ me->extent (y_common, Y_AXIS)));
+}
+
+/* We want to avoid situations like this:
+ still more text
+ more text
+ text
+ -------------------
+ staff
+ -------------------
+
+ The point is that "still more text" should be positioned under
+ "more text". In order to achieve this, we place the grobs in several
+ passes. We keep track of the right-most horizontal position that has been
+ affected by the current pass so far (actually we keep track of 2
+ positions, one for above the staff, one for below).
+
+ In each pass, we loop through the unplaced grobs from left to right.
+ If the grob overlaps the right-most affected position, we place it
+ (and then update the right-most affected position to point to the right
+ edge of the just-placed grob). Otherwise, we skip it until the next pass.
+*/
+static void
+add_grobs_of_one_priority (Skyline_pair *const skylines,
+ vector<Grob*> elements,
+ Grob *x_common,
+ Grob *y_common)
+{
+ vector<Box> boxes;
+ Drul_array<Real> last_affected_position;
+
+ reverse (elements);
+ while (!elements.empty ())
+ {
+ last_affected_position[UP] = -infinity_f;
+ last_affected_position[DOWN] = -infinity_f;
+ /* do one pass */
+ for (vsize i = elements.size (); i--;)
+ {
+ Direction dir = get_grob_direction (elements[i]);
+ if (dir == CENTER)
+ {
+ warning (_ ("an outside-staff object should have a direction, defaulting to up"));
+ dir = UP;
+ }
+
+ Box b (elements[i]->extent (x_common, X_AXIS),
+ elements[i]->extent (y_common, Y_AXIS));
+ SCM horizon_padding_scm = elements[i]->get_property ("outside-staff-horizontal-padding");
+ Real horizon_padding = robust_scm2double (horizon_padding_scm, 0.0);
+
+ if (b[X_AXIS][LEFT] - 2*horizon_padding < last_affected_position[dir])
+ continue;
+
+ if (b[X_AXIS].is_empty () || b[Y_AXIS].is_empty ())
+ warning (_f ("outside-staff object %s has an empty extent", elements[i]->name ().c_str ()));
+ else
+ {
+ boxes.clear ();
+ boxes.push_back (b);
+ Skyline other = Skyline (boxes, horizon_padding, X_AXIS, -dir);
+ Real padding = robust_scm2double (elements[i]->get_property ("outside-staff-padding"), 0.5);
+ Real dist = (*skylines)[dir].distance (other) + padding;
+
+ if (dist > 0)
+ {
+ b.translate (Offset (0, dir*dist));
+ elements[i]->translate_axis (dir*dist, Y_AXIS);
+ }
+ (*skylines)[dir].insert (b, 0, X_AXIS);
+ elements[i]->set_property ("outside-staff-priority", SCM_BOOL_F);
+ last_affected_position[dir] = b[X_AXIS][RIGHT];
+ }
+ elements.erase (elements.begin () + i);
+ }
+ }
+}
+
+Skyline_pair
Axis_group_interface::skyline_spacing (Grob *me, vector<Grob*> elements)
{
vector_sort (elements, staff_priority_less);
Grob *x_common = common_refpoint_of_array (elements, me, X_AXIS);
Grob *y_common = common_refpoint_of_array (elements, me, Y_AXIS);
+ assert (y_common == me);
+
vsize i = 0;
vector<Box> boxes;
for (i = 0; i < elements.size ()
&& !scm_is_number (elements[i]->get_property ("outside-staff-priority")); i++)
- boxes.push_back (Box (elements[i]->extent (x_common, X_AXIS),
- elements[i]->extent (y_common, Y_AXIS)));
-
+ add_boxes (elements[i], x_common, y_common, &boxes);
- Drul_array<Skyline> skylines (Skyline (boxes, X_AXIS, DOWN),
- Skyline (boxes, X_AXIS, UP));
+ Skyline_pair skylines (boxes, 0, X_AXIS);
for (; i < elements.size (); i++)
{
- Direction dir = get_grob_direction (elements[i]);
- if (dir == CENTER)
- {
- warning (_ ("an outside-staff object should have a direction"));
- continue;
- }
-
- Box b (elements[i]->extent (x_common, X_AXIS),
- elements[i]->extent (y_common, Y_AXIS));
- boxes.clear ();
- boxes.push_back (b);
- Skyline other = Skyline (boxes, X_AXIS, -dir);
- Real dist = skylines[dir].distance (other);
-
- if (dist > 0)
- {
- b.translate (Offset (0, dir*dist));
- elements[i]->translate_axis (dir*dist, Y_AXIS);
- }
- skylines[dir].insert (b, X_AXIS);
+ SCM priority = elements[i]->get_property ("outside-staff-priority");
+ vector<Grob*> current_elts;
+ current_elts.push_back (elements[i]);
+ while (i < elements.size () - 1
+ && scm_eq_p (elements[i+1]->get_property ("outside-staff-priority"), priority))
+ current_elts.push_back (elements[++i]);
+
+ add_grobs_of_one_priority (&skylines, current_elts, x_common, y_common);
}
+ return skylines;
}
-ADD_INTERFACE (Axis_group_interface, "axis-group-interface",
+ADD_INTERFACE (Axis_group_interface,
"An object that groups other layout objects.",
"elements "
"common-refpoint-of-elements "
"pure-relevant-elements "
- "skyline-spacing "
+ "skylines "
"cached-pure-extents "
);
#include "engraver.hh"
-
#include "stream-event.hh"
#include "item.hh"
{
public:
DECLARE_SCHEME_CALLBACK (print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE ();
};
MAKE_SCHEME_CALLBACK (Balloon_interface, print, 1);
return fr.smobbed_copy ();
}
-ADD_INTERFACE (Balloon_interface, "text-balloon-interface",
+ADD_INTERFACE (Balloon_interface,
"A collection of routines to put text balloons around an object.",
/* properties */
ADD_INTERFACE (Bar_line,
- "bar-line-interface",
"Bar line.\n"
"\n"
*/
#include "pointer-group-interface.hh"
-#include "std-vector.hh"
#include "stem.hh"
#include "beam.hh"
+#include "grob.hh"
#include "staff-symbol-referencer.hh"
#include "directional-element-interface.hh"
#include <algorithm>
using namespace std;
+#include "grob.hh"
#include "align-interface.hh"
#include "international.hh"
#include "output-def.hh"
}
ADD_INTERFACE (Beam,
- "beam-interface",
"A beam. \n\n"
"The @code{thickness} property is the weight of beams, "
#include "lilypond-key.hh"
#include "main.hh"
-#include "music-output.hh"
#include "music.hh"
#include "output-def.hh"
#include "paper-book.hh"
#include "score.hh"
-#include "stencil.hh"
#include "text-interface.hh"
#include "warn.hh"
#include "performance.hh"
#include "axis-group-interface.hh"
#include "context.hh"
#include "translator-group.hh"
+#include "item.hh"
#include "translator.icc"
column_alist_ = scm_assoc_set_x (column_alist_, align_name, group->self_scm ());
- Break_align_interface::add_element (align_, group);
+ Break_alignment_interface::add_element (align_, group);
}
Axis_group_interface::add_element (group, item);
}
"Align grobs with corresponding @code{break-align-symbols} into "
"groups, and order the groups according to @code{breakAlignOrder}. "
"The left edge of the alignment gets a separate group, with a symbol @code{left-edge}. ",
- /* create */ "BreakAlignment BreakAlignGroup LeftEdge",
+ /* create */ "BreakAlignment "
+ "BreakAlignGroup "
+ "LeftEdge ",
/* read */ "",
/* write */ "");
+++ /dev/null
-/*
- break-align-interface.cc -- implement Break_align_interface
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
-*/
-
-
-#include "break-align-interface.hh"
-
-#include "align-interface.hh"
-#include "axis-group-interface.hh"
-#include "dimensions.hh"
-#include "international.hh"
-#include "output-def.hh"
-#include "paper-column.hh"
-#include "pointer-group-interface.hh"
-#include "self-alignment-interface.hh"
-#include "side-position-interface.hh"
-#include "warn.hh"
-
-
-MAKE_SCHEME_CALLBACK (Break_align_interface, self_align_callback, 1);
-SCM
-Break_align_interface::self_align_callback (SCM smob)
-{
- Grob *me = unsmob_grob (smob);
-
- Item *item = dynamic_cast<Item *> (me);
- Direction bsd = item->break_status_dir ();
- if (bsd == LEFT)
- me->set_property ("self-alignment-X", scm_from_int (RIGHT));
-
- /*
- Force break alignment itself to be done first, in the case
- */
- return Self_alignment_interface::aligned_on_self (me, X_AXIS);
-}
-
-/*
- This is tricky: we cannot modify 'elements, since callers are
- iterating the same list. Reordering the list in-place, or resetting
- 'elements will skip elements in the loops of callers.
-
- So we return the correct order as an array.
-*/
-SCM
-Break_align_interface::break_align_order (Item *me)
-{
- SCM order_vec = me->get_property ("break-align-orders");
- if (!scm_is_vector (order_vec)
- || scm_c_vector_length (order_vec) < 3)
- return SCM_BOOL_F;
-
- SCM order = scm_vector_ref (order_vec,
- scm_from_int (me->break_status_dir () + 1));
-
-
- return order;
-}
-
-
-vector<Grob*>
-Break_align_interface::ordered_elements (Grob *grob)
-{
- Item *me = dynamic_cast<Item *> (grob);
- extract_grob_set (me, "elements", elts);
-
-
- SCM order = break_align_order (me);
-
- if (order == SCM_BOOL_F)
- return elts;
-
- vector<Grob*> writable_elts (elts);
- /*
- Copy in order specified in BREAK-ALIGN-ORDER.
- */
- vector<Grob*> new_elts;
- for (; scm_is_pair (order); order = scm_cdr (order))
- {
- SCM sym = scm_car (order);
-
- for (vsize i = writable_elts.size (); i--;)
- {
- Grob *g = writable_elts[i];
- if (g && sym == g->get_property ("break-align-symbol"))
- {
- new_elts.push_back (g);
- writable_elts.erase (writable_elts.begin () + i);
- }
- }
- }
-
- return new_elts;
-}
-
-void
-Break_align_interface::add_element (Grob *me, Grob *toadd)
-{
- Align_interface::add_element (me, toadd);
-}
-
-MAKE_SCHEME_CALLBACK(Break_align_interface, calc_positioning_done, 1)
-SCM
-Break_align_interface::calc_positioning_done (SCM smob)
-{
- Grob *grob = unsmob_grob (smob);
- Item *me = dynamic_cast<Item *> (grob);
-
- vector<Grob*> elems = ordered_elements (me);
- vector<Interval> extents;
-
- int last_nonempty = -1;
- for (vsize i = 0; i < elems.size (); i++)
- {
- Interval y = elems[i]->extent (elems[i], X_AXIS);
- extents.push_back (y);
- if (!y.is_empty ())
- last_nonempty = i;
- }
-
- vsize idx = 0;
- while (idx < extents.size () && extents[idx].is_empty ())
- idx++;
-
- vector<Real> offsets;
- offsets.resize (elems.size ());
- for (vsize i = 0; i < offsets.size ();i++)
- offsets[i] = 0.0;
-
- Real extra_right_space = 0.0;
- vsize edge_idx = VPOS;
- while (idx < elems.size ())
- {
- vsize next_idx = idx + 1;
- while (next_idx < elems.size ()
- && extents[next_idx].is_empty ())
- next_idx++;
-
- Grob *l = elems[idx];
- Grob *r = 0;
-
- if (next_idx < elems.size ())
- r = elems[next_idx];
-
- SCM alist = SCM_EOL;
-
- /*
- Find the first grob with a space-alist entry.
- */
- extract_grob_set (l, "elements", elts);
-
- for (vsize i = elts.size (); i--;)
- {
- Grob *elt = elts[i];
-
- if (edge_idx == VPOS
- && (elt->get_property ("break-align-symbol")
- == ly_symbol2scm ("left-edge")))
- edge_idx = idx;
-
- SCM l = elt->get_property ("space-alist");
- if (scm_is_pair (l))
- {
- alist = l;
- break;
- }
- }
-
- SCM rsym = r ? SCM_EOL : ly_symbol2scm ("right-edge");
-
- /*
- We used to use #'cause to find out the symbol and the spacing
- table, but that gets icky when that grob is suicided for some
- reason.
- */
- if (r)
- {
- extract_grob_set (r, "elements", elts);
- for (vsize i = elts.size ();
- !scm_is_symbol (rsym) && i--;)
- {
- Grob *elt = elts[i];
- rsym = elt->get_property ("break-align-symbol");
- }
- }
-
- if (rsym == ly_symbol2scm ("left-edge"))
- edge_idx = next_idx;
-
- SCM entry = SCM_EOL;
- if (scm_is_symbol (rsym))
- entry = scm_assq (rsym, alist);
-
- bool entry_found = scm_is_pair (entry);
- if (!entry_found)
- {
- string sym_string;
- if (scm_is_symbol (rsym))
- sym_string = ly_symbol2string (rsym);
-
- string orig_string;
- if (unsmob_grob (l->get_property ("cause")))
- orig_string = unsmob_grob (l->get_property ("cause"))->name ();
-
- programming_error (_f ("No spacing entry from %s to `%s'",
- orig_string.c_str (),
- sym_string.c_str ()));
- }
-
- Real distance = 1.0;
- SCM type = ly_symbol2scm ("extra-space");
-
- if (entry_found)
- {
- entry = scm_cdr (entry);
-
- distance = scm_to_double (scm_cdr (entry));
- type = scm_car (entry);
- }
-
- if (r)
- {
- if (type == ly_symbol2scm ("extra-space"))
- offsets[next_idx] = extents[idx][RIGHT] + distance
- - extents[next_idx][LEFT];
- /* should probably junk minimum-space */
- else if (type == ly_symbol2scm ("minimum-space"))
- offsets[next_idx] = max (extents[idx][RIGHT], distance);
- }
- else
- {
- extra_right_space = distance;
- if (idx < offsets.size() - 1)
- offsets[idx+1] = extents[idx][RIGHT] + distance;
- }
-
- idx = next_idx;
- }
-
- Real here = 0.0;
- Interval total_extent;
-
- Real alignment_off = 0.0;
- for (vsize i = 0; i < offsets.size (); i++)
- {
- here += offsets[i];
- if (i == edge_idx)
- alignment_off = -here;
- total_extent.unite (extents[i] + here);
- }
-
- if (total_extent.is_empty ())
- return SCM_BOOL_T;
-
- if (me->break_status_dir () == LEFT)
- alignment_off = -total_extent[RIGHT] - extra_right_space;
- else if (edge_idx == VPOS)
- alignment_off = -total_extent[LEFT];
-
- here = alignment_off;
- for (vsize i = 0; i < offsets.size (); i++)
- {
- here += offsets[i];
- elems[i]->translate_axis (here, X_AXIS);
- }
-
- return SCM_BOOL_T;
-}
-
-ADD_INTERFACE (Break_aligned_interface, "break-aligned-interface",
- "Items that are aligned in prefatory matter.\n"
- "\n"
- "The spacing of these items is controlled by the @code{space-alist}\n"
- "property. It contains a list @code{break-align-symbol}s with a specification\n"
- "of the associated space. The space specification can be "
- "@table @code\n"
- "@item (minimum-space . @var{spc}))\n"
- " Pad space until the distance is @var{spc}\n"
- "@item (fixed-space . @var{spc})\n"
- " Set a fixed space\n"
- "@item (semi-fixed-space . @var{spc})\n"
- " Set a space. Half of it is fixed and half is stretchable. \n"
- "(does not work at start of line. fixme)\n"
- "@item (extra-space . @var{spc})\n"
- " Add @var{spc} amount of space.\n"
- "@end table\n"
- "\n"
- "Special keys for the alist are @code{first-note} and @code{next-note}, signifying\n"
- "the first note on a line, and the next note halfway a line.\n"
- "\n"
- "Rules for this spacing are much more complicated than this. \n"
- "See [Wanske] page 126 -- 134, [Ross] pg 143 -- 147\n",
-
- /* properties */
- "break-align-symbol "
- "space-alist "
- );
-
-ADD_INTERFACE (Break_align_interface, "break-alignment-interface",
- "The object that performs break aligment. See @ref{break-aligned-interface}.",
-
- /* properties */
- "positioning-done "
- "break-align-orders");
-
-
-MAKE_SCHEME_CALLBACK(Break_alignment_align_interface, self_align_callback, 1)
-SCM
-Break_alignment_align_interface::self_align_callback (SCM grob)
-{
- Grob *me = unsmob_grob (grob);
- Item *alignment = dynamic_cast<Item*> (me->get_parent (X_AXIS));
- if (!Break_align_interface::has_interface (alignment))
- return scm_from_int (0);
-
- SCM my_align = me->get_property ("break-align-symbol");
- SCM order = Break_align_interface::break_align_order (alignment);
-
- vector<Grob*> elements = Break_align_interface::ordered_elements (alignment);
- if (elements.size () == 0)
- return scm_from_int (0);
-
- int last_idx_found = -1;
- vsize i = 0;
- for (SCM s = order; scm_is_pair (s); s = scm_cdr (s))
- {
- if (i < elements.size ()
- && elements[i]->get_property ("break-align-symbol") == scm_car (s))
- {
- last_idx_found = i;
- i ++;
- }
-
- if (scm_car (s) == my_align)
- break ;
- }
-
- Direction which_edge = LEFT;
- if (vsize (last_idx_found + 1) < elements.size())
- last_idx_found ++;
- else
- which_edge = RIGHT;
-
- Grob *common = me->common_refpoint (elements[last_idx_found], X_AXIS);
-
- return scm_from_double (robust_relative_extent (elements[last_idx_found], common, X_AXIS)[which_edge]
- - me->relative_coordinate (common, X_AXIS));
-}
-
-ADD_INTERFACE (Break_alignment_align_interface, "break-alignment-align-interface",
- "Object that is aligned on a break aligment. ",
-
- /* properties */
- "break-align-symbol "
- )
-
-
--- /dev/null
+/*
+ break-align-interface.cc -- implement Break_alignment_interface
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+*/
+
+
+#include "break-align-interface.hh"
+
+#include "align-interface.hh"
+#include "axis-group-interface.hh"
+#include "dimensions.hh"
+#include "international.hh"
+#include "output-def.hh"
+#include "paper-column.hh"
+#include "pointer-group-interface.hh"
+#include "self-alignment-interface.hh"
+#include "side-position-interface.hh"
+#include "warn.hh"
+
+
+MAKE_SCHEME_CALLBACK (Break_alignment_interface, self_align_callback, 1);
+SCM
+Break_alignment_interface::self_align_callback (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+
+ Item *item = dynamic_cast<Item *> (me);
+ Direction bsd = item->break_status_dir ();
+ if (bsd == LEFT)
+ me->set_property ("self-alignment-X", scm_from_int (RIGHT));
+
+ /*
+ Force break alignment itself to be done first, in the case
+ */
+ return Self_alignment_interface::aligned_on_self (me, X_AXIS);
+}
+
+/*
+ This is tricky: we cannot modify 'elements, since callers are
+ iterating the same list. Reordering the list in-place, or resetting
+ 'elements will skip elements in the loops of callers.
+
+ So we return the correct order as an array.
+*/
+SCM
+Break_alignment_interface::break_align_order (Item *me)
+{
+ SCM order_vec = me->get_property ("break-align-orders");
+ if (!scm_is_vector (order_vec)
+ || scm_c_vector_length (order_vec) < 3)
+ return SCM_BOOL_F;
+
+ SCM order = scm_vector_ref (order_vec,
+ scm_from_int (me->break_status_dir () + 1));
+
+
+ return order;
+}
+
+
+vector<Grob*>
+Break_alignment_interface::ordered_elements (Grob *grob)
+{
+ Item *me = dynamic_cast<Item *> (grob);
+ extract_grob_set (me, "elements", elts);
+
+
+ SCM order = break_align_order (me);
+
+ if (order == SCM_BOOL_F)
+ return elts;
+
+ vector<Grob*> writable_elts (elts);
+ /*
+ Copy in order specified in BREAK-ALIGN-ORDER.
+ */
+ vector<Grob*> new_elts;
+ for (; scm_is_pair (order); order = scm_cdr (order))
+ {
+ SCM sym = scm_car (order);
+
+ for (vsize i = writable_elts.size (); i--;)
+ {
+ Grob *g = writable_elts[i];
+ if (g && sym == g->get_property ("break-align-symbol"))
+ {
+ new_elts.push_back (g);
+ writable_elts.erase (writable_elts.begin () + i);
+ }
+ }
+ }
+
+ return new_elts;
+}
+
+void
+Break_alignment_interface::add_element (Grob *me, Grob *toadd)
+{
+ Align_interface::add_element (me, toadd);
+}
+
+MAKE_SCHEME_CALLBACK(Break_alignment_interface, calc_positioning_done, 1)
+SCM
+Break_alignment_interface::calc_positioning_done (SCM smob)
+{
+ Grob *grob = unsmob_grob (smob);
+ Item *me = dynamic_cast<Item *> (grob);
+
+ vector<Grob*> elems = ordered_elements (me);
+ vector<Interval> extents;
+
+ int last_nonempty = -1;
+ for (vsize i = 0; i < elems.size (); i++)
+ {
+ Interval y = elems[i]->extent (elems[i], X_AXIS);
+ extents.push_back (y);
+ if (!y.is_empty ())
+ last_nonempty = i;
+ }
+
+ vsize idx = 0;
+ while (idx < extents.size () && extents[idx].is_empty ())
+ idx++;
+
+ vector<Real> offsets;
+ offsets.resize (elems.size ());
+ for (vsize i = 0; i < offsets.size ();i++)
+ offsets[i] = 0.0;
+
+ Real extra_right_space = 0.0;
+ vsize edge_idx = VPOS;
+ while (idx < elems.size ())
+ {
+ vsize next_idx = idx + 1;
+ while (next_idx < elems.size ()
+ && extents[next_idx].is_empty ())
+ next_idx++;
+
+ Grob *l = elems[idx];
+ Grob *r = 0;
+
+ if (next_idx < elems.size ())
+ r = elems[next_idx];
+
+ SCM alist = SCM_EOL;
+
+ /*
+ Find the first grob with a space-alist entry.
+ */
+ extract_grob_set (l, "elements", elts);
+
+ for (vsize i = elts.size (); i--;)
+ {
+ Grob *elt = elts[i];
+
+ if (edge_idx == VPOS
+ && (elt->get_property ("break-align-symbol")
+ == ly_symbol2scm ("left-edge")))
+ edge_idx = idx;
+
+ SCM l = elt->get_property ("space-alist");
+ if (scm_is_pair (l))
+ {
+ alist = l;
+ break;
+ }
+ }
+
+ SCM rsym = r ? SCM_EOL : ly_symbol2scm ("right-edge");
+
+ /*
+ We used to use #'cause to find out the symbol and the spacing
+ table, but that gets icky when that grob is suicided for some
+ reason.
+ */
+ if (r)
+ {
+ extract_grob_set (r, "elements", elts);
+ for (vsize i = elts.size ();
+ !scm_is_symbol (rsym) && i--;)
+ {
+ Grob *elt = elts[i];
+ rsym = elt->get_property ("break-align-symbol");
+ }
+ }
+
+ if (rsym == ly_symbol2scm ("left-edge"))
+ edge_idx = next_idx;
+
+ SCM entry = SCM_EOL;
+ if (scm_is_symbol (rsym))
+ entry = scm_assq (rsym, alist);
+
+ bool entry_found = scm_is_pair (entry);
+ if (!entry_found)
+ {
+ string sym_string;
+ if (scm_is_symbol (rsym))
+ sym_string = ly_symbol2string (rsym);
+
+ string orig_string;
+ if (unsmob_grob (l->get_property ("cause")))
+ orig_string = unsmob_grob (l->get_property ("cause"))->name ();
+
+ programming_error (_f ("No spacing entry from %s to `%s'",
+ orig_string.c_str (),
+ sym_string.c_str ()));
+ }
+
+ Real distance = 1.0;
+ SCM type = ly_symbol2scm ("extra-space");
+
+ if (entry_found)
+ {
+ entry = scm_cdr (entry);
+
+ distance = scm_to_double (scm_cdr (entry));
+ type = scm_car (entry);
+ }
+
+ if (r)
+ {
+ if (type == ly_symbol2scm ("extra-space"))
+ offsets[next_idx] = extents[idx][RIGHT] + distance
+ - extents[next_idx][LEFT];
+ /* should probably junk minimum-space */
+ else if (type == ly_symbol2scm ("minimum-space"))
+ offsets[next_idx] = max (extents[idx][RIGHT], distance);
+ }
+ else
+ {
+ extra_right_space = distance;
+ if (idx < offsets.size() - 1)
+ offsets[idx+1] = extents[idx][RIGHT] + distance;
+ }
+
+ idx = next_idx;
+ }
+
+ Real here = 0.0;
+ Interval total_extent;
+
+ Real alignment_off = 0.0;
+ for (vsize i = 0; i < offsets.size (); i++)
+ {
+ here += offsets[i];
+ if (i == edge_idx)
+ alignment_off = -here;
+ total_extent.unite (extents[i] + here);
+ }
+
+ if (total_extent.is_empty ())
+ return SCM_BOOL_T;
+
+ if (me->break_status_dir () == LEFT)
+ alignment_off = -total_extent[RIGHT] - extra_right_space;
+ else if (edge_idx == VPOS)
+ alignment_off = -total_extent[LEFT];
+
+ here = alignment_off;
+ for (vsize i = 0; i < offsets.size (); i++)
+ {
+ here += offsets[i];
+ elems[i]->translate_axis (here, X_AXIS);
+ }
+
+ return SCM_BOOL_T;
+}
+
+
+
+MAKE_SCHEME_CALLBACK(Break_alignable_interface, self_align_callback, 1)
+SCM
+Break_alignable_interface::self_align_callback (SCM grob)
+{
+ Grob *me = unsmob_grob (grob);
+ Item *alignment = dynamic_cast<Item*> (me->get_parent (X_AXIS));
+ if (!Break_alignment_interface::has_interface (alignment))
+ return scm_from_int (0);
+
+ SCM my_align = me->get_property ("break-align-symbol");
+ SCM order = Break_alignment_interface::break_align_order (alignment);
+
+ vector<Grob*> elements = Break_alignment_interface::ordered_elements (alignment);
+ if (elements.size () == 0)
+ return scm_from_int (0);
+
+ int last_idx_found = -1;
+ vsize i = 0;
+ for (SCM s = order; scm_is_pair (s); s = scm_cdr (s))
+ {
+ if (i < elements.size ()
+ && elements[i]->get_property ("break-align-symbol") == scm_car (s))
+ {
+ last_idx_found = i;
+ i ++;
+ }
+
+ if (scm_car (s) == my_align)
+ break ;
+ }
+
+ Direction which_edge = LEFT;
+ if (vsize (last_idx_found + 1) < elements.size())
+ last_idx_found ++;
+ else
+ which_edge = RIGHT;
+
+ Grob *common = me->common_refpoint (elements[last_idx_found], X_AXIS);
+
+ return scm_from_double (robust_relative_extent (elements[last_idx_found], common, X_AXIS)[which_edge]
+ - me->relative_coordinate (common, X_AXIS));
+}
+
+ADD_INTERFACE (Break_alignable_interface,
+ "Object that is aligned on a break aligment. ",
+
+ /* properties */
+ "break-align-symbol "
+ )
+
+
+
+ADD_INTERFACE (Break_aligned_interface,
+ "Items that are aligned in prefatory matter.\n"
+ "\n"
+ "The spacing of these items is controlled by the @code{space-alist}\n"
+ "property. It contains a list @code{break-align-symbol}s with a specification\n"
+ "of the associated space. The space specification can be "
+ "@table @code\n"
+ "@item (minimum-space . @var{spc}))\n"
+ " Pad space until the distance is @var{spc}\n"
+ "@item (fixed-space . @var{spc})\n"
+ " Set a fixed space\n"
+ "@item (semi-fixed-space . @var{spc})\n"
+ " Set a space. Half of it is fixed and half is stretchable. \n"
+ "(does not work at start of line. fixme)\n"
+ "@item (extra-space . @var{spc})\n"
+ " Add @var{spc} amount of space.\n"
+ "@end table\n"
+ "\n"
+ "Special keys for the alist are @code{first-note} and @code{next-note}, signifying\n"
+ "the first note on a line, and the next note halfway a line.\n"
+ "\n"
+ "Rules for this spacing are much more complicated than this. \n"
+ "See [Wanske] page 126 -- 134, [Ross] pg 143 -- 147\n",
+
+ /* properties */
+ "break-align-symbol "
+ "space-alist "
+ );
+
+ADD_INTERFACE (Break_alignment_interface,
+ "The object that performs break aligment. See @ref{break-aligned-interface}.",
+
+ /* properties */
+ "positioning-done "
+ "break-align-orders");
#include <cstdlib>
using namespace std;
-#include "grob-array.hh"
#include "item.hh"
#include "system.hh"
+#include "grob-array.hh"
static SCM break_criterion;
void
#include "direction.hh"
#include "text-interface.hh"
#include "font-interface.hh"
+#include "grob.hh"
/*
TODO: thickness should be a grob property (unit: linethickness)
return scm_from_double (inter * sz * d);
}
-ADD_INTERFACE (Breathing_sign, "breathing-sign-interface",
+ADD_INTERFACE (Breathing_sign,
"A breathing sign.",
"direction "
return SCM_UNSPECIFIED;
}
-ADD_INTERFACE (Chord_name, "chord-name-interface",
+ADD_INTERFACE (Chord_name,
"A chord name.",
#include <cctype>
using namespace std;
+#include "item.hh"
#include "context.hh"
#include "bar-line.hh"
#include "staff-symbol-referencer.hh"
#include "font-interface.hh"
#include "international.hh"
#include "item.hh"
-#include "std-string.hh"
#include "stencil.hh"
MAKE_SCHEME_CALLBACK (Clef, calc_glyph_name, 1);
return out.smobbed_copy ();
}
-ADD_INTERFACE (Clef, "clef-interface",
+ADD_INTERFACE (Clef,
"A clef sign",
/* properties */
#include "pointer-group-interface.hh"
#include "pitch.hh"
#include "stream-event.hh"
+#include "item.hh"
#include "translator.icc"
return out.smobbed_copy ();
}
-ADD_INTERFACE (Cluster, "cluster-interface",
+ADD_INTERFACE (Cluster,
"A graphically drawn musical cluster. "
"\n\n"
"@code{padding} adds to the vertical extent of the shape (top and "
{
public:
DECLARE_SCHEME_CALLBACK (height, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
MAKE_SCHEME_CALLBACK (Cluster_beacon, height, 1);
}
ADD_INTERFACE (Cluster_beacon,
- "cluster-beacon-interface",
"A place holder for the cluster spanner to determine the vertical "
"extents of a cluster spanner at this X position.",
#include "note-column.hh"
#include "note-collision.hh"
#include "axis-group-interface.hh"
+#include "item.hh"
class Collision_engraver : public Engraver
{
Output_def *l = pscore_->layout ();
System *sys = pscore_->root_system ();
- Real padding = robust_scm2double (l->c_variable ("between-system-padding"), 0);
+ Real padding = robust_scm2double (l->c_variable ("page-breaking-between-system-padding"), 0);
Real space = robust_scm2double (l->c_variable ("ideal-system-space"), 0);
Interval first_line = line_dimensions_int (pscore_->layout (), 0);
#include "international.hh"
#include "item.hh"
#include "main.hh"
-#include "paper-column.hh"
#include "simple-closure.hh"
#include "spanner.hh"
#include "warn.hh"
#include "music-wrapper-iterator.hh"
#include "context.hh"
+#include "music.hh"
+
class Context_specced_music_iterator : public Music_wrapper_iterator
{
return stencil.smobbed_copy ();
}
-ADD_INTERFACE (Custos, "custos-interface",
+ADD_INTERFACE (Custos,
"A custos object.",
"style "
"neutral-position "
#include "dimension-cache.hh"
+
#include "warn.hh"
#include "grob.hh"
#include "directional-element-interface.hh"
#include "warn.hh"
+#include "grob.hh"
Direction
get_grob_direction (Grob *me)
#include "input.hh"
#include "international.hh"
#include "ly-smobs.icc"
-#include "stream-event.hh"
#include "warn.hh"
IMPLEMENT_SMOBS (Dispatcher);
#include "side-position-interface.hh"
#include "engraver.hh"
#include "translator.icc"
+#include "item.hh"
class Dot_column_engraver : public Engraver
{
#include "side-position-interface.hh"
#include "axis-group-interface.hh"
#include "stem.hh"
+#include "grob.hh"
#include "pointer-group-interface.hh"
/*
}
ADD_INTERFACE (Dot_column,
- "dot-column-interface",
"Groups dot objects so they form a column, and position dots so they do not "
"clash with staff lines ",
return mol.smobbed_copy ();
}
-ADD_INTERFACE (Dots, "dots-interface",
+ADD_INTERFACE (Dots,
"The dots to go with a notehead or rest."
"@code{direction} sets the preferred direction to move in case of staff "
"line collisions.",
#include <cctype>
using namespace std;
+#include "item.hh"
#include "duration.hh"
#include "engraver.hh"
#include "note-column.hh"
#include "audio-item.hh"
#include "audio-column.hh"
#include "global-context.hh"
-#include "pitch.hh"
#include "stream-event.hh"
#include "translator.icc"
#include "warn.hh"
#include "staff-symbol-referencer.hh"
#include "stream-event.hh"
#include "warn.hh"
+#include "spanner.hh"
#include "translator.icc"
TRANSLATOR_DECLARATIONS (Dynamic_engraver);
DECLARE_ACKNOWLEDGER (accidental);
- DECLARE_ACKNOWLEDGER (script);
DECLARE_ACKNOWLEDGER (stem_tremolo);
DECLARE_ACKNOWLEDGER (note_column);
DECLARE_ACKNOWLEDGER (slur);
finished_cresc_->set_bound (RIGHT, info.grob ());
}
-void
-Dynamic_engraver::acknowledge_script (Grob_info info)
-{
- if (!line_spanner_ || !script_)
- return;
-
- SCM p = info.grob ()->get_property ("script-priority");
-
- /*
- UGH.
-
- DynamicText doesn't really have a script-priority field.
- */
- if (scm_is_number (p)
- && scm_to_int (p)
- < scm_to_int (script_->get_property ("script-priority")))
- Side_position_interface::add_support (line_spanner_, info.grob ());
-}
-
ADD_ACKNOWLEDGER (Dynamic_engraver, accidental);
-ADD_ACKNOWLEDGER (Dynamic_engraver, script);
ADD_ACKNOWLEDGER (Dynamic_engraver, note_column);
ADD_ACKNOWLEDGER (Dynamic_engraver, slur);
ADD_ACKNOWLEDGER (Dynamic_engraver, stem_tremolo);
{
public:
DECLARE_SCHEME_CALLBACK (print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
/*
}
ADD_INTERFACE (Dynamic_text_spanner,
- "dynamic-text-spanner-interface",
"A text spanner for crescendo texts",
"bound-padding "
#include "grob.hh"
#include "music.hh"
#include "output-def.hh"
-#include "pitch.hh"
#include "staff-symbol-referencer.hh"
#include "stem.hh"
#include "stream-event.hh"
struct Enclosing_bracket
{
- static bool has_interface (Grob*);
+ DECLARE_GROB_INTERFACE();
public:
DECLARE_SCHEME_CALLBACK(print, (SCM));
ADD_INTERFACE(Enclosing_bracket,
- "enclosing-bracket-interface",
"Brackets alongside bass figures.",
#include "engraver-group.hh"
#include "grob.hh"
#include "paper-score.hh"
-#include "stream-event.hh"
#include "translator-dispatch-list.hh"
#include "warn.hh"
#include "context.hh"
#include "international.hh"
-#include "item.hh"
#include "lilypond-key.hh"
#include "music.hh"
#include "paper-column.hh"
#include "input.hh"
#include "international.hh"
#include "music.hh"
-#include "pitch.hh"
-#include "stream-event.hh"
#include "warn.hh"
Event_chord_iterator::Event_chord_iterator ()
#include "input.hh"
#include "international.hh"
#include "music.hh"
-#include "pitch.hh"
#include "warn.hh"
Event_iterator::Event_iterator ()
#include "pointer-group-interface.hh"
#include "stream-event.hh"
#include "warn.hh"
+#include "spanner.hh"
#include "translator.icc"
*/
#include "line-interface.hh"
-#include "lily-guile.hh"
#include "spanner.hh"
#include "output-def.hh"
#include "item.hh"
struct Figured_bass_continuation
{
- static bool has_interface (Grob*);
+ DECLARE_GROB_INTERFACE();
public:
DECLARE_SCHEME_CALLBACK(print, (SCM));
}
ADD_INTERFACE(Figured_bass_continuation,
- "figured-bass-continuation-interface",
"Simple extender line between bounds.",
/* props */
#include "context.hh"
#include "spanner.hh"
+#include "item.hh"
#include "side-position-interface.hh"
#include "translator.icc"
#include "axis-group-interface.hh"
#include "side-position-interface.hh"
#include "stem.hh"
#include "stream-event.hh"
+#include "item.hh"
#include "translator.icc"
return g->get_property_alist_chain (defaults);
}
-ADD_INTERFACE (Font_interface, "font-interface",
+ADD_INTERFACE (Font_interface,
"Any symbol that is typeset through fixed sets of glyphs, "
" (ie. fonts)",
(c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
+#include "font-metric.hh"
+
#include "warn.hh"
#include "stencil.hh"
-#include "font-metric.hh"
#include "modified-font-metric.hh"
LY_DEFINE (ly_font_get_glyph, "ly:font-get-glyph",
#include "modified-font-metric.hh"
#include "open-type-font.hh"
#include "stencil.hh"
-#include "virtual-methods.hh"
#include "warn.hh"
#include "ly-smobs.icc"
#include "engraver.hh"
#include "grob.hh"
#include "input.hh"
-#include "moment.hh"
#include "pitch.hh"
#include "rhythmic-head.hh"
#include "international.hh"
#include "libc-extension.hh"
#include "lily-guile.hh"
-#include "std-string.hh"
#include "misc.hh"
#include "warn.hh"
#include "version.hh"
LY_DEFINE (ly_camel_case_to_lisp_identifier, "ly:camel-case->lisp-identifier",
1, 0, 0, (SCM name_sym),
- "Convert FooBar to foo-bar style symbol.")
+ "Convert FooBar_Bla to foo-bar-bla style symbol.")
{
SCM_ASSERT_TYPE(scm_is_symbol (name_sym), name_sym,
SCM_ARG1, __FUNCTION__, "symbol");
*/
const string in = ly_symbol2string (name_sym);
-
- vector<char> out;
-
- /* don't add '-' before first character */
- out.push_back (tolower (in[0]));
-
- for (size_t inpos = 1; inpos < in.size (); inpos++)
- {
- if (isupper (in[inpos]))
- out.push_back ('-');
- out.push_back (tolower (in[inpos]));
- }
+ string result = camel_case_to_lisp_identifier (in);
- string result (&out[0], out.size ());
return ly_symbol2scm (result.c_str ());
}
{
if (last_line_ && last_line_->get_bound (RIGHT))
last_line_ = 0;
+
if (line_)
{
if (last_line_)
#include "music-iterator.hh"
#include "music.hh"
#include "output-def.hh"
-#include "stream-event.hh"
#include "warn.hh"
Global_context::Global_context (Output_def *o, Object_key *key)
#include "music.hh"
#include "music-wrapper.hh"
-#include "moment.hh"
class Grace_music
{
subclass like VaticanaLigatureEngraver. The property is lateron
read by the associated item class, such as VaticanaLigature.--jr
*/
-ADD_INTERFACE (Gregorian_ligature, "gregorian-ligature-interface",
+ADD_INTERFACE (Gregorian_ligature,
"A gregorian ligature",
"virga stropha inclinatum auctum descendens ascendens "
"oriscus quilisma deminutum cavum linea pes-or-flexa "
#include "pointer-group-interface.hh"
#include "lookup.hh"
#include "output-def.hh"
-#include "stencil.hh"
MAKE_SCHEME_CALLBACK (Grid_line_interface, print, 1);
SCM
Pointer_group_interface::add_grob (me, ly_symbol2scm ("elements"), b);
}
-ADD_INTERFACE (Grid_line_interface, "grid-line-interface",
+ADD_INTERFACE (Grid_line_interface,
"A line that spanned between grid-points. ",
"elements thickness");
-ADD_INTERFACE (Grid_point_interface, "grid-point-interface",
+ADD_INTERFACE (Grid_point_interface,
"A spanning point for grid lines. ",
"");
#include "context.hh"
#include "grob-info.hh"
-#include "grob.hh"
#include "item.hh"
#include "music.hh"
#include "spanner.hh"
#include "grob.hh"
#include "international.hh"
#include "protected-scm.hh"
-#include "std-string.hh"
+#include "string-convert.hh"
#include "warn.hh"
+#include "misc.hh"
-void add_interface (char const *symbol,
+SCM add_interface (char const *cxx_name,
char const *descr,
char const *vars)
{
- SCM s = ly_symbol2scm (symbol);
+ string suffix ("-interface");
+ string lispy_name = camel_case_to_lisp_identifier (cxx_name);
+ vsize end = max (int (0), int (lispy_name.length () - suffix.length ()));
+ if (lispy_name.substr (end) != suffix)
+ lispy_name += suffix;
+
+ SCM s = ly_symbol2scm (lispy_name.c_str ());
SCM d = scm_makfrom0str (descr);
SCM l = parse_symbol_list (vars);
ly_add_interface (s, d, l);
+
+ return s;
}
void
Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
-#include "grob.hh"
-
#include "warn.hh" // error()
#include "item.hh"
#include "output-def.hh"
#include "system.hh"
#include "font-interface.hh"
#include "paper-score.hh"
-
+#include "grob-array.hh"
LY_DEFINE (ly_grob_property_data, "ly:grob-property-data",
2, 0, 0, (SCM grob, SCM sym),
it probably means that the Alignment was fixed and it has already been
calculated.
*/
- Grob *p = get_parent (Y_AXIS);
- Real trans = 0;
- if (Align_interface::has_interface (p) && !dim_cache_[Y_AXIS].offset_)
- trans = Align_interface::get_pure_child_y_translation (p, this, start, end);
+ if (Grob *p = get_parent (Y_AXIS))
+ {
+ Real trans = 0;
+ if (Align_interface::has_interface (p) && !dim_cache_[Y_AXIS].offset_)
+ trans = Align_interface::get_pure_child_y_translation (p, this, start, end);
- return off + trans
- + dim_cache_[Y_AXIS].parent_->pure_relative_y_coordinate (refp, start, end);
+ return off + trans + p->pure_relative_y_coordinate (refp, start, end);
+ }
+ return off;
}
/* Invoke callbacks to get offset relative to parent. */
}
-ADD_INTERFACE (Grob, "grob-interface",
+ADD_INTERFACE (Grob,
"A grob represents a piece of music notation\n"
"\n"
"All grobs have an X and Y-position on the page. These X and Y positions\n"
"meta "
"minimum-X-extent "
"minimum-Y-extent "
+ "outside-staff-horizontal-padding "
+ "outside-staff-padding "
"outside-staff-priority "
"rotation "
"springs-and-rods "
return mol.smobbed_copy ();
}
-ADD_INTERFACE (Hairpin, "hairpin-interface",
+ADD_INTERFACE (Hairpin,
"A hairpin crescendo/decrescendo.",
/* props */
#include "axis-group-interface.hh"
#include "spanner.hh"
#include "warn.hh"
-#include "item.hh"
MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner, y_extent, 1);
SCM
Pointer_group_interface::add_unordered_grob (me, ly_symbol2scm ("items-worth-living"), n);
}
-ADD_INTERFACE (Hara_kiri_group_spanner, "hara-kiri-group-interface",
+ADD_INTERFACE (Hara_kiri_group_spanner,
"A group spanner that keeps track of interesting items. If it "
"doesn't contain any after linebreaking, then it "
"will remove itself and all its children.",
#include "pointer-group-interface.hh"
#include "side-position-interface.hh"
#include "stream-event.hh"
+#include "spanner.hh"
+#include "item.hh"
#include "translator.icc"
#include "staff-symbol-referencer.hh"
#include "tuplet-bracket.hh"
#include "axis-group-interface.hh"
+#include "spanner.hh"
+#include "item.hh"
Stencil
}
ADD_INTERFACE (Horizontal_bracket,
-
- "horizontal-bracket-interface",
"A horizontal bracket encompassing notes.",
/* props */
#include "std-vector.hh"
#include "box.hh"
-#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
class Accidental_interface
{
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static string get_fontcharname (string style, int alteration);
static vector<Box> accurate_boxes (Grob *me,
Grob **common);
#ifndef ACCIDENTAL_PLACEMENT_HH
#define ACCIDENTAL_PLACEMENT_HH
-#include "grob.hh"
+#include "grob-interface.hh"
+#include "lily-proto.hh"
class Accidental_placement
{
DECLARE_SCHEME_CALLBACK (alignment_callback, (SCM element));
static void add_accidental (Grob *, Grob *);
+ static vector<Grob*> get_break_reminder_accidentals (vector<Grob*> const &elts,
+ Grob *left);
static Interval get_relevant_accidental_extent (Grob *me,
Item *item_col,
Grob *acc);
vector<Grob*> *real_acc);
DECLARE_SCHEME_CALLBACK(calc_positioning_done, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif /* ACCIDENTAL_PLACEMENT_HH */
#define ALIGN_INTERFACE_HH
#include "lily-proto.hh"
-#include "lily-guile.hh"
#include "std-vector.hh"
+#include "grob-interface.hh"
struct Align_interface
{
static void add_element (Grob *, Grob *);
static int get_count (Grob *, Grob *);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static Real get_pure_child_y_translation (Grob *, Grob *child, int start, int end);
};
#include <pango/pangoft2.h>
#endif
-/**
+
+/*
Interface to all .afm files living in the filesystem.
*/
class All_font_metrics
int pango_dpi_;
#endif
+ map<string, Index_to_charcode_map > filename_charcode_maps_map_;
+
All_font_metrics (All_font_metrics const &);
public:
+
+ Index_to_charcode_map const *get_index_to_charcode_map (string filename, FT_Face face);
+
All_font_metrics (string search_path);
~All_font_metrics ();
};
extern All_font_metrics *all_fonts_global;
+SCM ly_reset_all_fonts ();
#endif /* ALL_FONTS_HH */
#ifndef AMBITUS_HH
#define AMBITUS_HH
-#include "lily-guile.hh"
-
-class Grob;
+#include "lily-proto.hh"
+#include "grob-interface.hh"
struct Ambitus
{
DECLARE_SCHEME_CALLBACK (print, (SCM smob));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static Slice get_positions (Grob *);
static Interval head_width (Grob *me, Grob *common);
};
#ifndef ARPEGGIO_HH
#define ARPEGGIO_HH
-#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
+
class Arpeggio
{
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (brew_chord_bracket, (SCM));
DECLARE_SCHEME_CALLBACK (width, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif /* ARPEGGIO_HH */
void add_audio_item (Audio_item *l);
void output (Midi_stream &midi_stream_r, int track_i);
+ Audio_staff ();
+
vector<Audio_item*> audio_items_;
int channel_;
};
#include "std-vector.hh"
#include "lily-proto.hh"
-#include "lily-guile.hh"
+#include "grob-interface.hh"
+#include "skyline.hh"
-/**
- */
struct Axis_group_interface
{
static SCM generic_group_extent (Grob *me, Axis a);
DECLARE_SCHEME_CALLBACK (width, (SCM smob));
DECLARE_SCHEME_CALLBACK (height, (SCM smob));
DECLARE_SCHEME_CALLBACK (pure_height, (SCM smob, SCM start, SCM end));
+ DECLARE_SCHEME_CALLBACK (calc_skylines, (SCM smob));
+ DECLARE_SCHEME_CALLBACK (combine_skylines, (SCM smob));
static Interval relative_group_extent (vector<Grob*> const &list,
Grob *common, Axis);
static Interval relative_pure_height (Grob *me, vector<Grob*> const &list,
static Interval cached_pure_height (Grob *me, vector<Grob*> const &list,
Grob *common, int, int);
- static void skyline_spacing (Grob *me, vector<Grob*> elements);
+ static Skyline_pair skyline_spacing (Grob *me, vector<Grob*> elements);
static void add_element (Grob *me, Grob *);
static void set_axes (Grob *, Axis, Axis);
static bool has_axis (Grob *, Axis);
static void get_children (Grob *, vector<Grob*> *);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif /* AXIS_GROUP_INTERFACE_HH */
#ifndef BAR_HH
#define BAR_HH
-#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
-/**
- A vertical bar.
-*/
class Bar_line
{
public:
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static Stencil dashed_bar_line (Grob *me, Real h, Real thick);
static Stencil compound_barline (Grob *, string, Real height, bool rounded);
#ifndef BAR_HH
#define BAR_HH
-#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
/**
A vertical bar.
class Bar
{
public:
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static Stencil compound_barline (Grob *, string, Real height);
static Stencil simple_barline (Grob *, Real wid, Real height);
#ifndef BEAM_HH
#define BEAM_HH
+#include "grob-interface.hh"
#include "std-vector.hh"
#include "lily-proto.hh"
-#include "lily-guile.hh"
#include "stem-info.hh"
/*
static int visible_stem_count (Grob *);
static Grob *first_visible_stem (Grob *);
static Grob *last_visible_stem (Grob *);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static void add_stem (Grob *, Grob *);
static bool is_knee (Grob *);
static void set_beaming (Grob *, Beaming_pattern const *);
#ifndef BOOK_HH
#define BOOK_HH
-#include "input.hh"
#include "lily-proto.hh"
#include "std-vector.hh"
#include "object-key.hh"
#include "std-string.hh"
+#include "virtual-methods.hh"
class Book
{
/*
- break-align-interface.hh -- declare Break_align_interface
+ break-align-interface.hh -- declare Break_alignment_interface
source file of the GNU LilyPond music typesetter
#ifndef BREAK_ALIGN_INTERFACE_HH
#define BREAK_ALIGN_INTERFACE_HH
-#include "item.hh"
+#include "grob-interface.hh"
+#include "lily-proto.hh"
-class Break_align_interface
+class Break_alignment_interface
{
public:
static vector<Grob*> ordered_elements (Grob *me);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static void add_element (Grob *me, Grob *add);
static SCM break_align_order (Item *me);
DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM element));
struct Break_aligned_interface
{
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
-struct Break_alignment_align_interface
+struct Break_alignable_interface
{
DECLARE_SCHEME_CALLBACK (self_align_callback, (SCM element));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif // BREAK_ALIGN_INTERFACE_HH
#ifndef BREATHING_SIGN_HH
#define BREATHING_SIGN_HH
-#include "lily-guile.hh"
+#include "grob-interface.hh"
+#include "lily-proto.hh"
class Grob;
DECLARE_SCHEME_CALLBACK (finalis, (SCM));
DECLARE_SCHEME_CALLBACK (offset_callback, (SCM element));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif // BREATHING_SIGN_HH
#define CHORD_NAME_HH
#include "stencil.hh"
+#include "grob-interface.hh"
class Chord_name
{
public:
DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif // CHORD_NAME_HH
#ifndef CLEF_HH
#define CLEF_HH
-#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
struct Clef
{
DECLARE_SCHEME_CALLBACK (calc_glyph_name, (SCM));
DECLARE_SCHEME_CALLBACK (print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif /* CLEF_HH */
#define CLUSTER_HH
#include "stencil.hh"
+#include "grob-interface.hh"
class Cluster
{
public:
DECLARE_SCHEME_CALLBACK (print, (SCM));
- // DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
- static bool has_interface (Grob *);
- // DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM ));
+ DECLARE_GROB_INTERFACE();
};
#endif // CLUSTER_HH
#include "lily-proto.hh"
#include "smobs.hh"
#include "input.hh"
+#include "virtual-methods.hh"
+
/*
The definition of a interpretation context as given in the
#define CONTEXT_HH
#include "context-key-manager.hh"
-#include "lily-proto.hh"
#include "listener.hh"
#include "moment.hh"
#include "std-vector.hh"
#ifndef CUSTOS_HH
#define CUSTOS_HH
-#include "lily-guile.hh"
-
-class Grob;
-class Stencil;
+#include "lily-proto.hh"
+#include "grob-interface.hh"
struct Custos
{
DECLARE_SCHEME_CALLBACK (print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
private:
static void add_streepjes (Grob *me, int pos, int interspaces, Stencil *custos_);
#ifndef DIRECTIONAL_ELEMENT_HH
#define DIRECTIONAL_ELEMENT_HH
-#include "grob.hh"
+#include "lily-proto.hh"
+#include "direction.hh"
// what is the advantage not having these two as STATICs of GROB -- jcn
void set_grob_direction (Grob *, Direction);
#ifndef DOT_COLUMN_HH
#define DOT_COLUMN_HH
-#include "lily-guile.hh"
+#include "lily-proto.hh"
+#include "grob-interface.hh"
+
class Grob;
static int compare (Grob *const &, Grob *const &);
static void add_head (Grob *dotcol, Grob *rh);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK (side_position, (SCM));
DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM));
};
#define DOTS_HH
#include "lily-proto.hh"
-#include "lily-guile.hh"
+#include "grob-interface.hh"
class Dots
{
public:
DECLARE_SCHEME_CALLBACK (print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif // DOTS_HH
#define FONT_INTERFACE_HH
#include "font-metric.hh"
+#include "grob-interface.hh"
struct Font_interface
{
static SCM text_font_alist_chain (Grob *);
static SCM music_font_alist_chain (Grob *);
static Font_metric *get_default_font (Grob *);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif /* FONT_INTERFACE_HH */
#include "lily-proto.hh"
#include "smobs.hh"
#include "virtual-methods.hh"
+#include "freetype.hh"
+
+#include <map>
+using namespace std;
+
+typedef map<FT_UInt, FT_ULong> Index_to_charcode_map;
class Font_metric
{
class Grob;
#include "std-string.hh"
+#include "grob-interface.hh"
+
class Gregorian_ligature
{
public:
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static string prefixes_to_str (Grob *);
};
#define GRID_LINE_INTERFACE_HH
#include "lily-proto.hh"
-#include "lily-guile.hh"
+#include "grob-interface.hh"
+
class Grid_line_interface
{
static void add_grid_point (Grob *me, Grob *b);
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (width, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
class Grid_point_interface
{
public:
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif /* GRID_LINE_INTERFACE_HH */
#include "lily-guile.hh"
-#define ADD_INTERFACE(cl, a, b, c) \
+#define DECLARE_GROB_INTERFACE() \
+ static SCM interface_symbol_; \
+ static bool has_interface (Grob*)
+
+#define ADD_INTERFACE(cl, b, c) \
+ SCM cl::interface_symbol_; \
bool cl::has_interface (Grob *me) \
{ \
- return me->internal_has_interface (ly_symbol2scm (a)); \
+ return me->internal_has_interface (interface_symbol_); \
} \
void cl ## _init_ifaces () \
{ \
- add_interface (a, b, c); \
+ cl::interface_symbol_ = add_interface (#cl, b, c); \
} \
ADD_SCM_INIT_FUNC (cl ## ifaces, cl ## _init_ifaces);
-void add_interface (char const *symbol,
+SCM add_interface (char const *cxx_name,
char const *descr,
char const *vars);
/* interfaces */
bool internal_has_interface (SCM intf);
- static bool has_interface (Grob *me);
+ DECLARE_GROB_INTERFACE();
/* offsets */
void translate_axis (Real, Axis);
#ifndef HAIRPIN_HH
#define HAIRPIN_HH
-#include "lily-guile.hh"
+#include "grob-interface.hh"
#include "lily-proto.hh"
-/**
- The hairpin symbol.
-*/
+
struct Hairpin
{
public:
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
static void consider_suicide (Spanner*);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif // HAIRPIN_HH
#ifndef HARA_KIRI_VERTICAL_GROUP_SPANNER_HH
#define HARA_KIRI_VERTICAL_GROUP_SPANNER_HH
-#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
class Hara_kiri_group_spanner
{
DECLARE_SCHEME_CALLBACK (pure_height, (SCM smob, SCM start, SCM end));
DECLARE_SCHEME_CALLBACK (force_hara_kiri_in_y_parent_callback, (SCM));
DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static bool request_suicide (Grob *me, int start, int end);
static void consider_suicide (Grob *me);
static void add_interesting_item (Grob *me, Grob *n);
#ifndef HORIZONTAL_BRACKET_HH
#define HORIZONTAL_BRACKET_HH
-#include "lily-guile.hh"
#include "lily-proto.hh"
#include "std-vector.hh"
+#include "grob-interface.hh"
struct Horizontal_bracket
{
static Stencil make_enclosing_bracket (Grob *me, Grob *refpoint,
vector<Grob*> grobs,
Axis a, Direction dir);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif /* HORIZONTAL_BRACKET_HH */
#define INPUT_HH
#include "flower-proto.hh"
-#include "std-string.hh"
/**
Base class for anything that records its poisition in the parse file.
};
-
-#include "input.hh"
#include "smobs.hh"
SCM make_input (Input spot);
#ifndef ITEM_HH
#define ITEM_HH
-#include "box.hh"
#include "grob.hh"
/**
virtual Paper_column *get_column () const;
virtual void handle_prebroken_dependencies ();
virtual Interval_t<int> spanned_rank_iv ();
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
protected:
virtual void discretionary_processing ();
void copy_breakable_items ();
Offset robust_scm2offset (SCM, Offset);
string robust_scm2string (SCM, string);
+
SCM ly_quote_scm (SCM s);
bool type_check_assignment (SCM val, SCM sym, SCM type_symbol);
string print_scm_val (SCM val);
/*
display and print newline.
*/
-void ly_display_scm (void *s);
+extern "C" {
+ void ly_display_scm (SCM s);
+}
void read_lily_scm_file (string);
void ly_c_init_guile ();
}
+SCM ly_offsets2scm (vector<Offset> os);
+vector<Offset> ly_scm2offsets (SCM s);
+
#endif /* LILY_GUILE_HH */
void start_main_input ();
+ SCM keyword_list () const;
SCM lookup_identifier (string s);
SCM lookup_identifier_symbol (SCM s);
void push_extra_token (int token_type);
#include "duration.hh"
#include "input.hh"
-#include "std-vector.hh"
#include "pitch.hh"
/**
class Skyline_entry;
class Slur_configuration;
class Slur_score_state;
+class Spacing_options;
class Span_score_bar_engraver;
class Spanner;
class Staff_group_bar_engraver;
+++ /dev/null
-/*
- lilypond-version.hh -- declare LilyPond_version
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1998--2006 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#ifndef LILYPOND_VERSION_HH
-#define LILYPOND_VERSION_HH
-
-#include "std-string.hh"
-
-struct Lilypond_version
-{
- Lilypond_version (int major, int minor, int patch);
- Lilypond_version (string str);
-
- string to_string () const;
- operator int () const;
-
- int major_;
- int minor_;
- int patch_;
- string extra_patch_string_;
-};
-
-extern Lilypond_version oldest_version;
-
-#endif // LILYPOND_VERSION_HH
--- /dev/null
+/*
+ lilypond-version.hh -- declare LilyPond_version
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1998--2006 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+#ifndef LILYPOND_VERSION_HH
+#define LILYPOND_VERSION_HH
+
+#include "std-string.hh"
+
+struct Lilypond_version
+{
+ Lilypond_version (int major, int minor, int patch);
+ Lilypond_version (string str);
+
+ string to_string () const;
+ operator int () const;
+
+ int major_;
+ int minor_;
+ int patch_;
+ string extra_patch_string_;
+};
+
+extern Lilypond_version oldest_version;
+
+#endif // LILYPOND_VERSION_HH
#define LINE_INTERFACE_HH
#include "lily-proto.hh"
+#include "grob-interface.hh"
struct Line_interface
{
static Stencil line (Grob *me, Offset from, Offset to);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static Stencil make_dashed_line (Real th, Offset from, Offset to, Real, Real);
static Stencil make_line (Real th, Offset from, Offset to);
static Stencil make_arrow (Offset beg, Offset end, Real thick,
#ifndef LINE_SPANNER_HH
#define LINE_SPANNER_HH
-#include "lily-guile.hh"
-
-class Grob;
-class Stencil;
+#include "lily-proto.hh"
+#include "grob-interface.hh"
class Line_spanner
{
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
static Stencil line_stencil (Grob *me, Offset f, Offset t);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
private:
static Offset get_broken_offset (Grob *me, Direction dir);
#ifndef EXTENDER_SPANNER_HH
#define EXTENDER_SPANNER_HH
-#include "spanner.hh"
+#include "grob-interface.hh"
+#include "lily-proto.hh"
/*
Extenders must be entered manually for now.
class Lyric_extender
{
public:
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK (print, (SCM));
};
#ifndef HYPHEN_SPANNER_HH
#define HYPHEN_SPANNER_HH
-#include "spanner.hh"
+#include "grob-interface.hh"
+#include "lily-proto.hh"
-struct Hyphen_spanner
+struct Lyric_hyphen
{
public:
DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM));
- bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK (print, (SCM));
};
#ifndef MEASURE_GROUPING_SPANNER_HH
#define MEASURE_GROUPING_SPANNER_HH
-#include "grob.hh"
+#include "grob-interface.hh"
+#include "lily-proto.hh"
+
class Measure_grouping
{
public:
DECLARE_SCHEME_CALLBACK (print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif /* MEASURE_GROUPING_SPANNER_HH */
#ifndef MELODY_SPANNER_HH
#define MELODY_SPANNER_HH
-#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
class Melody_spanner
{
public:
- static bool has_interface (Grob*);
+ DECLARE_GROB_INTERFACE();
static void add_stem (Grob*, Grob*);
DECLARE_SCHEME_CALLBACK(calc_neutral_stem_direction, (SCM));
};
#define MENSURAL_LIGATURE_HH
#include "lily-proto.hh"
-#include "lily-guile.hh"
+#include "grob-interface.hh"
+
/*
* These are all possible mensural ligature primitives.
{
DECLARE_SCHEME_CALLBACK (brew_ligature_primitive, (SCM));
DECLARE_SCHEME_CALLBACK (print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif /* MENSURAL_LIGATURE_HH */
Real directed_round (Real f, Direction d);
Real peak_around (Real epsilon, Real threshold, Real x);
+string camel_case_to_lisp_identifier (string in);
+
#endif
#ifndef MULTI_MEASURE_REST_HH
#define MULTI_MEASURE_REST_HH
-#include "lily-guile.hh"
+#include "grob-interface.hh"
#include "rod.hh"
class Multi_measure_rest
{
public:
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (percent, (SCM));
static void add_column (Grob *, Item *);
#include "lily-guile.hh"
SCM ly_make_music_function (SCM, SCM);
+SCM make_music_function (SCM, SCM);
+
SCM get_music_function_transform (SCM);
bool is_music_function (SCM);
#ifndef MUSIC_SEQUENCE_HH
#define MUSIC_SEQUENCE_HH
-#include "music.hh"
+#include "pitch.hh"
+#include "moment.hh"
+#include "lily-guile.hh"
struct Music_sequence
{
#ifndef MUSIC_WRAPPER_ITERATOR_HH
#define MUSIC_WRAPPER_ITERATOR_HH
-#include "music.hh"
#include "music-iterator.hh"
/**
#ifndef MUSIC_HH
#define MUSIC_HH
-#include "virtual-methods.hh"
#include "smobs.hh"
#include "moment.hh"
#include "pitch.hh"
#ifndef COLLISION_HH
#define COLLISION_HH
-#include "lily-proto.hh"
-#include "lily-guile.hh"
#include "std-vector.hh"
+#include "grob-interface.hh"
+#include "lily-proto.hh"
+
/**
Resolve conflicts between various Note_columns (chords).
static Drul_array<vector<Grob*> > get_clash_groups (Grob *me);
DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM smob));
static void add_column (Grob *me, Grob *ncol);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif // COLLISION_HH
#ifndef NOTE_COLUMN_HH
#define NOTE_COLUMN_HH
-#include "item.hh"
+#include "grob-interface.hh"
+#include "lily-proto.hh"
+
/** a struct for treating a group of noteheads (noteheads, stem
(chord) and scripts) as a single entity.
static void set_dotcol (Grob *me, Grob *);
static void add_head (Grob *me, Grob *);
static bool has_rests (Grob *me);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static Item *get_stem (Grob *);
};
#define NOTEHEAD_HH
#include "stencil.hh"
+#include "grob-interface.hh"
/** ball at the end of the stem. Also takes care of ledger lines.
DECLARE_SCHEME_CALLBACK (brew_ez_stencil, (SCM));
DECLARE_SCHEME_CALLBACK (stem_x_shift, (SCM));
DECLARE_SCHEME_CALLBACK (calc_stem_attachment, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static Real stem_attachment_coordinate (Grob *, Axis a);
static int get_balltype (Grob *);
#ifndef NOTE_SPACING_HH
#define NOTE_SPACING_HH
+#include "grob-interface.hh"
#include "lily-proto.hh"
class Note_spacing
{
public:
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static void get_spacing (Grob *me, Item *, Real, Real, Real *, Real *);
static void stem_dir_correction (Grob *me, Item *next_col, Real incr,
#ifndef OPEN_TYPE_FONT_HH
#define OPEN_TYPE_FONT_HH
-#include <map>
-using namespace std;
-#include "freetype.hh"
#include "font-metric.hh"
-typedef map<FT_UInt, FT_ULong> Index_to_charcode_map;
Index_to_charcode_map make_index_to_charcode_map (FT_Face face);
void get_unicode_name (char*s, FT_ULong code);
void get_glyph_index_name (char*s, FT_ULong code);
string get_otf_table (FT_Face face, string tag);
FT_Face open_ft_face (string str);
+
#endif /* OPEN_TYPE_FONT_HH */
#ifndef MUSIC_OUTPUT_DEF_HH
#define MUSIC_OUTPUT_DEF_HH
-#include "std-string.hh"
#include "lily-proto.hh"
#include "virtual-methods.hh"
#include "smobs.hh"
#define PAGE_BREAKING_HH
#include "constrained-breaking.hh"
-#include "lily-guile.hh"
/* Either a paper-score, markup or header.
*/
#ifndef PAGE_TURN_PAGE_BREAKING_HH
#define PAGE_TURN_PAGE_BREAKING_HH
-#include "constrained-breaking.hh"
#include "page-breaking.hh"
-#include "lily-guile.hh"
/*
A dynamic programming solution to breaking pages
#include <pango/pango.h>
#include <pango/pangoft2.h>
-#include "font-metric.hh"
-#include "open-type-font.hh"
+#include "font-metric.hh"
class Pango_font : public Font_metric
{
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
- static bool has_interface (Grob *);
- static int get_rank (Grob *);
+ DECLARE_GROB_INTERFACE();
+ static int get_rank (Grob const *);
static bool is_musical (Grob *);
static Moment when_mom (Grob *);
static bool is_used (Grob *);
#ifndef PERCENT_REPEAT_ITEM_HH
#define PERCENT_REPEAT_ITEM_HH
-#include "grob.hh"
+#include "grob-interface.hh"
+#include "lily-proto.hh"
class Percent_repeat_item_interface
{
public:
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK (beat_slash, (SCM));
DECLARE_SCHEME_CALLBACK (double_percent, (SCM));
static Stencil x_percent (Grob *, int, Real, Real);
#define PROPERTY_OBJECT_HH
#include "stencil.hh"
+#include "virtual-methods.hh"
+
/*
A formatted "system" (A block of titling also is a Property_object)
#ifndef REST_COLLISION_HH
#define REST_COLLISION_HH
+#include "grob-interface.hh"
#include "lily-proto.hh"
-#include "lily-guile.hh"
class Rest_collision
{
public:
static void add_column (Grob *me, Grob *);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK (force_shift_callback, (SCM element));
DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM element));
DECLARE_SCHEME_CALLBACK (force_shift_callback_rest, (SCM element, SCM off));
#ifndef REST_HH
#define REST_HH
-#include "lily-guile.hh"
+#include "grob-interface.hh"
class Grob;
{
public:
DECLARE_SCHEME_CALLBACK (y_offset_callback, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static string glyph_name (Grob *, int, string, bool);
static SCM brew_internal_stencil (Grob*, bool);
static SCM generic_extent_callback (Grob*, Axis);
#ifndef RHYTHMIC_HEAD_HH
#define RHYTHMIC_HEAD_HH
-#include "lily-guile.hh"
+#include "grob-interface.hh"
#include "lily-proto.hh"
class Rhythmic_head
static Item *get_dots (Grob *);
static int dot_count (Grob *);
DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif // RHYTHMIC_HEAD_HH
Drul_array<Item *> item_drul_;
Real distance_;
- /**
- translate the rod so as to refer to Paper_columns
- */
void columnize ();
-
void add_to_cols ();
-
Rod ();
};
#include "std-vector.hh"
#include "smobs.hh"
#include "virtual-methods.hh"
-#include "std-string.hh"
class Score
{
#ifndef Script_COLUMN_HH
#define Script_COLUMN_HH
-#include "lily-guile.hh"
#include "lily-proto.hh"
-
+#include "grob-interface.hh"
#include "std-vector.hh"
class Script_column
static void add_side_positioned (Grob *, Grob *);
DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
DECLARE_SCHEME_CALLBACK (row_before_line_breaking, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static void order_grobs (vector<Grob*> grobs);
};
#ifndef SCRIPT_INTERFACE_HH
#define SCRIPT_INTERFACE_HH
-#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
/**
Articulation marks (and the like) that are attached to notes/stems.
{
public:
static Stencil get_stencil (Grob *, Direction d);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (calc_direction, (SCM));
};
#ifndef SELF_ALIGNMENT_INTERFACE_HH
#define SELF_ALIGNMENT_INTERFACE_HH
-#include "spanner.hh"
+#include "lily-proto.hh"
+#include "grob-interface.hh"
struct Self_alignment_interface
{
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static SCM aligned_on_self (Grob *me, Axis a);
static SCM centered_on_object (Grob *me, Axis a);
#include "grob-interface.hh"
#include "lily-proto.hh"
-#include "lily-guile.hh"
struct Semi_tie_column
{
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK(calc_positioning_done, (SCM));
};
#include "grob-interface.hh"
-#include "lily-guile.hh"
+#include "lily-proto.hh"
struct Semi_tie
{
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK (calc_direction, (SCM));
DECLARE_SCHEME_CALLBACK (calc_control_points, (SCM));
#ifndef SEPARATING_GROUP_SPANNER_HH
#define SEPARATING_GROUP_SPANNER_HH
-#include "spanner.hh"
+#include "grob-interface.hh"
+#include "lily-proto.hh"
class Separating_group_spanner
{
public:
static void add_spacing_unit (Grob *me, Item *);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM));
};
#include "lily-proto.hh"
#include "direction.hh"
+#include "grob-interface.hh"
+#include "skyline.hh"
struct Separation_item
{
- static bool has_interface (Grob *);
- static Interval conditional_width (Grob *, Grob *);
+ DECLARE_GROB_INTERFACE();
+ DECLARE_SCHEME_CALLBACK(calc_skylines, (SCM));
+
+ static vector<Box> boxes (Grob *me, Grob *left);
+ static Skyline conditional_skyline (Grob *, Grob *);
static Interval width (Grob *);
static Interval relative_width (Grob *, Grob *);
static Grob *extremal_break_aligned_grob (Grob *, Direction, Interval *);
+ static bool set_distance (Drul_array<Item *>, Real);
+ static void set_skyline_distance (Drul_array<Item*>, Real);
static void add_item (Grob *, Item *);
static void add_conditional_item (Grob *, Grob *);
};
#ifndef SIDE_POSITION_INTERFACE_HH
#define SIDE_POSITION_INTERFACE_HH
-#include "spanner.hh"
-#include "item.hh"
+#include "grob-interface.hh"
+#include "lily-proto.hh"
/*
TODO: move out unrelated callbacks.
bool pure, int start, int end, Real *current_off);
static Axis get_axis (Grob *);
static void set_axis (Grob *, Axis);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static void add_support (Grob *, Grob *);
static void add_staff_support (Grob *);
static Direction get_direction (Grob *);
#define SKYLINE_HH
#include <list>
+
#include "axis.hh"
#include "box.hh"
#include "interval.hh"
#include "direction.hh"
#include "std-vector.hh"
-#include "stencil.hh"
+#include "smobs.hh"
struct Building
{
Interval iv_;
- Real start_height_;
- Real end_height_;
- Real m_;
- Real b_;
+ Drul_array<Real> height_;
+
+ Real y_intercept_;
+ Real slope_;
- Building (Real start, Real start_height, Real end_height, Real end, Real max_slope);
+ void precompute ();
+ Building (Real start, Real start_height, Real end_height, Real end);
+ Building (Box const &b, Real horizon_padding, Axis a, Direction d);
+ void print () const;
Real height (Real x) const;
Real intersection (Building const &other) const;
- void leading_part (Real chop, Real h);
- bool obstructs (Building const &other) const;
+ void leading_part (Real chop);
+ bool conceals_beginning (Building const &other) const;
+ bool conceals (Building const &other) const;
+ bool sane () const;
+ Building sloped_neighbour (Real horizon_padding, Direction d) const;
};
class Skyline
private:
list<Building> buildings_;
Direction sky_;
- Real max_slope_;
+
void internal_merge_skyline (list<Building>*, list<Building>*,
list<Building> *const result);
- void internal_build_skyline (list<Building>*,
- list<Building> *const result);
+ void internal_build_skyline (list<Building>*, list<Building> *const result);
bool is_legal_skyline () const;
+ DECLARE_SIMPLE_SMOBS(Skyline);
public:
Skyline ();
+ Skyline (Skyline const &src);
Skyline (Direction sky);
- Skyline (vector<Box> const &bldgs, Axis a, Direction sky);
-
+ Skyline (vector<Box> const &bldgs, Real horizon_padding, Axis a, Direction sky);
+ Skyline (Box const &b, Real horizon_padding, Axis a, Direction sky);
+ vector<Offset> to_points () const;
void merge (Skyline const &);
- void insert (Box const &, Axis);
+ void insert (Box const &, Real horizon_padding, Axis);
+ void print () const;
void raise (Real);
+ void shift (Real);
Real distance (Skyline const &) const;
Real height (Real airplane) const;
Real max_height () const;
void set_minimum_height (Real height);
- Stencil stencil ();
+};
+
+class Skyline_pair
+{
+private:
+ Drul_array<Skyline> skylines_;
+
+ DECLARE_SIMPLE_SMOBS(Skyline_pair);
+public:
+ Skyline_pair ();
+ Skyline_pair (vector<Box> const &boxes, Real horizon_padding, Axis a);
+ Skyline_pair (Box const &, Real horizon_padding, Axis a);
+ void raise (Real);
+ void shift (Real);
+ void insert (Box const &, Real horizon_padding, Axis);
+ void merge (Skyline_pair const &other);
+ Skyline &operator [] (Direction d);
+ Skyline const &operator [] (Direction d) const;
};
#endif /* SKYLINE_HH */
#define SLUR_CONFIGURATION_HH
#include "bezier.hh"
+#include "lily-proto.hh"
#include "std-vector.hh"
-#include "main.hh"
enum Configuration_tag
#define SLUR_SCORING_HH
#include "box.hh"
-#include "lily-proto.hh"
#include "std-vector.hh"
#include "lily-guile.hh"
#include "slur-score-parameters.hh"
#ifndef SLUR_HH
#define SLUR_HH
-#include "grob-info.hh"
#include "lily-proto.hh"
-#include "lily-guile.hh"
#include "std-vector.hh"
+#include "grob-interface.hh"
class Slur
{
static void add_column (Grob *me, Grob *col);
static void add_extra_encompass (Grob *me, Grob *col);
static void replace_breakable_encompass_objects (Grob *me);
- static void auxiliary_acknowledge_extra_object (Grob_info, vector<Grob*>&, vector<Grob*>&);
+ static void auxiliary_acknowledge_extra_object (Grob_info const &, vector<Grob*>&, vector<Grob*>&);
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (calc_control_points, (SCM));
DECLARE_SCHEME_CALLBACK (calc_direction, (SCM));
DECLARE_SCHEME_CALLBACK (height, (SCM));
DECLARE_SCHEME_CALLBACK (outside_slur_callback, (SCM, SCM));
DECLARE_SCHEME_CALLBACK (pure_outside_slur_callback, (SCM, SCM, SCM, SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static Bezier get_curve (Grob *me);
};
#define SMOBS_HH
#include "lily-guile.hh"
-#include "virtual-methods.hh"
#include "warn.hh"
/*
#ifndef SOURCE_FILE_HH
#define SOURCE_FILE_HH
-#include "flower-proto.hh"
#include "std-vector.hh"
#include "lily-proto.hh"
#include "smobs.hh"
#ifndef SPACEABLE_GROB_HH
#define SPACEABLE_GROB_HH
-#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
struct Spaceable_grob
{
static void add_spring (Grob *me, Grob *to, Real dist, Real strength);
static void get_spring (Grob *me, Grob *other, Real *dist, Real *inv_strength);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static void remove_interface (Grob *);
static SCM get_minimum_distances (Grob *);
static SCM get_ideal_distances (Grob *);
(c) 2002--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
+#include "grob-interface.hh"
+#include "lily-proto.hh"
struct Spacing_interface
{
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
--- /dev/null
+/*
+ spacing-options.hh -- declare Spacing_options
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2006 Han-Wen Nienhuys <hanwen@lilypond.org>
+
+*/
+
+#ifndef SPACING_OPTIONS_HH
+#define SPACING_OPTIONS_HH
+
+#include "lily-proto.hh"
+#include "rational.hh"
+
+struct Spacing_options
+{
+ bool packed_;
+ bool stretch_uniformly_;
+ bool float_nonmusical_columns_;
+ bool float_grace_columns_;
+ Rational global_shortest_;
+ Real increment_;
+ Real shortest_duration_space_;
+
+ Spacing_options();
+ void init_from_grob (Grob *me);
+ Real get_duration_space (Rational d, bool *) const;
+};
+#endif /* SPACING_OPTIONS_HH */
#define SPACING_SPANNER_HH
#include "lily-proto.hh"
-#include "lily-guile.hh"
#include "rational.hh"
#include "std-vector.hh"
-
-struct Spacing_options
-{
- bool packed_;
- bool stretch_uniformly_;
- bool float_nonmusical_columns_;
- bool float_grace_columns_;
- Rational global_shortest_;
- Real increment_;
- Real shortest_duration_space_;
-
- Spacing_options();
- void init_from_grob (Grob *me);
- Real get_duration_space (Rational d, bool *) const;
-};
+#include "grob-interface.hh"
/*
TODO: prune to public interface.
DECLARE_SCHEME_CALLBACK (set_springs, (SCM));
DECLARE_SCHEME_CALLBACK (calc_common_shortest_duration, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif /* SPACING_SPANNER_HH */
#ifndef SPAN_BAR_HH
#define SPAN_BAR_HH
-#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
/**
This is a barline that is spanned across other bar lines. This is
{
public:
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static Interval get_spanned_interval (Grob *);
static void add_bar (Grob *, Grob *);
static void evaluate_glyph (Grob *);
static bool less (Spanner *const &, Spanner *const &);
virtual Grob *find_broken_piece (System *) const;
virtual void derived_mark () const;
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
virtual System *get_system () const;
protected:
#define STAFF_SPACING_HH
#include "lily-proto.hh"
+#include "grob-interface.hh"
class Staff_spacing
{
public:
static void next_notes_correction (Grob *, Grob *, Real *, Real *);
static void next_note_correction (Grob *, Grob *, Interval, Real*, Real *);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static void get_spacing_params (Grob *, Real *, Real *);
static Interval bar_y_positions (Grob *);
#ifndef STAFF_SYMBOL_REFERENCER_HH
#define STAFF_SYMBOL_REFERENCER_HH
-#include "grob.hh"
+#include "grob-interface.hh"
+#include "lily-proto.hh"
/**
A notation object that needs access to variables of the staff (no
class Staff_symbol_referencer
{
public:
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static bool ugly_hack (Grob *);
static void set_position (Grob *, Real);
DECLARE_SCHEME_CALLBACK (callback, (SCM element));
#ifndef STAFF_SYMBOL_HH
#define STAFF_SYMBOL_HH
-#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
/**
TODO: add linethickness as parameter.
static int line_count (Grob *);
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (height, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif // STAFF_SYMBOL_HH
#define STEM_INFO_HH
#include "real.hh"
+#include "direction.hh"
/*
Parameters for a stem, (multiply with stemdirection, to get real values
#define ABBREV_HH
#include "lily-proto.hh"
-#include "lily-guile.hh"
+#include "grob-interface.hh"
class Stem_tremolo
{
public:
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK (calc_slope, (SCM));
DECLARE_SCHEME_CALLBACK (calc_width, (SCM));
DECLARE_SCHEME_CALLBACK (print, (SCM));
#include "std-vector.hh"
#include "lily-proto.hh"
-#include "lily-guile.hh"
#include "stem-info.hh"
+#include "grob-interface.hh"
class Stem
{
static Real stem_end_position (Grob *);
static Stencil flag (Grob *);
static Stencil get_translated_flag (Grob*);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static void set_spacing_hints (Grob *);
DECLARE_SCHEME_CALLBACK (print, (SCM));
bool is_stencil_head (SCM symbol);
SCM all_stencil_heads ();
+Stencil points_to_line_stencil (vector<Offset> points);
+
#endif /* STENCIL_HH */
#ifndef SYSTEM_START_DELIMITER_HH
#define SYSTEM_START_DELIMITER_HH
-#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
/*
Braces/brackets across staves.
public:
DECLARE_SCHEME_CALLBACK (print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static void try_collapse (Grob *);
static Stencil staff_bracket (Grob *, Real);
static Stencil old_staff_bracket (Grob *, Real);
#include "column-x-positions.hh"
#include "spanner.hh"
-#include "grob-array.hh"
#include "skyline.hh"
/*
int spanner_count () const;
void break_into_pieces (vector<Column_x_positions> const &);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
vector<Item*> broken_col_range (Item const *, Item const *) const;
vector<Grob*> columns () const;
#define TEXT_ITEM
#include "stencil.hh"
+#include "grob-interface.hh"
+
class Text_interface
{
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (interpret_markup, (SCM, SCM, SCM));
DECLARE_SCHEME_CALLBACK (interpret_string, (SCM, SCM, SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static bool is_markup (SCM);
};
#ifndef TEXT_SPANNER_HH
#define TEXT_SPANNER_HH
-#include "lily-guile.hh"
-
-class Grob;
+#include "grob-interface.hh"
+#include "lily-proto.hh"
class Text_spanner
{
public:
DECLARE_SCHEME_CALLBACK (print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif /* TEXT_SPANNER_HH */
#ifndef TIE_COLUMN_HH
#define TIE_COLUMN_HH
+#include "grob-interface.hh"
#include "lily-proto.hh"
-#include "lily-guile.hh"
class Tie_column
{
public:
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static void add_tie (Grob *me, Grob *);
DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM));
DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
#ifndef TIE_CONFIGURATION_HH
#define TIE_CONFIGURATION_HH
-#include "main.hh"
-#include "lily-proto.hh"
#include "direction.hh"
#include "interval.hh"
-#include "compare.hh"
#include "std-vector.hh"
+#include "main.hh" // DEBUG_SLUR_SCORING
class Tie_configuration
{
#define TIE_FORMATTING_PROBLEM_HH
#include "drul-array.hh"
-#include "std-vector.hh"
#include "skyline.hh"
-#include "lily-proto.hh"
#include "tie-configuration.hh"
#include "tie-details.hh"
#include "tuple.hh"
#ifndef TIE_HH
#define TIE_HH
-#include "lily-guile.hh"
#include "lily-proto.hh"
#include "skyline.hh"
+#include "grob-interface.hh"
{
public:
static void set_head (Grob *, Direction, Grob *head);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static Grob *head (Grob *, Direction);
static int get_column_rank (Grob *, Direction);
static int get_position (Grob *);
#ifndef METER_HH
#define METER_HH
-#include "item.hh"
+#include "grob-interface.hh"
+#include "lily-proto.hh"
/**
Print a time_signature sign.
*/
struct Time_signature
{
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static Stencil special_time_signature (Grob *, SCM, int, int);
static Stencil numbered_time_signature (Grob *, int, int);
DECLARE_SCHEME_CALLBACK (print, (SCM));
#include "moment.hh"
#include "translator.hh"
-#include "std-vector.hh"
-
class Timing_translator : public Translator
{
public:
#define TRANSLATOR_DISPATCH_LIST_HH
#include "lily-proto.hh"
-#include "lily-guile.hh"
#include "std-vector.hh"
#include "smobs.hh"
#include "listener.hh"
#include "translator.hh"
-#include "std-vector.hh"
typedef void (Translator:: *Translator_method) (void);
typedef void (Translator_group:: *Translator_group_method) (void);
#define TRANSLATOR_HH
#include "global-ctor.hh"
-#include "std-string.hh"
#include "lily-proto.hh"
#include "virtual-methods.hh"
-#include "input.hh"
+#include "input.hh" // for error reporting
#include "smobs.hh"
#include "std-vector.hh"
#include "protected-scm.hh"
#ifndef Tuplet_bracket_HH
#define Tuplet_bracket_HH
-#include "lily-guile.hh"
#include "lily-proto.hh"
#include "std-vector.hh"
+#include "grob-interface.hh"
class Tuplet_bracket
{
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (calc_connect_to_neighbors, (SCM smob));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
static Grob* get_common_x (Spanner *);
static void add_tuplet_bracket (Grob *me, Grob *smaller_bracket);
static void get_bounds (Grob *, Grob **, Grob **);
#ifndef VATICANA_LIGATURE_HH
#define VATICANA_LIGATURE_HH
-#include "stencil.hh"
+#include "grob-interface.hh"
+#include "lily-proto.hh"
struct Vaticana_ligature
{
DECLARE_SCHEME_CALLBACK (brew_ligature_primitive, (SCM));
DECLARE_SCHEME_CALLBACK (print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
/*
#define VOLTA_SPANNER_HH
#include "spanner.hh"
+#include "lily-proto.hh"
class Volta_bracket_interface
{
public:
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK (print, (SCM));
static void modify_edge_height (Spanner *);
static void add_column (Grob *, Grob *col);
*/
#include "engraver.hh"
-#include "spanner.hh"
#include "pointer-group-interface.hh"
#include "side-position-interface.hh"
#include "axis-group-interface.hh"
}
ADD_INTERFACE (Item,
- "item-interface",
- "\n"
- "\n"
+
"Grobs can be distinguished in their role in the horizontal spacing.\n"
"Many grobs define constraints on the spacing by their sizes. For\n"
"example, note heads, clefs, stems, and all other symbols with a fixed\n"
{
DECLARE_SCHEME_CALLBACK (print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
/*
return mol.smobbed_copy ();
}
-ADD_INTERFACE (Key_signature_interface, "key-signature-interface",
+ADD_INTERFACE (Key_signature_interface,
"A group of accidentals, to be printed as signature sign.",
"style c0-position alteration-alist");
#include <map>
using namespace std;
-#include "item.hh"
#include "note-head.hh"
#include "staff-symbol-referencer.hh"
#include "staff-symbol.hh"
Interval x_extent,
Real left_shorten);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
Stencil
}
ADD_INTERFACE (Ledger_line_spanner,
- "ledger-line-interface",
"This spanner draws the ledger lines of a staff.\n"
"This is a separate grob because it has to process\n"
"all potential collisions between all note heads.",
/* properties */
+ "gap "
+ "length-fraction "
+ "minimum-length-fraction "
"note-heads "
"thickness "
- "minimum-length-fraction "
- "length-fraction "
- "gap");
+ );
struct Ledgered_interface
{
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
ADD_INTERFACE (Ledgered_interface,
- "ledgered-interface",
"Objects that need ledger lines, typically "
- "note heads. See also @ref{ledger-line-interface}.",
+ "note heads. See also @ref{ledger-line-spanner-interface}.",
"no-ledgers");
#include "interval.hh"
#include "lily-guile.hh"
#include "lily-lexer.hh"
-#include "lilypond-input-version.hh"
+#include "lilypond-version.hh"
#include "main.hh"
#include "music.hh"
#include "music-function.hh"
{
Lilypond_version current ( MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL );
Lilypond_version ver (s);
- if (! ((ver >= oldest_version) && (ver <= current)))
+ if (int (ver) < oldest_version)
{
- non_fatal_error (_f ("Incorrect lilypond version: %s (%s, %s)", ver.to_string (), oldest_version.to_string (), current.to_string ()));
- non_fatal_error (_ ("Consider updating the input with the convert-ly script"));
+ non_fatal_error (_f ("file too old: %s (oldest supported: %s)", ver.to_string (), oldest_version.to_string ()));
+ non_fatal_error (_ ("consider updating the input with the convert-ly script"));
return false;
- }
+ }
+
+ if (ver > current)
+ {
+ non_fatal_error (_f ("program too old: %s (file requires: %s)", current.to_string (), ver.to_string ()));
+ return false;
+ }
return true;
}
#include "tuplet-bracket.hh"
#include "spanner.hh"
#include "stream-event.hh"
+#include "spanner.hh"
+#include "item.hh"
+
#include "translator.icc"
/*
using namespace std;
-#include "config.hh"
-
#include "dimensions.hh"
#include "direction.hh"
#include "file-path.hh"
return result;
}
-void
-ly_display_scm (void *s)
-{
- scm_display ((SCM)s, scm_current_output_port ());
- scm_newline (scm_current_output_port ());
-}
+extern "C" {
+ // maybe gdb 5.0 becomes quicker if it doesn't do fancy C++ typing?
+ void
+ ly_display_scm (SCM s)
+ {
+ scm_display (s, scm_current_output_port ());
+ scm_newline (scm_current_output_port ());
+ }
+};
string
ly_scm2string (SCM str)
scm_to_double (scm_cdr (s)));
}
+SCM
+ly_offsets2scm (vector<Offset> os)
+{
+ SCM l = SCM_EOL;
+ SCM *tail = &l;
+ for (vsize i = 0; i < os.size (); i++)
+ {
+ *tail = scm_cons (ly_offset2scm (os[i]), SCM_EOL);
+ tail = SCM_CDRLOC(*tail);
+ }
+ return l;
+}
+
+vector<Offset>
+ly_scm2offsets (SCM s)
+{
+ vector<Offset> os;
+ for (; scm_is_pair (s); s = scm_cdr (s))
+ os.push_back (ly_scm2offset (scm_car (s)));
+ return os;
+}
+
SCM
ly_deep_copy (SCM src)
{
--- /dev/null
+/*
+ lily-lexer-scheme.cc -- implement Lily_lexer bindings.
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2006 Han-Wen Nienhuys <hanwen@lilypond.org>
+
+*/
+
+#include "lily-lexer.hh"
+
+LY_DEFINE(ly_lexer_keywords, "ly:lexer-keywords",
+ 1,0,0, (SCM lexer),
+ "Return a list of (KEY . CODE) pairs, signifying the lilypond reserved words list.")
+{
+ Lily_lexer * lex = Lily_lexer::unsmob (lexer);
+ SCM_ASSERT_TYPE(lex, lexer, SCM_ARG1, __FUNCTION__, "lily lexer");
+ return lex->keyword_list ();
+}
+
return keytable_->lookup (s.c_str ());
}
+SCM
+Lily_lexer::keyword_list () const
+{
+ if (!keytable_)
+ return SCM_EOL;
+
+ SCM l = SCM_EOL;
+ SCM *tail = &l;
+ for (vsize i = 0; i < keytable_->table_.size (); i++)
+ {
+ *tail = scm_acons (scm_makfrom0str (keytable_->table_[i].name_),
+ scm_from_int (keytable_->table_[i].tokcode_),
+ SCM_EOL);
+
+ tail = SCM_CDRLOC(*tail);
+ }
+
+ return l;
+}
+
SCM
Lily_lexer::lookup_identifier_symbol (SCM sym)
{
#include "file-name-map.hh"
#include "file-name.hh"
#include "file-path.hh"
-#include "input.hh"
#include "international.hh"
#include "lily-lexer.hh"
#include "lily-parser.hh"
return SCM_UNSPECIFIED;
}
-LY_DEFINE (ly_clone_parser, "ly:clone-parser",
+LY_DEFINE (ly_parser_lexer, "ly:parser-lexer",
+ 1, 0, 0, (SCM parser_smob),
+ "Return the lexer for PARSER_SMOB.")
+{
+ Lily_parser *parser = unsmob_lily_parser (parser_smob);
+ return parser->lexer_->self_scm ();
+}
+
+LY_DEFINE (ly_parser_clone, "ly:parser-clone",
1, 0, 0, (SCM parser_smob),
"Return a clone of PARSER_SMOB.")
{
#include <ctype.h>
-#include "lilypond-input-version.hh"
+#include "lilypond-version.hh"
#include "string-convert.hh"
#include "misc.hh"
#include "staff-symbol-referencer.hh"
#include "lookup.hh"
#include "output-def.hh"
+#include "grob.hh"
Stencil
Line_interface::make_arrow (Offset begin, Offset end,
return stil;
}
-ADD_INTERFACE (Line_interface, "line-interface",
+ADD_INTERFACE (Line_interface,
"Generic line objects. Any object using lines supports this. Normally, "
"you get a straight line. If @code{dash-period} is defined, a dashed line is "
"produced; the length of the dashes is tuned with "
"style "
"arrow-length "
"arrow-width")
+
+
+
+/* todo: move this somewhere else? */
+Stencil
+points_to_line_stencil (vector<Offset> points)
+{
+ Stencil ret;
+ for (vsize i = 1; i < points.size (); i++)
+ {
+ if (points[i-1].is_sane () && points[i].is_sane ())
+ {
+ Stencil line
+ = Line_interface::make_line (0.1, points[i-1], points[i]);
+ ret.add_stencil (line);
+ }
+ }
+ return ret;
+}
Offset my_off;
Offset his_off;
+ Real extra_dy = robust_scm2double (me->get_property ("extra-dy"),
+ 0.0);
+
if (bound[RIGHT]->break_status_dir ())
{
if (bound[LEFT]->break_status_dir ())
Real yoff = this_common_y->relative_coordinate (all_common_y, Y_AXIS);
Offset p1 (bound[LEFT]->extent (commonx, X_AXIS)[RIGHT],
- this_ext.center () + yoff);
+ this_ext.center () + yoff - extra_dy / 2);
Offset p2 (bound[RIGHT]->extent (commonx, X_AXIS)[LEFT],
- next_ext.center () + yoff);
+ next_ext.center () + yoff + extra_dy / 2);
- Offset dz (p2 -p1);
+ Offset dz (p2 - p1);
Real len = dz.length ();
Offset dir = dz * (1 / len);
his_off[ax] = bound[LEFT]->relative_coordinate (common[a], ax);
}
- ofxy = dxy * (off / dxy.length ());
+ ofxy = dxy * (off / dxy.length ()) ;
dxy -= 2*ofxy;
+ dxy[Y_AXIS] += extra_dy;
+
Stencil line = line_stencil (me, Offset (0, 0), dxy);
line.translate_axis (bound[LEFT]->extent (bound[LEFT], X_AXIS).length () / 2, X_AXIS);
- line.translate (ofxy - my_off + his_off);
+ line.translate (ofxy - my_off + his_off + Offset (0, -extra_dy/2));
return line.smobbed_copy ();
}
}
-ADD_INTERFACE (Line_spanner, "line-spanner-interface",
+ADD_INTERFACE (Line_spanner,
"Generic line drawn between two objects, e.g. for use with glissandi.\n"
"The property @code{style} can be @code{line}, "
"@code{dashed-line}, @code{trill}, \n"
"@code{dotted-line} or @code{zigzag}.\n"
"\n",
-
+
+ "extra-dy "
"arrow "
"gap "
"thickness "
(c) 2004--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
-#include "context.hh"
#include "dispatcher.hh"
#include "global-context.hh"
#include "grob.hh"
*/
#include "music.hh"
-#include "pitch.hh"
-#include "moment.hh"
struct Lyric_combine_music
{
#include "lyric-extender.hh"
-
+#include "spanner.hh"
+#include "item.hh"
#include "warn.hh"
#include "lookup.hh"
-#include "paper-column.hh"
#include "output-def.hh"
#include "note-head.hh"
#include "pointer-group-interface.hh"
return mol.smobbed_copy ();
}
-ADD_INTERFACE (Lyric_extender, "lyric-extender-interface",
+ADD_INTERFACE (Lyric_extender,
"The extender is a simple line at the baseline of the lyric "
"that helps show the length of a melissima (tied/slurred note).",
/*
- hyphen-spanner.cc -- implement Hyphen_spanner
+ hyphen-spanner.cc -- implement Lyric_hyphen
source file of the GNU LilyPond music typesetter
#include "output-def.hh"
#include "paper-column.hh"
#include "moment.hh"
+#include "spanner.hh"
/*
TODO: should extract hyphen dimensions or hyphen glyph from the
font.
*/
-MAKE_SCHEME_CALLBACK (Hyphen_spanner, print, 1);
+MAKE_SCHEME_CALLBACK (Lyric_hyphen, print, 1);
SCM
-Hyphen_spanner::print (SCM smob)
+Lyric_hyphen::print (SCM smob)
{
Spanner *me = unsmob_spanner (smob);
Drul_array<Item *> bounds (me->get_bound (LEFT),
return total.smobbed_copy ();
}
-MAKE_SCHEME_CALLBACK (Hyphen_spanner, set_spacing_rods, 1);
+MAKE_SCHEME_CALLBACK (Lyric_hyphen, set_spacing_rods, 1);
SCM
-Hyphen_spanner::set_spacing_rods (SCM smob)
+Lyric_hyphen::set_spacing_rods (SCM smob)
{
Grob *me = unsmob_grob (smob);
return SCM_UNSPECIFIED;
}
-ADD_INTERFACE (Hyphen_spanner,
+ADD_INTERFACE (Lyric_hyphen,
- "lyric-hyphen-interface",
-
"A centered hyphen is a simple line between "
"lyrics used to divide syllables",
#include "getopt-long.hh"
#include "global-ctor.hh"
#include "international.hh"
-#include "lily-guile.hh"
#include "lily-version.hh"
#include "misc.hh"
#include "output-def.hh"
init_fontconfig ();
init_freetype ();
-
- all_fonts_global = new All_font_metrics (global_path.to_string ());
+ ly_reset_all_fonts ();
if (!init_scheme_variables.empty ()
|| !init_scheme_code_string.empty ())
bool overwrite = true;
if (!yield)
{
- yield = "70";
+ yield = "65";
overwrite = false;
}
sane_putenv ("GUILE_MIN_YIELD_1", yield, overwrite);
sane_putenv ("GUILE_MIN_YIELD_2", yield, overwrite);
sane_putenv ("GUILE_MIN_YIELD_MALLOC", yield, overwrite);
+
+
+ sane_putenv ("GUILE_INIT_SEGMENT_SIZE_1",
+ "10485760", overwrite);
+ sane_putenv ("GUILE_MAX_SEGMENT_SIZE",
+ "104857600", overwrite);
}
void
setup_paths (argv[0]);
setup_guile_env ();
+#if 0
/* Debugging aid. */
try
{
{
error (_f ("exception caught: %s", e.what ()));
};
-
+#else
+ scm_boot_guile (argc, argv, main_with_guile, 0);
+#endif
+
/* Only reachable if GUILE exits. That is an error. */
return 1;
}
#include "side-position-interface.hh"
#include "global-context.hh"
#include "engraver.hh"
+#include "spanner.hh"
#include "translator.icc"
return m.smobbed_copy ();
}
-ADD_INTERFACE (Measure_grouping, "measure-grouping-interface",
+ADD_INTERFACE (Measure_grouping,
"This object indicates groups of beats. "
"Valid choices for @code{style} are @code{bracket} and @code{triangle}.",
"thickness style height");
stem->set_property ("neutral-direction", Melody_spanner::calc_neutral_stem_direction_proc);
}
-ADD_INTERFACE (Melody_spanner, "melody-spanner-interface",
+ADD_INTERFACE (Melody_spanner,
"Context dependent typesetting decisions.",
"stems "
return SCM_EOL;
}
-ADD_INTERFACE (Mensural_ligature, "mensural-ligature-interface",
+ADD_INTERFACE (Mensural_ligature,
"A mensural ligature",
"delta-position "
return 1.0;
return max (- epsilon * (x - threshold) / ((x + epsilon) * threshold), 0.0);
}
+
+
+string
+camel_case_to_lisp_identifier (string in)
+{
+ vector<char> out;
+
+ /* don't add '-' before first character */
+ out.push_back (tolower (in[0]));
+
+ for (size_t inpos = 1; inpos < in.size (); inpos++)
+ {
+ if (isupper (in[inpos]))
+ out.push_back ('-');
+ out.push_back (tolower (in[inpos]));
+ }
+
+ string result (&out[0], out.size ());
+ replace_all (result, '_', '-');
+
+ return result;
+}
+
#include "text-metrics.hh"
#include "warn.hh"
#include "stencil.hh"
-#include "lookup.hh"
#include "main.hh"
Modified_font_metric::Modified_font_metric (Font_metric *fm,
(c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
-#include "lily-guile.hh"
+#include "ly-module.hh"
+
#include "warn.hh"
#include "main.hh"
#include "std-string.hh"
-#include "ly-module.hh"
/*
If a variable in changed in SRC, we DEST doesn't see the
#include "staff-symbol-referencer.hh"
#include "stream-event.hh"
#include "moment.hh"
+#include "spanner.hh"
#include "translator.icc"
return SCM_UNSPECIFIED;
}
-ADD_INTERFACE (Multi_measure_rest, "multi-measure-rest-interface",
+ADD_INTERFACE (Multi_measure_rest,
"A rest that spans a whole number of measures.",
/* properties */
--- /dev/null
+#include "music-function.hh"
+
+LY_DEFINE (ly_music_function_p, "ly:music-function?", 1, 0, 0,
+ (SCM x),
+ "Is @var{x} an @code{music-function}?")
+{
+ return is_music_function (x) ? SCM_BOOL_T : SCM_BOOL_F;
+}
+
+LY_DEFINE (ly_music_function_extract, "ly:music-function-extract", 1, 0, 0,
+ (SCM x),
+ "Return the Scheme function inside @var{x}")
+{
+ SCM_ASSERT_TYPE(is_music_function (x), x, SCM_ARG1, __FUNCTION__,
+ "music function");
+
+ return SCM_CELL_OBJECT_1(x);
+}
+
+LY_DEFINE (ly_make_music_function, "ly:make-music-function", 2, 0, 0,
+ (SCM signature, SCM func),
+ "Make a function to process music, to be used for the "
+ "parser. @code{func} is the function, and @code{signature} describes "
+ "Its arguments. @code{signature} is a list containing either "
+ "@code{ly:music?} predicates or other type predicates.")
+{
+ SCM_ASSERT_TYPE(ly_is_procedure (func), func, SCM_ARG1, __FUNCTION__, "function");
+ return make_music_function (signature, func);
+}
+
return 1;
}
-LY_DEFINE (ly_make_music_function, "ly:make-music-function", 2, 0, 0,
- (SCM signature, SCM func),
- "Make a function to process music, to be used for the "
- "parser. @code{func} is the function, and @code{signature} describes "
- "Its arguments. @code{signature} is a list containing either "
- "@code{ly:music?} predicates or other type predicates.")
-{
- scm_set_object_property_x (func, ly_symbol2scm ("music-function-signature"),
- signature);
-
- SCM_RETURN_NEWSMOB (music_function_tag, func);
-}
-
bool
is_music_function (SCM music_function)
{
scm_set_smob_print (music_function_tag, print_music_function);
}
+SCM
+make_music_function (SCM signature, SCM func)
+{
+ scm_set_object_property_x (func, ly_symbol2scm ("music-function-signature"),
+ signature);
+
+ SCM_RETURN_NEWSMOB (music_function_tag, func);
+}
+
ADD_SCM_INIT_FUNC (music_function_tag, init_music_function);
+
*/
-#include "music-iterator.hh"
-
#include <cstdio>
using namespace std;
#include "warn.hh"
+#include "music.hh"
#include "context.hh"
#include "event-iterator.hh"
#include "input.hh"
#include "music-output.hh"
#include "ly-smobs.icc"
-#include "virtual-methods.hh"
Music_output::Music_output ()
{
#include "duration.hh"
#include "warn.hh"
-#include "pitch.hh"
LY_DEFINE (ly_music_length, "ly:music-length",
1, 0, 0, (SCM mus),
(c) 1998--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
+#include "music-sequence.hh"
+
#include "warn.hh"
#include "program-option.hh"
-#include "pitch.hh"
+#include "music.hh"
#include "input.hh"
-#include "music-sequence.hh"
void
transpose_music_list (SCM lst, Pitch rq)
#include "music-wrapper-iterator.hh"
#include "music-wrapper.hh"
+#include "music.hh"
Music_wrapper_iterator::Music_wrapper_iterator ()
{
{
Music *me = unsmob_music (m);
Music *elt = unsmob_music (me->get_property ("element"));
- return elt->get_length ().smobbed_copy ();
+ if (elt)
+ return elt->get_length ().smobbed_copy ();
+ else
+ return Moment (0).smobbed_copy ();
}
#include "ly-smobs.icc"
#include "main.hh"
#include "music-sequence.hh"
-#include "pitch.hh"
#include "score.hh"
#include "warn.hh"
#include "side-position-interface.hh"
#include "stem.hh"
#include "stream-event.hh"
+#include "item.hh"
#include "warn.hh"
#include "translator.icc"
#include "note-head.hh"
#include "output-def.hh"
#include "pointer-group-interface.hh"
+#include "item.hh"
#include "rhythmic-head.hh"
#include "staff-symbol-referencer.hh"
#include "side-position-interface.hh"
else
shift_amount *= 0.17;
+ /*
+
+ */
+ if (full_collide
+ && dnball_type * upball_type == 0)
+ {
+ if (upball_type == 0 && dnball_type == 1)
+ shift_amount *= 1.25;
+ else if (upball_type == 0 && dnball_type == 2)
+ shift_amount *= 1.35;
+ else if (dnball_type == 0 && upball_type == 1)
+ shift_amount *= 0.7;
+ else if (dnball_type == 0 && upball_type == 2)
+ shift_amount *= 0.75;
+ }
+
/*
* Fix issue #44:
*
Axis_group_interface::add_element (me, ncol);
}
-ADD_INTERFACE (Note_collision_interface, "note-collision-interface",
+ADD_INTERFACE (Note_collision_interface,
"An object that handles collisions between notes with different stem "
"directions and horizontal shifts. Most of the interesting properties "
"are to be set in @ref{note-column-interface}: these are "
#include "axis-group-interface.hh"
#include "directional-element-interface.hh"
#include "international.hh"
+#include "item.hh"
#include "note-head.hh"
#include "output-def.hh"
#include "pointer-group-interface.hh"
return unsmob_grob (me->get_object ("arpeggio"));
}
-ADD_INTERFACE (Note_column, "note-column-interface",
+ADD_INTERFACE (Note_column,
"Stem and noteheads combined",
/* properties */
#include "side-position-interface.hh"
#include "staff-symbol-referencer.hh"
#include "context.hh"
+#include "spanner.hh"
+#include "item.hh"
+
/**
Create line-spanner grobs for lines that connect note heads.
#include "font-interface.hh"
#include "international.hh"
#include "warn.hh"
+#include "grob.hh"
static Stencil
internal_print (Grob *me, string *font_char)
}
-ADD_INTERFACE (Note_head, "note-head-interface",
+ADD_INTERFACE (Note_head,
"Note head",
/* properties */
#include <cctype>
using namespace std;
-#include "dots.hh"
-#include "dot-column.hh"
#include "duration.hh"
#include "item.hh"
#include "output-def.hh"
*/
}
-ADD_INTERFACE (Note_spacing, "note-spacing-interface",
+ADD_INTERFACE (Note_spacing,
"This object calculates spacing wishes for individual voices.",
{
FT_ULong len;
FT_Byte *tab = load_table (tag.c_str (), face, &len);
+ string ret ((char const*) tab, len);
+ free (tab);
- return string ((char const*) tab, len);
+ return ret;
}
FT_Face
struct Ottava_bracket
{
DECLARE_SCHEME_CALLBACK (print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
/*
}
ADD_INTERFACE (Ottava_bracket,
- "ottava-bracket-interface",
-
"An ottava bracket",
/*
#include "note-column.hh"
#include "side-position-interface.hh"
#include "engraver.hh"
+#include "spanner.hh"
+#include "item.hh"
class Ottava_spanner_engraver : public Engraver
{
(c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
-#include "font-metric.hh"
+#include "output-def.hh"
+
#include "pango-font.hh"
#include "modified-font-metric.hh"
-#include "output-def.hh"
#include "ly-module.hh"
#include "context-def.hh"
#include "lily-parser.hh"
#include "duration.hh"
#include "grob.hh"
#include "international.hh"
-#include "moment.hh"
#include "paper-column.hh"
#include "stream-event.hh"
#include "warn.hh"
#include <pango/pangoft2.h>
#include <freetype/ftxf86.h>
+#include <map>
+
/* Ugh. */
-#include "pango-font.hh"
+#include "pango-font.hh"
#include "dimensions.hh"
#include "file-name.hh"
#include "international.hh"
-#include "lookup.hh"
+#include "lookup.hh" // debugging
#include "main.hh"
#include "string-convert.hh"
#include "warn.hh"
+#include "all-font-metrics.hh"
#if HAVE_PANGO_FT2
#include "stencil.hh"
}
-map<string, Index_to_charcode_map > filename_charcode_maps_map;
-Index_to_charcode_map const *get_index_to_charcode_map (string postscript_name, FT_Face face);
-
-
-Index_to_charcode_map const *
-get_index_to_charcode_map (string filename, FT_Face face)
-{
- if (filename_charcode_maps_map.find (filename) == filename_charcode_maps_map.end ())
- filename_charcode_maps_map[filename] = make_index_to_charcode_map (face);
-
- if (filename_charcode_maps_map.find (filename) == filename_charcode_maps_map.end ())
- return 0;
-
- return &filename_charcode_maps_map[filename];
-}
-
void
get_glyph_index_name (char *s, FT_ULong code)
{
Index_to_charcode_map const *cmap = 0;
bool has_glyph_names = ftface->face_flags & FT_FACE_FLAG_GLYPH_NAMES;
if (! has_glyph_names)
- cmap = get_index_to_charcode_map (file_name, ftface);
+ cmap = all_fonts_global->get_index_to_charcode_map (file_name, ftface);
bool is_ttf = string (FT_Get_X11_Font_Format (ftface)) == "TrueType";
bool cid_keyed = false;
#include "international.hh"
#include "axis-group-interface.hh"
#include "context.hh"
-#include "item.hh"
#include "note-spacing.hh"
#include "paper-column.hh"
#include "pointer-group-interface.hh"
}
int
-Paper_column::get_rank (Grob *me)
+Paper_column::get_rank (Grob const *me)
{
- return dynamic_cast<Paper_column *> (me)->rank_;
+ return dynamic_cast<Paper_column const *> (me)->rank_;
}
System *
ADD_INTERFACE (Paper_column,
-
- "paper-column-interface",
"@code{Paper_column} objects form the top-most X-parents for items."
" The are two types of columns: musical columns, where are attached to, and "
" non-musical columns, where bar-lines, clefs etc. are attached to. "
#include "engraver.hh"
-#include "grob.hh"
#include "item.hh"
#include "pointer-group-interface.hh"
#include "simple-closure.hh"
#include "lily-guile.hh"
#include "lily-lexer.hh"
#include "lily-parser.hh"
-#include "lilypond-input-version.hh"
#include "main.hh"
#include "misc.hh"
#include "music.hh"
#include "stem.hh"
#include "stream-event.hh"
#include "text-interface.hh"
+#include "item.hh"
#include "translator.icc"
#include "context.hh"
#include "dispatcher.hh"
#include "lily-guile.hh"
-#include "listener.hh"
#include "music.hh"
#include "music-iterator.hh"
#include "music-sequence.hh"
*/
#include "percent-repeat-item.hh"
-
-
+#include "item.hh"
#include "lookup.hh"
#include "font-interface.hh"
return m.smobbed_copy ();
}
-ADD_INTERFACE (Percent_repeat_item_interface, "percent-repeat-interface",
+ADD_INTERFACE (Percent_repeat_item_interface,
"Repeats that look like percent signs",
- "slope thickness");
+
+ "slope "
+ "thickness ");
*/
#include "input.hh"
-#include "music.hh"
#include "repeated-music.hh"
#include "sequential-iterator.hh"
midi_stream << Midi_header (1, tracks_, clocks_per_4);
message (_ ("Track...") + " ");
+
int channel = 0;
for (vsize i = 0; i < audio_staffs_.size (); i++)
{
if (be_verbose_global)
progress_indication ("[" + to_string (i));
- /*
- MIDI players tend to ignore instrument settings on
- channel 10, the percussion channel by default.
- */
- if (channel % 16 == 9)
- channel++;
+ int midi_channel = s->channel_;
+
+ if (midi_channel < 0)
+ {
+ midi_channel = channel;
+ channel ++;
+ /*
+ MIDI players tend to ignore instrument settings on
+ channel 10, the percussion channel.
+ */
+ if (channel % 16 == 9)
+ channel ++;
+ }
/*
Huh? Why does each staff also have a separate channel? We
should map channels to voices, not staves. --hwn.
*/
- if (channel > 15)
+ if (midi_channel > 15)
{
warning (_ ("MIDI channel wrapped around"));
warning (_ ("remapping modulo 16"));
+
+ midi_channel = midi_channel % 16;
}
- s->output (midi_stream, channel);
- channel ++;
+ s->output (midi_stream, midi_channel);
if (be_verbose_global)
progress_indication ("]");
}
}
-
void
Performance::add_element (Audio_element *p)
{
struct Piano_pedal_bracket
{
DECLARE_SCHEME_CALLBACK (print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
MAKE_SCHEME_CALLBACK (Piano_pedal_bracket, print, 1);
}
ADD_INTERFACE (Piano_pedal_bracket,
- "piano-pedal-bracket-interface",
"The bracket of the piano pedal. "
"It can be tuned through the regular "
#include "stream-event.hh"
#include "string-convert.hh"
#include "warn.hh"
-#include "protected-scm.hh"
+#include "spanner.hh"
+#include "item.hh"
+
#include "translator.icc"
+
/*
TODO:
(c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
+
+#include "engraver.hh"
+
#include "staff-symbol-referencer.hh"
#include "note-head.hh"
#include "rhythmic-head.hh"
-#include "engraver.hh"
+#include "grob.hh"
class Pitch_squash_engraver : public Engraver
{
#include "pointer-group-interface.hh"
-#include "lily-proto.hh"
-#include "item.hh"
#include "grob-array.hh"
#include "grob.hh"
#include "prob.hh"
#include "main.hh"
#include "item.hh"
+#include "input.hh"
#include "ly-smobs.icc"
/* Compare mutable and immutable lists, element by element. */
for (i = 0; i < 2; i++)
{
- SCM aprop = props[0][i], bprop = props[1][i];
+ SCM aprop = props[0][i];
+ SCM bprop = props[1][i];
- for (; scm_is_pair (aprop) && scm_is_pair(bprop); aprop = scm_cdr (aprop), bprop = scm_cdr (bprop))
+ for (;
+ scm_is_pair (aprop) && scm_is_pair(bprop);
+ aprop = scm_cdr (aprop), bprop = scm_cdr (bprop))
{
+ SCM aval = scm_cdar (aprop);
+ SCM bval = scm_cdar (bprop);
if (scm_caar (aprop) != scm_caar (bprop) ||
- !to_boolean (scm_equal_p (scm_cdar (aprop), scm_cdar (bprop))))
+ (
+ !(unsmob_input (aval) && unsmob_input (bval))
+ &&
+ !to_boolean (scm_equal_p (aval, bval))))
return SCM_BOOL_F;
}
#include "lily-guile.hh"
#include "music-sequence.hh"
#include "music.hh"
-#include "stream-event.hh"
#include "warn.hh"
class Quote_iterator : public Music_wrapper_iterator
#include "input.hh"
#include "international.hh"
#include "music.hh"
-#include "pitch.hh"
class Relative_octave_check
{
*/
#include "music.hh"
-#include "pitch.hh"
#include "warn.hh"
#include "program-option.hh"
#include "engraver.hh"
#include "rest-collision.hh"
#include "note-column.hh"
+#include "item.hh"
class Rest_collision_engraver : public Engraver
{
#include "rhythmic-head.hh"
#include "staff-symbol-referencer.hh"
#include "stem.hh"
+#include "grob.hh"
#include "warn.hh"
MAKE_SCHEME_CALLBACK (Rest_collision, force_shift_callback, 1);
return SCM_UNSPECIFIED;
}
-ADD_INTERFACE (Rest_collision, "rest-collision-interface",
+ADD_INTERFACE (Rest_collision,
"Move around ordinary rests (not multi-measure-rests) to avoid "
"conflicts.",
#include "paper-score.hh"
#include "staff-symbol-referencer.hh"
#include "stencil.hh"
+#include "grob.hh"
// -> offset callback
MAKE_SCHEME_CALLBACK (Rest, y_offset_callback, 1);
return ly_interval2scm (unsmob_stencil (m)->extent (a));
}
-ADD_INTERFACE (Rest, "rest-interface",
+ADD_INTERFACE (Rest,
"A rest symbol.",
/* properties */
#include "rhythmic-head.hh"
#include "stem.hh"
#include "note-column.hh"
+#include "item.hh"
#include "dot-column.hh"
#include "pointer-group-interface.hh"
ADD_INTERFACE (Rhythmic_head,
- "rhythmic-head-interface",
-
"Note head or rest",
"dot "
#include "paper-column-engraver.hh"
#include "paper-column.hh"
#include "paper-score.hh"
-#include "stream-event.hh"
#include "system.hh"
#include "warn.hh"
#include "audio-column.hh"
#include "audio-item.hh"
#include "context-def.hh"
-#include "context.hh"
#include "dispatcher.hh"
#include "global-context.hh"
#include "performance.hh"
#include "midi-stream.hh"
-#include "moment.hh"
#include "output-def.hh"
#include "string-convert.hh"
#include "warn.hh"
#include "engraver.hh"
#include "script-column.hh"
#include "side-position-interface.hh"
+#include "item.hh"
#include "translator.icc"
class Script_column_engraver : public Engraver
{
Grob *script_column_;
- vector<Item*> scripts_;
+ vector<Grob*> scripts_;
public:
TRANSLATOR_DECLARATIONS (Script_column_engraver);
#include "directional-element-interface.hh"
#include "side-position-interface.hh"
#include "warn.hh"
+#include "grob.hh"
#include "pointer-group-interface.hh"
#include <map>
{
Grob *g = unsmob_grob (scm_car (s));
if (last)
- Side_position_interface::add_support (g, last);
+ {
+ SCM outside_staff = last->get_property ("outside-staff-priority");
+ if (scm_is_number (outside_staff))
+ {
+ /* we allow the outside-staff-priority ordering to override the
+ script-priority ordering */
+ if (!scm_is_number (g->get_property ("outside-staff-priority")))
+ g->set_property ("outside-staff-priority",
+ scm_from_double (scm_to_double (outside_staff) + 0.1));
+ }
+ else
+ Side_position_interface::add_support (g, last);
+ }
last = g;
}
while (flip (&d) != DOWN);
}
-ADD_INTERFACE (Script_column, "script-column-interface",
+ADD_INTERFACE (Script_column,
"An interface that sorts scripts "
"according to their @code{script-priority}",
#include "script-interface.hh"
#include "directional-element-interface.hh"
+#include "item.hh"
#include "warn.hh"
#include "font-interface.hh"
#include "side-position-interface.hh"
struct Text_script
{
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
-ADD_INTERFACE (Text_script, "text-script-interface",
+ADD_INTERFACE (Text_script,
"An object that is put above or below a note",
/* properties */
/*
Hmm. Where should we put add-stem-support ?
*/
-ADD_INTERFACE (Script_interface, "script-interface",
+ADD_INTERFACE (Script_interface,
"An object that is put above or below a note",
"add-stem-support "
"avoid-slur "
#include "engraver.hh"
#include "accidental-placement.hh"
+#include "item.hh"
#include "script-column.hh"
#include "side-position-interface.hh"
#include "self-alignment-interface.hh"
#include "warn.hh"
+#include "grob.hh"
MAKE_SCHEME_CALLBACK (Self_alignment_interface, y_aligned_on_self, 1);
SCM
a);
}
-ADD_INTERFACE (Self_alignment_interface, "self-alignment-interface",
+ADD_INTERFACE (Self_alignment_interface,
"Position this object on itself and/or on its parent. To this end, the following functions "
" are provided: \n"
"@table @code \n"
#include "staff-symbol-referencer.hh"
#include "item.hh"
#include "tie-formatting-problem.hh"
-#include "tie-configuration.hh"
#include "tie-column-format.hh"
ADD_INTERFACE(Semi_tie_column,
- "semi-tie-column-interface",
"The interface for a column of l.v. ties.",
/* properties */
ADD_INTERFACE(Semi_tie,
- "semi-tie-interface",
-
"A tie which is only on one side connected to note heads. ",
/* properties */
if (lb)
{
- Interval li (Separation_item::width (lb));
- Interval ri (Separation_item::conditional_width (r, lb));
- if (!li.is_empty () && !ri.is_empty ())
- {
- Rod rod;
-
- rod.item_drul_[LEFT] = lb;
- rod.item_drul_[RIGHT] = r;
-
- rod.distance_ = li[RIGHT] - ri[LEFT] + padding;
- rod.add_to_cols ();
- }
+ Separation_item::set_distance (Drul_array<Item*> (lb, r), padding);
}
- Interval li (Separation_item::width (l));
- Interval ri (Separation_item::conditional_width (r, l));
- if (!li.is_empty () && !ri.is_empty ())
- {
- Rod rod;
-
- rod.item_drul_[LEFT] = l;
- rod.item_drul_[RIGHT] = r;
-
- rod.distance_ = li[RIGHT] - ri[LEFT] + padding;
-
- if (rod.distance_ > 0.0)
- rod.add_to_cols ();
- break;
- }
+ if (Separation_item::set_distance (Drul_array<Item *> (l, r), padding))
+ break;
/*
this grob doesn't cause a constraint. We look further until we
Pointer_group_interface::add_unordered_grob (me, ly_symbol2scm ("elements"), i);
}
-ADD_INTERFACE (Separating_group_spanner, "separation-spanner-interface",
+ADD_INTERFACE (Separating_group_spanner,
"A spanner that calculates spacing constraints (\"rods\") "
"using the @code{separation-item-interface} grobs in @code{elements}.",
#include "note-spacing.hh"
#include "accidental-placement.hh"
#include "context.hh"
+#include "spanner.hh"
#include "grob-array.hh"
#include "pointer-group-interface.hh"
void
Separating_line_group_engraver::acknowledge_item (Grob_info i)
{
- Item *it = dynamic_cast<Item *> (i.grob ());
- if (!it)
- return;
+ Item *it = i.item ();
if (it->get_parent (X_AXIS)
- && Axis_group_interface::has_axis (it->get_parent (X_AXIS), X_AXIS))
+ && it->get_parent (X_AXIS) == it->get_parent (Y_AXIS)
+ && Axis_group_interface::has_axis (it->get_parent (X_AXIS), X_AXIS)
+ && Axis_group_interface::has_axis (it->get_parent (Y_AXIS), Y_AXIS))
return;
if (to_boolean (it->get_property ("no-spacing-rods")))
#include "separation-item.hh"
+#include "skyline.hh"
#include "paper-column.hh"
#include "warn.hh"
#include "pointer-group-interface.hh"
Pointer_group_interface::add_grob (me, ly_symbol2scm ("conditional-elements"), e);
}
+void
+Separation_item::set_skyline_distance (Drul_array<Item *> items,
+ Real padding)
+{
+ Drul_array<Skyline_pair*> lines (Skyline_pair::unsmob (items[LEFT]->get_property ("skylines")),
+ Skyline_pair::unsmob (items[RIGHT]->get_property ("skylines")));
+ Skyline right = conditional_skyline (items[RIGHT], items[LEFT]);
+ right.merge ((*lines[RIGHT])[LEFT]);
+
+ Real dist = padding + (*lines[LEFT])[RIGHT].distance (right);
+ if (dist > 0)
+ {
+ Rod rod;
+
+ rod.item_drul_ = items;
+
+ rod.distance_ = dist;
+ rod.add_to_cols ();
+ }
+}
+
+bool
+Separation_item::set_distance (Drul_array<Item *> items,
+ Real padding)
+{
+ set_skyline_distance (items, padding);
+ return true;
+}
+
/*
Return the width of ME given that we are considering the object on
the LEFT.
*/
-Interval
-Separation_item::conditional_width (Grob *me, Grob *left)
+Skyline
+Separation_item::conditional_skyline (Grob *me, Grob *left)
{
- Interval w = width (me);
+ vector<Box> bs = boxes (me, left);
+ return Skyline (bs, 0.1, Y_AXIS, LEFT);
+}
+
+
+MAKE_SCHEME_CALLBACK(Separation_item,calc_skylines,1);
+SCM
+Separation_item::calc_skylines (SCM smob)
+{
+ Item *me = unsmob_item (smob);
+ vector<Box> bs = boxes (me, 0);
+ /* todo: the horizon_padding is somewhat arbitrary */
+ return Skyline_pair (bs, 0.1, Y_AXIS).smobbed_copy ();
+}
+/* if left is non-NULL, get the boxes corresponding to the
+ conditional-elements (conditioned on the grob LEFT). This
+ sounds more general than it is: conditional-elements are
+ always accidentals attached to a tied note.
+*/
+vector<Box>
+Separation_item::boxes (Grob *me, Grob *left)
+{
Item *item = dynamic_cast<Item *> (me);
+
+ int very_large = INT_MAX;
Paper_column *pc = item->get_column ();
+ vector<Box> out;
+ extract_grob_set (me, left ? "conditional-elements" : "elements", read_only_elts);
+ vector<Grob*> elts;
- extract_grob_set (me, "conditional-elements", elts);
+ if (left)
+ elts = Accidental_placement::get_break_reminder_accidentals (read_only_elts, left);
+ else
+ elts = read_only_elts;
+
+ Grob *ycommon = common_refpoint_of_array (elts, me, Y_AXIS);
+
for (vsize i = 0; i < elts.size (); i++)
{
Item *il = dynamic_cast<Item *> (elts[i]);
if (pc != il->get_column ())
{
- /* this shouldn't happen, but let's continue anyway. */
- programming_error ("Separation_item: I've been drinking too much");
- continue; /*UGH UGH*/
+ continue;
}
if (to_boolean (il->get_property ("no-spacing-rods")))
continue;
- if (Accidental_placement::has_interface (il))
- w.unite (Accidental_placement::get_relevant_accidental_extent (il, pc, left));
- }
+ Interval y (il->pure_height (ycommon, 0, very_large));
+ Interval x (il->extent (pc, X_AXIS));
- SCM pad = me->get_property ("padding");
+ SCM padding = elts[i]->get_property ("padding");
+ x.widen (robust_scm2double (padding, 0));
+
+ out.push_back (Box (x, y));
+ }
- w.widen (robust_scm2double (pad, 0.0));
- return w;
+ return out;
}
Interval
Separation_item::width (Grob *me)
{
SCM sw = me->get_property ("X-extent");
- if (is_number_pair (sw))
- return ly_scm2interval (sw);
-
- Item *item = dynamic_cast<Item *> (me);
- Paper_column *pc = item->get_column ();
- Interval w;
-
- extract_grob_set (me, "elements", elts);
- for (vsize i = 0; i < elts.size (); i++)
- {
- Item *il = dynamic_cast<Item *> (elts[i]);
- if (pc != il->get_column ())
- {
- /* this shouldn't happen, but let's continue anyway. */
- programming_error ("Separation_item: I've been drinking too much");
- continue; /*UGH UGH*/
- }
-
- if (to_boolean (il->get_property ("no-spacing-rods")))
- continue;
-
- Interval iv (il->extent (pc, X_AXIS));
- if (!iv.is_empty ())
- w.unite (iv);
- }
-
- SCM pad = me->get_property ("padding");
-
- w.widen (robust_scm2double (pad, 0.0));
-
- me->set_property ("X-extent", ly_interval2scm (w));
-
- return w;
+ return ly_scm2interval (sw);
}
Interval
return last_grob;
}
-ADD_INTERFACE (Separation_item, "separation-item-interface",
+ADD_INTERFACE (Separation_item,
"Item that computes widths to generate spacing rods. "
- "This is done in concert with @ref{separation-spanner-interface}.",
- "padding X-extent conditional-elements elements");
+ "This is done in concert with @ref{separating-group-spanner-interface}.",
+
+ "X-extent "
+ "conditional-elements "
+ "elements "
+ "padding "
+ "skylines "
+ );
#include "staff-symbol.hh"
#include "string-convert.hh"
#include "misc.hh"
+#include "grob.hh"
void
Side_position_interface::add_support (Grob *me, Grob *e)
return NO_AXES;
}
-ADD_INTERFACE (Side_position_interface, "side-position-interface",
+ADD_INTERFACE (Side_position_interface,
"Position a victim object (this one) next to other objects (the "
"support). The property @code{direction} signifies where to put the "
"victim object relative to the support (left or right, up or down?)\n\n "
#include "simple-closure.hh"
#include "grob.hh"
-#include "lily-guile.hh"
static scm_t_bits simple_closure_tag;
#include "skyline.hh"
-#include "line-interface.hh"
+#include "ly-smobs.icc"
/* A skyline is a sequence of non-overlapping buildings: something like
this:
_______
- / \ ________
- / \ ________/ \
- /\ / \ / \
- / -----/ \ / \
- / \ / \
- / ------------/ ----
+ | \ ________
+ | \ ________/ \
+ /\ | \ / \
+ / -------- \ / \
+ / \ / \
+ / ------------/ ----
--
Each building has a starting position, and ending position, a starting
height and an ending height.
#define EPS 1e-10
static inline bool
-equal (Real x, Real y)
+approx_equal (Real x, Real y)
{
return abs (x - y) < EPS || (isinf (x) && isinf (y) && ((x > 0) == (y > 0)));
}
+static inline bool
+approx_greater_than (Real x, Real y)
+{
+ return x > y + EPS;
+}
+
+static inline bool
+approx_less_than (Real x, Real y)
+{
+ return x < y - EPS;
+}
+
+static inline bool
+approx_less_equal (Real x, Real y)
+{
+ return x <= y + EPS;
+}
+
+static inline bool
+approx_greater_equal (Real x, Real y)
+{
+ return x >= y - EPS;
+}
+
+void
+Skyline::print () const
+{
+ for (list<Building>::const_iterator i = buildings_.begin ();
+ i != buildings_.end (); i++)
+ {
+ (*i).print ();
+ }
+}
+
bool
Skyline::is_legal_skyline () const
{
list<Building>::const_iterator i;
Real last_x = -infinity_f;
- Real last_h = -infinity_f;
for (i = buildings_.begin (); i != buildings_.end (); i++)
{
if (i->iv_[LEFT] != last_x)
return false;
- if (i != buildings_.begin () && !equal (i->start_height_, last_h))
- return false;
last_x = i->iv_[RIGHT];
- last_h = i->end_height_;
+ if (isinf (i->iv_.length ()) && i->height_[LEFT] != i->height_[RIGHT])
+ return false;
}
return last_x == infinity_f;
}
-Building::Building (Real start, Real start_height, Real end_height, Real end, Real max_slope)
+Building::Building (Real start, Real start_height, Real end_height, Real end)
: iv_ (start, end)
{
- start_height_ = start_height;
- end_height_ = end_height;
+ height_[LEFT] = start_height;
+ height_[RIGHT] = end_height;
+
+ if (isinf (start) || isinf (end))
+ assert (start_height == end_height);
+
+ precompute ();
+}
+
+Building::Building (Box const &b, Real horizon_padding, Axis horizon_axis, Direction sky)
+{
+ Real height = sky * b[other_axis (horizon_axis)][sky];
- if (isinf (start))
- assert (isinf (start_height) || start_height == end_height);
- if (isinf (end))
- assert (isinf (end_height) || start_height == end_height);
+ iv_ = b[horizon_axis];
+ iv_.widen (horizon_padding + EPS);
+ height_[LEFT] = height;
+ height_[RIGHT] = height;
+
+ if (sane ())
+ precompute ();
+}
+
+void
+Building::precompute ()
+{
+ slope_ = (height_[RIGHT] - height_[LEFT]) / (iv_.length());
+ if (height_[LEFT] == height_[RIGHT]) /* in case they're both infinity */
+ slope_ = 0;
- m_ = (end_height - start_height) / (end - start);
- if (start_height == end_height)
- m_ = 0;
- if (isinf (m_) || isnan (m_))
- m_ = max_slope * (start_height < end_height ? 1 : -1);
- assert (abs (m_) <= max_slope);
+ assert (!isinf (slope_) && !isnan (slope_));
- if (isinf (start))
+ if (isinf (iv_[START]))
{
- if (isinf (end))
- b_ = start_height;
- else
- b_ = end_height - m_*end;
+ assert (slope_ == 0);
+ y_intercept_ = height_[LEFT];
}
else
- b_ = start_height - m_*start;
+ y_intercept_ = height_[LEFT] - slope_ * iv_[START];
}
Real
Building::height (Real x) const
{
if (isinf (x))
- return (x > 0) ? end_height_ : start_height_;
- return m_*x + b_;
+ return (x > 0) ? height_[RIGHT] : height_[LEFT];
+ return slope_*x + y_intercept_;
+}
+
+void
+Building::print () const
+{
+ printf ("X[%f,%f] -> Y[%f,%f]\n",
+ iv_[LEFT], iv_[RIGHT],
+ height_[LEFT], height_[RIGHT]);
}
Real
Building::intersection (Building const &other) const
{
- return (b_ - other.b_) / (other.m_ - m_);
+ return (y_intercept_ - other.y_intercept_) / (other.slope_ - slope_);
}
void
-Building::leading_part (Real chop, Real h)
+Building::leading_part (Real chop)
{
- assert (chop > iv_[LEFT] && chop <= iv_[RIGHT] && !equal (chop, iv_[LEFT]));
- assert (equal (h, height (chop)));
+ assert (chop > iv_[LEFT] && chop <= iv_[RIGHT] && !approx_equal (chop, iv_[LEFT]));
iv_[RIGHT] = chop;
- end_height_ = h;
+ height_[RIGHT] = height (chop);
+}
+
+Building
+Building::sloped_neighbour (Real horizon_padding, Direction d) const
+{
+ Real left = iv_[d];
+ Real right = iv_[d] + d * horizon_padding;
+ Real left_height = height_[d];
+ Real right_height = height_[d] - horizon_padding;
+ if (d == LEFT)
+ {
+ swap (left, right);
+ swap (left_height, right_height);
+ }
+ return Building (left, left_height, right_height, right);
+}
+
+bool
+Building::sane () const
+{
+ return approx_less_than (iv_[LEFT], iv_[RIGHT])
+ && !isinf (height_[RIGHT])
+ && !isinf (height_[LEFT]);
}
static void
skyline_trailing_part (list<Building> *sky, Real x)
{
- if (equal (x, sky->front ().iv_[RIGHT]))
+ if (approx_equal (x, sky->front ().iv_[RIGHT]))
sky->pop_front ();
else
assert (x < sky->front ().iv_[RIGHT]);
if (!sky->empty ())
{
sky->front ().iv_[LEFT] = x;
- sky->front ().start_height_ = sky->front ().height (x);
+ sky->front ().height_[LEFT] = sky->front ().height (x);
}
}
bool
-Building::obstructs (Building const &other) const
+Building::conceals_beginning (Building const &other) const
{
- if (equal (intersection (other), iv_[LEFT]) || equal (start_height_, other.start_height_))
- return m_ > other.m_ || (m_ == other.m_ && b_ > other.b_);
- return start_height_ > other.start_height_;
+ if (approx_equal (intersection (other), iv_[LEFT]) || approx_equal (height_[LEFT], other.height_[LEFT]))
+ return slope_ > other.slope_;
+ return height_[LEFT] > other.height_[LEFT];
+}
+
+bool
+Building::conceals (Building const &other) const
+{
+ assert (iv_[LEFT] <= other.iv_[LEFT]);
+ return (iv_[RIGHT] >= other.iv_[RIGHT])
+ && approx_greater_equal (height (other.iv_[LEFT]), other.height_[LEFT])
+ && approx_greater_equal (height (other.iv_[RIGHT]), other.height_[RIGHT]);
}
void
{
while (!s1->empty ())
{
- if (s2->front ().obstructs (s1->front ()))
+ if (s2->front ().conceals_beginning (s1->front ()))
swap (s1, s2);
Building b = s1->front ();
- while (s2->front ().iv_[RIGHT] < b.iv_[RIGHT]
- && s2->front ().end_height_ <= b.height (s2->front ().iv_[RIGHT]) + EPS)
+ while (!s2->empty () && b.conceals (s2->front ()))
s2->pop_front ();
+ if (s2->empty ())
+ {
+ result->push_front (b);
+ break;
+ }
- /* the front of s2 either intersects with b or it ends after b */
+ /* s2 either intersects with b or it ends after b */
Real end = infinity_f;
- Real s2_end_height = s2->front ().end_height_;
+ Real s2_start_height = s2->front ().height_[LEFT];
+ Real s2_end_height = s2->front ().height_[RIGHT];
+ Real s1_start_height = b.height (s2->front ().iv_[LEFT]);
Real s1_end_height = b.height (s2->front ().iv_[RIGHT]);
- if (s2_end_height > s1_end_height + EPS)
+ if (approx_greater_than (s2_start_height, s1_start_height))
+ end = s2->front ().iv_[LEFT];
+ else if (approx_greater_than (s2_end_height, s1_end_height))
end = b.intersection (s2->front ());
end = min (end, b.iv_[RIGHT]);
- Real height = b.height (end);
- b.leading_part (end, height);
+ b.leading_part (end);
result->push_front (b);
skyline_trailing_part (s1, end);
- if (!s1->empty ())
- s1->front ().start_height_ = height;
skyline_trailing_part (s2, end);
}
result->reverse ();
static void
empty_skyline (list<Building> *const ret)
{
- ret->push_front (Building (-infinity_f, -infinity_f, -infinity_f, infinity_f, 0));
+ ret->push_front (Building (-infinity_f, -infinity_f, -infinity_f, infinity_f));
}
static void
-single_skyline (Building const &b, list<Building> *const ret, Real max_slope)
+single_skyline (Building b, Real horizon_padding, list<Building> *const ret)
{
+ b.iv_.widen (horizon_padding);
+
if (!isinf (b.iv_[RIGHT]))
- ret->push_front (Building (b.iv_[RIGHT], b.end_height_, -infinity_f, infinity_f, max_slope));
- ret->push_front (b);
+ ret->push_front (Building (b.iv_[RIGHT], -infinity_f,
+ -infinity_f, infinity_f));
+ if (horizon_padding > 0 && !isinf (b.iv_.length ()))
+ ret->push_front (b.sloped_neighbour (horizon_padding, RIGHT));
+
+ if (b.iv_[RIGHT] > b.iv_[LEFT])
+ ret->push_front (b);
+
+ if (horizon_padding > 0 && !isinf (b.iv_.length ()))
+ ret->push_front (b.sloped_neighbour (horizon_padding, LEFT));
if (!isinf (b.iv_[LEFT]))
- ret->push_front (Building (-infinity_f, -infinity_f, b.start_height_, b.iv_[LEFT], max_slope));
+ ret->push_front (Building (-infinity_f, -infinity_f,
+ -infinity_f, b.iv_[LEFT]));
}
void
}
else if (size == 1)
{
- single_skyline (buildings->front (), result, max_slope_);
+ single_skyline (buildings->front (), 0, result);
return;
}
Skyline::Skyline ()
{
- max_slope_ = 2;
sky_ = UP;
- empty_skyline (&buildings_);
+ empty_skyline (&buildings_);
+}
+
+Skyline::Skyline (Skyline const &src)
+{
+ sky_ = src.sky_;
+
+ for (list<Building>::const_iterator i = src.buildings_.begin ();
+ i != src.buildings_.end (); i++)
+ {
+ buildings_.push_back (Building ((*i)));
+ }
}
Skyline::Skyline (Direction sky)
{
- max_slope_ = 2;
sky_ = sky;
empty_skyline (&buildings_);
}
-Skyline::Skyline (vector<Box> const &boxes, Axis a, Direction sky)
+/*
+ build skyline from a set of boxes. If horizon_padding > 0, expand all the boxes
+ by that amount and add 45-degree sloped boxes to the edges of each box (of
+ width horizon_padding). That is, the total amount of horizontal expansion is
+ horizon_padding*4, half of which is sloped and half of which is flat.
+
+ Boxes should have fatness in the horizon_axis (after they are expanded by
+ horizon_padding), otherwise they are ignored.
+ */
+Skyline::Skyline (vector<Box> const &boxes, Real horizon_padding, Axis horizon_axis, Direction sky)
{
list<Building> bldgs;
sky_ = sky;
- max_slope_ = 2;
for (vsize i = 0; i < boxes.size (); i++)
{
- Interval iv = boxes[i][a];
- Real height = sky * boxes[i][other_axis (a)][sky];
- if (!iv.is_empty () && !isinf (height) && !equal (iv[LEFT], iv[RIGHT]))
- bldgs.push_front (Building (iv[LEFT], height, height, iv[RIGHT], max_slope_));
+ Building front (boxes[i], horizon_padding, horizon_axis, sky);
+ if (front.sane ())
+ {
+ bldgs.push_front (front);
+ if (horizon_padding > 0 && !isinf (front.iv_.length ()))
+ {
+ bldgs.push_front (front.sloped_neighbour (horizon_padding, LEFT));
+ bldgs.push_front (front.sloped_neighbour (horizon_padding, RIGHT));
+ }
+ }
}
+
internal_build_skyline (&bldgs, &buildings_);
assert (is_legal_skyline ());
}
+Skyline::Skyline (Box const &b, Real horizon_padding, Axis horizon_axis, Direction sky)
+{
+ sky_ = sky;
+ Building front (b, 0, horizon_axis, sky);
+ single_skyline (front, horizon_padding, &buildings_);
+}
+
void
Skyline::merge (Skyline const &other)
{
}
void
-Skyline::insert (Box const &b, Axis a)
+Skyline::insert (Box const &b, Real horizon_padding, Axis a)
{
list<Building> other_bld;
list<Building> my_bld;
- Interval iv = b[a];
- Real height = sky_ * b[other_axis (a)][sky_];
my_bld.splice (my_bld.begin (), buildings_);
- single_skyline (Building (iv[LEFT], height, height, iv[RIGHT], max_slope_), &other_bld, max_slope_);
+ single_skyline (Building (b, 0, a, sky_), horizon_padding, &other_bld);
internal_merge_skyline (&other_bld, &my_bld, &buildings_);
assert (is_legal_skyline ());
}
list<Building>::iterator end = buildings_.end ();
for (list<Building>::iterator i = buildings_.begin (); i != end; i++)
{
- i->start_height_ += sky_ * r;
- i->end_height_ += sky_ * r;
- i->b_ += sky_ * r;
+ i->height_[LEFT] += sky_ * r;
+ i->height_[RIGHT] += sky_ * r;
+ i->y_intercept_ += sky_ * r;
}
assert (is_legal_skyline ());
}
+void
+Skyline::shift (Real r)
+{
+ list<Building>::iterator end = buildings_.end ();
+ for (list<Building>::iterator i = buildings_.begin (); i != end; i++)
+ {
+ i->iv_[LEFT] += r;
+ i->iv_[RIGHT] += r;
+ }
+}
+
Real
Skyline::distance (Skyline const &other) const
{
if (i->iv_[RIGHT] >= airplane)
return sky_ * i->height (airplane);
}
+
assert (0);
return 0;
}
Skyline::set_minimum_height (Real h)
{
Skyline s (sky_);
- s.buildings_.front ().start_height_ = h*sky_;
- s.buildings_.front ().end_height_ = h*sky_;
- s.buildings_.front ().b_ = h*sky_;
+ s.buildings_.front ().height_[LEFT] = h * sky_;
+ s.buildings_.front ().height_[RIGHT] = h * sky_;
+ s.buildings_.front ().y_intercept_ = h * sky_;
merge (s);
}
-Stencil
-Skyline::stencil ()
+
+vector<Offset>
+Skyline::to_points () const
{
- Stencil ret;
- for (list<Building>::iterator i = buildings_.begin (); i != buildings_.end (); i++)
+ vector<Offset> out;
+
+ for (list<Building>::const_iterator i (buildings_.begin ());
+ i != buildings_.end (); i++)
{
- if (!isinf (i->iv_.length ()))
- {
- Stencil line = Line_interface::make_line (0.1,
- Offset (i->iv_[LEFT], sky_*i->start_height_),
- Offset (i->iv_[RIGHT], sky_*i->end_height_));
- ret.add_stencil (line);
- }
+ if (!isinf (i->iv_[LEFT]) && !isinf (i->height_[LEFT]))
+ out.push_back (Offset (i->iv_[LEFT], sky_ * i->height_[LEFT]));
+ if (!isinf (i->iv_[RIGHT]) && !isinf (i->height_[RIGHT]))
+ out.push_back (Offset (i->iv_[RIGHT], sky_ * i->height_[RIGHT]));
}
- return ret;
+ return out;
+}
+
+Skyline_pair::Skyline_pair ()
+ : skylines_ (Skyline (DOWN), Skyline (UP))
+{
+}
+
+Skyline_pair::Skyline_pair (vector<Box> const &boxes, Real padding, Axis a)
+ : skylines_ (Skyline (boxes, padding, a, DOWN), Skyline (boxes, padding, a, UP))
+{
+}
+
+Skyline_pair::Skyline_pair (Box const &b, Real padding, Axis a)
+ : skylines_ (Skyline (b, padding, a, DOWN), Skyline (b, padding, a, UP))
+{
+}
+
+void
+Skyline_pair::raise (Real r)
+{
+ skylines_[UP].raise (r);
+ skylines_[DOWN].raise (r);
+}
+
+void
+Skyline_pair::shift (Real r)
+{
+ skylines_[UP].shift (r);
+ skylines_[DOWN].shift (r);
+}
+
+void
+Skyline_pair::insert (Box const &b, Real padding, Axis a)
+{
+ skylines_[UP].insert (b, padding, a);
+ skylines_[DOWN].insert (b, padding, a);
+}
+
+void
+Skyline_pair::merge (Skyline_pair const &other)
+{
+ skylines_[UP].merge (other[UP]);
+ skylines_[DOWN].merge (other[DOWN]);
+}
+
+Skyline&
+Skyline_pair::operator [] (Direction d)
+{
+ return skylines_[d];
+}
+
+Skyline const&
+Skyline_pair::operator [] (Direction d) const
+{
+ return skylines_[d];
+}
+
+/****************************************************************/
+
+
+IMPLEMENT_SIMPLE_SMOBS (Skyline);
+IMPLEMENT_TYPE_P (Skyline, "ly:skyline?");
+IMPLEMENT_DEFAULT_EQUAL_P (Skyline);
+
+IMPLEMENT_SIMPLE_SMOBS (Skyline_pair);
+IMPLEMENT_TYPE_P (Skyline_pair, "ly:skyline-pair?");
+IMPLEMENT_DEFAULT_EQUAL_P (Skyline_pair);
+
+SCM
+Skyline::mark_smob (SCM)
+{
+ return SCM_EOL;
+}
+
+int
+Skyline::print_smob (SCM s, SCM port, scm_print_state *)
+{
+ Skyline *r = (Skyline *) SCM_CELL_WORD_1 (s);
+ (void) r;
+
+ scm_puts ("#<Skyline>", port);
+
+ return 1;
+}
+
+SCM
+Skyline_pair::mark_smob (SCM)
+{
+ return SCM_EOL;
+}
+
+int
+Skyline_pair::print_smob (SCM s, SCM port, scm_print_state *)
+{
+ Skyline_pair *r = (Skyline_pair *) SCM_CELL_WORD_1 (s);
+ (void) r;
+
+ scm_puts ("#<Skyline-pair>", port);
+ return 1;
}
*/
#include "slur.hh"
-
+#include "grob-info.hh"
#include "grob-array.hh"
#include "beam.hh"
#include "bezier.hh"
Slur::add_column (Grob *me, Grob *n)
{
Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-columns"), n);
- add_bound_item (dynamic_cast<Spanner *> (me), dynamic_cast<Item *> (n));
+ add_bound_item (dynamic_cast<Spanner *> (me), n);
}
void
* Used by Slur_engraver:: and Phrasing_slur_engraver::
*/
void
-Slur::auxiliary_acknowledge_extra_object (Grob_info info,
+Slur::auxiliary_acknowledge_extra_object (Grob_info const &info,
vector<Grob*> &slurs,
vector<Grob*> &end_slurs)
{
}
-ADD_INTERFACE (Slur, "slur-interface",
+ADD_INTERFACE (Slur,
"A slur",
me->set_object ("ideal-distances", SCM_EOL);
}
-ADD_INTERFACE (Spaceable_grob, "spaceable-grob-interface",
+ADD_INTERFACE (Spaceable_grob,
"A layout object that takes part in the spacing problem. ",
*/
#include "spacing-spanner.hh"
+
+#include "spacing-options.hh"
#include "moment.hh"
#include "paper-column.hh"
#include "warn.hh"
+#include "pointer-group-interface.hh"
+#include "system.hh"
/*
LilyPond spaces by taking a simple-minded spacing algorithm, and
}
}
+Moment *
+get_measure_length (Grob *column)
+{
+ Grob * sys = column->get_parent (X_AXIS);
+
+ extract_grob_set (sys, "columns", cols);
+
+ vsize col_idx = binary_search (cols, column,
+ Paper_column::less_than);
+
+ if (col_idx == VPOS)
+ {
+ programming_error ( __FUNCTION__ + string (": Unknown column"));
+ return 0;
+ }
+
+ do
+ {
+ if (Moment *len = unsmob_moment (cols[col_idx]->get_property ("measure-length")))
+ {
+ return len;
+ }
+ }
+ while (col_idx-- != 0);
+
+ return 0;
+}
+
Real
Spacing_spanner::note_spacing (Grob *me, Grob *lc, Grob *rc,
Spacing_options const *options,
several measures.
*/
- Moment *dt = unsmob_moment (rc->get_property ("measure-length"));
+ Moment *dt = get_measure_length (lc);
if (dt)
{
delta_t = min (delta_t, *dt);
#include "staff-spacing.hh"
+#include "spacing-options.hh"
#include "system.hh"
#include "paper-column.hh"
#include "column-x-positions.hh"
#include "spacing-spanner.hh"
#include "note-spacing.hh"
#include "moment.hh"
+#include "grob-array.hh"
#include "break-align-interface.hh"
#include "warn.hh"
for (vsize i = elts.size (); i--;)
{
Grob *g = elts[i];
- if (g && Break_align_interface::has_interface (g))
+ if (g && Break_alignment_interface::has_interface (g))
{
extract_grob_set (g, "elements", gelts);
for (vsize j = gelts.size (); j--;)
{
musical_column->set_property ("shortest-playing-duration", proportional);
musical_column->set_property ("shortest-starter-duration", proportional);
+ musical_column->set_property ("used", SCM_BOOL_T);
return;
}
#include "spacing-spanner.hh"
#include "warn.hh"
#include "moment.hh"
+#include "spacing-options.hh"
/* Find the loose columns in POSNS, and drape them around the columns
specified in BETWEEN-COLS. */
*/
-#include "spacing-spanner.hh"
+#include "spacing-options.hh"
#include "grob.hh"
#include "misc.hh"
#include "moment.hh"
#include <math.h>
#include <cstdio>
+
using namespace std;
+#include "spacing-options.hh"
#include "international.hh"
#include "main.hh"
#include "moment.hh"
Spaceable_grob::add_spring (l, r, distance, inverse_strength);
}
-ADD_INTERFACE (Spacing_spanner, "spacing-spanner-interface",
+ADD_INTERFACE (Spacing_spanner,
"The space taken by a note is dependent on its duration. Doubling a\n"
"duration adds spacing-increment to the space. The most common shortest\n"
"note gets @code{shortest-duration-space}. Notes that are even shorter are\n"
);
-ADD_INTERFACE (Spacing_interface, "spacing-interface",
+ADD_INTERFACE (Spacing_interface,
"Something to do with line breaking and spacing. "
"Kill this one after determining line breaks.",
#include "pointer-group-interface.hh"
#include "side-position-interface.hh"
#include "staff-symbol-referencer.hh"
+#include "item.hh"
/**
Make arpeggios that span multiple staves. Catch arpeggios, and span a
for (vsize j = 0; j < arpeggios_.size (); j++)
{
extract_grob_set (arpeggios_[j], "stems", stems);
- for (vsize i = stems.size (); i--;)
+ for (vsize i = 0; i < stems.size (); i++)
Pointer_group_interface::add_grob (span_arpeggio_, ly_symbol2scm ("stems"),
stems[i]);
extract_grob_set (arpeggios_[j], "side-support-elements", sses);
- for (vsize i = sses.size (); i--;)
+ for (vsize i = 0; i < sses.size (); i++)
Pointer_group_interface::add_grob (span_arpeggio_, ly_symbol2scm ("side-support-elements"),
sses[i]);
return scm_from_double (iv.length ());
}
-ADD_INTERFACE (Span_bar, "span-bar-interface",
+ADD_INTERFACE (Span_bar,
"A bar line that spanned between other barlines. This interface is "
" used for bar lines that connect different staves.",
(c) 1996--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
-#include "spanner.hh"
-
-
#include "pointer-group-interface.hh"
#include "libc-extension.hh"
#include "paper-column.hh"
Spanner::set_spacing_rods (SCM smob)
{
Grob *me = unsmob_grob (smob);
-
- Rod r;
- Spanner *sp = dynamic_cast<Spanner *> (me);
- r.item_drul_[LEFT] = sp->get_bound (LEFT);
- r.item_drul_[RIGHT] = sp->get_bound (RIGHT);
-
SCM num_length = me->get_property ("minimum-length");
if (scm_is_number (num_length))
{
+ Rod r;
+ Spanner *sp = dynamic_cast<Spanner *> (me);
+
+
+ System *root = get_root_system (me);
+ vector<Item*> cols (root->broken_col_range (sp->get_bound (LEFT)->get_column (),
+ sp->get_bound (RIGHT)->get_column ()));
+
+ if (cols.size ())
+ {
+ Rod r ;
+ r.item_drul_[LEFT] = sp->get_bound (LEFT);
+ r.item_drul_[RIGHT] = cols[0]->find_prebroken_piece (LEFT);
+ r.distance_ = robust_scm2double (num_length, 0);
+ r.add_to_cols ();
+
+ r.item_drul_[LEFT] = cols.back ()->find_prebroken_piece (RIGHT);
+ r.item_drul_[RIGHT] = sp->get_bound (RIGHT);
+ r.add_to_cols ();
+ }
+
r.distance_ = robust_scm2double (num_length, 0);
+ r.item_drul_[LEFT] = sp->get_bound (LEFT);
+ r.item_drul_[RIGHT] = sp->get_bound (RIGHT);
r.add_to_cols ();
}
}
ADD_INTERFACE (Spanner,
- "spanner-interface",
"Some objects are horizontally spanned between objects. For\n"
"example, slur, beam, tie, etc. These grobs form a subtype called\n"
"@code{Spanner}. All spanners have two span-points (these must be\n"
*fixed += correction_fixed;
}
-ADD_INTERFACE (Staff_spacing, "staff-spacing-interface",
+ADD_INTERFACE (Staff_spacing,
"This object calculates spacing details from a "
" breakable symbol (left) to another object. For example, it takes care "
" of optical spacing from a bar lines to a note.",
#include "staff-symbol-referencer.hh"
-
#include "staff-symbol.hh"
+#include "grob.hh"
#include "output-def.hh"
#include "libc-extension.hh"
< Staff_symbol_referencer::get_position (b);
}
-ADD_INTERFACE (Staff_symbol_referencer, "staff-symbol-referencer-interface",
+ADD_INTERFACE (Staff_symbol_referencer,
"An object whose Y position is meant relative to a staff "
"symbol. "
"These usually have @code{Staff_symbol_referencer::callback} "
-ADD_INTERFACE (Staff_symbol, "staff-symbol-interface",
+ADD_INTERFACE (Staff_symbol,
"This spanner draws the lines of a staff. "
"A staff symbol definines a vertical unit, the staff space. "
"Quantities that go by a half staff space are called positions "
#include "engraver.hh"
#include "side-position-interface.hh"
#include "text-interface.hh"
+#include "item.hh"
class Stanza_number_engraver : public Engraver
{
#include "translator.icc"
-/**
- Make stems upon receiving noteheads.
-*/
class Stem_engraver : public Engraver
{
Grob *stem_;
return s.smobbed_copy ();
}
-ADD_INTERFACE (Stem_tremolo, "stem-tremolo-interface",
+ADD_INTERFACE (Stem_tremolo,
"A beam slashing a stem to indicate a tremolo.",
"beam-thickness "
*/
#include "stem.hh"
+#include "spanner.hh"
#include <cmath> // rint
using namespace std;
}
/* FIXME: Too many properties */
-ADD_INTERFACE (Stem, "stem-interface",
+ADD_INTERFACE (Stem,
"The stem represent the graphical stem. "
"In addition, it internally connects note heads, beams and"
"tremolos. "
LY_DEFINE (ly_event_property, "ly:event-property",
2, 0, 0, (SCM sev, SCM sym),
"Get the property @var{sym} of stream event @var{mus}.\n"
- "If @var{sym} is undefined, return @code{' ()}.\n")
+ "If @var{sym} is undefined, return @code{'()}.\n")
{
Stream_event *e = unsmob_stream_event (sev);
SCM_ASSERT_TYPE (e, sev, SCM_ARG1, __FUNCTION__, "stream event");
}
ADD_INTERFACE (System_start_delimiter,
- "system-start-delimiter-interface",
"The brace, bracket or bar in front of the system. "
,
{
public:
static Stencil get_stencil (Grob *);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK (print, (SCM));
};
ADD_INTERFACE (System_start_text,
- "system-start-text-interface",
"Text in front of the system.",
/* properties */
exprs));
if (debug_skylines)
{
- sys_stencil.add_stencil (skylines_[UP].stencil ().in_color (255, 0, 0));
- sys_stencil.add_stencil (skylines_[DOWN].stencil ().in_color (0, 255, 0));
+ sys_stencil.add_stencil (points_to_line_stencil (skylines_[UP].to_points ()).in_color (255, 0, 0));
+ sys_stencil.add_stencil (points_to_line_stencil (skylines_[DOWN].to_points ()).in_color (0, 255, 0));
}
Grob *left_bound = this->get_bound (LEFT);
left = left->get_column ();
right = right->get_column ();
+
extract_grob_set (this, "columns", cols);
- vsize i = 0;
- while (i < cols.size ()
- && cols[i] != left)
- i++;
+ vsize i = binary_search (cols, (Grob *) left,
+ Paper_column::less_than);
+
+ int end_rank = Paper_column::get_rank (right);
if (i < cols.size ())
i++;
while (i < cols.size ()
- && cols[i] != right)
+ && Paper_column::get_rank (cols[i]) < end_rank)
{
Paper_column *c = dynamic_cast<Paper_column *> (cols[i]);
if (Paper_column::is_breakable (c) && !c->system_)
return ret;
}
+
/** Return all columns, but filter out any unused columns , since they might
disrupt the spacing problem. */
vector<Grob*>
boxes.push_back (Box (xiv, yiv));
}
- skylines_[UP] = Skyline (boxes, X_AXIS, UP);
- skylines_[DOWN] = Skyline (boxes, X_AXIS, DOWN);
+ SCM horizon_padding_scm = get_property ("skyline-horizontal-padding");
+ Real horizon_padding = robust_scm2double (horizon_padding_scm, 0);
+ skylines_[UP] = Skyline (boxes, horizon_padding, X_AXIS, UP);
+ skylines_[DOWN] = Skyline (boxes, horizon_padding, X_AXIS, DOWN);
}
-ADD_INTERFACE (System, "system-interface",
+ADD_INTERFACE (System,
"This is the toplevel object: each object in a score "
"ultimately has a System object as its X and Y parent. ",
"pure-Y-extent "
"spaceable-staves "
"skyline-distance "
+ "skyline-horizontal-padding "
)
--- /dev/null
+/*
+ tab-harmonic-engraver.cc -- implement Tab_harmonic_engraver
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+*/
+
+#include "engraver.hh"
+
+#include "item.hh"
+#include "pointer-group-interface.hh"
+#include "simple-closure.hh"
+#include "stream-event.hh"
+#include "warn.hh"
+
+#include "translator.icc"
+
+class Tab_harmonic_engraver : public Engraver
+{
+ TRANSLATOR_DECLARATIONS (Tab_harmonic_engraver);
+
+protected:
+ DECLARE_ACKNOWLEDGER (note_head);
+};
+
+Tab_harmonic_engraver::Tab_harmonic_engraver()
+{
+}
+
+void
+Tab_harmonic_engraver::acknowledge_note_head (Grob_info info)
+{
+ if (Stream_event *note = info.event_cause ())
+ {
+ for (SCM s = note->get_property ("articulations");
+ scm_is_pair (s); s = scm_cdr (s))
+ {
+ Stream_event *ev = unsmob_stream_event (scm_car (s));
+
+ if (!ev)
+ continue;
+
+
+ if (ev->in_event_class ("harmonic-event"))
+ {
+ if (Item *victim = info.item ())
+ {
+ Engraver *eng = dynamic_cast<Engraver*> (info.origin_translator ());
+ Item *paren = eng->make_item ("HarmonicParenthesesItem", victim->self_scm ());
+ Pointer_group_interface::add_grob (paren, ly_symbol2scm ("elements"), victim);
+
+ paren->set_parent (victim, Y_AXIS);
+
+ Real size = robust_scm2double (paren->get_property ("font-size"), 0.0)
+ + robust_scm2double (victim->get_property ("font-size"), 0.0);
+ paren->set_property ("font-size", scm_from_double (size));
+ }
+ }
+ }
+ }
+}
+
+ADD_ACKNOWLEDGER (Tab_harmonic_engraver, note_head);
+ADD_TRANSLATOR (Tab_harmonic_engraver,
+ /* doc */ "Parenthesize objects whose music cause has the @code{parenthesize} "
+ "property.",
+
+ /* create */
+ "HarmonicParenthesesItem ",
+ /* read */ "",
+ /* write */ "");
/*
tab-note-heads-engraver.cc -- part of GNU LilyPond
- based on note-heads-engraver.cc, by Jean-Baptiste Lamy <jiba@tuxfamily.org>,
-
- (c) 2002--2006
+ (c) 2002--2006 Han-Wen Nienhuys, Jean-Baptiste Lamy <jiba@tuxfamily.org>,
*/
#include <cctype>
#include "rhythmic-head.hh"
#include "stream-event.hh"
#include "warn.hh"
+#include "context.hh"
#include "translator.icc"
vsize j = 0;
for (vsize i = 0; i < note_events_.size (); i++)
{
- SCM stringTunings = get_property ("stringTunings");
- int number_of_strings = scm_ilength (stringTunings);
+ SCM string_tunings = get_property ("stringTunings");
+ int number_of_strings = scm_ilength (string_tunings);
bool high_string_one = to_boolean (get_property ("highStringOne"));
Stream_event *event = note_events_[i];
while (!string_found)
{
int fret = unsmob_pitch (scm_pitch)->semitone_pitch ()
- - scm_to_int (scm_list_ref (stringTunings, scm_from_int (tab_string - 1)));
+ - scm_to_int (scm_list_ref (string_tunings, scm_from_int (tab_string - 1)));
if (fret < min_fret)
tab_string += high_string_one ? 1 : -1;
else
string_found = true;
}
- SCM text = scm_call_3 (proc, scm_from_int (tab_string), stringTunings, scm_pitch);
+ SCM text = scm_call_3 (proc, scm_from_int (tab_string),
+ context ()->self_scm (),
+ event->self_scm ());
+ note->set_property ("text", text);
+
int pos = 2 * tab_string - number_of_strings - 1; // No tab-note between the string !!!
if (to_boolean (get_property ("stringOneTopmost")))
pos = -pos;
- note->set_property ("text", text);
-
note->set_property ("staff-position", scm_from_int (pos));
+
+
notes_.push_back (note);
}
}
#include "stem.hh"
#include "stream-event.hh"
#include "text-interface.hh"
+#include "item.hh"
#include "translator.icc"
class Text_engraver : public Engraver
{
vector<Stream_event *> evs_;
- vector<Item*> texts_;
+ vector<Grob*> texts_;
public:
TRANSLATOR_DECLARATIONS (Text_engraver);
protected:
ly_symbol2scm ("markup-signature"))));
}
-ADD_INTERFACE (Text_interface, "text-interface",
+ADD_INTERFACE (Text_interface,
"A scheme markup text, see @usermanref{Text markup}.",
"baseline-skip "
"text "
#include "international.hh"
#include "note-column.hh"
#include "side-position-interface.hh"
+#include "spanner.hh"
#include "stream-event.hh"
#include "translator.icc"
if (spans[i])
{
Side_position_interface::add_support (spans[i], info.grob ());
- add_bound_item (spans[i], dynamic_cast<Item *> (info.grob ()));
+ add_bound_item (spans[i], info.grob ());
}
}
}
}
ADD_INTERFACE (Text_spanner,
- "text-spanner-interface",
"generic text spanner",
-ADD_INTERFACE (Tie_column, "tie-column-interface",
+ADD_INTERFACE (Tie_column,
"Object that sets directions of multiple ties in a tied chord",
/* properties */
*/
#include "tie-configuration.hh"
+
#include "warn.hh"
#include "tie-formatting-problem.hh"
#include "bezier.hh"
#include "paper-column.hh"
#include "bezier.hh"
#include "directional-element-interface.hh"
-#include "item.hh"
#include "libc-extension.hh"
#include "misc.hh"
#include "note-head.hh"
boxes.push_back (Box (x, y));
}
while (flip (&updowndir) != DOWN);
-
- chord_outlines_[key] = Skyline (boxes, Y_AXIS, -dir);
+
+ /* todo: the horizon_padding is somewhat arbitrary */
+ chord_outlines_[key] = Skyline (boxes, 0.1, Y_AXIS, -dir);
if (bounds[0]->break_status_dir ())
{
Real x = robust_relative_extent (bounds[0], x_refpoint_, X_AXIS)[-dir];
}
ADD_INTERFACE (Tie,
- "tie-interface",
-
"A horizontal curve connecting two noteheads. \n\n"
,
#include "engraver-group.hh"
+#include "item.hh"
#include "international.hh"
#include "misc.hh"
#include "time-signature.hh"
#include "time-signature.hh"
+#include "grob.hh"
#include "font-interface.hh"
#include "international.hh"
#include "output-def.hh"
return m;
}
-ADD_INTERFACE (Time_signature, "time-signature-interface",
+ADD_INTERFACE (Time_signature,
"A time signature, in different styles.\n"
" The following values for 'style are are recognized:\n"
"\n"
*/
#include "translator-dispatch-list.hh"
-
-#include "grob-info.hh"
#include "engraver.hh"
#include "ly-smobs.icc"
#include "score-engraver.hh"
#include "score-performer.hh"
-#include "engraver-group.hh"
-#include "performer-group.hh"
#include "warn.hh"
/*
#include "output-def.hh"
#include "performer-group.hh"
#include "scm-hash.hh"
-#include "stream-event.hh"
#include "warn.hh"
Translator_group *
#include "note-column.hh"
#include "side-position-interface.hh"
#include "stream-event.hh"
+#include "spanner.hh"
#include "translator.icc"
if (spans[i])
{
Side_position_interface::add_support (spans[i], info.grob ());
- add_bound_item (spans[i], dynamic_cast<Item *> (info.grob ()));
+ add_bound_item (spans[i], info.grob ());
}
}
}
#include <freetype/tttables.h>
-#include "lily-proto.hh"
#include "memory-stream.hh"
#include "warn.hh"
#include "lily-guile.hh"
= (TT_Postscript *) FT_Get_Sfnt_Table (face, ft_sfnt_post);
if (pt->maxMemType42)
- lily_cookie_fprintf (out, "%%%%VMUsage: %ld %ld\n", 0, 0);
+ lily_cookie_fprintf (out, "%%%%VMUsage: %d %d\n", 0, 0);
lily_cookie_fprintf (out, "%d dict begin\n", 11);
lily_cookie_fprintf (out, "/FontName /%s def\n",
lily_cookie_fprintf (out, "/FontType 42 def\n");
lily_cookie_fprintf (out, "/FontInfo 8 dict dup begin\n");
lily_cookie_fprintf (out, "/version (%d.%d) def\n",
- (ht->Font_Revision >> 16),
- (ht->Font_Revision &((1 << 16) -1)));
+ int (ht->Font_Revision >> 16),
+ int (ht->Font_Revision &((1 << 16) -1)));
#if 0
if (strings[0])
straight_corners[d] += -d * shorten[d] / length * dz;
while (flip (&d) != LEFT);
- if (gap.is_empty ())
- gap = Interval (0, 0);
- do
- gap_corners[d] = (dz * 0.5) + gap[d] / length * dz;
- while (flip (&d) != LEFT)
- ;
+ if (!gap.is_empty ())
+ {
+ do
+ gap_corners[d] = (dz * 0.5) + gap[d] / length * dz;
+ while (flip (&d) != LEFT);
+ }
Drul_array<Offset> flare_corners = straight_corners;
do
Stencil m;
do
{
- m.add_stencil (Line_interface::line (me, straight_corners[d],
- gap_corners[d]));
+ if (!gap.is_empty ())
+ m.add_stencil (Line_interface::line (me, straight_corners[d],
+ gap_corners[d]));
m.add_stencil (Line_interface::line (me, straight_corners[d],
flare_corners[d]));
}
+
while (flip (&d) != LEFT);
+ if (gap.is_empty ())
+ m.add_stencil (Line_interface::line (me, straight_corners[LEFT],
+ straight_corners[RIGHT]));
+
return m;
}
}
ADD_INTERFACE (Tuplet_bracket,
- "tuplet-bracket-interface",
"A bracket with a number in the middle, used for tuplets. "
"When the bracket spans a line break, the value of "
"@code{break-overshoot} determines how far it extends "
#include "stream-event.hh"
#include "tuplet-bracket.hh"
#include "warn.hh"
+#include "item.hh"
#include "translator.icc"
protected:
vector<Tuplet_description> tuplets_;
+ vector<Tuplet_description> new_tuplets_;
vector<Tuplet_description> stopped_tuplets_;
vector<Spanner*> last_tuplets_;
+
DECLARE_ACKNOWLEDGER (note_column);
DECLARE_TRANSLATOR_LISTENER (tuplet_span);
virtual void finalize ();
{
Tuplet_description d;
d.event_ = ev;
- tuplets_.push_back (d);
+ new_tuplets_.push_back (d);
}
else if (dir == STOP && tuplets_.size ())
{
}
stopped_tuplets_.clear ();
+ concat (tuplets_, new_tuplets_);
+ new_tuplets_.clear ();
for (vsize j = tuplets_.size (); j > 0; j--)
{
/* i goes from size-1 downto 0, inclusively */
struct Tuplet_number
{
DECLARE_SCHEME_CALLBACK(print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
ADD_INTERFACE (Tuplet_number,
- "tuplet-number-interface",
"The number for a bracket. "
,
return SCM_EOL;
}
-ADD_INTERFACE (Vaticana_ligature, "vaticana-ligature-interface",
+ADD_INTERFACE (Vaticana_ligature,
"A vaticana style gregorian ligature",
/* properties */
"Catch groups (staffs, lyrics lines, etc.) and stack "
"them vertically.",
/* create */ "VerticalAlignment",
- /* read */ "alignAboveContext alignBelowContext",
+ /* read */
+ "alignAboveContext "
+ "alignBelowContext ",
+
/* write */ "");
Vertical_align_engraver::Vertical_align_engraver ()
Side_position_interface::add_support (me, c);
}
-ADD_INTERFACE (Volta_bracket_interface, "volta-bracket-interface",
+ADD_INTERFACE (Volta_bracket_interface,
"Volta bracket with number",
/* properties */
#include "context.hh"
#include "international.hh"
#include "note-column.hh"
+#include "item.hh"
#include "side-position-interface.hh"
#include "staff-symbol.hh"
#include "text-interface.hh"
(Voice Slur direction ,DOWN)
)
- keepAliveInterfaces = #'(rhythmic-grob-interface lyric-interface percent-repeat-interface)
- quotedEventTypes = #'(note-event rest-event time-scaled-music tie-event beam-event)
+ keepAliveInterfaces = #'(
+ rhythmic-grob-interface
+ lyric-interface
+ percent-repeat-interface)
+ quotedEventTypes = #'(
+ note-event
+ rest-event
+ tie-event
+ beam-event
+ tuplet-span-event)
instrumentTransposition = #(ly:make-pitch 0 0 0)
verticallySpacedContexts = #'(Staff)
\name "TabVoice"
\alias "Voice"
\consists "Tab_note_heads_engraver"
+ \consists "Tab_harmonic_engraver"
+
\remove "Note_heads_engraver"
\remove "Fingering_engraver"
\remove "New_fingering_engraver"
%% No accidental in tablature !
\remove Accidental_engraver
+
+ \override Glissando #'extra-dy = #0.75
+ \override Glissando #'gap = #0.2
}
\context {
@var{music}: a music sequence, containing BarChecks as limiting expressions.
Example:
+
+@verbatim
\\parallelMusic #'(A B C) {
c c | d d | e e |
d d | e e | f f |
A = { c c | d d | }
B = { d d | e e | }
C = { e e | f f | }
+@end verbatim
"
(let* ((voices (apply circular-list (make-list (length voice-ids) (list))))
(current-voices voices)
(if (access? tweak-filename R_OK)
(begin
(ly:message "Including tweak file ~a" tweak-filename)
- (set! page-layout-parser (ly:clone-parser parser))
+ (set! page-layout-parser (ly:parser-clone parser))
(ly:parser-parse-string page-layout-parser
(format #f "\\include \"~a\""
tweak-filename))))))
--- /dev/null
+# assumes depth and ISOLANG are defined
+
+OUT_ITEXI_FILES = $(ITELY_FILES:%.itely=$(outdir)/%.itexi)
+
+LILYPOND_BOOK_INCLUDES += \
+ -I$(top-src-dir)/Documentation/user \
+ -I$(top-build-dir)/Documentation/user/$(outdir)
+
+default:
+
+$(outdir)/lilypond.nexi: $(ITELY_FILES) $(ITEXI_FILES)
+
+MAKEINFO = LANG=$(ISOLANG) $(MAKEINFO_PROGRAM) --force
+
+$(outdir)/lilypond/index.html: $(outdir)/lilypond.nexi doc-po
+ mkdir -p $(dir $@)
+ -$(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
+ find $(outdir) -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | xargs $(PYTHON) $(top-src-dir)/buildscripts/html-gettext.py $(depth)/Documentation/po/$(outdir) $(ISOLANG)
+
+$(outdir)/lilypond.html: $(outdir)/lilypond.nexi
+ -$(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $<
+
+local-WWW: png-ln $(outdir)/lilypond.html $(outdir)/lilypond/index.html deep-ln lang-merge
+
+lang-merge:
+ $(foreach i, $(shell find $(outdir) -name '*.html' | xargs grep -L --label="" 'UNTRANSLATED NODE: IGNORE ME'), ln -f $(i) $(i:$(outdir)/%.html=$(depth)/Documentation/user/$(outdir)/%.$(ISOLANG).html) &&) true
+
+png-ln:
+ mkdir -p $(outdir)/lilypond
+ # makeinfo is broken, it MUST have PNGs in output dir
+ # symlinking PNGs...
+ $(foreach i, $(shell find $(depth)/Documentation/user/$(outdir) -maxdepth 1 -name '*.png'), ln -sf ../$(i) $(i:$(depth)/Documentation/user/$(outdir)/%.png=$(outdir)/%.png) &&) true
+ $(foreach i, $(shell find $(depth)/Documentation/user/$(outdir)/lilypond -name '*.png'), ln -sf ../../$(i) $(i:$(depth)/Documentation/user/$(outdir)/%.png=$(outdir)/%.png) &&) true
+
+# Links referred to by Documentation index
+# BROKEN: the following makes broken symlinks
+#LILYPOND_LINKS = Reference-Manual.html Tutorial.html Ly2dvi.html Midi2ly.html
+
+
+deep-ln:
+ mkdir -p $(outdir)/lilypond
+ cd $(outdir)/lilypond && $(foreach i, $(LILYPOND_LINKS),\
+ rm -f $(i) && ln -s lilypond.html $(i) &&) true
+
+local-WWW-clean: deep-WWW-clean
+
+deep-WWW-clean:
+ rm -rf $(outdir)/lilypond
+
+web-clean: clean
+ $(MAKE) out=www local-WWW-clean
+
+doc-po:
+ $(MAKE) -C $(depth)/Documentation/po messages
LILYPOND_BOOK = $(script-dir)/lilypond-book.py
LILYPOND_BOOK_INCLUDES = -I $(src-dir)/ -I $(outdir) -I $(input-dir) -I $(input-dir)/regression/ -I $(input-dir)/manual/ -I $(input-dir)/tutorial/ -I $(top-build-dir)/mf/$(outconfbase)/ -I $(top-build-dir)/mf/out/
-LILYPOND_BOOK_LILYPOND_FLAGS=--backend=eps --formats=ps,png,pdf -dinclude-eps-fonts -dgs-load-fonts --header=texidoc -I $(top-src-dir)/input/manual -dcheck-internal-types -ddump-signatures -danti-alias-factor=2
+LILYPOND_JOBS=$(if $(CPU_COUNT),-djob-count=$(CPU_COUNT),)
+LILYPOND_BOOK_LILYPOND_FLAGS=--backend=eps --formats=ps,png,pdf $(LILYPOND_JOBS) -dinclude-eps-fonts -dgs-load-fonts --header=texidoc -I $(top-src-dir)/input/manual -dcheck-internal-types -ddump-signatures -danti-alias-factor=2
LILYPOND_BOOK_FLAGS = --process="$(LILYPOND_BINARY) $(LILYPOND_BOOK_LILYPOND_FLAGS)"
TEXINPUTS=$(top-src-dir)/tex/::
# Make tfm files first, log files last,
# so that normally log files aren't made twice
-ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(TFM_FILES) $(LOG_FILES) $(ENC_FILES) $(LISP_FILES) $(FETA_LIST_FILES) $(OTF_TABLES) $(NCSB_OTFS) $(PFA_FILES) $(OTF_FILES) $(SVG_FILES)
+ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(TFM_FILES) $(LOG_FILES) $(ENC_FILES) $(LISP_FILES) $(OTF_TABLES) $(NCSB_OTFS) $(PFA_FILES) $(OTF_FILES) $(SVG_FILES)
#PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
NAME = lilypond
MODULE_NAME = po
-
-POT_FILES = $(call src-wildcard,*.pot)
-PO_FILES = $(call src-wildcard,*.po)
-MO_FILES = $(addprefix $(outdir)/, $(PO_FILES:.po=.mo))
-HELP_CATALOGS = $(PO_FILES:%.po=%)
-CATALOGS = $(HELP_CATALOGS:lilypond=)
-EXTRA_DIST_FILES = TODO $(PO_FILES) $(POT_FILES)
-STEPMAKE_TEMPLATES=podir
+DOMAIN = $(NAME)
+EXTRA_DIST_FILES = TODO
+STEPMAKE_TEMPLATES=podir
include $(depth)/make/stepmake.make
py = src_glob ('*.py')
c = src_glob ('*.c')
-pym = map (env.AT_COPY_EXT, py)
cm = map (env.SharedObject, c)
-pym
+py
cm
-install (cm + pym, env['sharedir_package_version'] + '/python')
+install (py, env['sharedir_package_version'] + '/python')
install (cm, env['libdir_package_version'] + '/python')
conversions.append (((2, 10, 0), conv, """bump version for release"""))
+
+def conv (str):
+ return re.sub ('ly:clone-parser',
+ 'ly:parser-clone', str)
+
+conversions.append (((2, 11, 2), conv, """ly:clone-parser -> ly:parser-clone"""))
+
(rename-page-1 #f))
(ly:message (_ "Converting to ~a...") "PNG")
- (make-ps-images name resolution paper-width paper-height rename-page-1 verbose
- (ly:get-option 'anti-alias-factor))
+
+ (make-ps-images name
+ #:resolution resolution
+ #:page-width paper-width
+ #:page-height paper-height
+ #:rename-page-1 rename-page-1
+ #:be-verbose verbose
+ #:anti-alias-factor (ly:get-option 'anti-alias-factor)
+ #:pixmap-format (ly:get-option 'pixmap-format)
+ )
+
(ly:progress "\n")))
(define-public (postprocess-output paper-book module filename formats)
(define-public (object-type obj)
(match-predicate obj type-p-name-alist))
+
(define-public (object-type-name obj)
(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)
(ly:add-interface
'parentheses-interface
"Parentheses for other objects"
- '(padding))
+ '(padding stencils))
(ly:add-interface
'piano-pedal-interface
"How much of the bound a spanner should enclose:
+1 = completely, 0 = center, -1 not at all.")
(expand-limit ,integer? "maximum number of measures expanded in church rests.")
- ;; remove me?
+ ;; remove me?
+ (extra-dy ,number? "Slope glissandi this much extra.")
(extra-X-extent ,number-pair? "A grob is enlarged in X dimension
by this much.")
(extra-Y-extent ,number-pair? "See @code{extra-X-extent}.")
(non-musical ,boolean? "True if the grob belongs in a NonMusicalPaperColumn.")
(number-type ,symbol? "Type of numbers to use in label. Choices
include @code{roman-lower}, @code{roman-upper}, and @code{arabic}.")
+ (outside-staff-horizontal-padding ,number? "By default, an outside-staff-object can be
+placed so that is it very close to another grob horizontally. If this property is set,
+the outside-staff-object will be raised so that it is not so close to its neighbour.")
+ (outside-staff-padding ,number? "The padding to place between this grob and the staff when
+spacing according to outside-staff-priority.")
(outside-staff-priority ,number? "When set, the grob will be positioned outside the staff
in such a way as to avoid all collisions. In case of a potential collision, the grob with
the smaller outside-staff-priority will be closer to the staff.")
object.")
(side-axis ,number? "If the value is #X (or equivalently 1), the object is placed horizontally next to the other object. If the value is #Y or 0, it is placed vertically.")
(size ,number? "Size of object, relative to standard size.")
+ (skylines ,ly:skyline-pair? "Two skylines, one above and one below this grob (or, for some grobs, to the left and to the right).")
(slope ,number? "The slope of this object.")
(slur-padding ,number? "Extra distance between slur and script.")
(space-alist ,list? "A table that specifies distances between
directions, this amount is the correction for two normal sized stems
that overlap completely.")
(stencil ,ly:stencil? "The symbol to print.")
+ (stencils ,list? "Multiple stencils, used as intermediate value.")
(strict-note-spacing ,boolean? "If set, unbroken columns
with non-musical material (clefs, barlines, etc.) are not spaced
separately, but put before musical columns.")
(spaceable-staves ,ly:grob-array? "Objects to be spaced during page layout.")
(skyline-distance ,number? "The distance between this staff and the next one, as determined by a skyline algorithm.")
- (skyline-spacing ,boolean? "When true, this axis-group will vertically space its children
-using a skyline algorithm.")
+ (skyline-horizontal-padding ,number? "For determining the vertical distance between 2 staves, it is possible to have a configuration which would result in a tight interleaving of grobs from the top staff and the bottom staff. The larger this parameter is, the farther apart the staves will be placed in such a configuration.")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(X-offset . ,(ly:make-simple-closure
`(,+
,(ly:make-simple-closure
- (list ly:break-alignment-align-interface::self-align-callback))
+ (list ly:break-alignable-interface::self-align-callback))
,(ly:make-simple-closure
(list ly:self-alignment-interface::x-aligned-on-self)))))
((class . Item)
(interfaces . (side-position-interface
text-interface
- break-alignment-align-interface
+ break-alignable-interface
self-alignment-interface
font-interface
))))
. (
(axes . (,Y))
(Y-extent . ,ly:axis-group-interface::height)
+ (skylines . ,ly:axis-group-interface::calc-skylines)
(meta . ((class . Spanner)
(interfaces . (axis-group-interface
))))))
(BendAfter
. (
- (stencil . ,fall::print)
+ (stencil . ,bend::print)
(thickness . 2.0)
(meta . ((class . Spanner)
(interfaces . (spanner-interface
. (
(non-musical . #t)
(stacking-dir . 1)
- (positioning-done . ,ly:break-align-interface::calc-positioning-done)
+ (positioning-done . ,ly:break-alignment-interface::calc-positioning-done)
(X-extent . ,ly:axis-group-interface::width)
(break-align-orders . ;; end of line
#((
(meta . ((class . Item)
(interfaces . (font-interface
break-aligned-interface
- percent-repeat-interface))))))
+ percent-repeat-item-interface))))))
(DoublePercentRepeatCounter
. (
(meta . ((class . Item)
(interfaces . (side-position-interface
self-alignment-interface
- percent-repeat-interface
+ percent-repeat-item-interface
font-interface
text-interface))))))
(DynamicLineSpanner
(minimum-space . 1.2)
(direction . ,DOWN)
(side-axis . ,Y)
+ (outside-staff-priority . 250)
(Y-extent . ,ly:axis-group-interface::height)
(X-extent . ,ly:axis-group-interface::width)
(meta . ((class . Spanner)
(font-shape . italic)
(avoid-slur . around)
(no-spacing-rods . #t)
- (script-priority . 100)
+ (outside-staff-priority . 250)
(meta . ((class . Item)
(interfaces . (font-interface
text-interface
(style . line)
(gap . 0.5)
(zigzag-width . 0.75)
- (non-musical . #t)
(X-extent . #f)
(Y-extent . #f)
(stencil . ,ly:line-spanner::print)
(length-fraction . 0.25)
(layer . 0)
(meta . ((class . Spanner)
- (interfaces . (ledger-line-interface))))))
+ (interfaces . (ledger-line-spanner-interface))))))
(LeftEdge
. (
(minimum-length . 0.3)
(minimum-distance . 0.1)
(padding . 0.07)
- (springs-and-rods . ,ly:hyphen-spanner::set-spacing-rods)
- (stencil . ,ly:hyphen-spanner::print)
+ (springs-and-rods . ,ly:lyric-hyphen::set-spacing-rods)
+ (stencil . ,ly:lyric-hyphen::print)
(Y-extent . (0 . 0))
(meta . ((class . Spanner)
(interfaces . (lyric-interface
(LyricSpace
. ((minimum-distance . 0.45)
- (springs-and-rods . ,ly:hyphen-spanner::set-spacing-rods)
+ (springs-and-rods . ,ly:lyric-hyphen::set-spacing-rods)
(padding . 0.0)
(Y-extent . #f)
(X-extent . #f)
(Y-offset . ,ly:side-position-interface::y-aligned-side)
(stencil . ,ly:text-interface::print)
-
- ;; no Y dimensions, because of lyrics under tenor clef.
- (Y-extent . (0 . 0))
(font-shape . italic)
(padding . 0.6)
(staff-padding . 0.2)
(dash-fraction . 0.3)
(edge-height . (0 . 1.2))
(direction . ,UP)
+ (outside-staff-priority . 400)
(meta . ((class . Spanner)
(interfaces . (ottava-bracket-interface
horizontal-bracket-interface
(ParenthesesItem
. ((stencil . ,parentheses-item::print)
+ (stencils . ,parentheses-item::calc-parenthesis-stencils)
(font-size . -6)
(padding . 0.2)
(meta . ((class . Item)
(interfaces . (parentheses-interface font-interface))))
))
+
+ (HarmonicParenthesesItem
+ . ((stencil . ,parentheses-item::print)
+ (padding . 0)
+ (stencils . ,parentheses-item::calc-angled-bracket-stencils)
+ (meta . ((class . Item)
+ (interfaces . (parentheses-interface font-interface))))
+ ))
(PhrasingSlur
. ((details . ,default-slur-details)
(meta . ((class . Spanner)
(interfaces . (multi-measure-rest-interface
font-interface
- percent-repeat-interface))))))
+ percent-repeat-item-interface))))))
(PercentRepeatCounter
. (
(stencil . ,ly:text-interface::print)
(meta . ((class . Spanner)
(interfaces . (side-position-interface
self-alignment-interface
- percent-repeat-interface
+ percent-repeat-item-interface
font-interface
text-interface))))))
(X-offset . ,(ly:make-simple-closure
`(,+
,(ly:make-simple-closure
- (list ly:break-alignment-align-interface::self-align-callback))
+ (list ly:break-alignable-interface::self-align-callback))
,(ly:make-simple-closure
(list ly:self-alignment-interface::x-aligned-on-self)))))
(break-visibility . ,end-of-line-invisible)
(break-align-symbol . staff-bar)
(padding . 0.8)
+ (outside-staff-priority . 1000)
(meta . ((class . Item)
(interfaces . (text-interface
side-position-interface
- break-alignment-align-interface
+ break-alignable-interface
font-interface
mark-interface
self-alignment-interface))))))
(thickness . 0.48)
(slope . 1.7)
(meta . ((class . Item)
- (interfaces . (percent-repeat-interface))))))
+ (interfaces . (percent-repeat-item-interface))))))
(RepeatTie
. (
(avoid-slur . inside)
(X-extent . ,ly:axis-group-interface::width)
(Y-extent . ,ly:axis-group-interface::height)
+ (skylines . ,ly:separation-item::calc-skylines)
(meta . ((class . Item)
(interfaces . (spacing-interface
separation-item-interface))))))
(meta . ((class . Spanner)
(interfaces . (only-prebreak-interface
spacing-interface
- separation-spanner-interface))))))
+ separating-group-spanner-interface))))))
(Slur
. ((details . ,default-slur-details)
(axes . (0 1))
(X-extent . ,ly:axis-group-interface::width)
(Y-extent . ,ly:axis-group-interface::height)
- (skyline-spacing . #t)
+ (skylines . ,ly:axis-group-interface::calc-skylines)
+ (skyline-horizontal-padding . 1.0)
(meta . ((class . System)
(interfaces . (system-interface
axis-group-interface))))))
(interfaces . (side-position-interface
system-start-delimiter-interface))))))
-
(TabNoteHead
. (
(stencil . ,ly:text-interface::print)
(Y-offset . ,ly:staff-symbol-referencer::callback)
+ (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
+ (direction . 0)
(font-size . -2)
(stem-attachment . (0.0 . 1.35))
(font-series . bold)
(stencil . ,ly:text-interface::print)
(direction . ,ly:script-interface::calc-direction)
+ (outside-staff-priority . 450)
(avoid-slur . around)
(slur-padding . 0.5)
(script-priority . 200)
(dash-period . 3.0)
(side-axis . ,Y)
(direction . ,UP)
+ (outside-staff-priority . 350)
(meta . ((class . Spanner)
(interfaces . (text-spanner-interface
line-spanner-interface
(stencil . ,ly:tie::print)
(font-size . -6)
(details . (
- ;; for a full list, see tie-helper.cc
+ ;; for a full list, see tie-details.cc
(ratio . 0.333)
(center-staff-line-clearance . 0.6)
(tip-staff-line-clearance . 0.45)
(direction . ,UP)
(Y-offset . ,ly:side-position-interface::y-aligned-side)
(side-axis . ,Y)
+ (outside-staff-priority . 50)
(meta . ((class . Spanner)
(interfaces . (text-spanner-interface
line-spanner-interface
(axes . (,X))
(font-size . -4)
(stencil . ,parenthesize-elements)
+ (stencils . ,parentheses-item::calc-parenthesis-stencils)
(direction . ,RIGHT)
(side-axis . ,X)
(padding . 0.3)
(Y-extent . ,ly:axis-group-interface::height)
(X-extent . ,ly:axis-group-interface::width)
(stacking-dir . -1)
- (padding . 0.1)
+ (padding . 0.1)
+ (skylines . ,ly:axis-group-interface::combine-skylines)
(meta . ((class . Spanner)
(interfaces . (align-interface
axis-group-interface))))))
(Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback)
(Y-extent . ,ly:hara-kiri-group-spanner::y-extent)
(X-extent . ,ly:axis-group-interface::width)
- (skyline-spacing . #t)
+ (skylines . ,ly:axis-group-interface::calc-skylines);
(meta . ((class . Spanner)
(interfaces . (axis-group-interface
- hara-kiri-group-interface
+ hara-kiri-group-spanner-interface
vertically-spaceable-interface))))))
(edge-height . (2.0 . 2.0)) ;; staff-space;
(minimum-space . 5)
(font-size . -4)
+ (outside-staff-priority . 100)
(meta . ((class . Spanner)
(interfaces . (volta-bracket-interface
horizontal-bracket-interface
(define pure-print-callbacks
(list
+ ly:bar-line::print
ly:note-head::print
+ ly:accidental-interface::print
+ ly:dots::print
ly:clef::print
ly:text-interface::print
ly:script-interface::print))
(define-markup-command (whiteout layout props arg) (markup?)
"Provide a white underground for @var{arg}"
- (let* ((stil (interpret-markup layout props arg))
- (white
- (interpret-markup layout props
- (make-with-color-markup
- white
- (make-filled-box-markup
- (ly:stencil-extent stil X)
- (ly:stencil-extent stil Y)
- 0.0)))))
-
- (ly:stencil-add white stil)))
+ (stencil-whiteout (interpret-markup layout props arg)))
(define-markup-command (pad-markup layout props padding arg) (number? markup?)
"Add space around a markup object."
space
(remove ly:stencil-empty? stencils))))
+(define-markup-command (concat layout props args) (markup-list?)
+ "Concatenate @var{args} in a horizontal line, without spaces inbetween.
+Strings and simple markups are concatenated on the input level, allowing
+ligatures. For example, @code{\\concat @{ \"f\" \\simple #\"i\" @}} is
+equivalent to @code{\"fi\"}."
+
+ (define (concat-string-args arg-list)
+ (fold-right (lambda (arg result-list)
+ (let ((result (if (pair? result-list)
+ (car result-list)
+ '())))
+ (if (and (pair? arg) (eqv? (car arg) simple-markup))
+ (set! arg (cadr arg)))
+ (if (and (string? result) (string? arg))
+ (cons (string-append arg result) (cdr result-list))
+ (cons arg result-list))))
+ '()
+ arg-list))
+
+ (interpret-markup layout
+ (prepend-alist-chain 'word-space 0 props)
+ (make-line-markup (concat-string-args args))))
(define (wordwrap-stencils stencils
justify base-space line-width text-dir)
(define-markup-command (fraction layout props arg1 arg2) (markup? markup?)
"Make a fraction of two markups."
(let* ((m1 (interpret-markup layout props arg1))
- (m2 (interpret-markup layout props arg2)))
+ (m2 (interpret-markup layout props arg2))
+ (factor (magstep (chain-assoc-get 'font-size props 0)))
+ (boxdimen (cons (* factor -0.05) (* factor 0.05)))
+ (padding (* factor 0.2))
+ (baseline (* factor 0.6))
+ (offset (* factor 0.75)))
(set! m1 (ly:stencil-aligned-to m1 X CENTER))
(set! m2 (ly:stencil-aligned-to m2 X CENTER))
(let* ((x1 (ly:stencil-extent m1 X))
(x2 (ly:stencil-extent m2 X))
- (line (ly:round-filled-box (interval-union x1 x2) '(-0.05 . 0.05) 0.0))
+ (line (ly:round-filled-box (interval-union x1 x2) boxdimen 0.0))
;; should stack mols separately, to maintain LINE on baseline
- (stack (stack-lines -1 0.2 0.6 (list m1 line m2))))
+ (stack (stack-lines DOWN padding baseline (list m1 line m2))))
(set! stack
(ly:stencil-aligned-to stack Y CENTER))
(set! stack
(ly:stencil-aligned-to stack X LEFT))
;; should have EX dimension
;; empirical anyway
- (ly:stencil-translate-axis stack 0.75 Y))))
+ (ly:stencil-translate-axis stack offset Y))))
--- /dev/null
+;;
+;; document-identifiers.scm -- implement documentation
+;; of identifiers from .ly file.
+;;
+;; source file of the GNU LilyPond music typesetter
+;;
+;; (c) 2006 Han-Wen Nienhuys <hanwen@lilypond.org>
+;;
+
+
+(use-modules (ice-9 format))
+
+(define (document-music-function music-func-pair)
+ (let*
+ ((name-sym (car music-func-pair))
+ (music-func (cdr music-func-pair))
+ (func (ly:music-function-extract music-func))
+ (arg-names
+ (map symbol->string
+ (cddr (cadr (procedure-source func)))))
+ (doc (procedure-documentation func))
+ (sign (object-property func 'music-function-signature))
+ (type-names (map type-name sign))
+
+ ;; C&P
+ (signature (zip arg-names arg-names type-names))
+ (signature-str
+ (string-join
+ (map (lambda (x) (format "@var{~a} (~a)"
+ (car x)
+ (cadr x)))
+
+ (zip arg-names type-names)))))
+
+ (format
+
+ "\n
+@item @code{~a} - ~a\n
+@findex ~a
+
+~a\n\n"
+
+ name-sym signature-str
+ name-sym
+ (if doc doc "(undocumented; fixme)"))))
+
+
+
+(define (document-object obj-pair)
+ (cond
+ ((ly:music-function? (cdr obj-pair)) (document-music-function obj-pair))
+ (else
+ #f)))
+
+(define-public (identifiers-doc-string)
+ (format
+ "@table @asis
+~a
+@end table
+"
+ (string-join
+ (filter
+ identity
+ (map
+ document-object
+ (ly:module->alist (current-module)))))))
(cddr (cadr (procedure-source func)))))
(sig-type-names (map type-name sig))
- (signature (zip arg-names sig-type-names))
(signature-str
(string-join
(map (lambda (x) (string-append
"document-functions.scm"
"document-translation.scm"
"document-music.scm"
+ "document-identifiers.scm"
"document-backend.scm"
"document-markup.scm"))
(markup-doc-string)
(open-output-file "markup-commands.tely"))
+(display
+ (identifiers-doc-string)
+ (open-output-file "identifiers.tely"))
+
(display
(backend-properties-doc-string all-user-grob-properties)
(define (first-line-position line layout)
"Position of the first line on page"
- (max (+ (ly:output-def-lookup layout 'page-top-space)
+ (max (+ (if (ly:prob-property? line 'is-title)
+ ;; do not use page-top-space if first line is a title
+ 0.0
+ (ly:output-def-lookup layout 'page-top-space))
(interval-end (paper-system-staff-extents line)))
(interval-end (paper-system-extent line Y))))
;;;; (c) 1998--2006 Jan Nieuwenhuizen <janneke@gnu.org>
;;;; Han-Wen Nienhuys <hanwen@xs4all.nl>
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; constants.
(define-public X 0)
(define-public Y 1)
(define-safe-public DOUBLE-SHARP 4)
(define-safe-public SEMI-TONE 2)
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; moments
+
(define-public ZERO-MOMENT (ly:make-moment 0 1))
(define-public (moment-min a b)
(if (ly:moment<? a b) a b))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; arithmetic
(define-public (average x . lst)
(/ (+ x (apply + lst)) (1+ (length lst))))
;;;;;;;;;;;;;;;;
;; alist
+
(define-public assoc-get ly:assoc-get)
(define-public (uniqued-alist alist acc)
;;;;;;;;;;;;;;;;
;; vector
+
(define-public (vector-for-each proc vec)
(do
((i 0 (1+ i)))
;;;;;;;;;;;;;;;;
;; list
+(define (functional-or . rest)
+ (if (pair? rest)
+ (or (car rest)
+ (apply functional-and (cdr rest)))
+ #f))
+
+(define (functional-and . rest)
+ (if (pair? rest)
+ (and (car rest)
+ (apply functional-and (cdr rest)))
+ #t))
+
+(define (split-list lst n)
+ "Split LST in N equal sized parts"
+
+ (define (helper todo acc-vector k)
+ (if (null? todo)
+ acc-vector
+ (begin
+ (if (< k 0)
+ (set! k (+ n k)))
+
+ (vector-set! acc-vector k (cons (car todo) (vector-ref acc-vector k)))
+ (helper (cdr todo) acc-vector (1- k)))))
+
+ (helper lst (make-vector n '()) (1- n)))
+
+(define (list-element-index lst x)
+ (define (helper todo k)
+ (cond
+ ((null? todo) #f)
+ ((equal? (car todo) x) k)
+ (else
+ (helper (cdr todo) (1+ k)))))
+
+ (helper lst 0))
(define-public (count-list lst)
"Given lst (E1 E2 .. ) return ((E1 . 1) (E2 . 2) ... ) "
+
(define (helper l acc count)
(if (pair? l)
(helper (cdr l) (cons (cons (car l) count) acc) (1+ count))
"Return list of elements in A that are not in B."
(lset-difference eq? a b))
-;; TODO: use the srfi-1 partition function.
(define-public (uniq-list lst)
-
"Uniq LST, assuming that it is sorted"
- (define (helper acc lst)
- (if (null? lst)
- acc
- (if (null? (cdr lst))
- (cons (car lst) acc)
- (if (equal? (car lst) (cadr lst))
- (helper acc (cdr lst))
- (helper (cons (car lst) acc) (cdr lst))))))
- (reverse! (helper '() lst) '()))
+
+ (reverse!
+ (fold (lambda (x acc)
+ (if (null? acc)
+ (list x)
+ (if (eq? x (car acc))
+ acc
+ (cons x acc))))
+ '() lst) '()))
(define (split-at-predicate predicate lst)
"Split LST = (a_1 a_2 ... a_k b_1 ... b_k)
L1 is copied, L2 not.
(split-at-predicate (lambda (x y) (= (- y x) 2)) '(1 3 5 9 11) (cons '() '()))"
+
;; " Emacs is broken
(define (inner-split predicate lst acc)
(set-car! c (reverse! (car c)))
c))
-(define-public (split-list lst sep?)
- "(display (split-list '(a b c / d e f / g) (lambda (x) (equal? x '/))))
+(define-public (split-list-by-separator lst sep?)
+ "(display (split-list-by-separator '(a b c / d e f / g) (lambda (x) (equal? x '/))))
=>
((a b c) (d e f) (g))
"
(if (null? lst)
'()
(let* ((c (split-one sep? lst '())))
- (cons (reverse! (car c) '()) (split-list (cdr c) sep?)))))
+ (cons (reverse! (car c) '()) (split-list-by-separator (cdr c) sep?)))))
(define-public (offset-add a b)
(cons (+ (car a) (car b))
"load fonts via Ghostscript.")
(include-book-title-preview #t "include book-titles in preview images.")
(include-eps-fonts #t "Include fonts in separate-system EPS files.")
+ (job-count #f "Process in parallel")
(eps-box-padding #f "Pad EPS bounding box left edge by this much to guarantee alignment between systems")
(gui #f "running from gui; redirect stderr to log file")
-
+ (log-file #f "redirect output to log FILE.log")
(old-relative #f
"relative for simultaneous music works
similar to chord syntax")
"experimental mechanism for remembering tweaks")
(point-and-click #t "use point & click")
(paper-size "a4" "the default paper size")
+ (pixmap-format "png16m" "GS format to use for pixel images")
(protected-scheme-parsing #t "continue when finding errors in inline
scheme are caught in the parser. If off, halt
on errors, and print a stack trace.")
(strict-infinity-checking #f "If yes, crash on encountering Inf/NaN")
(ttf-verbosity 0
- "how much verbosity for TTF font embedding?")
+ "how much verbosity for TTF font embedding?")
(show-available-fonts #f
"List font names available.")
(if (defined? 'set-debug-cell-accesses!)
(set-debug-cell-accesses! #f))
-;(set-debug-cell-accesses! 1000)
+ ;(set-debug-cell-accesses! 1000)
(use-modules (ice-9 regex)
(ice-9 safe)
(if (ly:get-option 'verbose)
(begin
+ (ly:set-option 'protected-scheme-parsing #f)
(debug-enable 'debug)
(debug-enable 'backtrace)
(read-enable 'positions)))
(if (ly:get-option 'verbose)
(ly:progress "[~A" file-name))
(if (not file-name)
- (ly:error (_ "Can't find ~A" x)))
+ (ly:error (_ "Can't find ~A") x))
(primitive-load file-name)
(if (ly:get-option 'verbose)
(ly:progress "]"))))
"//*" "/"
(string-regexp-substitute "\\\\" "/" x))))
;; FIXME: this prints a warning.
- (define-public (ly-getcwd)
+ (define-public (ly-getcwd)
(slashify (native-getcwd))))
(else (define-public ly-getcwd getcwd)))
(ly:set-default-scale (ly:make-scale #(0 2 4 5 7 9 11)))
-
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; other files.
(,vector? . "vector")))
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; debug mem leaks
+(define gc-dumping #f)
(define gc-protect-stat-count 0)
(define-public (dump-gc-protects)
(set! gc-protect-stat-count (1+ gc-protect-stat-count))
".scm"))
(outfile (open-file out-file-name "w")))
- (display (format "Dumping gc protected objs to ~a...\n" out-file-name))
+ (set! gc-dumping #t)
+ (display (format "Dumping GC statistics ~a...\n" out-file-name))
(display
(map (lambda (y)
(let ((x (car y))
(c (cdr y)))
-
- (string-append
- (string-join
- (map object->string (list (object-address x) c x))
- " ")
- "\n")))
-
+ (display
+ (format "~a (~a) = ~a\n" (object-address x) c x)
+ outfile)))
(filter
(lambda (x)
(not (symbol? (car x))))
protects))
outfile)
-; (display (ly:smob-protects))
+ (format outfile "\nprotected symbols: ~a\n"
+ (length (filter symbol? (map car protects))))
+
+
+
+ ;; (display (ly:smob-protects))
(newline outfile)
(if (defined? 'gc-live-object-stats)
(let* ((stats #f))
(display "Live object statistics: GC'ing\n")
+ (ly:reset-all-fonts)
(gc)
(gc)
(ly:set-option 'debug-gc-assert-parsed-dead #t)
(gc)
-
+ (ly:set-option 'debug-gc-assert-parsed-dead #f)
+
(set! stats (gc-live-object-stats))
(display "Dumping live object statistics.\n")
(format outfile "~a: ~a\n" (car x) (cdr x)))
(sort (gc-live-object-stats)
(lambda (x y)
- (string<? (car x) (car y)))))))))
+ (string<? (car x) (car y)))))))
+
+
+ (newline outfile)
+ (let*
+ ((stats (gc-stats)))
+
+ (for-each
+ (lambda (sym)
+ (display
+ (format "~a ~a ~a\n"
+ gc-protect-stat-count
+ sym
+ (let ((sym-stat (assoc sym stats)))
+ (if sym-stat
+ (cdr sym-stat)
+ "?")))
+ outfile))
+ '(protected-objects bytes-malloced cell-heap-size
+
+ )))
+
+ (set! gc-dumping #f)
+
+ ))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(define (multi-fork count)
+ (define (helper count acc)
+ (if (> count 0)
+ (let*
+ ((pid (primitive-fork)))
+ (if (= pid 0)
+ (1- count)
+ (helper (1- count) (cons pid acc))))
+ acc))
+ (helper count '()))
+
+
(define-public (lilypond-main files)
"Entry point for LilyPond."
(if (null? files)
(no-files-handler))
+ (if (ly:get-option 'read-file-list)
+ (set! files
+ (filter (lambda (s)
+ (> (string-length s) 0))
+ (apply append
+ (map (lambda (f) (string-split (ly:gulp-file f) #\nl))
+ files)))
+ ))
+
+ (if (and (number? (ly:get-option 'job-count))
+ (> (length files) (ly:get-option 'job-count)))
+
+ (let*
+ ((count (ly:get-option 'job-count))
+ (split-todo (split-list files count))
+ (joblist (multi-fork count))
+ (errors '()))
+
+ (if (not (string-or-symbol? (ly:get-option 'log-file)))
+ (ly:set-option 'log-file "lilypond-multi-run"))
+
+ (if (number? joblist)
+ (begin
+ (ly:set-option 'log-file (format "~a-~a"
+ (ly:get-option 'log-file) joblist))
+ (set! files (vector-ref split-todo joblist)))
+
+ (begin
+ (ly:progress "\nForking into jobs: ~a\n" joblist)
+ (for-each
+ (lambda (pid)
+ (let* ((stat (cdr (waitpid pid))))
+
+ (if (not (= stat 0))
+ (set! errors (cons (list-element-index joblist pid) errors)))))
+ joblist)
+
+ (for-each
+ (lambda (x)
+ (let* ((logfile (format "~a-~a.log"
+ (ly:get-option 'log-file) x))
+ (log (ly:gulp-file logfile))
+ (len (string-length log))
+ (tail (substring log (max 0 (- len 1024)))))
+
+ (display (format "\n\nlogfile ~a:\n\n ~a" logfile tail))))
+
+ errors)
+
+ (if (pair? errors)
+ (ly:error "Children ~a exited with errors." errors))
+
+ (exit (if (null? errors) 0 1))))))
+
+
+ (if (string-or-symbol? (ly:get-option 'log-file))
+ (ly:stderr-redirect (format "~a.log" (ly:get-option 'log-file)) "w"))
+
(let ((failed (lilypond-all files)))
(if (pair? failed)
(begin
(exit 0)))))
(define-public (lilypond-all files)
- (if (ly:get-option 'read-file-list)
- (set! files
- (filter (lambda (s)
- (> (string-length s) 0))
- (apply append
- (map (lambda (f) (string-split (ly:gulp-file f) #\nl))
- files)))
- ))
+
(if (ly:get-option 'show-available-fonts)
(begin
))
(let* ((failed '())
+ (first #t)
(handler (lambda (key failed-file)
(set! failed (append (list failed-file) failed)))))
(for-each
(lambda (x)
- (ly:set-option 'debug-gc-assert-parsed-dead #f)
+
+ ;; We don't carry info across file boundaries
+ (if first
+ (set! first #f)
+ (gc))
+
(lilypond-file handler x)
(ly:clear-anonymous-modules)
(if (ly:get-option 'debug-gc)
- (dump-gc-protects)))
-
+ (dump-gc-protects)
+ (if (= (random 40) 1)
+ (ly:reset-all-fonts))))
+
files)
failed))
(define-public (gui-main files)
(if (null? files)
(gui-no-files-handler))
- (let* ((base (basename (car files) ".ly"))
- (log-name (string-append base ".log")))
- (if (not (ly:get-option 'gui))
- (ly:message (_ "Redirecting output to ~a...") log-name))
- (ly:stderr-redirect log-name "w")
- (ly:message "# -*-compilation-*-")
+
+ (if (not (string? (ly:get-option 'log-file)))
+ (let* ((base (basename (car files) ".ly"))
+ (log-name (string-append base ".log")))
+ (if (not (ly:get-option 'gui))
+ (ly:message (_ "Redirecting output to ~a...") log-name))
+ (ly:stderr-redirect log-name "w")
+ (ly:message "# -*-compilation-*-"))
(let ((failed (lilypond-all files)))
(if (pair? failed)
(define (script-to-mmrest-text music)
"Extract 'direction and 'text from SCRIPT-MUSIC, and transform MultiMeasureTextEvent"
+
(if (memq 'script-event (ly:music-property music 'types))
- (let ((dir (ly:music-property music 'direction))
- (p (make-music 'MultiMeasureTextEvent
+ (let*
+ ((dir (ly:music-property music 'direction))
+ (tags (ly:music-property music 'tags))
+ (p (make-music 'MultiMeasureTextEvent
+ 'tags tags
'text (ly:music-property music 'text))))
(if (ly:dir? dir)
(set! (ly:music-property p 'direction) dir))
;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; markup definer utilities
+
+(defmacro-public in-module-define-variable (module-name symbol value)
+ "Define a variable in a module and export its name.
+ (in-module-define-variable (some module) symbol value)"
+ (let ((gmodule (gensym "module")))
+ `(let ((,gmodule (resolve-module ',module-name)))
+ (module-define! ,gmodule ',symbol ,value)
+ (module-export! ,gmodule '(,symbol)))))
+
+(defmacro-public in-module-define-function
+ (module-name function-name+arg-list . body)
+ "Define a public function in a module:
+ (in-module-define-function (some module) (function-name . args)
+ ..body..)"
+ `(in-module-define-variable
+ ,module-name
+ ,(car function-name+arg-list)
+ (let ((proc (lambda ,(cdr function-name+arg-list)
+ ,@body)))
+ (set-procedure-property! proc
+ 'name
+ ',(car function-name+arg-list))
+ proc)))
+
;;; `define-markup-command' can be used both for built-in markup
;;; definitions and user defined markups.
-
(defmacro-public define-markup-command (command-and-args signature . body)
"
(define-markup-command (COMMAND layout props arg1 arg2 ...) (arg1-type? arg2-type? ...)
\"documentation string\"
...command body...)
- or:
- (define-markup-command COMMAND (arg1-type? arg2-type? ...)
- function)
+or:
+ (define-markup-command COMMAND (arg1-type? arg2-type? ...) function)
"
- (let* ((command (if (pair? command-and-args) (car command-and-args) command-and-args))
- (args (if (pair? command-and-args) (cdr command-and-args) '()))
- (command-name (string->symbol (string-append (symbol->string command) "-markup")))
- (make-markup-name (string->symbol (string-append "make-" (symbol->string command-name)))))
- `(begin
- (define-public ,(if (pair? args)
- (cons command-name args)
- command-name)
- ,@body)
- (set! (markup-command-signature ,command-name) (list ,@signature))
- (if (not (member ,command-name markup-function-list))
- (set! markup-function-list (cons ,command-name markup-function-list)))
- (define-public (,make-markup-name . args)
- (let ((sig (list ,@signature)))
- (make-markup ,command-name ,(symbol->string make-markup-name) sig args))))))
+ (let* ((command (if (pair? command-and-args)
+ (car command-and-args)
+ command-and-args))
+ (command-name (string->symbol (format #f "~a-markup" command)))
+ (make-markup-name (string->symbol (format #f "make-~a-markup" command))))
+ `(let ((lily-module (resolve-module '(lily))))
+ ;; define the COMMAND-markup procedure in (lily) module
+ ,(if (pair? command-and-args)
+ ;; two cases:
+ ;; 1/ (define (COMMAND-markup layout props arg1 arg2 ...)
+ ;; ..command body))
+ `(in-module-define-function (lily) (,command-name ,@(cdr command-and-args))
+ ,@body)
+ ;; 2/ (define COMMAND-markup function)
+ `(in-module-define-variable (lily) ,command-name ,(car body)))
+ (let ((command-proc (module-ref lily-module ',command-name)))
+ ;; register its command signature
+ (set! (markup-command-signature command-proc)
+ (list ,@signature))
+ ;; add the COMMAND-markup procedure to the list of markup functions
+ (if (not (member command-proc markup-function-list))
+ (set! markup-function-list (cons command-proc markup-function-list)))
+ ;; define the make-COMMAND-markup procedure in (lily) module
+ (in-module-define-function (lily) (,make-markup-name . args)
+ (make-markup command-proc
+ ,(symbol->string make-markup-name)
+ (list ,@signature)
+ args))))))
(define-public (make-markup markup-function make-name signature args)
" Construct a markup object from MARKUP-FUNCTION and ARGS. Typecheck
(define (markup-symbol-to-proc markup-sym)
"Return the markup command procedure which name is `markup-sym', if any."
(hash-fold (lambda (key val prev)
- (or prev
- (if (eqv? (procedure-name key) markup-sym) key #f)))
+ (or prev
+ (if (eqv? (procedure-name key) markup-sym) key #f)))
#f
markup-command-signatures))
(car stencils))
(ly:make-stencil '() '(0 . 0) '(0 . 0))))
-
-
-
-
-
-
(define-public (display-music music)
"Display music, not done with music-map for clarity of presentation."
+
(display music)
(display ": { ")
(let ((es (ly:music-property music 'elements))
(string (cdr (assoc octavation '((2 . "15ma")
(1 . "8va")
(0 . #f)
- (-1 . "8va bassa")
- (-2 . "15ma bassa"))))))
+ (-1 . "8vb")
+ (-2 . "15mb"))))))
(ly:context-set-property! context 'middleCPosition new-c0)
(ly:context-set-property! context 'originalCentralCPosition c0)
(ly:context-set-property! context 'ottavation string)))))
"Split the parts of a chord into different Voices using separator"
(let ((es (ly:music-property ch 'elements)))
(set! (ly:music-property ch 'elements)
- (voicify-list (split-list es music-separator?) 0))
+ (voicify-list (split-list-by-separator es music-separator?) 0))
ch))
(define-public (voicify-music m)
(list
(make-sequential-music
(list
- (context-spec-music (make-property-set 'skipTypesetting #t) 'Score)
+ (context-spec-music (make-property-set 'skipTypesetting #t)
+ 'Score)
(make-music 'SkipMusic 'duration
- (ly:make-duration 0 0
- (ly:moment-main-numerator skip-length)
- (ly:moment-main-denominator skip-length)))
- (context-spec-music (make-property-set 'skipTypesetting #f) 'Score)))
+ (ly:make-duration
+ 0 0
+ (ly:moment-main-numerator skip-length)
+ (ly:moment-main-denominator skip-length)))
+ (context-spec-music (make-property-set 'skipTypesetting #f)
+ 'Score)))
music)))
music)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; general
+(define-public (grob::has-interface grob iface)
+ (memq iface (ly:grob-interfaces grob)))
(define-public (make-stencil-boxer thickness padding callback)
;; The TabNoteHead tablatureFormat callback.
;; Compute the text grob-property
-(define-public (fret-number-tablature-format string tuning pitch)
- (make-whiteout-markup
- (make-vcenter-markup
- (number->string
- (- (ly:pitch-semitones pitch)
- (list-ref tuning
- ;; remove 1 because list index starts at 0 and guitar string at 1.
- (- string 1)))))))
+(define-public (fret-number-tablature-format string
+ context event)
+ (let*
+ ((tuning (ly:context-property context 'stringTunings))
+ (pitch (ly:event-property event 'pitch))
+ (is-harmonic (apply
+ functional-or
+ (map
+ (lambda (ev)
+ (eq? 'harmonic-event (ly:event-property ev 'class)))
+ (ly:event-property event 'articulations)))))
+
+
+ (make-whiteout-markup
+ (make-vcenter-markup
+ (format
+ "~a"
+ (- (ly:pitch-semitones pitch)
+ (list-ref tuning
+ ;; remove 1 because list index starts at 0 and guitar string at 1.
+ (- string 1))))))
+ ))
;; The 5-string banjo has got a extra string, the fifth (duh), wich
;; starts at the fifth fret on the neck. Frets on the fifth string
;; the "first fret" on the fifth string is really the sixth fret
;; on the banjo neck.
;; We solve this by defining a new fret-number-tablature function:
-(define-public (fret-number-tablature-format-banjo string tuning pitch)
+(define-public (fret-number-tablature-format-banjo string
+ context event)
+ (let*
+ ((tuning (ly:context-property context 'stringTunings))
+ (pitch (ly:event-property event 'pitch))
+ )
(make-whiteout-markup
(make-vcenter-markup
(let ((fret (- (ly:pitch-semitones pitch) (list-ref tuning (- string 1)))))
(number->string (cond
((and (> fret 0) (= string 5))
(+ fret 5))
- (else fret)))))))
+ (else fret))))))
+ ))
; default tunings for common string instruments
;; * Pitch Trill Heads
;; * Parentheses
+(define-public (parentheses-item::calc-parenthesis-stencils grob)
+ (let* (
+ (font (ly:grob-default-font grob))
+ (lp (ly:font-get-glyph font "accidentals.leftparen"))
+ (rp (ly:font-get-glyph font "accidentals.rightparen"))
+ )
+
+ (list lp rp)))
+
+
+(define (grob-text grob text)
+ (let*
+ ((layout (ly:grob-layout grob))
+ (defs (ly:output-def-lookup layout 'text-font-defaults))
+ (props (ly:grob-alist-chain grob defs)))
+
+ (ly:text-interface::interpret-markup
+ layout props text)))
+
+(define-public (parentheses-item::calc-angled-bracket-stencils grob)
+ (let* (
+ (font (ly:grob-default-font grob))
+ (lp (ly:stencil-aligned-to (ly:stencil-aligned-to (grob-text grob (ly:wide-char->utf-8 #x2329))
+ Y CENTER) X RIGHT))
+ (rp (ly:stencil-aligned-to (ly:stencil-aligned-to (grob-text grob (ly:wide-char->utf-8 #x232A))
+ Y CENTER) X LEFT))
+ )
+
+ (list (stencil-whiteout lp)
+ (stencil-whiteout rp))))
+
(define (parenthesize-elements grob . rest)
(let*
((refp (if (null? rest)
(car rest)))
(elts (ly:grob-object grob 'elements))
(x-ext (ly:relative-group-extent elts refp X))
-
- (font (ly:grob-default-font grob))
- (lp (ly:font-get-glyph font "accidentals.leftparen"))
- (rp (ly:font-get-glyph font "accidentals.rightparen"))
+ (stencils (ly:grob-property grob 'stencils))
+ (lp (car stencils))
+ (rp (cadr stencils))
(padding (ly:grob-property grob 'padding 0.1)))
(ly:stencil-add
))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
value)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; falls
+;; falls/doits
-(define-public (fall::print spanner)
+(define-public (bend::print spanner)
+ (define (close a b)
+ (< (abs (- a b)) 0.01))
+
(let*
((delta-y (* 0.5 (ly:grob-property spanner 'delta-position)))
(left-span (ly:spanner-bound spanner LEFT))
+ (dots (if (and (grob::has-interface left-span 'note-head-interface)
+ (ly:grob? (ly:grob-object left-span 'dot)))
+ (ly:grob-object left-span 'dot) #f))
+
(right-span (ly:spanner-bound spanner RIGHT))
(thickness (* (ly:grob-property spanner 'thickness)
(ly:output-def-lookup (ly:grob-layout spanner)
(ly:grob-common-refpoint spanner
left-span X)
X))
+ (common-y (ly:grob-common-refpoint spanner left-span Y))
(left-x (+ padding
- (interval-end (ly:grob-robust-relative-extent
- left-span common X))))
+ (max (interval-end (ly:grob-robust-relative-extent
+ left-span common X))
+ (if (and
+ dots
+ (close (ly:grob-relative-coordinate dots common-y Y)
+ (ly:grob-relative-coordinate spanner common-y Y)))
+ (interval-end (ly:grob-robust-relative-extent dots common X))
+ -10000) ;; TODO: use real infinity constant.
+ )))
+ (x (display (grob::has-interface left-span 'note-head-interface)))
+
(right-x (- (interval-start
(ly:grob-robust-relative-extent right-span common X))
padding))
))))
)
+ (display left-span)
(ly:make-stencil
exp
- (cons 0 dx)
+ (cons (- left-x self-x) (- right-x self-x))
(cons (min 0 delta-y)
(max 0 delta-y)))))
(if (> digit 5)
(ly:input-message (ly:event-property event 'origin)
- "Music for the martians"))
+ "Warning: Fingering notation for finger number ~a" digit))
(number->string digit 10)
))
;; other caracters
(else
(display c out))))))))
- `(let ((parser-clone (ly:clone-parser parser)))
+ `(let ((parser-clone (ly:parser-clone parser)))
,@(map (lambda (binding)
`(ly:parser-define! parser-clone ',(car binding) ,(cdr binding)))
(reverse bindings))
(rename-file file old)
(my-system be-verbose
#t
- (format #f "convert -scale \"~a%\" ~a ~a" percentage old file))
+ (format #f "convert -scale \"~a%\" -depth 8 ~a ~a" percentage old file))
(delete-file old)
))
0)))
(define-public (make-ps-images ps-name . rest)
- (let-optional
- rest ((resolution 90)
- page-width
- page-height
- (rename-page-1? #f)
- (verbose? #f)
- (aa-factor 1)
- )
-
- (let* ((base (basename (re-sub "[.]e?ps" "" ps-name)))
- (png1 (string-append base ".png"))
- (pngn (string-append base "-page%d.png"))
+ (let-keywords*
+ rest #f
+ ((resolution 90)
+ (page-width 100)
+ (page-height 100)
+ (rename-page-1 #f)
+ (be-verbose #f)
+ (pixmap-format 'png16m)
+ (anti-alias-factor 1))
+
+ (let* (
+ (format-str (format "~a" pixmap-format))
+ (extension (cond
+ ((string-contains format-str "png") "png")
+ ((string-contains format-str "jpg") "jpeg")
+ ((string-contains format-str "jpeg") "jpeg")
+ (else
+ (ly:error "Unknown pixmap format ~a" pixmap-format))))
+ (base (basename (re-sub "[.]e?ps" "" ps-name)))
+ (png1 (format "~a.~a" base extension))
+ (pngn (format "~a-page%d.~a" base extension))
(page-count (ps-page-count ps-name))
-
(multi-page? (> page-count 1))
(output-file (if multi-page? pngn png1))
- ;; png16m is because Lily produces color nowadays.
- ;; can't use pngalpha device, since IE is broken.
- ;;
(gs-variable-options
(if multi-page?
(format #f "-dDEVICEWIDTHPOINTS=~,2f -dDEVICEHEIGHTPOINTS=~,2f" page-width page-height)
-dGraphicsAlphaBits=4\
-dTextAlphaBits=4\
-dNOPAUSE\
- -sDEVICE=png16m\
+ -sDEVICE=~a\
-sOutputFile=~S\
-r~S\
~S\
-c quit"
(search-gs)
- (if verbose? "" "-q")
+ (if be-verbose "" "-q")
gs-variable-options
+ pixmap-format
output-file
- (* aa-factor resolution) ps-name))
+ (* anti-alias-factor resolution) ps-name))
(status 0)
(files '()))
(set! cmd (re-sub "=" "#" cmd))
(set! cmd (re-sub "-dSAFER " "" cmd))))
- (set! status (my-system verbose? #f cmd))
+ (set! status (my-system be-verbose #f cmd))
(set! files
(if multi-page?
(map delete-file files)
(exit 1)))
- (if (and rename-page-1? multi-page?)
+ (if (and rename-page-1 multi-page?)
(begin
(rename-file (re-sub "%d" "1" pngn) png1)
(set! files
(cdr files)))
))
- (if (not (= 1 aa-factor))
- (for-each (lambda (f) (scale-down-image verbose? aa-factor f))
+ (if (not (= 1 anti-alias-factor))
+ (for-each (lambda (f) (scale-down-image be-verbose anti-alias-factor f))
files))
files)))
ly:hara-kiri-group-spanner::force-hara-kiri-callback
ly:hara-kiri-group-spanner::y-extent
ly:horizontal-bracket::print
- ly:hyphen-spanner::print
- ly:hyphen-spanner::set-spacing-rods
+ ly:lyric-hyphen::print
+ ly:lyric-hyphen::set-spacing-rods
ly:key-signature-interface::print
ly:line-spanner::print
ly:lyric-extender::print
`(text ,font-metric ,text) (car b) (cdr b))))
(define-public (fontify-text-white scale font-metric text)
- "Set TEXT with scale factor s"
+ "Set TEXT with scale factor SCALE"
(let* ((b (ly:text-dimension font-metric text))
;;urg -- workaround for using ps font
(c `(white-text ,(* 2 scale) ,text)))
;;urg -- extent is not from ps font, but we hope it's close
(ly:make-stencil c (car b) (cdr b))))
+(define-public (stencil-with-color stencil color)
+ (ly:make-stencil
+ (list 'color color (ly:stencil-expr stencil))
+ (ly:stencil-extent stencil X)
+ (ly:stencil-extent stencil Y)))
+
+(define-public (stencil-whiteout stencil)
+ (let*
+ ((x-ext (ly:stencil-extent stencil X))
+ (y-ext (ly:stencil-extent stencil Y))
+
+ )
+
+ (ly:stencil-add
+ (stencil-with-color (ly:round-filled-box x-ext y-ext 0.0)
+ white)
+ stencil)
+ ))
+
(define-public (dimension-arrows destination)
"Draw twosided arrow from here to @var{destination}"
import os
import sys
import re
+import md5
################
# RELOCATION
d.update (locals())
return (PREAMBLE_LY + body) % d
- # TODO: Use md5?
def get_hash (self):
if not self.hash:
- self.hash = abs (hash (self.full_ly ()))
+ hash = md5.md5 (self.relevant_contents (self.full_ly ()))
+
+ ## let's not create too long names.
+ self.hash = hash.hexdigest ()[:10]
+
return self.hash
def basename (self):
if FILENAME in self.option_dict:
return self.option_dict[FILENAME]
if global_options.use_hash:
- return 'lily-%d' % self.get_hash ()
+ return 'lily-%s' % self.get_hash ()
raise 'to be done'
def write_ly (self):
outf = open (self.basename () + '.ly', 'w')
outf.write (self.full_ly ())
-
open (self.basename () + '.txt', 'w').write ('image of music')
+ def relevant_contents (self, ly):
+ return re.sub (r'\\(version|sourcefileline)[^\n]*\n', '', ly)
+
def ly_is_outdated (self):
base = self.basename ()
-
- tex_file = '%s.tex' % base
- eps_file = '%s.eps' % base
- system_file = '%s-systems.tex' % base
- ly_file = '%s.ly' % base
- ok = os.path.exists (ly_file) \
- and os.path.exists (system_file)\
- and os.stat (system_file)[stat.ST_SIZE] \
- and re.match ('% eof', open (system_file).readlines ()[-1])
- if ok and (not global_options.use_hash or FILENAME in self.option_dict):
- ok = (self.full_ly () == open (ly_file).read ())
- if ok:
- # TODO: Do something smart with target formats
- # (ps, png) and m/ctimes.
+ ly_file = base + '.ly'
+ tex_file = base + '.tex'
+ eps_file = base + '.eps'
+ systems_file = base + '-systems.tex'
+
+ if (os.path.exists (ly_file)
+ and os.path.exists (systems_file)
+ and os.stat (systems_file)[stat.ST_SIZE]
+ and re.match ('% eof', open (systems_file).readlines ()[-1])
+ and (global_options.use_hash or FILENAME in self.option_dict)
+ and (self.relevant_contents (self.full_ly ())
+ == self.relevant_contents (open (ly_file).read ()))):
return None
+ if global_options.verbose:
+ print 'OUT OF DATE: ', ly_file
return self
def png_is_outdated (self):
base = self.basename ()
+ # FIXME: refactor stupid OK stuff
ok = not self.ly_is_outdated ()
if global_options.format in (HTML, TEXINFO):
ok = ok and os.path.exists (base + '.eps')
if backend == 'ps':
return 0
+ # FIXME: refactor stupid OK stuff
base = self.basename ()
ok = self.ly_is_outdated ()
ok = ok and (os.path.exists (base + '.texstr'))
def ly (self):
name = self.substring ('filename')
contents = open (find_file (name)).read ()
-
- ## strip version string to make automated regtest comparisons
- ## across versions easier.
- contents = re.sub (r'\\version *"[^"]*"', '', contents)
-
return ('\\sourcefilename \"%s\"\n\\sourcefileline 0\n%s'
% (name, contents))
return args
def main ():
+ # FIXME: 85 lines of `main' macramee??
files = do_options ()
file = files[0]
(use-modules
(ice-9 getopt-long)
(ice-9 regex)
+ (srfi srfi-1)
(srfi srfi-13)
(srfi srfi-14))
;; argv0 relocation -- do in wrapper?
-
(define LILYPONDPREFIX
(let* ((prefix
(or (getenv "LILYPONDPREFIX")
(format "~a ~a" (getenv "BROWSER") uri)
(format #f "firefox -remote 'OpenURL(~a,new-tab)'" uri))))
+
+(define (strip-framework-path var)
+ (define pat "lilypond/usr")
+ (let*
+ ((val (getenv var))
+ (paths (string-split val #\:))
+ (without (remove (lambda (s) (string-contains s pat))
+ paths)))
+
+ (if (not (= (length without)
+ (length paths)))
+ (setenv var (string-join without ":")))))
+
(define (main args)
(let ((files (parse-options args)))
(if (running-from-gui?)
(show-help (current-error-port))
(exit 2)))
(set! %load-path (cons LILYPONDPREFIX %load-path))
+
(primitive-eval '(use-modules (scm editor)))
+ (strip-framework-path "LD_LIBRARY_PATH")
(let* ((uri (car files)))
(if (is-textedit-uri? uri)
(run-editor uri)
## grab the first version number in --version output.
eval _ver=\"\`("$1" --version || "$1" -V) 2>&1 | grep '\(^\| \)[0-9][0-9]*\.[0-9]' \
| head -n 1 \
- | tr ' ' '\n' | grep '[0-9]\.[0-9]' | head -n 1 | sed 's/\([0-9.]*\).*/\1/g'\`\"
+ | tr ' ' '\n' | sed 's/\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/g' | grep '\(^\| \)[0-9][0-9]*\.[0-9]' | head -n 1\`\"
if test -z "$_ver"; then
## If empty, try date [fontforge]
index_url=''
top_url=''
changelog_file=''
+content_negotiation = False
package_name = ''
package_version = ''
Options:
--changelog=FILE use FILE as ChangeLog [ChangeLog]
+ --content-negotiation strip .html and .png from urls
--footer=FILE use FILE as footer
--header=FILE use FILE as header
-h, --help print this help
(options, files) = getopt.getopt(sys.argv[1:], 'h', [
'changelog=', 'footer=', 'header=', 'help', 'index=',
- 'name=', 'version='])
+ 'name=', 'content-negotiation', 'version='])
for opt in options:
o = opt[0]
a = opt[1]
if o == '--changelog':
changelog_file = a
+ elif o == '--content-negotiation':
+ content_negotiation = True
elif o == '--footer':
footer_file = a
elif o == '--header':
return s
underscore = _
-
+C = 'site'
LANGUAGES = (
- ('site', 'English'),
+ (C, 'English'),
('nl', 'Nederlands'),
+ ('fr', 'French')
)
language_available = _ ("Other languages: %s.") % "%(language_menu)s"
def file_lang (file, lang):
(base, ext) = os.path.splitext (file)
base = os.path.splitext (base)[0]
- if lang and lang != 'site':
+ if lang and lang != C:
return base + '.' + lang + ext
return base + ext
base_name = os.path.basename (file_name)
- lang = 'site'
- m = re.match ('.*[.]([^.]*).html', file_name)
+ lang = C
+ m = re.match ('.*[.]([^/.]*).html', file_name)
if m:
lang = m.group (1)
and os.path.exists (file_lang (file_name, x[0])),
LANGUAGES)
- # Strip .html, .png suffix for auto language selection.
-# page = re.sub ('''(href|src)=[\'"]([^/][.]*[^.:\'"]*)(.html(#[^"]*)|.png)[\'"]''',
-# '\\1="\\2"', page)
+ # Strip .html, .png suffix for auto language selection (content
+ # negotiation). The menu must keep the full extension, so do
+ # this before adding the menu.
+ if content_negotiation:
+ page = re.sub ('''(href|src)=[\'"]([^/][.]*[^.:\'"]*)(.html|.png)(#[^"\']*|)[\'"]''',
+ '\\1="\\2\\4"', page)
- # Create language menu.
+ # Add menu after stripping: must not have autoselection for language menu.
language_menu = ''
for (prefix, name) in available:
lang_file = file_lang (base_name, prefix)
+ if language_menu != '':
+ language_menu += ', '
language_menu += '<a href="%(lang_file)s">%(name)s</a>' % vars ()
languages = ''
page = page + languages
return page
- ## end i18n
for f in files:
do_file (f)
man:
$(LOOP)
-# be careful about deletion.
clean: local-clean
- -rm -f $(outdir)/*
+ -rm -rf "./$(outdir)"
$(LOOP)
ifneq ($(strip $(depth)),.)
cvs-clean:
$(MAKE) local-distclean
- find . -type d -name out | xargs rm -rf
- find . -type d -name out-www | xargs rm -rf
+ rm -rf out
+ rm -rf out-www
rm -f aclocal.m4 configure
maintainerclean:
# empty
+
+POT_FILES = $(call src-wildcard,*.pot)
+PO_FILES = $(call src-wildcard,*.po)
+MO_FILES = $(addprefix $(outdir)/, $(PO_FILES:.po=.mo))
+
+HELP_CATALOGS = $(PO_FILES:%.po=%)
+CATALOGS = $(HELP_CATALOGS:$(DOMAIN)=)
+
+DIST_FILES += $(POT_FILES) $(PO_FILES)
+
# -*-python-*-
Import ('env', 'install', 'src_glob')
-sources = src_glob ('*.tex') + ['latin1.enc']
+sources = src_glob ('*.tex')
install (sources, env['sharedir_package_version'] + '/tex')