+1.3.143.jcn1
+============
+
+* Small doco fixes.
+
+* Cosmetic bugfixes to chord names.
+
+* Fixed order of piano pedal strings (Amelie).
+
+* Changed embarrassing 'chorda' to corda (Thanks, Amelie).
+
+* Bugfixes: ly2dvi: empty tagline, don't fail if gettext.py can't be
+imported, check for linewidth before indexing, copy midi output.
+
+1.3.143
+=======
+
1.3.142.hwn2
============
with 32nd notes (and no shorter notes), you would use @code{(end * * 1
32)}.
-[say something about irregular meters. eg 5/8 = 2+3/8, 3+2/8]
+@c not true
+@c Automatic beams can not be put on the last note in a score.
-Automatic beams can not be put on the last note in a score.
+If a score ends while an automatic beam has not been ended and is still
+accepting notes, this last beam will not be typeset at all.
@cindex automatic beam generation
@cindex autobeam
@refbugs
-It is not possible to specify beaming for beams with mixed durations,
-that differs from the beaming of all separate durations, ie, you'll
-have to specify manual beams to get:
+It is not possible to specify beaming parameters for beams with mixed
+durations, that differ from the beaming parameters of all separate
+durations, ie, you'll have to specify manual beams to get:
@lilypond[fragment,singleline,relative]
\property Voice.autoBeamSettings
- \override #'(end * * * *) = #(make-moment 3 8)
- \time 12/8; c'8 c c c16 c c c c c [c c c c] c8 c c4
+ \override #'(end * * * *) = #(make-moment 3 8)
+ \time 12/8; c'8 c c c16 c c c c c [c c c c] c8 c c4
@end lilypond
+It is not possible to specify beaming parameters that act differently in
+different parts of a measure, eg, in irregular meters such as @code{5/8}
+that breaks down to @code{2/8 +3/8} or @code{3/8 + 2/8}, automatic beams
+won't act according to the broken down parts @code{2/8} and @code{3/8}.
@c . {Manual beams}
@cindex Automatic beams
@cindex Pedals
Piano pedal instruction can be expressed using
-@code{\sustainDown}, @code{\sustainUp}, @code{\unaChorda},
-@code{\treChorde}, @code{\sostenutoDown} and @code{\sostenutoUp}.
+@code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
+@code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp}.
These identifiers are shorthands for spanner commands of the types
-@code{Sustain}, @code{UnaChorda} and @code{Sostenuto}:
+@code{Sustain}, @code{UnaCorda} and @code{Sostenuto}:
@lilypond[fragment,verbatim]
c''4 \spanrequest \start "Sustain" c''4 c''4 \spanrequest \stop "Sustain"
LilyPond examines chords specified as lists of notes to determine a name
to give the chord. LilyPond will not try to identify chord inversions or
-added base, which may result in strange chord names when chords are
-entered as a list of pitches:
-
-[base vs. bass ?]
+an added bass note, which may result in strange chord names when chords
+are entered as a list of pitches:
@lilypond[verbatim,center,singleline]
scheme = \notes {
Routines that determine the names to be printed are written in Scheme,
and may be customized by the user. The code can be found in
-@file{scm/chord-name.scm}.
+@file{scm/chord-name.scm}. Here's an example showing the differences in
+chord name styles:
+
+@c too long?
+@c maybe just junk verbatim option?
+@lilypond[verbatim,singleline]
+scheme = \chords {
+ c1 c:5^3 c:4^3 c:5+
+ c:m7+ c:m5-.7
+ c:5-.7 c:5+.7
+ c:9^7
+}
+
+\score {
+ \notes <
+ \context ChordNames = banter \scheme
+ \context ChordNames = american {
+ \property ChordNames.ChordName \override
+ #'style = #'american \scheme }
+ \context ChordNames = jazz {
+ \property ChordNames.ChordName \override
+ #'style = #'jazz \scheme }
+ \context Staff \transpose c'' \scheme
+ >
+}
+@end lilypond
-[3 short examples showing differences between american, banter and jazz]
@node Writing parts
@section Writing parts
@end example
where the pieces of music @var{musicexpr1} and @var{musicexpr2} will be
-combined into one context @var{context}. The names of the music
+combined into one context @var{context}. The context names of the music
expressions must start with the prefixes @code{one} and @code{two}.
-[Name of music expressions? is that context name? ]
-
The most useful function of the part combiner to combining threads into
one voice, as common for wind parts in orchestral scores:
* What to tune?::
* Font selection::
* Text markup::
+* Embedded @TeX{}::
@end menu
@node Tuning groups of grobs
}
@end lilypond
+@node Embedded @TeX{}
+@subsection Embeded @TeX{}
+@cindex embedded tex
+@cindex embedded tex
+
+You can use @TeX{} commands in text scripts, but this should be avoided
+because this makes it impossible for LilyPond to compute the exact
+length of the string, which may lead to collisions. Also, @TeX{}
+commands won't work with direct PostScript output.
+
+@lilypond[fragment,relative,verbatim]
+ a''^"3 $\\times$ \\`a deux"
+@end lilypond
+
+@subsection Embedded PostScript
+@cindex embedded postscript
+@cindex embedded postscript
+
+You can also use raw PostScript commands embedded in text scripts. This
+offers ultimate flexibitily, but you'll have to learn the arcane
+PostScript language. Currently, embedded PostScript will @strong{not}
+work with direct PostScript output. Note that all dimensions that you
+use are in @code{staff-space}s.
+
+@lilypond[verbatim]
+\score {
+ \notes \relative c'' {
+ a-#"\\embeddedps{3 4 moveto 5 3 rlineto stroke}"
+ -#"\\embeddedps{ [ 0 1 ] 0 setdash 3 5 moveto 5 -3 rlineto stroke}"
+ b-#"\\embeddedps{3 4 moveto 0 0 1 2 8 4 20 3.5 rcurveto stroke}"
+ s2
+ a'1
+ }
+ \paper { linewidth = 70 * \staffspace; }
+}
+@end lilypond
@c . {Page layout}
@cindex Sound
LilyPond can produce MIDI output. The performance lacks lots of
-interesting effects, such as swing, articulation, slurring, tieing,
-etc., but it is good enough for proof-hearing the music you enter.
-
-Dynamics and tempo changes are interpreted.
-
-[TODO: mention volume control/Instrument Equaliser]
-
+interesting effects, such as swing, articulation, slurring, etc., but it
+is good enough for proof-hearing the music you have entered. Ties,
+dynamics and tempo changes are interpreted.
+
+The MIDI volume is composed of two elements: the current dynamics of the
+voice and the type of musical instrument.
+
+Dynamic marks, crescendi and decrescendi translate into MIDI volume
+levels. Dynamic marks translate to a fixed fraction of the available
+MIDI volume range, crescendi and decrescendi make the the volume vary
+linearly between their two extremities. The fractions be adjusted by
+overriding the @code{absolute-volume-alist} defined in
+@file{scm/midi.scm}.
+
+For each type of musical instrument (that MIDI supports), a volume range
+can be defined. This gives you basic equaliser control, which can
+enhance the quality of the MIDI output remarkably. You can add
+instruments and ranges or change the default settings by overriding
+the @code{instrument-equaliser-alist} defined in @file{scm/midi.scm}.
@refbugs
@node Latex and texinfo integration
@section Latex and texinfo integration
+
+@menu
+* Songs with additional verses::
+@end menu
+
+
So what does this look like? Well, here is an example:
@lilypond[veryverbatim, intertext="produces this music:"]
\score{
a feature of La@TeX{}. (But you usually put things inside a verbatim
environment when you don't want La@TeX{} to do any linebreaking)
+@node Songs with additional verses
+@subsection Songs with additional verses
+
+With lilypond-book, you can typeset songs with additional verses. To
+make lilypond-book print titles like ly2dvi, add
+
+@example
+\input titledefs.tex
+\def\preLilypondExample@{\def\mustmakelilypondtitle@{@}@}
+@end example
+
+just before the music fragment.
+
+@c urg: can't show, won't work for .texi docs
+
+@example
+% generate standard lilypond titles
+\input titledefs.tex
+\def\preLilypondExample@{\def\mustmakelilypondtitle@{@}@}
+
+\begin@{lilypond@}
+\header @{
+ title = "Title";
+ subtitle = "Subtitle";
+ subsubtitle = "Subsubtitle";
+ opus = "Opus 1";
+ piece = "Piece";
+ composer = "Composer";
+ enteredby = "JCN";
+ instrument = "instrument";
+@}
+\paper @{ linewidth = -1.; @}
+\score @{
+ \notes \relative c'' @{ a b c d @}
+@}
+\end@{lilypond@}
+
+\begin@{enumerate@}
+\item Verse one. aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa
+\item Verse two. bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb
+\end@{enumerate@}
+@end example
+
+
@node end of tutorial
@section The end
MAJOR_VERSION=1
MINOR_VERSION=3
PATCH_LEVEL=143
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
--- /dev/null
+% accidentals clash
+\score {
+ \context Staff \notes\relative c' <
+ % koord: c1 e g bes dis
+ bes'1 dis
+ >
+}
\ No newline at end of file
Pedal_info *p = info_list_;
- char * names [] = { "Sostenuto", "Sustain", "UnaChorda", 0 };
+ char * names [] = { "Sostenuto", "Sustain", "UnaCorda", 0 };
char **np = names ;
do
{
}
else
{
- s = gh_car (strings);
+ s = gh_caddr (strings);
}
p->start_req_l_ = 0;
}
else if (p->req_l_drul_[START])
{
p->start_req_l_ = p->req_l_drul_[START];
- s = gh_caddr (strings);
+ s = gh_car (strings);
}
if (gh_string_p (s))
verticalAlignmentChildCallback = #Align_interface::alignment_callback
pedalSustainStrings = #'("Ped." "*Ped." "*")
- pedalUnaChordaStrings = #'("una chorda" "" "tre chorde")
+ pedalUnaCordaStrings = #'("una corda" "" "tre corde")
pedalSostenutoStrings = #'() % FIXME
tupletNumberFormatFunction = #denominator-tuplet-formatter
\property Voice.crescendoSpanner = "dashed-line"
}
+% ah, this is handy: maybe drop resetting of properties in
+% dynamic-engraver ?
endcresc = \notes {
-\commandspanrequest \stop "crescendo";
-\property Voice.crescendoText = ##f
-\property Voice.crescendoSpanner = ##f
+ \commandspanrequest \stop "crescendo";
+ \property Voice.crescendoText = ##f
+ \property Voice.crescendoSpanner = ##f
+}
+
+dim = \notes {
+ \commandspanrequest \start "decrescendo" ;
+ \property Voice.decrescendoText = "dim."
+ \property Voice.decrescendoSpanner = "dashed-line"
+}
+
+enddim = \notes {
+ \commandspanrequest \stop "decrescendo";
+ \property Voice.decrescendoText = ##f
+ \property Voice.decrescendoSpanner = ##f
}
%{
sustainDown = \spanrequest \start "Sustain"
sustainUp = \spanrequest \stop "Sustain"
-unaChorda = \spanrequest \start "UnaChorda"
-treChorde = \spanrequest \stop "UnaChorda"
+unaCorda = \spanrequest \start "UnaCorda"
+treCorde = \spanrequest \stop "UnaCorda"
sostenutoDown = \spanrequest \start "Sostenuto"
sostenutoUp = \spanrequest \stop "Sostenuto"
depth = ../..
examples=standchen
+mutopia-examples=standchen
LOCALSTEPMAKE_TEMPLATES=mutopia
include $(depth)/make/stepmake.make
-\header{
-filename = "standchen.ly";
-title = "St\"andchen (Serenade) \"Leise flehen meine Lieder\"";
-opus = "D. 957 No. 4";
-composer = "Franz Schubert (1797-1828)";
-poet= "Text by Ludwig Rellstab (1799-1860)";
-enteredby = "JCN";
-description = "A schubert song in 16 pt";
-copyright = "public domain";
-}
-
-\version "1.3.117";
-
-\include "standchen.ly"
-\header{
-filename = "standchen.ly";
-title = "St\\\"andchen";
-subtitle = "(Serenade)\\\\``Leise flehen meine Lieder''";
-opus = "D. 957 No. 4";
-date = "August 1828";
-composer = "Franz Schubert (1797-1828)";
-poet= "Text by Ludwig Rellstab (1799-1860)";
-enteredby = "JCN";
-copyright = "public domain";
-}
-
-\version "1.3.117";
-
-% fool make-website
-% \include "standchen.ly";
-\header{
-filename = "standchen.ly";
-%
-% From the album:
-% Schubert-Lieder
-% Edition Schott No. 608
-% Without date, but makes mention of
-% ``Jubil"aums-Ausgabe zum 100. Todestage'' ie, 1928
-%
-% page 60
-%
-title = "St\\\"andchen";
-subtitle = "(Serenade)\\\\``Leise flehen meine Lieder''";
-opus = "D. 957 No. 4";
-date = "August 1828";
-composer = "Franz Schubert (1797-1828)";
-poet= "Text by Ludwig Rellstab (1799-1860)";
-enteredby = "JCN";
-copyright = "public domain";
+
+instrument = "Piano"
+
+\header {
+ title = "Ständchen";
+ subtitle = "(Serenade)";
+ subsubtitle = "Leise flehen meine Lieder";
+ opus = "D. 957 No. 4";
+ date = "August 1828";
+ composer = "Franz Schubert (1797-1828)";
+ poet = "Text by Ludwig Rellstab (1799-1860)";
+ enteredby = "JCN";
+ copyright = "public domain";
+ instrument = \instrument;
% mutopia headers.
- mutopiatitle = "St\\\"andchen";
- mutopiasubtitle = "(Serenade)\\\\``Leise flehen meine Lieder''";
+ mutopiatitle = "Standchen";
+ mutopiasubtitle = "Leise flehen meine Lieder";
mutopiacomposer = "Franz Schubert (1797-1828)";
mutopiapoet = "Ludwig Rellstab (1799-1860)";
- mutopiaopus = "D. 957 No. 4";
- mutopiainstrument = "Piano";
+ mutopiaopus = "D957.4";
+ mutopiainstrument = \instrument;
+ date = "1828/08";
style = "Romantic";
- copyright = "Public Domain";
- tagline = "\\\\This music is part of the Mutopia project, http://sca.uwater
-loo.ca/Mutopia/\\\\It has been typeset and placed in the public domain by Jan Nieuwenhuizen.\\\\Unrestricted modification and redistribution is permitted and enc
-ouraged - copy this music and share it!";
- maintainer = "janneke@gnu.org";
- lastupdated = "1999/Oct/17";
+ source = "Schubert-Lieder; Edition Schott No. 608, (Not dated).
+ Jubilaeums-Ausgabe zum 100. Todestage (~1928).";
+ copyright = "Public Domain";
+ maintainer = "Jan Nieuwenhuizen";
+ maintainer_email = "janneke@gnu.org";
+ lastupdated = "2001/Mar/26";
+ mutopiapublicdomain = "\\parbox{\hsize}{\\thefooter\\quad\\small
+ \\\\This music is part of the Mutopia project,
+ \\texttt{http://www.mutopiaproject.org/}\\\\It has been typeset
+ and placed in the public domain by " + \maintainer +
+ ".\\\\Unrestricted modification and redistribution is permitted
+ and encouraged---copy this music and share it.}";
+ tagline = \mutopiapublicdomain;
+ footer = "Mutopia-2001/03/26-xx";
}
-%{
- Tested Features: multivoice accents lyrics chords piano music
-multiple \paper{}s in one \score
-Note: Original key f.
-%}
-
-\version "1.3.117";
+\version "1.3.141";
-dynamicUp = \property Voice.DynamicLineSpanner \override #'direction = #1
-dynamicRevert = \property Voice.DynamicLineSpanner \revert #'direction
+dynamicUp = \property Voice.DynamicLineSpanner \override #'direction = #1
+dynamicRevert = \property Voice.DynamicLineSpanner \revert #'direction
+\include "paper16.ly"
vocalVerse = \notes\relative c''{
\dynamicUp
R2. |
g8. b16 es4. d8 |
c8. g16 es4. c8 |
- \grace { as'16 bes } \times 2/3 { [ )as8( )g] as } c4. as8 |
+ % CHECK
+ % \grace { as'16 bes } \times 2/3 { [ )as8( )g] as } c4. as8 |
+ \grace { as'16( bes } \times 2/3 { [ )as8( )g] as } c4. as8 |
g2. |
\grace { f16( g } \times 2/3 { [ )f8( )e] f } as4. f8 |
; Cm iso Cm.no5
(((0 . 0) (2 . -1)) . ("m"))
; C2 iso C2.no3
- (((0 . 0) (1 . 0) (4 . 0)) . (super "2"))
+ (((0 . 0) (1 . 0) (4 . 0)) . ("" (super "2")))
; C4 iso C4.no3
- (((0 . 0) (3 . 0) (4 . 0)) . (super "4"))
- ; Cdim iso Cm5-
+ (((0 . 0) (3 . 0) (4 . 0)) . ("" (super "4")))
+ ;; Cdim iso Cm5-
(((0 . 0) (2 . -1) (4 . -1)) . ("dim"))
; Co iso Cm5-7-
- ; urg
- (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . (super "o"))
+ (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . ("" (super "o")))
; Cdim9
(((0 . 0) (2 . -1) (4 . -1) (6 . -2) (1 . -1)) . ("dim" (super "9")))
(((0 . 0) (2 . -1) (4 . -1) (6 . -2) (1 . -1) (3 . -1)) . ("dim" (super "11")))
(((0 . 0) (2 . -1)) . ("m"))
(((0 . 0) (3 . 0) (4 . 0)) . ("sus"))
(((0 . 0) (2 . -1) (4 . -1)) . ("dim"))
-;Alternate: (((0 . 0) (2 . -1) (4 . -1)) . ((super "o")))
+;Alternate: (((0 . 0) (2 . -1) (4 . -1)) . ("" (super "o")))
(((0 . 0) (2 . 0) (4 . 1)) . ("aug"))
;Alternate: (((0 . 0) (2 . 0) (4 . 1)) . ("+"))
(((0 . 0) (1 . 0) (4 . 0)) . ("2"))
;; Common seventh chords
- (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . (rows (super "o") "7"))
+ (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . ("" (super "o") "7"))
(((0 . 0) (2 . 0) (4 . 0) (6 . 0)) . ("maj7"))
(((0 . 0) (2 . -1) (4 . 0) (6 . -1)) . ("m7"))
(((0 . 0) (2 . 0) (4 . 0) (6 . -1)) . ("7"))
;jazz: the delta, see jazz-chords.ly
;;(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . (super ((font-family . math) "N"))
;; ugh, kludge slashed o
- (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") ((kern . -0.85) ((raise . 0.57) ((font-relative-size . -3) "/"))) "7")) ; slashed o
+ ;; (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") ((kern . -0.85) ((raise . 0.57) ((font-relative-size . -3) "/"))) "7")) ; slashed o
+ (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") (((kern . -0.85) (raise . 1.1) (font-relative-size . -2)) "/") "7")) ; slashed o
+
(((0 . 0) (2 . 0) (4 . 1) (6 . -1)) . ("aug7"))
(((0 . 0) (2 . 0) (4 . -1) (6 . 0)) . (rows "maj7" ((font-relative-size . -2) ((raise . 0.2) (music (named "accidentals--1")))) "5"))
(((0 . 0) (2 . 0) (4 . -1) (6 . -1)) . (rows "7" ((font-relative-size . -2) ((raise . 0.2) (music (named "accidentals--1")))) "5"))
;; DONT use non-ascii characters, even if ``it works'' in Windows
- ;;(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . (((raise . 0.8)"o"))); works, but "o" is a little big
- (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . ((raise . 0.8) (size . -2) ("o")))
+ ;;(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . ((raise . 0.8) (size . -2) ("o")))
+ (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . ("" (super "o")))
;; half diminshed chords
- ; half diminished seventh chord = slashed o
- (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (((raise . 0.8)"/o")))
+ ;; half diminished seventh chord = slashed o
+ ;; (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (((raise . 0.8) "/o")))
+ (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") (((kern . -0.85) (raise . 1.1) (font-relative-size . -2)) "/") "7")) ; slashed o
+
; half diminished seventh chord with major 9 = slashed o cancelation 9
(((0 . 0) (2 . -1) (4 . -1) (6 . -1) (1 . 0)) . (
((raise . 0.8)"/o(")
tuplet-bracket-interface font-interface))
))
- (UnaChordaPedal . (
+ (UnaCordaPedal . (
(molecule-callback . ,Text_item::brew_molecule)
(font-shape . italic)
(no-spacing-rods . #t)
(Y-offset-callbacks .
(,Side_position_interface::aligned_side
,Side_position_interface::centered_on_parent))
- (meta . ,(grob-description "UnaChordaPedal" text-interface font-interface))
+ (meta . ,(grob-description "UnaCordaPedal" text-interface font-interface))
))
(VoltaBracket . (
(append
'(
("sf" . 1.00)
+ ("fffff" . 0.95)
("ffff" . 0.91)
("fff" . 0.81)
("ff" . 0.71)
("p" . 0.30)
("pp" . 0.20)
("ppp" . 0.10)
+ ("pppp" . 0.08)
+ ("ppppp" . 0.05)
)
absolute-volume-alist))
(engraver-description
"Piano_pedal_engraver"
"Engrave piano pedal symbols."
- '(SostenutoPedal SustainPedal UnaChordaPedal)
- '(pedalSostenutoStrings pedalSustainStrings pedalUnaChordaStrings
+ '(SostenutoPedal SustainPedal UnaCordaPedal)
+ '(pedalSostenutoStrings pedalSustainStrings pedalUnaCordaStrings
)))
(cons
(translator-property-description 'pedalSustainStrings list? "List of string to print for sustain-pedal. Format is
(UP UPDOWN DOWN), where each of the three is the string to print when
this is done with the pedal.")
-(translator-property-description 'pedalUnaChordaStrings string? "see pedalSustainStrings.")
+(translator-property-description 'pedalUnaCordaStrings string? "see pedalSustainStrings.")
(translator-property-description 'pedalSostenutoStrings string? "see pedalSustainStrings.")
(translator-property-description 'phrasingPunctuation string? "")
conversions.append (((1,3,141), conv, 'xNoDots -> xSolid'))
+if 1:
+ def conv (str):
+ str = re.sub ('([Cc])horda', '\\1orda', str)
+ return str
+
+ conversions.append (((1,3,144), conv, 'Chorda -> Corda'))
+
############################
endfooter=\tagline -> 'lily was here <version>'
}
+ lilytagline (->lily was here), usertagline, copyright etc.
+
* head/header tagline/endfooter
+ * check/set TEXINPUTS: see to it that/warn if not/
+ kpathsea can find titledefs.tex?
+
* dvi from lilypond .tex output? This is hairy, because we create dvi
from lilypond .tex *and* header output.
- * windows compatibility: rm -rf, cp file... dir
+ * multiple \score blocks?
+
+ * windows-sans-cygwin compatibility? rm -rf, cp file... dir
'''
import tempfile
sys.path.append ('@datadir@/python')
-import gettext
-gettext.bindtextdomain ('lilypond', '@localedir@')
-gettext.textdomain('lilypond')
-_ = gettext.gettext
+try:
+ import gettext
+ gettext.bindtextdomain ('lilypond', '@localedir@')
+ gettext.textdomain('lilypond')
+ _ = gettext.gettext
+except:
+ def _ (s):
+ return s
layout_fields = ['title', 'subtitle', 'subsubtitle', 'footer', 'head',
def cleanup_temp ():
if not keep_temp_dir_p:
if verbose_p:
- progress (_ ('Cleaning up `%s\'') % temp_dir)
+ progress (_ ("Cleaning %s...") % temp_dir)
system ('rm -rf %s' % temp_dir)
orientation = extra['orientation'][0]
# set sane geometry width (a4-width) for linewidth = -1.
- linewidth = extra['linewidth'][0]
- if linewidth < 0:
+ if not extra['linewidth'] or extra['linewidth'][0] < 0:
linewidth = 597
+ else:
+ linewidth = extra['linewidth'][0]
s = s + '\geometry{width=%spt%s,headheight=2mm,headsep=0pt,footskip=2mm,%s}\n' % (linewidth, textheight, orientation)
s = s + r'''
s = s + r'''
\makeatletter
-\renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\lilypondtagline}}%
+\renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\makelilypondtagline}}%
\makeatother
'''
s = s + '\\end{document}'
type = 'DVI'
dest = os.path.join (outdir, dest)
+ midi = base + '.midi'
+ midi = os.path.join (outdir, midi)
+
if outdir != '.':
system ('mkdir -p %s' % outdir)
- system ('cp \"%s\" \"%s\"' % (srcname, dest ))
- if re.match ('[.]midi', string.join (os.listdir ('.'))):
- system ('cp *.midi %s' % outdir, ignore_error = 1)
+
+ #if re.match ('.*[.]dvi', string.join (os.listdir ('.'))):
+ if os.path.isfile (srcname):
+ # huh, and what bout all other (-1, -2) scores?
+ system ('cp \"%s\" \"%s\"' % (srcname, dest))
+ else:
+ dest = 0
+ if re.match ('.*[.]midi', string.join (os.listdir ('.'))):
+ system ('cp *.midi %s' % outdir)
+ else:
+ midi = 0
depfile = os.path.join (outdir, base + '.dep')
cleanup_temp ()
# most insteresting info last
- progress (_ ("dependencies output to %s...") % depfile)
- progress (_ ("%s output to %s...") % (type, dest))
+ # don't say silly things
+ if os.path.isfile (depfile):
+ progress (_ ("dependencies output to %s...") % depfile)
+ if dest and os.path.isfile (dest):
+ progress (_ ("%s output to %s...") % (type, dest))
+ if midi and os.path.isfile (midi):
+ progress (_ ("%s output to %s...") % ('MIDI', midi))
'''
TODO:
- * more flexible build paths
- * cleanup previous tree
+ * more flexible build/ftp/patches/releases paths
* flexible build command
* show only?
'''
import operator
import tempfile
+try:
+ import gettext
+ gettext.bindtextdomain ('lilypond', '@localedir@')
+ gettext.textdomain('lilypond')
+ _ = gettext.gettext
+except:
+ def _ (s):
+ return s
sys.path.append ('@datadir@/python')
import gettext
package_name = 'lilypond'
help_summary = _("Fetch and rebuild from latest source package")
build_root = os.environ ['HOME'] + '/usr/src'
-build_command = './configure; make web'
+build_command = '(./configure --prefix=$HOME/usr && make all web) >> log.txt 2>&1'
+
release_dir = build_root + '/releases'
patch_dir = build_root + '/patches'
url = 'ftp://appel.lilypond.org/pub/gnu/LilyPond/development/lilypond-*.tar.gz'
url = 'ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/development/lilypond-*.tar.gz'
+remove_previous_p = 0
+
# lily_py.py -- options and stuff
#
def cleanup_temp ():
if not keep_temp_dir_p:
if verbose_p:
- progress (_ ('Cleaning up `%s\'') % temp_dir)
+ progress (_ ("Cleaning %s...") % temp_dir)
system ('rm -rf %s' % temp_dir)
def build (p):
os.chdir (build_root)
system ('tar xzf %s/%s.tar.gz' % (release_dir, p))
+ system ('rm -f building')
+ os.symlink ('%s/%s' % (build_root, p), 'building')
os.chdir (p)
return system (build_command)
help ()
elif o == '--buid-root' or o == '-b':
build_root = a
+ elif o == '--remove-previous' or o == '-r':
+ remove_previous_p = 1
elif o == '--url' or o == '-u':
url = a
elif o == '--verbose' or o == '-V':
if 1:
latest = find_latest (url)
- if os.path.isdir ('%s/%s' % (build_root, latest)):
+ #if os.path.isdir ('%s/%s' % (build_root, latest)):
+ if os.path.isdir ('%s/%s/%s' % (build_root, latest, 'lily/out/lilypond')):
progress (_ ("latest is %s") % latest)
progress (_ ("relax, %s is up to date" % package_name))
sys.exit (0)
progress (_ ("fetching %s...") % get)
copy_url (get, '.')
- build_command = './configure --prefix=$HOME/usr && make web'
if not build (latest):
if os.path.isdir ('%s/%s' % (build_root, package_name)):
os.chdir ('%s/%s' % (build_root, package_name))
previous = os.getcwd ()
os.chdir (build_root)
- system ('rm -f %s' % package_name)
- system ('echo rm -rf %s/%s' % (build_root, previous))
+ if remove_previous_p:
+ system ('echo rm -rf %s/%s' % (build_root, previous))
+ system ('rm -f %s' % package_name)
os.symlink ('%s/%s' % (build_root, latest), package_name)
os.chdir (original_dir)
\ifx\lilypondfooter\undefined\else%
\parbox{\textwidth}{\mbox{}\lilypondfooter}\fi
}
+\def\makelilypondtagline
+{
+ \ifx\lilypondtagline\undefined\else\lilypondtagline\fi
+}
\endinput