of output.
Set `per_line' to 2; replace hard-coded value with it.
* Documentation/user/*: Many fixes to improve appearance of
printed manual.
+2004-11-01 Werner Lemberg <wl@gnu.org>
+
+ * buildscripts/mf-to-table.py (write_fontlist): Improve formatting
+ of output.
+ Set `per_line' to 2; replace hard-coded value with it.
+
+ * Documentation/user/*: Many fixes to improve appearance of
+ printed manual.
+
2004-11-01 Werner Lemberg <wl@gnu.org>
* Documentation/user/changing-defaults.itely,
@appendix Cheat sheet
-@multitable @columnfractions .3 .3 .4
+@multitable @columnfractions .35 .3 .35
@item @b{Syntax}
@tab @b{Description}
chapter documents the tools included in the distribution to do so.
There are other tools that produce LilyPond input, for example GUI
sequencers and XML converters. Refer to the
-@uref{http://lilypond.org,website} for more details.
+@uref{http://@/lilypond@/.org,website} for more details.
@cindex ABC
-ABC is a fairly simple ASCII based format. It is described at the ABC site:
+ABC is a fairly simple ASCII based format. It is described at the ABC site:
@quotation
-@uref{http://www.gre.ac.uk/~c.walshaw/abc2mtex/abc.txt}.
+@uref{http://@/www@/.gre@/.ac@/.uk/@/~c.walshaw/@/abc2mtex/@/abc@/.txt}.
@end quotation
abc2ly translates from ABC to LilyPond. It is invoked as follows:
there are also external tools that generate LilyPond files.
These tools include
-http://denemo.sourceforge.net/
+@uref{http://@/denemo@/.sourceforge@/.net/,Denemo}.
@itemize @bullet
-@item @uref{http://www.nongnu.org/xml2ly/, xml2ly}, that imports
-@uref{http://www.musicxml.com/,MusicXML}
+@item @uref{http://@/www@/.nongnu@/.org/@/xml2ly/, xml2ly}, that imports
+@uref{http://@/www@/.musicxml@/.com/,MusicXML}
@item
-@uref{http://rnvs.informatik.tu-chemnitz.de/~jan/noteedit/noteedit.html,NoteEdit}
+@uref{http://@/rnvs@/.informatik@/.tu@/-chemnitz@/.de/@/~jan/@/noteedit/@/noteedit@/.html,NoteEdit}
which imports MusicXML
-@item @uref{http://www.all-day-breakfast.com/rosegarden/,Rosegarden},
+@item @uref{http://@/www@/.all@/-day@/-breakfast@/.com/@/rosegarden/,Rosegarden},
which imports MIDI
@end itemize
@unnumbered Full Grob interface list
The automatic documentation failed to build.
-Visit @uref{http://www.cs.uu.nl/~hanwen/lilypond/Documentation,lilypond online}
+Visit @uref{http://@/www@/.cs@/.uu@/.nl/@/~hanwen/@/lilypond/@/Documentation,lilypond online}
instrument or a melodic fragment. Cut and paste this into a file,
add notes, and you're finished!
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
melody = \relative c' {
\clef treble
automatic beaming, you'll have to change or comment out the relevant
line.
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
melody = \relative c' {
\clef treble
Want to prepare a lead sheet with a melody and chords? Look no further!
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
melody = \relative c' {
\clef treble
This template allows you to prepare a song with melody, words, and chords.
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
melody = \relative c' {
\clef treble
Here is a simple piano staff.
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
upper = \relative c'' {
\clef treble
Here is a typical song format: one staff with the melody and lyrics, with
piano accompaniment underneath.
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
melody = \relative c'' {
\clef treble
Instead of having a full staff for the melody and lyrics, you can place
the lyrics between the piano staff (and omit the separate melody staff).
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
upper = \relative c'' {
\clef treble
since the template is right here, you don't have to do the
tweaking yourself.
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
upper = \relative c'' {
\clef treble
This template demonstrates a string quartet. It also uses a @code{\global}
section for time and key signatures.
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
global = {
\time 4/4
parts. For example, the time signature and key signatures are almost
always the same for all parts.
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
\version "2.3.22"
global = {
\key c \major
\context ChoirStaff <<
\context Lyrics = sopranos { s1 }
\context Staff = women <<
- \context Voice = sopranos { \voiceOne << \global \sopMusic >> }
- \context Voice = altos { \voiceTwo << \global \altoMusic >> }
+ \context Voice =
+ sopranos { \voiceOne << \global \sopMusic >> }
+ \context Voice =
+ altos { \voiceTwo << \global \altoMusic >> }
>>
\context Lyrics = altos { s1 }
\context Lyrics = tenors { s1 }
\context Staff = men <<
\clef bass
- \context Voice = tenors { \voiceOne <<\global \tenorMusic >> }
- \context Voice = basses { \voiceTwo <<\global \bassMusic >> }
+ \context Voice =
+ tenors { \voiceOne <<\global \tenorMusic >> }
+ \context Voice =
+ basses { \voiceTwo <<\global \bassMusic >> }
>>
\context Lyrics = basses { s1 }
\context Lyrics = sopranos \lyricsto sopranos \sopWords
\layout {
\context {
- % a little smaller so lyrics can be closer to the staff.
+ % a little smaller so lyrics
+ % can be closer to the staff
\Staff minimumVerticalExtent = #'(-3 . 3)
}
}
notes. As a compromise, bar lines are often printed between the
staves rather than on the staves.
-@lilypond[verbatim,linewidth=11.0\cm]
+@lilypond[quote,verbatim,linewidth=11.0\cm]
\version "2.3.22"
global = {
- % incipit
- \once \override Score.SystemStartBracket #'transparent = ##t
- \key f \major
- \time 2/2
- \once \override Staff.TimeSignature #'style = #'neomensural
- \override Voice.NoteHead #'style = #'neomensural
- \override Voice.Rest #'style = #'neomensural
- \set Staff.printKeyCancellation = ##f
- \cadenzaOn % turn off bar lines
- \skip 1*10
- \once \override Staff.BarLine #'transparent = ##f
- \bar "||"
- \skip 1*1 % need this extra \skip such that clef change comes
- % after bar line
- \bar ""
-
- % main
- \cadenzaOff % turn bar lines on again
- \once \override Staff.Clef #'full-size-change = ##t
- \set Staff.forceClef = ##t
- \key g \major
- \time 4/4
- \override Voice.NoteHead #'style = #'default
- \override Voice.Rest #'style = #'default
+ % incipit
+ \once \override Score.SystemStartBracket #'transparent = ##t
+ \key f \major
+ \time 2/2
+ \once \override Staff.TimeSignature #'style = #'neomensural
+ \override Voice.NoteHead #'style = #'neomensural
+ \override Voice.Rest #'style = #'neomensural
+ \set Staff.printKeyCancellation = ##f
+ \cadenzaOn % turn off bar lines
+ \skip 1*10
+ \once \override Staff.BarLine #'transparent = ##f
+ \bar "||"
+ \skip 1*1 % need this extra \skip such that clef change comes
+ % after bar line
+ \bar ""
+
+ % main
+ \cadenzaOff % turn bar lines on again
+ \once \override Staff.Clef #'full-size-change = ##t
+ \set Staff.forceClef = ##t
+ \key g \major
+ \time 4/4
+ \override Voice.NoteHead #'style = #'default
+ \override Voice.Rest #'style = #'default
- % FIXME: setting printKeyCancellation back to #t must not
- % occur in the first bar after the incipit. Dto. for forceClef.
- % Therefore, we need an extra \skip.
- \skip 1*1
- \set Staff.printKeyCancellation = ##t
- \set Staff.forceClef = ##f
+ % FIXME: setting printKeyCancellation back to #t must not
+ % occur in the first bar after the incipit. Dto. for forceClef.
+ % Therefore, we need an extra \skip.
+ \skip 1*1
+ \set Staff.printKeyCancellation = ##t
+ \set Staff.forceClef = ##f
- \skip 1*5
+ \skip 1*5
- % last bar contains a brevis (i.e. spans 2 bars);
- % therefore do not draw this particular bar
- \cadenzaOn
- \skip 1*2
- \cadenzaOff
+ % last bar contains a brevis (i.e. spans 2 bars);
+ % therefore do not draw this particular bar
+ \cadenzaOn
+ \skip 1*2
+ \cadenzaOff
- % let finis bar go through all staves
- \override Staff.BarLine #'transparent = ##f
+ % let finis bar go through all staves
+ \override Staff.BarLine #'transparent = ##f
- % finis bar
- \bar "|."
+ % finis bar
+ \bar "|."
}
discantusNotes = {
- \transpose c' c'' {
- \set Staff.instrument = "Discantus "
-
- % incipit
- \clef "neomensural-c1"
- c'1. s2 % two bars
- \skip 1*8 % eight bars
- \skip 1*1 % one bar
-
- % main
- \clef "treble"
- d'2. d'4 |
- b e' d'2 |
- c'4 e'4.( d'8 c' b |
- a4) b a2 |
- b4.( c'8 d'4) c'4 |
- \once \override NoteHead #'transparent = ##t c'1 |
- b\breve |
- }
+ \transpose c' c'' {
+ \set Staff.instrument = "Discantus "
+
+ % incipit
+ \clef "neomensural-c1"
+ c'1. s2 % two bars
+ \skip 1*8 % eight bars
+ \skip 1*1 % one bar
+
+ % main
+ \clef "treble"
+ d'2. d'4 |
+ b e' d'2 |
+ c'4 e'4.( d'8 c' b |
+ a4) b a2 |
+ b4.( c'8 d'4) c'4 |
+ \once \override NoteHead #'transparent = ##t c'1 |
+ b\breve |
+ }
}
discantusLyrics = \lyricmode {
- % incipit
- IV-
+ % incipit
+ IV-
- % main
- Ju -- bi -- |
- la -- te De -- |
- o, om --
- nis ter -- |
- ra, __ om- |
- "..." |
- -us. |
+ % main
+ Ju -- bi -- |
+ la -- te De -- |
+ o, om --
+ nis ter -- |
+ ra, __ om- |
+ "..." |
+ -us. |
}
altusNotes = {
- \transpose c' c'' {
- \set Staff.instrument = "Altus "
-
- % incipit
- \clef "neomensural-c3"
- r1 % one bar
- f1. s2 % two bars
- \skip 1*7 % seven bars
- \skip 1*1 % one bar
-
- % main
- \clef "treble"
- r2 g2. e4 fis g | % two bars
- a2 g4 e |
- fis g4.( fis16 e fis4) |
- g1 |
- \once \override NoteHead #'transparent = ##t g1 |
- g\breve |
- }
+ \transpose c' c'' {
+ \set Staff.instrument = "Altus "
+
+ % incipit
+ \clef "neomensural-c3"
+ r1 % one bar
+ f1. s2 % two bars
+ \skip 1*7 % seven bars
+ \skip 1*1 % one bar
+
+ % main
+ \clef "treble"
+ r2 g2. e4 fis g | % two bars
+ a2 g4 e |
+ fis g4.( fis16 e fis4) |
+ g1 |
+ \once \override NoteHead #'transparent = ##t g1 |
+ g\breve |
+ }
}
altusLyrics = \lyricmode {
- % incipit
- IV-
+ % incipit
+ IV-
- % main
- Ju -- bi -- la -- te | % two bars
- De -- o, om -- |
- nis ter -- ra, |
- "..." |
- -us. |
+ % main
+ Ju -- bi -- la -- te | % two bars
+ De -- o, om -- |
+ nis ter -- ra, |
+ "..." |
+ -us. |
}
tenorNotes = {
- \transpose c' c' {
- \set Staff.instrument = "Tenor "
-
- % incipit
- \clef "neomensural-c4"
- r\longa % four bars
- r\breve % two bars
- r1 % one bar
- c'1. s2 % two bars
- \skip 1*1 % one bar
- \skip 1*1 % one bar
-
- % main
- \clef "treble_8"
- R1 |
- R1 |
- R1 |
- r2 d'2. d'4 b e' | % two bars
- \once \override NoteHead #'transparent = ##t e'1 |
- d'\breve |
- }
+ \transpose c' c' {
+ \set Staff.instrument = "Tenor "
+
+ % incipit
+ \clef "neomensural-c4"
+ r\longa % four bars
+ r\breve % two bars
+ r1 % one bar
+ c'1. s2 % two bars
+ \skip 1*1 % one bar
+ \skip 1*1 % one bar
+
+ % main
+ \clef "treble_8"
+ R1 |
+ R1 |
+ R1 |
+ r2 d'2. d'4 b e' | % two bars
+ \once \override NoteHead #'transparent = ##t e'1 |
+ d'\breve |
+ }
}
tenorLyrics = \lyricmode {
- % incipit
- IV-
+ % incipit
+ IV-
- % main
- Ju -- bi -- la -- te | % two bars
- "..." |
- -us. |
+ % main
+ Ju -- bi -- la -- te | % two bars
+ "..." |
+ -us. |
}
bassusNotes = {
- \transpose c' c' {
- \set Staff.instrument = "Bassus "
-
- % incipit
- \clef "bass"
- r\maxima % eight bars
- f1. s2 % two bars
- \skip 1*1 % one bar
-
- % main
- \clef "bass"
- R1 |
- R1 |
- R1 |
- R1 |
- g2. e4 |
- \once \override NoteHead #'transparent = ##t e1 |
- g\breve |
- }
+ \transpose c' c' {
+ \set Staff.instrument = "Bassus "
+
+ % incipit
+ \clef "bass"
+ r\maxima % eight bars
+ f1. s2 % two bars
+ \skip 1*1 % one bar
+
+ % main
+ \clef "bass"
+ R1 |
+ R1 |
+ R1 |
+ R1 |
+ g2. e4 |
+ \once \override NoteHead #'transparent = ##t e1 |
+ g\breve |
+ }
}
bassusLyrics = \lyricmode {
- % incipit
- IV-
+ % incipit
+ IV-
- % main
- Ju -- bi- |
- "..." |
- -us. |
+ % main
+ Ju -- bi- |
+ "..." |
+ -us. |
}
\score {
- \context StaffGroup = choirStaff <<
- \context Voice = discantusNotes << \global \discantusNotes >>
- \context Lyrics = discantusLyrics
- \lyricsto discantusNotes { \discantusLyrics }
- \context Voice = altusNotes << \global \altusNotes >>
- \context Lyrics = altusLyrics \lyricsto altusNotes { \altusLyrics }
- \context Voice = tenorNotes << \global \tenorNotes >>
- \context Lyrics = tenorLyrics \lyricsto tenorNotes { \tenorLyrics }
- \context Voice = bassusNotes << \global \bassusNotes >>
- \context Lyrics = bassusLyrics
- \lyricsto bassusNotes { \bassusLyrics }
- >>
- \layout {
- \context {
- \Score
- \override BarLine #'transparent = ##t
- \remove "System_start_delimiter_engraver"
- }
- \context {
- \Voice
- \override Slur #'transparent = ##t
- }
- }
+ \context StaffGroup = choirStaff <<
+ \context Voice =
+ discantusNotes << \global \discantusNotes >>
+ \context Lyrics =
+ discantusLyrics \lyricsto discantusNotes { \discantusLyrics }
+ \context Voice =
+ altusNotes << \global \altusNotes >>
+ \context Lyrics =
+ altusLyrics \lyricsto altusNotes { \altusLyrics }
+ \context Voice =
+ tenorNotes << \global \tenorNotes >>
+ \context Lyrics =
+ tenorLyrics \lyricsto tenorNotes { \tenorLyrics }
+ \context Voice =
+ bassusNotes << \global \bassusNotes >>
+ \context Lyrics =
+ bassusLyrics \lyricsto bassusNotes { \bassusLyrics }
+ >>
+ \layout {
+ \context {
+ \Score
+ \override BarLine #'transparent = ##t
+ \remove "System_start_delimiter_engraver"
+ }
+ \context {
+ \Voice
+ \override Slur #'transparent = ##t
+ }
+ }
}
@end lilypond
@c FIXME: produces a warning ; key change merge.
@c The `linewidth' argument is for the \header.
-@lilypond[verbatim,raggedright,linewidth]
+@lilypond[quote,verbatim,raggedright,linewidth]
\version "2.3.22"
\header {
title = "Song"
composer = "Me"
meter = "moderato"
piece = "Swing"
- tagline = "LilyPond example file by Amelie Zapf, Berlin 07/07/2003"
- texidoc = "Jazz tune for combo (horns, guitar, piano, bass, drums)."
+ tagline = "LilyPond example file by Amelie Zapf,
+ Berlin 07/07/2003"
+ texidoc = "Jazz tune for combo
+ (horns, guitar, piano, bass, drums)."
}
#(set-global-staff-size 16)
%%%%%%%%%%%% Some macros %%%%%%%%%%%%%%%%%%%
sl = {
- \override NoteHead #'style = #'slash
- \override Stem #'transparent = ##t
+ \override NoteHead #'style = #'slash
+ \override Stem #'transparent = ##t
}
nsl = {
- \revert NoteHead #'style
- \revert Stem #'transparent
+ \revert NoteHead #'style
+ \revert Stem #'transparent
}
-cr = \override NoteHead #'style = #'cross
+cr = \override NoteHead #'style = #'cross
ncr = \revert NoteHead #'style
%% insert chord name style stuff here.
%%%%%%%%%%%% Keys'n'thangs %%%%%%%%%%%%%%%%%
-global = {
- \time 4/4
+global = {
+ \time 4/4
}
-Key = { \key c \major }
+Key = { \key c \major }
% ############ Horns ############
+
% ------ Trumpet ------
trpt = \transpose c d \relative c'' {
- \Key
- c1 c c
+ \Key
+ c1 c c
+}
+trpharmony = \transpose c' d {
+ \jzchords
}
-
-trpharmony = \transpose c' d { \jzchords }
trumpet = {
- \global
- \set Staff.instrument = #"Trumpet"
- \clef treble
- \context Staff <<
- \trpt
- >>
+ \global
+ \set Staff.instrument = #"Trumpet"
+ \clef treble
+ \context Staff <<
+ \trpt
+ >>
}
% ------ Alto Saxophone ------
alto = \transpose c a \relative c' {
- \Key
- c1 c c
+ \Key
+ c1 c c
+}
+altoharmony = \transpose c' a {
+ \jzchords
}
-
-altoharmony = \transpose c' a { \jzchords }
altosax = {
- \global
- \set Staff.instrument = #"Alto Sax"
- \clef treble
- \context Staff <<
- \alto
- >>
+ \global
+ \set Staff.instrument = #"Alto Sax"
+ \clef treble
+ \context Staff <<
+ \alto
+ >>
}
% ------ Baritone Saxophone ------
bari = \transpose c a' \relative c {
- \Key
- c1 c \sl d4^"Solo" d d d \nsl
+ \Key
+ c1 c \sl d4^"Solo" d d d \nsl
+}
+bariharmony = \transpose c' a \chordmode {
+ \jzchords s1 s d2:maj e:m7
}
-
-bariharmony = \transpose c' a \chordmode { \jzchords s1 s d2:maj e:m7 }
barisax = {
- \global
- \set Staff.instrument = #"Bari Sax"
- \clef treble
- \context Staff <<
- \bari
- >>
+ \global
+ \set Staff.instrument = #"Bari Sax"
+ \clef treble
+ \context Staff <<
+ \bari
+ >>
}
+
% ------ Trombone ------
tbone = \relative c {
- \Key
- c1 c c
+ \Key
+ c1 c c
+}
+tboneharmony = \chordmode {
+ \jzchords
}
-
-tboneharmony = \chordmode { \jzchords }
trombone = {
- \global
- \set Staff.instrument = #"Trombone"
- \clef bass
- \context Staff <<
- \tbone
- >>
+ \global
+ \set Staff.instrument = #"Trombone"
+ \clef bass
+ \context Staff <<
+ \tbone
+ >>
}
+
% ############ Rhythm Section #############
+
% ------ Guitar ------
gtr = \relative c'' {
- \Key
- c1 \sl b4 b b b \nsl c1
+ \Key
+ c1 \sl b4 b b b \nsl c1
}
-
-gtrharmony = \chordmode { \jzchords
- s1 c2:min7+ d2:maj9
+gtrharmony = \chordmode {
+ \jzchords
+ s1 c2:min7+ d2:maj9
}
-
guitar = {
- \global
- \set Staff.instrument = #"Guitar"
- \clef treble
- \context Staff <<
- \gtr
- >>
+ \global
+ \set Staff.instrument = #"Guitar"
+ \clef treble
+ \context Staff <<
+ \gtr
+ >>
}
%% ------ Piano ------
-rhUpper = \relative c'' {
- \voiceOne
- \Key
- c1 c c
+rhUpper = \relative c'' {
+ \voiceOne
+ \Key
+ c1 c c
}
-
-rhLower = \relative c' {
- \voiceTwo
- \Key
- e1 e e
+rhLower = \relative c' {
+ \voiceTwo
+ \Key
+ e1 e e
}
-lhUpper = \relative c' {
- \voiceOne
- \Key
- g1 g g
+lhUpper = \relative c' {
+ \voiceOne
+ \Key
+ g1 g g
}
-
-lhLower = \relative c {
- \voiceTwo
- \Key
- c1 c c
+lhLower = \relative c {
+ \voiceTwo
+ \Key
+ c1 c c
}
PianoRH = {
- \clef treble
- \global
- \set Staff.midiInstrument = "acoustic grand"
- \context Staff <<
- \context Voice = one \rhUpper
- \context Voice = two \rhLower
- >>
+ \clef treble
+ \global
+ \set Staff.midiInstrument = "acoustic grand"
+ \context Staff <<
+ \context Voice = one \rhUpper
+ \context Voice = two \rhLower
+ >>
}
-
PianoLH = {
- \clef bass
- \global
- \set Staff.midiInstrument = "acoustic grand"
- \context Staff <<
- \context Voice = one \lhUpper
- \context Voice = two \lhLower
- >>
+ \clef bass
+ \global
+ \set Staff.midiInstrument = "acoustic grand"
+ \context Staff <<
+ \context Voice = one \lhUpper
+ \context Voice = two \lhLower
+ >>
}
piano = {
- \context PianoStaff <<
- \set PianoStaff.instrument = #"Piano"
- \context Staff = upper \PianoRH
- \context Staff = lower \PianoLH
- >>
+ \context PianoStaff <<
+ \set PianoStaff.instrument = #"Piano"
+ \context Staff = upper \PianoRH
+ \context Staff = lower \PianoLH
+ >>
}
% ------ Bass Guitar ------
-bass = \relative c {
- \Key
- c1 c c
+Bass = \relative c {
+ \Key
+ c1 c c
}
-
bass = {
- \global
- \set Staff.instrument = #"Bass"
- \clef bass
- \context Staff <<
- \bass
- >>
+ \global
+ \set Staff.instrument = #"Bass"
+ \clef bass
+ \context Staff <<
+ \Bass
+ >>
}
- % ------ Drums ------
-
+% ------ Drums ------
up = \drummode {
- hh4 <hh sn>4 hh <hh sn> hh <hh sn>4
- hh4 <hh sn>4
- hh4 <hh sn>4
- hh4 <hh sn>4
+ hh4 <hh sn>4 hh <hh sn> hh <hh sn>4
+ hh4 <hh sn>4
+ hh4 <hh sn>4
+ hh4 <hh sn>4
}
down = \drummode {
- bd4 s bd s bd s bd s bd s bd s
+ bd4 s bd s bd s bd s bd s bd s
}
drumContents = {
- \global
- <<
- \set DrumStaff.instrument = #"Drums"
- \new DrumVoice { \voiceOne \up }
- \new DrumVoice { \voiceTwo \down }
- >>
+ \global
+ <<
+ \set DrumStaff.instrument = #"Drums"
+ \new DrumVoice { \voiceOne \up }
+ \new DrumVoice { \voiceTwo \down }
+ >>
}
%%%%%%%%% It All Goes Together Here %%%%%%%%%%%%%%%%%%%%%%
\score {
-<<
- \context StaffGroup = horns <<
- \context Staff = trumpet \trumpet
-
- \context Staff = altosax \altosax
-
- \context ChordNames = barichords \bariharmony
-
- \context Staff = barisax \barisax
-
- \context Staff = trombone \trombone
- >>
+ <<
+ \context StaffGroup = horns <<
+ \context Staff = trumpet \trumpet
+ \context Staff = altosax \altosax
+ \context ChordNames = barichords \bariharmony
+ \context Staff = barisax \barisax
+ \context Staff = trombone \trombone
+ >>
- \context StaffGroup = rhythm <<
- \context ChordNames = chords \gtrharmony
- \context Staff = guitar \guitar
- \context PianoStaff = piano \piano
+ \context StaffGroup = rhythm <<
+ \context ChordNames = chords \gtrharmony
+ \context Staff = guitar \guitar
+ \context PianoStaff = piano \piano
+ \context Staff = bass \bass
+ \new DrumStaff { \drumContents }
+ >>
+ >>
- \context Staff = bass \bass
+ \layout {
+ \context { \RemoveEmptyStaffContext }
+ \context {
+ \Score
+ \override BarNumber #'padding = #3
+ \override RehearsalMark #'padding = #2
+ skipBars = ##t
+ }
+ }
- \new DrumStaff { \drumContents }
- >>
->>
- \layout {
- \context { \RemoveEmptyStaffContext }
- \context {
- \Score
- \override BarNumber #'padding = #3
- \override RehearsalMark #'padding = #2
- skipBars = ##t
- }
- }
- \midi { \tempo 4 = 75 }
+ \midi { \tempo 4 = 75 }
}
-
@end lilypond
@node Other templates
"Petr Tchaikowski" on your music.
@ The `linewidth' is for \header.
-@lilypond[verbatim,raggedright,linewidth]
+@lilypond[quote,verbatim,raggedright,linewidth]
\version "2.3.22"
\header {
- dedication = "dedication"
- title = "Title"
- subtitle = "Subtitle"
- subsubtitle = "Subsubtitle"
- composer = "Composer (xxxx-yyyy)"
- opus = "Opus 0"
- piece = "Piece I"
- instrument = "Instrument"
- arranger = "Arranger"
- poet = "Poet"
- texttranslator = "Translator"
- copyright = "public domain"
-
-% These are headers used by the Mutopia Project http://www.mutopiaproject.org/
- mutopiatitle = ""
- mutopiacomposer = ""
- mutopiapoet = ""
- mutopiainstrument = ""
- date = "composer's dates"
- source = "urtext "
- maintainer = "your name here"
- maintainerEmail = "your email here"
- maintainerWeb = "your home page"
- lastupdated = "2004/Aug/26"
+ dedication = "dedication"
+ title = "Title"
+ subtitle = "Subtitle"
+ subsubtitle = "Subsubtitle"
+ composer = "Composer (xxxx-yyyy)"
+ opus = "Opus 0"
+ piece = "Piece I"
+ instrument = "Instrument"
+ arranger = "Arranger"
+ poet = "Poet"
+ texttranslator = "Translator"
+ copyright = "public domain"
+
+ % These are headers used by the Mutopia Project
+ % http://www.mutopiaproject.org/
+ mutopiatitle = ""
+ mutopiacomposer = ""
+ mutopiapoet = ""
+ mutopiainstrument = ""
+ date = "composer's dates"
+ source = "urtext "
+ maintainer = "your name here"
+ maintainerEmail = "your email here"
+ maintainerWeb = "your home page"
+ lastupdated = "2004/Aug/26"
}
\score {
- \header {
- piece = "piece1"
- opus = "opus1"
- }
- { c'4 }
+ \header {
+ piece = "piece1"
+ opus = "opus1"
+ }
+ { c'4 }
}
\score {
- \header {
- piece = "piece2"
- opus = "opus2"
- }
- { c'4 }
+ \header {
+ piece = "piece2"
+ opus = "opus2"
+ }
+ { c'4 }
}
-
@end lilypond
@subsection Gregorian template
quarter notes, and two types of barlines, a short one indicating a rest,
and a second one indicating a breath mark.
-@lilypond[verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
barOne = { \once \override Staff.BarLine #'bar-size = #2
- \bar "|" }
+ \bar "|" }
barTwo = { \once \override Staff.BarLine #'extra-offset = #'(0 . 2)
- \once \override Staff.BarLine #'bar-size = #2
- \bar "|" }
+ \once \override Staff.BarLine #'bar-size = #2
+ \bar "|" }
chant = \relative c' {
- \set Score.timing = ##f
- \override Staff.Stem #'transparent = ##t
+ \set Score.timing = ##f
+ \override Staff.Stem #'transparent = ##t
- f4 a2 \barTwo
- g4 a2 f2 \barOne
- g4( f) f( g) a2
+ f4 a2 \barTwo
+ g4 a2 f2 \barOne
+ g4( f) f( g) a2
}
\score {
- \chant
- \layout{ }
- \midi { \tempo 4=60 }
+ \chant
+ \layout{ }
+ \midi { \tempo 4=60 }
}
-
@end lilypond
@subsection Bagpipe music
TODO - replace Bagpipe template with Andrew McNabb's work?
-@lilypond[verbatim]
+@lilypond[quote,verbatim]
taor = { \grace { g32[ d' g e'] } }
grip = { \grace { g32[ b g ] } }
thrd = { \grace { g32[ d' c'] } }
gcdg = { \grace { g'32[ c' d'] } }
\transpose a a' {
- #(add-grace-property 'Voice 'Stem 'length 6)
- \time 6/8 \partial 4
- \tieUp
- \slurUp
-
- f'4 |
- \gg f'4 e'8 \thrd d'4. |
- \eg a4.(a4) d'8 |
- \gg d'4 f'8 \dble e'4. ( | \noBreak
- e'8) d'4 \gg d'4 e'8 |
-
- \break
- \time 9/8
- \dblf f'2.( f'4) d'8 |
- \time 6/8
- \dblg g'4 a'8 \gg a'4. |
- \thrd d'4.( d'4) \eg a8 |
- \time 9/8
- \dble e'4 \lag e'8 \gg e'16[ d'8. e'8] \gg f'4 g'8 |
-
- \break
- \time 6/8
- \gg f'4 e'8 \thrd d'4. |
- \eg a4.( a4) d'8 |
- \dblg g'4 a'8 \gg a'4. |
- \thrd d'4.( d'4) f'8 |
-
- \break
- \dblg g'4 e'8( e'8) \dblf f'8.[ e'16] |
- \thrd d'4.( d'4) \cg d'8 |
- \gg c'4 e'8 \thrd d'4.( |
- d'4.) \gdcg d'4.
-
+ #(add-grace-property 'Voice 'Stem 'length 6)
+ \time 6/8 \partial 4
+ \tieUp
+ \slurUp
+
+ f'4 |
+ \gg f'4 e'8 \thrd d'4. |
+ \eg a4.(a4) d'8 |
+ \gg d'4 f'8 \dble e'4. ( | \noBreak
+ e'8) d'4 \gg d'4 e'8 |
+
+ \break
+ \time 9/8
+ \dblf f'2.( f'4) d'8 |
+ \time 6/8
+ \dblg g'4 a'8 \gg a'4. |
+ \thrd d'4.( d'4) \eg a8 |
+ \time 9/8
+ \dble e'4 \lag e'8 \gg e'16[ d'8. e'8] \gg f'4 g'8 |
+
+ \break
+ \time 6/8
+ \gg f'4 e'8 \thrd d'4. |
+ \eg a4.( a4) d'8 |
+ \dblg g'4 a'8 \gg a'4. |
+ \thrd d'4.( d'4) f'8 |
+
+ \break
+ \dblg g'4 e'8( e'8) \dblf f'8.[ e'16] |
+ \thrd d'4.( d'4) \cg d'8 |
+ \gg c'4 e'8 \thrd d'4.( |
+ d'4.) \gdcg d'4.
}
@end lilypond
constant rhythm. The spacing should reflect that. Unfortunately, the
eye deceives us a little; not only does it notice the distance between
note heads, it also takes into account the distance between
-consecutive stems. As a result, the notes of an up-stem/down-stem
+consecutive stems. As a result, the notes of an up-stem/@/down-stem
combination should be put farther apart, and the notes of a down-up
combination should be put closer together, all depending on the
combined vertical positions of the notes. The first two measures are
printed with this correction, the last two measures without. The notes
-in the last two measures form down-stem/up-stem clumps of notes.
+in the last two measures form down-stem/@/up-stem clumps of notes.
@cindex typography
vary from system to system. On occasion, this manual refers to
initialization and example files. Throughout this manual, we refer to
input files relative to the top-directory of the source archive. For
-example, @file{input/test/bla.ly} may refer to the file
-@file{lilypond-2.3.14/input/test/bla.ly}. On binary packages for the
-Unix platform, the documentation and examples can typically be found
-somewhere below @file{/usr/share/doc/lilypond/}. Initialization files,
-for example @file{scm/lily.scm}, or @file{ly/engraver-init.ly}, are
-usually found in the directory @file{/usr/share/lilypond/}.
+example, @file{input/@/test/@/bla@/.ly} may refer to the file
+@file{lilypond@/-2.3.14/@/input/@/test/@/bla@/.ly}. On binary packages
+for the Unix platform, the documentation and examples can typically be
+found somewhere below @file{/usr/@/share/@/doc/@/lilypond/}.
+Initialization files, for example @file{scm/@/lily@/.scm}, or
+@file{ly/@/engraver@/-init@/.ly}, are usually found in the directory
+@file{/usr/@/share/@/lilypond/}.
@cindex adjusting output
@cindex variables
Finally, this and all other manuals, are available online both as PDF
files and HTML from the web site, which can be found at
-@uref{http://www.lilypond.org/}.
+@uref{http://@/www@/.lilypond@/.org/}.
@cindex website
@cindex URL
This chapter details the technicalities of running LilyPond.
-
+
@menu
-* Invoking lilypond::
-* Error messages::
-* Reporting bugs::
-* Editor support::
-* Invoking lilypond-latex::
+* Invoking lilypond::
+* Error messages::
+* Reporting bugs::
+* Editor support::
+* Invoking lilypond-latex::
@end menu
@node Invoking lilypond
The @code{lilypond} may be called as follows from the command line.
@example
- lilypond [@var{option}]@dots{} @var{file}@dots{}
+lilypond [@var{option}]@dots{} @var{file}@dots{}
@end example
@item -h,--help
Show a summary of usage.
+
@item --include, -I=@var{directory}
Add @var{directory} to the search path for input files.
@cindex file searching
@cindex search path
+
@item -i,--init=@var{file}
Set init file to @var{file} (default: @file{init.ly}).
+
@item -o,--output=@var{FILE}
- Set the default output file to @var{FILE}.
+Set the default output file to @var{FILE}.
+
@item --ps
- Generate PostScript.
+Generate PostScript.
+
@item --dvi
- Generate DVI files. In this case, the @TeX{} backend should be
- specified, i.e. @code{-f tex}.
+Generate DVI files. In this case, the @TeX{} backend should be
+specified, i.e. @code{-f tex}.
+
@item --png
- Generate pictures of each page, in PNG format. This implies @code{--ps}.
+Generate pictures of each page, in PNG format. This implies @code{--ps}.
+
@item --pdf
- Generate PDF. This implies @code{--ps}.
+Generate PDF. This implies @code{--ps}.
+
@item --preview
- Generate an output file containing the titles and the first system
+Generate an output file containing the titles and the first system
+
@item --no-pages
- Do not generate the full pages. Useful in combination with
+Do not generate the full pages. Useful in combination with
@code{--preview}.
+
@item -s,--safe
-Do not trust the @code{.ly} input.
+Do not trust the @code{.ly} input.
When LilyPond formatting is available through a web server, the
@code{--safe} @b{MUST} be passed. This will prevent inline Scheme
-code from wreaking havoc, for example
+code from wreaking havoc, for example
+@quotation
@verbatim
- #(system "rm -rf /")
- {
- c4^#(ly:export (ly:gulp-file "/etc/passwd"))
- }
+#(system "rm -rf /")
+{
+ c4^#(ly:export (ly:gulp-file "/etc/passwd"))
+}
@end verbatim
+@end quotation
The @code{--safe} option works by evaluating in-line Scheme
expressions in a special safe module. This safe module is derived from
GUILE @file{safe-r5rs} module, but adds a number of functions of the
-LilyPond API. These functions are listed in @file{scm/safe-lily.scm}.
+LilyPond API. These functions are listed in @file{scm/@/safe@/-lily@/.scm}.
In addition, @code{--safe} disallows @code{\include} directives and
disables the use of backslashes in @TeX{} strings.
In @code{--safe} mode, it is not possible to import LilyPond variables
-into Scheme.
+into Scheme.
@code{--safe} does @emph{not} detect resource overuse. It is still
possible to make the program hang indefinitely, for example by feeding
information.
@item -w,--warranty
-Show the warranty with which GNU LilyPond comes. (It comes with
+Show the warranty with which GNU LilyPond comes. (It comes with
@strong{NO WARRANTY}!)
@end table
-@section Environment variables
+@section Environment variables
For processing both the @TeX{} and the PostScript output, the
appropriate environment variables must be set. The following scripts
do this:
@itemize @bullet
-@item @file{buildscripts/out/lilypond-profile}
+@item @file{buildscripts/@/out/@/lilypond@/-profile}
(for SH shells)
-@item @file{buildscripts/out/lilypond-login} (for C-shells)
+@item @file{buildscripts/@/out/@/lilypond@/-login} (for C-shells)
@end itemize
They should normally be sourced as part of the login process. If these
If you use sh, bash, or a similar shell, then add the following to
your @file{.profile}:
@example
- . @var{/the/path/to/}lilypond-profile
+. @var{/the/path/to/}lilypond-profile
@end example
If you use csh, tcsh or a similar shell, then add the following to
your @file{~/.login}:
@example
- source @var{/the/path/to/}lilypond-login
+source @var{/the/path/to/}lilypond-login
@end example
Of course, in both cases, you should substitute the proper location of
These scripts set the following variables:
@table @code
@item TEXMF
- To make sure that @TeX{} and lilypond find data files (among
+To make sure that @TeX{} and lilypond find data files (among
others @file{.tex}, @file{.mf} and @file{.tfm}),
you have to set @code{TEXMF} to point to the lilypond data
file tree. A typical setting would be
@cindex warning
@item Warning
- Something looks suspect. If you are requesting something out of the
+Something looks suspect. If you are requesting something out of the
ordinary then you will understand the message, and can ignore it.
However, warnings usually indicate that something is wrong with the
input file.
following form
@example
- @var{filename}:@var{lineno}:@var{columnno}: @var{message}
- @var{offending input line}
-@end example
+@var{filename}:@var{lineno}:@var{columnno}: @var{message}
+@var{offending input line}
+@end example
A line-break is inserted in offending line to indicate the column
-where the error was found. For example,
+where the error was found. For example,
@example
test.ly:2:19: error: not a duration: 5:
- @{ c'4 e'5
+ @{ c'4 e'5
g' @}
@end example
the report to @email{bug-lilypond@@gnu.org}.
When you've found a bug, have a look at our
-@uref{http://@/lilypond.org/@/doc/@/v2.3/@/bugs/,bug database} to see if it
-has already been reported. You could also try doing a few searches
+@uref{http://@/lilypond@/.org/@/doc/@/v2.3/@/bugs/,bug database} to see if
+it has already been reported. You could also try doing a few searches
on the mailing list for the bug. Sometimes the bug will have already
been reported and a fix or workaround is already known.
Here is an example of a good bug report:
-@verbatim
-
-It seems that placement of accidentals is broken. In the
+@example
+It seems that placement of accidentals is broken. In the
following example, the accidental touches the note head.
Using Mac OSX 10.3.5, fink package lilypond-unstable
\version "2.3.22"
-\relative c''{
+\relative c''@{
a4 b cis d
-}
-@end verbatim
+@}
+@end example
-@lilypond
+@lilypond[quote]
\version "2.3.22"
\relative c''{
- \override Accidental #'extra-offset = #'(1.0 . 0)
- a4 b cis d
+ \override Accidental #'extra-offset = #'(1.0 . 0)
+ a4 b cis d
}
@end lilypond
@cindex editors
@cindex vim
@cindex emacs
-@cindex modes, editor
+@cindex modes, editor
@cindex syntax coloring
@cindex coloring, syntax
@item VIM
-For @uref{http://www.vim.org,VIM}, a @file{vimrc} is supplied, along with
-syntax coloring tools. For more information, refer to the
+For @uref{http://@/www@/.vim@/.org,VIM}, a @file{vimrc} is supplied, along
+with syntax coloring tools. For more information, refer to the
@ifhtml
@uref{../../../topdocs/out-www/INSTALL.html,installation instructions}.
@end ifhtml
@item JEdit
-The @uref{http://www.jedit.org/,jEdit} editor has a LilyPond plugin.
+The @uref{http://@/www@/.jedit@/.org/,jEdit} editor has a LilyPond plugin.
This plugin includes a DVI viewer, integrated help and viewing via
GhostScript. It can be installed by doing @key{Plugins > Plugin
Manager}, and selecting @code{LilyTool} from the @key{Install} tab.
The @code{lilypond-latex} wrapper is invoked from the command-line as
follows
@example
- @code{lilypond-latex} [@var{option}]@dots{} @var{file}@dots{}
+@code{lilypond-latex} [@var{option}]@dots{} @var{file}@dots{}
@end example
To have @code{lilypond-latex} read from stdin, use a dash @code{-} for
@table @code
@item -k,--keep
- Keep the temporary directory with all output
-files. The temporary directory is created in the current directory as @code{@code{lilypond}.dir}.
+Keep the temporary directory with all output files. The temporary
+directory is created in the current directory as @code{@code{lilypond}.dir}.
+
@item -h,--help
- Print usage help.
+Print usage help.
+
@item -I,--include=@var{dir}
- Add @var{dir} to LilyPond's include path.
+Add @var{dir} to LilyPond's include path.
+
@item -o,--output=@var{file}
- Generate output to @var{file}. The extension of @var{file} is ignored.
+Generate output to @var{file}. The extension of @var{file} is ignored.
+
@item --png
- Also generate pictures of each page, in PNG format.
+Also generate pictures of each page, in PNG format.
+
@item --preview
- Also generate a picture of the first system of the score.
+Also generate a picture of the first system of the score.
@cindex preview
@cindex picture
@cindex pixmap
@cindex thumbnail
@cindex screen shot
-
+
@item -s,--set=@var{key}=@var{val}
- Add @var{key}= @var{val} to the settings, overriding those specified
+Add @var{key}= @var{val} to the settings, overriding those specified
in the files. Possible keys: @code{language}, @code{latexheaders},
@code{latexpackages}, @code{latexoptions}, @code{papersize},
@code{linewidth}, @code{orientation},
@code{textheight}.
+
@item -v,--version
Show version information.
+
@item -V,--verbose
Be verbose. This prints out commands as they are executed, and more
information about the formatting process is printed.
+
@item --debug
Print even more information. This is useful when generating bug reports.
+
@item -w,--warranty
-Show the warranty with which GNU LilyPond comes. (It comes with
+Show the warranty with which GNU LilyPond comes. (It comes with
@strong{NO WARRANTY}!)
@end table
-
@subsection Additional parameters
The @code{lilypond} program responds to several parameters specified
@table @code
@item language
- Specify La@TeX{} language: the @code{babel} package will be
+Specify La@TeX{} language: the @code{babel} package will be
included. Default: unset.
- Read from the @code{\header} block.
+Read from the @code{\header} block.
@item latexheaders
- Specify additional La@TeX{} headers file.
- Normally read from the @code{\header} block. Default value: empty.
+Specify additional La@TeX{} headers file.
+Normally read from the @code{\header} block. Default value: empty.
@item latexpackages
- Specify additional La@TeX{} packages file. This works cumulative,
+Specify additional La@TeX{} packages file. This works cumulative,
so you can add multiple packages using multiple @code{-s=latexpackages} options.
- Normally read from the @code{\header} block. Default value:
+Normally read from the @code{\header} block. Default value:
@code{geometry}.
@item latexoptions
- Specify additional options for the La@TeX{}
+Specify additional options for the La@TeX{}
@code{\documentclass}. You can put any valid value here. This was
designed to allow @code{lilypond} to produce output for double-sided
paper, with balanced margins and page numbers on alternating sides. To
achieve this specify @code{twoside}.
@item orientation
- Set orientation. Choices are @code{portrait} or @code{landscape}. Is
+Set orientation. Choices are @code{portrait} or @code{landscape}. Is
read from the @code{\layout} block, if set.
-
+
@item textheight
- The vertical extension of the music on the page. It is normally
- calculated automatically, based on the paper size.
+The vertical extension of the music on the page. It is normally
+calculated automatically, based on the paper size.
@item linewidth
- The music line width. It is normally read from the @code{\layout}
+The music line width. It is normally read from the @code{\layout}
block.
@item papersize
- The paper size (as a name, e.g. @code{a4}). It is normally read from
+The paper size (as a name, e.g. @code{a4}). It is normally read from
the @code{\layout} block.
-
+
@item fontenc
- The font encoding, should be set identical to the @code{font-encoding}
- property in the score.
+The font encoding, should be set identical to the @code{font-encoding}
+property in the score.
@end table
-
-
-
@cindex web site
A further source of information is the website, which can be found at
-@uref{http://www.lilypond.org/}. The website contains on-line copies of
-this and other documentation.
+@uref{http://@/www@/.lilypond@/.org/}. The website contains on-line copies
+of this and other documentation.
@include dedication.itely
@end table
The source archive includes a more elaborate Bib@TeX{} bibliography of
-over 100 entries in @file{Documentation/bibliography/}. It is also
+over 100 entries in @file{Documentation/@/bibliography/}. It is also
available online from the website.
to @code{b}. The pitch @code{c} is an octave below middle C and the
letters span the octave above that C
-@lilypond[fragment,verbatim,noindent]
+@lilypond[quote,fragment,verbatim]
\clef bass
a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
@end lilypond
r1 r2 r4 r8 r16 r32 r64 r64
@end example
-@lilypond[quote,noindent]
+@lilypond[quote]
\score {
\relative c'' {
a\breve*1/2 \autoBeamOff
duration. The default for the first note is a quarter note.
@lilypond[quote,raggedright,verbatim,fragment]
-{
-a a a2 a a4 a a1 a
-}
+{ a a a2 a a4 a a1 a }
@end lilypond
@cindex @code{\relative}
@example
- \relative @var{startpitch} @var{musicexpr}
+\relative @var{startpitch} @var{musicexpr}
@end example
+
+@noindent
or
+
@example
- \relative @var{musicexpr}
+\relative @var{musicexpr}
@end example
The octave of notes that appear in @var{musicexpr} are calculated as
when any of these properties are changed. The following example shows
possibilities when setting properties manually.
-@lilypond[raggedright,verbatim]
+@lilypond[quote,raggedright,verbatim]
{
\set Staff.clefGlyph = #"clefs-F"
\set Staff.clefPosition = #2
@code{beatLength} property.
-@lilypond[fragment,quote,relative=2,verbatim,noindent]
+@lilypond[fragment,quote,relative=2,verbatim]
c16[ c c c c c c c]
\set subdivideBeams = ##t
c16[ c c c c c c c]
only end in a few positions within the measure: beams can end on a beat,
or at durations specified by the properties in
@code{autoBeamSettings}. The defaults for @code{autoBeamSettings}
-are defined in @file{scm/@/auto@/-beam.scm}.
+are defined in @file{scm/@/auto@/-beam@/.scm}.
The value of @code{autoBeamSettings} is changed with two functions,
@example
@item drums-style
This is the default. It typesets a typical drum kit on a five-line staff
-@lilypond[quote,raggedright,noindent]
+@lilypond[quote,raggedright]
nam = \lyricmode { cymc cyms cymr hh hhc hho hhho hhp cb hc
bd sn ss tomh tommh tomml toml tomfh tomfl }
mus = \drummode { cymc cyms cymr hh | hhc hho hhho hhp | \break cb hc
\set TabStaff.minimumFret = #8
e16 fis gis a b4
@end example
-@lilypond[quote,noindent,raggedright]
+@lilypond[quote,raggedright]
frag = {
\key e \major
e16 fis gis a b4
ignatzekExceptions)
@end example
adds the new exceptions to the default ones, which are defined in
-@file{ly/chord-modifier-init.ly}.
+@file{ly/@/chord@/-modifier@/-init@/.ly}.
For an example of tuning this property, see also
@inputfileref{input/@/regression,chord@/-name@/-exceptions@/.ly}.
@inputfileref{input/@/test,chords@/-without@/-melody@/.ly}.
-Init files: @file{scm/@/chords@/-ignatzek.scm}, and
-@file{scm/@/chord@/-entry.scm}.
+Init files: @file{scm/@/chords@/-ignatzek@/.scm}, and
+@file{scm/@/chord@/-entry@/.scm}.
@refbugs
}
@end lilypond
-The file @file{scm/@/translation@/-functions.scm} contains the definitions
+The file @file{scm/@/translation@/-functions@/.scm} contains the definitions
of @code{format-mark-numbers} (the default format) and
@code{format-mark-letters}. These can be used as inspiration for other
formatting functions.
Program reference: @internalsref{MarkEvent}, @internalsref{RehearsalMark}.
-Init files: @file{scm/@/translation@/-functions.scm} contains the
+Init files: @file{scm/@/translation@/-functions@/.scm} contains the
definition of @code{format-mark-numbers} and
@code{format-mark-letters}. They can be used as inspiration for other
formatting functions.
Program reference: @internalsref{BarNumber}.
-Examples: @inputfileref{input/@/test,bar@/-number@/-every@/-five@/-reset@/.ly},
+Examples:
+@inputfileref{input/@/test,bar@/-number@/-every@/-five@/-reset@/.ly},
and @inputfileref{input/@/test,bar@/-number@/-regular@/-interval@/.ly}.
@refbugs
provided. These are specifically designed for use with notation in
Editio Vaticana style.
-@lilypond[quote,raggedright,verbatim,noindent]
+@lilypond[quote,raggedright,verbatim]
\include "gregorian-init.ly"
\score {
\context VaticanaVoice {
proper values, so you can immediately go ahead entering the chant, as
the following excerpt demonstrates
-@lilypond[quote,raggedright,verbatim,noindent]
+@lilypond[quote,raggedright,verbatim]
\include "gregorian-init.ly"
\score {
<<
grob properties to proper values, so you can immediately go ahead
entering the chant, as the following excerpt demonstrates
-@lilypond[quote,raggedright,verbatim,noindent]
+@lilypond[quote,raggedright,verbatim]
\score {
<<
\context MensuralVoice = "discantus" \transpose c c' {
specials, but does not use the kpathsea library, so it cannot find
LilyPond font and PostScript library files.}, version 22.36 or newer.
It is available from
-@uref{ftp://ftp.math.berkeley.edu/pub/Software/TeX/xdvi.tar.gz,ftp.math.berkeley.edu}.
+@uref{ftp://@/ftp@/.math@/.berkeley@/.edu/@/pub/@/Software/@/TeX/@/xdvi@/.tar@/.gz,
+ftp@/.math@/.berkeley@/.edu}.
Most @TeX{} distributions ship with xdvik, which is always a few
versions behind the official Xdvi. To find out which Xdvi you are
running, try @code{xdvi -version} or @code{xdvi.bin -version}.
-@item an editor with a client/server interface (or a lightweight GUI
+@item an editor with a client/@/server interface (or a lightweight GUI
editor):
@itemize @bullet
@item Emacs. Emacs is an extensible text-editor. It is available from
-@uref{http://www.gnu.org/software/emacs/}. You need version 21 to use
-column location.
+@uref{http://@/www@/.gnu@/.org/@/software/@/emacs/}. You need version 21
+to use column location.
@c move this elsewhere?
@cindex XEmacs
@item NEdit. NEdit runs under Windows, and Unix.
- It is available from @uref{http://www.nedit.org}.
+It is available from @uref{http://@/www@/.nedit@/.org}.
@cindex NEdit
@item GVim. GVim is a GUI variant of VIM, the popular VI
-clone. It is available from @uref{http://www.vim.org}.
+clone. It is available from @uref{http://@/www@/.vim@/.org}.
@cindex GVim
@cindex Vim
@cindex Emacs
For using point-and-click with Emacs, add the following
-In your Emacs startup file (usually @file{~/.emacs}):
+In your Emacs startup file (usually @file{~/@/.emacs}):
@example
(server-start)
@end example
Examples of the use of @code{\applymusic} are in the next section.
@seealso
-@file{ly/@/music-functions-init@/.ly}.
+@file{ly/@/music@/-functions@/-init@/.ly}.
@node Manipulating music expressions
@subsection Manipulating music expressions
input syntax, and as internal mechanism to glue together modules of
the program. This section is a very brief overview of entering data in
Scheme.@footnote{If you want to know more about Scheme, see
-@uref{http://www.schemers.org}.}
+@uref{http://@/www@/.schemers@/.org}.}
The most basic thing of a language is data: numbers, character
strings, lists, etc. Here is a list of data types that are relevant to
Not all midi players correctly handle tempo change in the midi
output. Players that are known to work include
-@uref{http://timidity.sourceforge.net/,timidity}.
+@uref{http://@/timidity@/.sourceforge@/.net/,timidity}.
Context definitions follow precisely the same syntax as within the
\layout block. Translation modules for sound are called performers.
-The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
+The contexts for MIDI output are defined in @file{ly/@/performer@/-init@/.ly}.
@node MIDI instrument names
Try it on this image
@lilypond[fragment,quote,raggedright,relative=2]
- c-\markup { \bold \huge { Click here. } }
+c-\markup { \bold \huge { Click here. } }
@end lilypond
@end ifhtml
@samp{a} through @samp{g}. So, if you enter
@example
- c d e f g a b
+c d e f g a b
@end example
@noindent
the result looks like this
@lilypond[fragment,quote,notime,relative=1]
- c d e f g a b
+c d e f g a b
@end lilypond
The duration of a note is specified by a number after the note name.
@c FIXME: have NOTIME also remove Score.timing?
@lilypond[fragment,quote,notime,relative=2]
- \set Score.timing = ##f
- \set Staff.autoBeaming = ##f
- { a1 a2 a4 a16 a32 s16_" " }
+\set Score.timing = ##f
+\set Staff.autoBeaming = ##f
+{ a1 a2 a4 a16 a32 s16_" " }
@end lilypond
If you do not specify a @rglos{duration}, the duration last entered is
defaults to a quarter
@example
- a a8 a a2 a
+a a8 a a2 a
@end example
@lilypond[fragment,quote,notime,relative=2]
- \set Score.timing = ##f
- { a a8 a a2 a s16_" " }
+\set Score.timing = ##f
+{ a a8 a a2 a s16_" " }
@end lilypond
@cindex rests
@example
- r2 r4 r8 r16
+r2 r4 r8 r16
@end example
@lilypond[fragment,quote,notime]
- \set Score.timing = ##f
- r2 r4 r8 r16 s16_" "
+\set Score.timing = ##f
+r2 r4 r8 r16 s16_" "
@end lilypond
Add a dot @samp{.} after the duration to get a @rglos{dotted note}
@example
- a2. a4 a8. a16
+a2. a4 a8. a16
@end example
@lilypond[fragment,quote,notime,relative=1]
- \set Score.timing = ##f
- { a2. a4 a8. a16 s16_" " }
+\set Score.timing = ##f
+{ a2. a4 a8. a16 s16_" " }
@end lilypond
The @rglos{meter} (or @rglos{time signature}) can be set with the
@code{\time} command
@example
- \time 3/4
- \time 6/8
- \time 4/4
+\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_" "
+\override Staff.Clef #'transparent = ##t
+\time 3/4
+s4_" "
+\time 6/8
+s4_" "
+\time 4/4
+s16_" "
@end lilypond
The @rglos{clef} can be set using the @code{\clef} command
@example
- \clef treble
- \clef bass
- \clef alto
- \clef tenor
+\clef treble
+\clef bass
+\clef alto
+\clef tenor
@end example
@lilypond[fragment,quote,notime]
- \set Score.timing = ##f
- \clef treble
- s4_" "
- \clef bass
- s4_" "
- \clef alto
- s4_" "
- \clef tenor
- s16_" "
+\set Score.timing = ##f
+\clef treble
+s4_" "
+\clef bass
+s4_" "
+\clef alto
+s4_" "
+\clef tenor
+s16_" "
@end lilypond
@code{@{@tie{}@dots{}@tie{}@}} to convert it to printable output.
@lilypond[fragment,quote,noindent,linewidth=55\staffspace]
- \time 3/4
- \clef bass
- c2 e4 g2.
- f4 e d c2 r4
+\time 3/4
+\clef bass
+c2 e4 g2.
+f4 e d c2 r4
@end lilypond
For more elaborate information on
input and save the file as @file{test.ly}
@example
- @{ c'4 e' g' @}
+@{ c'4 e' g' @}
@end example
@noindent
} which you can print or with the standard facilities of your
operating system.@footnote{If your system does not have any tools
installed, you can try
-@uref{http://www.cs.wisc.edu/~ghost/,Ghostscript}, a freely available
-package for viewing and printing PDF and PostScript files.}
+@uref{http://@/www@/.cs@/.wisc@/.edu/@/~ghost/,Ghostscript}, a freely
+available package for viewing and printing PDF and PostScript files.}
On Windows, start up a text-editor@footnote{Any simple or
programmer-oriented editor will do, for example Notepad. Do not use a
LilyPond.} and enter
@example
- @{ c'4 e' g' @}
+@{ c'4 e' g' @}
@end example
Save it on the desktop as @file{test.ly} and make sure that it is not
like German and Dutch.}
@example
- cis1 ees fisis aeses
+cis1 ees fisis aeses
@end example
@lilypond[fragment,quote,notime]
- \set Score.timing = ##f
- \transpose c c' { cis1 ees fisis aeses s16_" " }
+\set Score.timing = ##f
+\transpose c c' { cis1 ees fisis aeses s16_" " }
@end lilypond
@cindex key signature, setting
a pitch and @code{\major} or @code{\minor}
@example
- \key d \major
- g1
- \key c \minor
- g
+\key d \major
+g1
+\key c \minor
+g
@end example
@lilypond[fragment,quote,notime,fragment]
- \key d \major
- g'1
- \key c \minor
- g'
+\key d \major
+g'1
+\key c \minor
+g'
@end lilypond
@noindent
In this example
@lilypond[quote,notime,fragment]
- \key d \major
- d' cis' fis'
+\key d \major
+d' cis' fis'
@end lilypond
@noindent
no note has an explicit accidental, but you still must enter
@example
- \key d \major
- d cis fis
+\key d \major
+d cis fis
@end example
@noindent
of A-flat major, it does get an accidental
@lilypond[quote,notime,fragment,relative=1,verbatim]
- \key as \major
- d
+\key as \major
+d
@end lilypond
Adding all alterations explicitly might require a little more effort
being tied
@lilypond[quote,notime,fragment,verbatim,relative=3]
- g4~ g a2~ a4
+g4~ g a2~ a4
@end lilypond
For more information on Ties see @ref{Ties}.
Beams are drawn automatically
@lilypond[quote,fragment,relative=2,verbatim]
- a8 ais d es r d
+a8 ais d es r d
@end lilypond
@noindent
with @samp{]}.
@lilypond[quote,fragment,relative=2,verbatim]
- a8[ ais] d[ es r d]
+a8[ ais] d[ es r d]
@end lilypond
For more information on beams, see @ref{Beaming}.
An example of the use of quotes is in the following Mozart fragment
@lilypond[quote,raggedright,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
+\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
a single note is a music expression
@lilypond[fragment,quote,verbatim,relative=3]
- a4
+a4
@end lilypond
Enclosing group of notes in braces creates a new music
expression
@lilypond[fragment,quote,verbatim,relative=3]
- { a4 g4 }
+{ a4 g4 }
@end lilypond
Putting a bunch of music expressions (notes) in braces, means that
notes
@lilypond[fragment,quote,verbatim,relative=3]
- { { a4 g } f g }
+{ { a4 g } f g }
@end lilypond
This technique is useful for non-monophonic music. To enter music
single character
@lilypond[fragment,quote,verbatim,relative=2]
- c-. c-- c-> c-^ c-+ c-_
+c-. c-- c-> c-^ c-+ c-_
@end lilypond
@cindex fingering
(@samp{-}) and the digit to be printed
@lilypond[fragment,quote,verbatim,relative=2]
- c-3 e-5 b-2 a-1
+c-3 e-5 b-2 a-1
@end lilypond
Articulations and fingerings are usually placed automatically, but you
best to let LilyPond determine the articulation directions.
@lilypond[fragment,quote,verbatim,relative=2]
- c_-^1 d^. f^4_2-> e^-_+
+c_-^1 d^. f^4_2-> e^-_+
@end lilypond
Dynamic signs are made by adding the markings (with a backslash) to
the note
@lilypond[fragment,quote,verbatim,relative=2]
- c\ff c\mf
+c\ff c\mf
@end lilypond
@cindex dynamics
crescendo, or the command @code{\!} can be used
@lilypond[fragment,quote,verbatim,relative=2]
- c2\< c2\ff\> c2 c2\!
+c2\< c2\ff\> c2 c2\!
@end lilypond
@samp{(} and @samp{)}, respectively
@lilypond[fragment,quote,fragment,relative=2,verbatim]
- d4( c16) cis( d e c cis d) e( d4)
+d4( c16) cis( d e c cis d) e( d4)
@end lilypond
@cindex slurs versus ties
nested
@lilypond[quote,fragment,relative=2]
- c2~( c8 fis fis4 ~ fis2 g2)
+c2~( c8 fis fis4 ~ fis2 g2)
@end lilypond
@cindex phrasing slurs
same time.
@lilypond[quote,fragment,relative=2,verbatim]
- a8(\( ais b c) cis2 b'2 a4 cis, c\)
+a8(\( ais b c) cis2 b'2 a4 cis, c\)
@end lilypond
Angle brackets are the symbols @samp{<} and @samp{>}.
@lilypond[quote,relative=1,fragment,verbatim]
- r4 <c e g>4 <c f a>8
+r4 <c e g>4 <c f a>8
@end lilypond
be placed outside the angled brackets
@lilypond[quote,relative=1,fragment,verbatim]
- r4 <c e g>8[ <c f a>]~ <c f a>
+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>\!)
+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>\!)
+\slurUp
+r4 <c e g>8\>( <c e g> <c e g> <c f a>\!)
@end lilypond
and @code{\partial 8} an eighth note
@lilypond[quote,relative=2,verbatim,fragment]
- \partial 8
- f8 c2 d e
+\partial 8
+f8 c2 d e
@end lilypond
@cindex tuplets
2/3 of their notated duration, so a triplet has 2/3 as its fraction
@lilypond[quote,relative=1,verbatim,fragment]
- \times 2/3 { f8 g a }
- \times 2/3 { c r c }
+\times 2/3 { f8 g a }
+\times 2/3 { c r c }
@end lilypond
@cindex grace notes
@cindex acciaccatura
@lilypond[quote,relative=2,verbatim,fragment]
- c4 \appoggiatura b16 c4
- c4 \acciaccatura b16 c4
+c4 \appoggiatura b16 c4
+c4 \acciaccatura b16 c4
@end lilypond
@noindent
To mark a file for version 2.4.0, use
@example
- \version "2.4.0"
+\version "2.4.0"
@end example
@noindent
Such chords can be entered like notes,
@lilypond[quote,verbatim,raggedright]
- \chordmode { c2 f4. g8 }
+\chordmode { c2 f4. g8 }
@end lilypond
@noindent
following example shows a few common modifiers
@lilypond[quote,verbatim,raggedright]
- \chordmode { c2 f4:m g4:maj7 gis1:dim7 }
+\chordmode { c2 f4:m g4:maj7 gis1:dim7 }
@end lilypond
For lead sheets, chords are not printed on staves, but as names on a
following result.
@lilypond[quote,verbatim,raggedright]
- \chords { c2 f4.:m g4.:maj7 gis8:dim7 }
+\chords { c2 f4.:m g4.:maj7 gis8:dim7 }
@end lilypond
@cindex lead sheet
@code{PianoStaff}
@example
- \new PianoStaff << \new Staff @dots{} >>
+\new PianoStaff << \new Staff @dots{} >>
@end example
Here is a small example
up complex music expressions. An identifier is assigned as follows
@example
- namedMusic = @{ @dots{} @}
+namedMusic = @{ @dots{} @}
@end example
@noindent
input. For example,
@example
- width = 4.5\cm
- name = "Wendy"
- aFivePaper = \paper @{ paperheight = 21.0 \cm @}
+width = 4.5\cm
+name = "Wendy"
+aFivePaper = \paper @{ paperheight = 21.0 \cm @}
@end example
Depending on its contents, the identifier can be used in different
places. The following example uses the above variables
@example
- \paper @{
- \aFivePaper
- linewidth = \width
- @}
- @{ c4^\name @}
+\paper @{
+ \aFivePaper
+ linewidth = \width
+@}
+@{ c4^\name @}
@end example
More information on the possible uses of identifiers is in the
It is convenient to define the notes in a special file. For example,
suppose that the file @file{horn-music.ly} contains the following part
-of a horn/bassoon duo
+of a horn/@/bassoon duo
@example
hornNotes = \relative c @{
in the following output
@lilypond[quote,raggedright]
- \transpose f c' \relative c {
- \time 2/4
- r4 f8 a cis4 f e d
- }
+\transpose f c' \relative c {
+ \time 2/4
+ r4 f8 a cis4 f e d
+}
@end lilypond
In ensemble pieces, one of the voices often does not play for many
takes 3@tie{}measures in 2/4 time
@example
- R2*3
+R2*3
@end example
When printing the part, multi-rests
must be condensed. This is done by setting a run-time variable
@example
- \set Score.skipBars = ##t
+\set Score.skipBars = ##t
@end example
@noindent
leading to
@lilypond[quote,raggedright]
- \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
- }
- >>
+\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
More in-depth information on preparing parts and scores can be found
#!@PYTHON@
-# mf-to-table.py -- convert spacing info in MF logs .afm and .tex
-#
+# mf-to-table.py -- convert spacing info in MF logs .afm and .tex
+#
# source file of the GNU LilyPond music typesetter
-#
+#
# (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
import os
def read_log_file (fn):
str = open (fn).read ()
- str = re.sub ('\n', '', str)
- str = re.sub ('[\t ]+', ' ', str)
+ str = re.sub ('\n', '', str)
+ str = re.sub ('[\t ]+', ' ', str)
deps = []
autolines = []
return (autolines, deps)
-
class Char_metric:
def __init__ (self):
pass
def tfm_checksum (fn):
- sys.stderr.write ("Reading checksum from `%s'\n" % fn)
+ sys.stderr.write ("Reading checksum from `%s'\n" % fn)
s = open (fn).read ()
s = s[ 12 * 2 : ]
cs_bytes = s[:4]
return cs
+
## ugh. What's font_family supposed to be? It's not an afm thing.
font_family = 'feta'
+
def parse_logfile (fn):
(autolines, deps) = read_log_file (fn)
charmetrics = []
group = ''
for l in autolines:
- tags = string.split(l, '@:')
+ tags = string.split (l, '@:')
if tags[0] == 'group':
group = tags[1]
elif tags[0] == 'puorg':
if group:
name = group + '-' + name
m = {
- 'description': tags[1],
- 'name': name,
+ 'description': tags[1],
+ 'name': name,
'tex': tags[10],
'code': string.atoi (tags[2]),
- 'breapth':string.atof (tags[3]),
+ 'breapth': string.atof (tags[3]),
'width': string.atof (tags[4]),
- 'depth':string.atof (tags[5]),
- 'height':string.atof (tags[6]),
+ 'depth': string.atof (tags[5]),
+ 'height': string.atof (tags[6]),
'wx': string.atof (tags[7]),
- 'wy':string.atof (tags[8]),
- }
+ 'wy': string.atof (tags[8]),
+ }
charmetrics.append (m)
elif tags[0] == 'font':
global font_family
# To omit 'GNU' (foundry) from font name proper:
# name = tags[2:]
#urg
- if 0: #testing
+ if 0: # testing
tags.append ('Regular')
-
encoding = re.sub (' ','-', tags[5])
tags = tags[:-1]
name = tags[1:]
'-')
if 1:
global_info['Weight'] = tags[4]
- else: #testing
+ else: # testing
global_info['Weight'] = tags[-1]
-
+
global_info['FontBBox'] = '0 0 1000 1000'
global_info['Ascender'] = '0'
global_info['Descender'] = '0'
global_info['EncodingScheme'] = encoding
-
- return (global_info, charmetrics, deps)
+ return (global_info, charmetrics, deps)
-def write_afm_char_metric(file, charmetric):
+def write_afm_char_metric (file, charmetric):
f = 1000;
tup = (charmetric['code'],
- charmetric['name'],
- -charmetric['breapth'] *f,
- -charmetric['depth']*f,
- charmetric['width']*f,
- charmetric['height']*f,
+ charmetric['name'],
+ -charmetric['breapth'] * f,
+ -charmetric['depth'] * f,
+ charmetric['width'] * f,
+ charmetric['height'] * f,
charmetric['wx'] * f,
charmetric['wy'] * f)
-
+
file.write ('C %d ; N %s ; B %d %d %d %d ; W %d %d ;\n'% tup)
+
def write_afm_header (file):
file.write ("StartFontMetrics 2.0\n")
file.write ("Comment Automatically generated by mf-to-table.py\n")
+
def write_afm_metric (file, global_info, charmetrics):
- for (k,v) in global_info.items():
- file.write ("%s %s\n" % (k,v))
+ for (k, v) in global_info.items():
+ file.write ("%s %s\n" % (k, v))
file.write ('StartCharMetrics %d\n' % len(charmetrics ))
for m in charmetrics:
- write_afm_char_metric (file,m)
+ write_afm_char_metric (file, m)
file.write ('EndCharMetrics\n')
file.write ('EndFontMetrics\n')
def write_tex_defs (file, global_info, charmetrics):
- ##nm = global_info['FontFamily']
+ ## nm = global_info['FontFamily']
nm = font_family
for m in charmetrics:
- file.write (r'''\gdef\%s%s{\char%d}%%%s''' % (nm, m['tex'], m['code'],'\n'))
+ file.write (r'''\gdef\%s%s{\char%d}%%%s''' % \
+ (nm, m['tex'], m['code'],'\n'))
file.write ('\\endinput\n')
+
def write_ps_encoding (name, file, global_info, charmetrics):
encs = ['.notdef'] * 256
for m in charmetrics:
encs[m['code']] = m['tex']
file.write ('/%s [\n' % name)
- for m in range(0,256):
+ for m in range (0, 256):
file.write (' /%s %% %d\n' % (encs[m], m))
file.write ('] def\n')
-
+
+
def write_fontlist (file, global_info, charmetrics):
- ##nm = global_info['FontFamily']
+ ## nm = global_info['FontFamily']
nm = font_family
- per_line = 3
- file.write (r"""
-%% LilyPond file to list all font symbols and the corresponding names
+ per_line = 2
+ file.write (
+r"""%% LilyPond file to list all font symbols and the corresponding names
%% Automatically generated by mf-to-table.py
-\score { \lyrics { \time %d/8
-""" % (2*per_line+1))
+
+\score {
+ \lyrics { \time %d/8
+""" % (2 * per_line + 1))
count = 0
for m in charmetrics:
-
count += 1
-
-## \musicglyph and \markup require "_" to be escaped differently:
-
- scm_string = re.sub('_', r'_', m['name'])
+ ## \musicglyph and \markup require "_" to be escaped
+ ## differently
+ scm_string = re.sub ('_', r'_', m['name'])
tex_string = re.sub ('_', r'\\_' , m['name'])
-
-## prevent TeX from interpreting "--" as long dash:
- tex_string=re.sub('--','-{}-', tex_string)
- file.write (' \\markup { \\raise #0.75 \\vcenter \\musicglyph #"%s" \\typewriter " %s" } 4 \n' % (scm_string, tex_string))
+ ## prevent TeX from interpreting "--" as long dash
+ tex_string = re.sub ('--','-{}-', tex_string)
- if (count % 3) ==0:
- file.write ('\skip 8 \\break\n')
- file.write (r"""
-}
- \layout{
+ file.write (''' \\markup { \\raise #0.75 \\vcenter
+ \\musicglyph #"%s"
+ \\typewriter " %s" } 4\n''' % (scm_string, tex_string))
+
+ if (count % per_line) == 0:
+ file.write (' \\skip 8 \\break\n')
+ file.write (r""" }
+
+ \layout {
interscoreline = 1.0
indent = 0.0 \cm
\context {
minimumVerticalExtent = ##f
}
\context {
- \Score
- \remove "Bar_number_engraver"
- }
- }
- }
+ \Score
+ \remove "Bar_number_engraver"
+ }
+ }
+}
""")
+
def write_deps (file, deps, targets):
-
-
for t in targets:
t = re.sub ( '^\\./', '', t)
file.write ('%s '% t)
file.write ('%s ' % d)
file.write ('\n')
-def help():
- sys.stdout.write(r"""Usage: mf-to-table [OPTIONS] LOGFILEs
+
+def help ():
+ sys.stdout.write(r"""Usage: mf-to-table [OPTIONS] LOGFILEs
+
Generate feta metrics table from preparated feta log.
Options:
-p, --package=DIR specify package
-t, --tex=FILE name output tex chardefs
- """
-)
- sys.exit (0)
-
+ """)
+ sys.exit (0)
-(options, files) = getopt.getopt(
- sys.argv[1:], 'a:d:hl:o:p:t:',
- ['enc=', 'afm=', 'outdir=', 'dep=', 'tex=', 'ly=', 'debug', 'help', 'package='])
-
+(options, files) = \
+ getopt.getopt (sys.argv[1:],
+ 'a:d:hl:o:p:t:',
+ ['enc=', 'afm=', 'outdir=', 'dep=',
+ 'tex=', 'ly=', 'debug', 'help', 'package='])
enc_nm = ''
texfile_nm = ''
afm.write ("Comment DesignSize %.2f\n" % g['DesignSize'])
del g['DesignSize']
-
+
write_afm_metric (afm, g, m)
write_tex_defs (open (texfile_nm, 'w'), g, m)
enc_name = 'FetaEncoding'
- if re.search ('parmesan', filenm) :
+ if re.search ('parmesan', filenm):
enc_name = 'ParmesanEncoding'
- elif re.search ('feta-brace', filenm) :
+ elif re.search ('feta-brace', filenm):
enc_name = 'FetaBraceEncoding'
write_ps_encoding (enc_name, open (enc_nm, 'w'), g, m)
texfile_nm, afmfile_nm])
if lyfile_nm:
write_fontlist (open (lyfile_nm, 'w'), g, m)
-
-
-