From 839a9c4cf0bef6a80a786b409a78e3de794d1370 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 15 Jul 2001 14:15:40 +0200 Subject: [PATCH] release: 1.4.5 ======== * Documentation fixes 1.4.4.stable.j --- CHANGES | 61 ++++++++------ Documentation/topdocs/index.tely | 5 +- Documentation/user/lilypond-book.itely | 5 ++ Documentation/user/ly2dvi.itexi | 3 + Documentation/user/refman.itely | 32 +++---- INSTALL.txt | 3 +- VERSION | 4 +- input/GNUmakefile | 2 +- input/ascii-art/GNUmakefile | 3 - input/template/GNUmakefile | 7 ++ input/template/README | 57 +++++++++++++ input/template/melody-lyrics-chords.ly | 45 ++++++++++ input/template/melody-lyrics.ly | 40 +++++++++ input/template/melody.ly | 28 +++++++ input/template/piano-4-voices.ly | 55 +++++++++++++ input/template/piano-lyrics.ly | 54 ++++++++++++ input/template/piano-melody-lyrics.ly | 58 +++++++++++++ input/template/piano.ly | 39 +++++++++ input/test/chord-banter.ly | 54 ++++++++++++ input/test/title.ly | 2 +- lily/beam.cc | 5 ++ lily/chord.cc | 9 +- lily/parser.yy | 5 +- lily/span-bar.cc | 110 +++++++++++++++++++++++++ make/out/lilypond.lsm | 8 +- make/out/lilypond.redhat.spec | 4 +- make/out/lilypond.suse.spec | 4 +- scm/chord-name.scm | 23 ++++-- scm/grob-description.scm | 2 +- scm/lily.scm | 2 +- scripts/lilypond-book.py | 4 +- scripts/ly2dvi.py | 102 ++++++++++++++++------- 32 files changed, 732 insertions(+), 103 deletions(-) create mode 100644 input/template/GNUmakefile create mode 100644 input/template/README create mode 100644 input/template/melody-lyrics-chords.ly create mode 100644 input/template/melody-lyrics.ly create mode 100644 input/template/melody.ly create mode 100644 input/template/piano-4-voices.ly create mode 100644 input/template/piano-lyrics.ly create mode 100644 input/template/piano-melody-lyrics.ly create mode 100644 input/template/piano.ly create mode 100644 input/test/chord-banter.ly diff --git a/CHANGES b/CHANGES index 17bb0aa2d8..c8d958cdbc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,39 +1,48 @@ ---- ../lilypond-1.4.4.stable.jcn2/CHANGES Sun Jul 8 18:51:34 2001 -++ b/CHANGES Fri Jul 13 11:24:19 2001 -@@ -1,5 +1,7 @@ --1.4.4.stable.jcn2 -1.4.4.stable.jcn3 - ================= +1.4.4.mb1 +======== + +* Documentation fixes + +1.4.4.stable.jcn4 +================= + +* Website: downloadable pictures with better alt texts. + +* Bugfix: c:dim7 generates . + +* Bugfix: call Cm5-/7 in Banter style. + +* Bugfix: don't change value of chord modifiers. + +* Bugfix: size and overstrike fix for some Banter chord names. + +* Bugfix: text2html: escape entities inside
.
+
+* Added some template .ly's for evaluation.
 
 * Bugfix: text2html: escape entities inside 
.
- 
- * Now really included lexer-gcc-3.0.patch.
- --- ../lilypond-1.4.4.stable.jcn1/CHANGES	Fri Jun 29 18:23:09 2001
-++ b/CHANGES	Sun Jul  8 18:51:34 2001
-@@ -1,5 +1,7 @@
--1.4.4.stable.jcn1
-1.4.4.stable.jcn2
- =================
 
 * Now really included lexer-gcc-3.0.patch.
- 
- * Added feature to ly2dvi to find feta pfa font files used in a
- postscript file to make printing of direct postscript a bit easier:1.4.4.jcn3
-==========
 
-TODO: look at other filledbox'es (stafflines and barlines don't match up).
+* Added feature to ly2dvi to find feta pfa font files used in a
+postscript file to make printing of direct postscript a bit easier:
+
+    lilypond -fps input/trip.ly
+    cat $(ly2dvi -f trip.ps) trip.ps | lpr
+
+* Reincluded 1.4.3.jcn2.
+
+* Website fixes.
 
-* Testing code off by default.  On: -e "(define ps-testing 1)" -fps
+* Ly2dvi now leaves .tex and .latex output if latex fails, and cleans
+the temp dir if anything fails.
 
-* Output via TeX/dvips still gives problems.  Use direct postscript
-output for real testing.
+* Fixes for windows scripts.
 
 * Beam and stem fixes:
- - Stems drawn in PostScript (should do all filledbox'es in PS?).
- - Fixes for draw_box and draw_beam PostScript routines.
+ - Fixes for draw-box and draw_beam PostScript routines.
  - Stems reach to top (or bottom) of beam.
- - Beam uses correct stem thickness (only right beams, left TODO).
- - testing code in effect: only outlines are drawn.
+ - Beam uses correct stem thickness.
 
 1.4.4
 =====
diff --git a/Documentation/topdocs/index.tely b/Documentation/topdocs/index.tely
index a75fb37c1a..1b26344f9e 100644
--- a/Documentation/topdocs/index.tely
+++ b/Documentation/topdocs/index.tely
@@ -7,7 +7,10 @@
 
 @html
 

-[logo] + +[picture of lily-cello-girl] + @end html diff --git a/Documentation/user/lilypond-book.itely b/Documentation/user/lilypond-book.itely index bc69709524..0250be7066 100644 --- a/Documentation/user/lilypond-book.itely +++ b/Documentation/user/lilypond-book.itely @@ -223,6 +223,11 @@ of the code is used. @item printfilename Prints the file name before the music example. Useful in conjunction with @code{\lilypondfile}. +@item relative, relative @var{N} + Use relative octave mode. By default, notes are specified relative + central C. The optional integer argument specifies how many octaves + higher (positive number) or lower (negative number) to place the + starting note. @end table @section Invocation diff --git a/Documentation/user/ly2dvi.itexi b/Documentation/user/ly2dvi.itexi index c1ee6242fa..ad872aa34f 100644 --- a/Documentation/user/ly2dvi.itexi +++ b/Documentation/user/ly2dvi.itexi @@ -138,6 +138,9 @@ block. @item papersize The paper size (as a name, e.g. @code{a4}). It is normally read from the @code{\paper} block. + +@item pagenumber + If set to @code{no}, no page numbers will be printed. @end table @unnumberedsubsec Environment variables diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index ac17a848af..f23e2053ab 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -395,7 +395,7 @@ should last. With this, you can make lots of tuplets while typing @lilypond[fragment, relative, singleline, verbatim] \property Voice.tupletSpannerDuration = #(make-moment 1 4) -\times 2/3 { c''8 c c c c c } +\times 2/3 { c'8 c c c c c } @end lilypond The format of the number is determined by the property @@ -974,7 +974,7 @@ after the last note: @lilypond[fragment,relative,verbatim] \context Staff { - r4 [r8 g'' a r8] r8 [g | a] r8 + r4 [r8 g' a r8] r8 [g | a] r8 } @end lilypond Whenever an manual beam is busy, the automatic beamer will not produce @@ -990,7 +990,7 @@ property, it's value will be used only once, and then it is erased. @lilypond[fragment,relative,verbatim] \context Staff { - [f'8 r16 f g a] + [f8 r16 f g a] [f8 r16 \property Voice.stemLeftBeamCount = #1 f g a] } @end lilypond @@ -1008,7 +1008,7 @@ Set @code{height} to zero, to get horizontal beams: @lilypond[fragment,relative,verbatim] \property Voice.Beam \set #'direction = #1 \property Voice.Beam \set #'height = #0 - [a''8 e' d c] + [a'8 e' d c] @end lilypond Here's how you'd specify a weird looking beam that instead of being @@ -1017,7 +1017,7 @@ horizontal, falls two staff spaces: @lilypond[fragment,relative,verbatim] \property Voice.Beam \set #'staff-position = #4 \property Voice.Beam \set #'height = #-4 - [c'8 c] + [c8 c] @end lilypond @cindex @code{default-neutral-direction} @@ -1054,7 +1054,7 @@ pair of symbols, specifying the attachment type of the left and right end points @lilypond[fragment,relative,verbatim] \property Voice.Slur \set #'direction = #1 \property Voice.Stem \set #'length = #5.5 - g''8(g)g4 + g'8(g)g4 \property Voice.Slur \set #'attachment = #'(stem . stem) g8(g)g4 @end lilypond @@ -1066,7 +1066,7 @@ stems might look better: @lilypond[fragment,relative,verbatim] \property Voice.Stem \set #'direction = #1 \property Voice.Slur \set #'direction = #1 - d'32( d'4 )d8.. + d32( d'4 )d8.. \property Voice.Slur \set #'attachment = #'(stem . stem) d,32( d'4 )d8.. @end lilypond @@ -1084,7 +1084,7 @@ indicate this preference by increasing the @code{beautiful} value: @lilypond[verbatim,singleline,relative] \property Voice.Beam \override #'direction = #-1 \property Voice.Slur \override #'direction = #1 - c'16( a' f' a a f a, )c, + c16( a' f' a a f a, )c, c( a' f' a a f d, )c \property Voice.Slur \override #'beautiful = #5.0 c( a' f' a a f d, )c @@ -1108,7 +1108,7 @@ indicate a musical sentence. It is started using @code{\(} and @code{\)} respectively. @lilypond[fragment,verbatim,center,relative] - \time 6/4 c'' \( ( d ) e f ( e ) \) d + \time 6/4 c' \( ( d ) e f ( e ) \) d @end lilypond Typographically, the phrasing slur behaves almost exactly like a normal @@ -1397,7 +1397,7 @@ A glissando line (grob @code{Voice.Glissando}) can be requested by attaching a @code{\glissando} to a note: @lilypond[fragment,relative,verbatim] - c''-\glissando c' + c'-\glissando c' @end lilypond @refbugs @@ -1439,7 +1439,7 @@ note: @code{c4-\ff}. The available dynamic marks are: @code{\ppp}, @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}. @lilypond[verbatim,singleline,fragment,relative] - c''\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff + c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff c2\sf c\rfz @end lilypond @@ -1477,7 +1477,7 @@ is an example how to do it: \context Voice { \property Voice.crescendoText = "cresc." \property Voice.crescendoSpanner = #'dashed-line - a''2\mf\< a a \!a + a'2\mf\< a a \!a } @end lilypond @@ -1857,7 +1857,7 @@ You can specify an arpeggio sign on a chord by attaching an @lilypond[fragment,relative,verbatim] - \context Voice + \context Voice @end lilypond When an arpeggio crosses staffs in piano music, you attach an arpeggio @@ -1867,7 +1867,7 @@ to the chords in both staffs, and set @lilypond[fragment,relative,verbatim] \context PianoStaff < \property PianoStaff.connectArpeggios = ##t - \context Voice = one { } + \context Voice = one { } \context Voice = other { \clef bass } > @end lilypond @@ -1899,7 +1899,7 @@ can be printed automatically. This is enabled if the property \context PianoStaff < \property PianoStaff.followVoice = ##t \context Staff \context Voice { - c'1 + c1 \translator Staff=two b2 a } @@ -3246,7 +3246,7 @@ commands won't work with direct PostScript output (see @ref{PostScript output}). @lilypond[fragment,relative,verbatim] - a''^"3 $\\times$ \\`a deux" + a'^"3 $\\times$ \\`a deux" @end lilypond You can also use raw PostScript commands embedded in text scripts. This diff --git a/INSTALL.txt b/INSTALL.txt index eb9e403815..23caefdcdf 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -475,7 +475,8 @@ Debian GNU/Linux unstable gcc-3.0 Flex (2.5.4a-11) in unstable does not produce g++-3.0 compliant C++ code. To compile LilyPond with gcc-3.0 you may do: - CC=gcc-3.0 CXX=g++-3.0 ./configure + + CC=gcc-3.0 CXX=g++-3.0 ./configure --enable-config=gcc-3.0 make conf=gcc-3.0 -C lily out-gcc-3.0/lexer.cc patch -p1 < lexer-gcc-3.0.patch make conf=gcc-3.0 -C lily diff --git a/VERSION b/VERSION index 9e2fb5ea5f..3e4197e5c4 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=4 -PATCH_LEVEL=4 -MY_PATCH_LEVEL=stable.jcn3 +PATCH_LEVEL=5 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/GNUmakefile b/input/GNUmakefile index 3f3951d288..9cf5f1fd68 100644 --- a/input/GNUmakefile +++ b/input/GNUmakefile @@ -1,6 +1,6 @@ depth = .. -SUBDIRS=bugs test regression tutorial no-notation ascii-art +SUBDIRS=bugs test regression tutorial no-notation ascii-art template # nereides is tweaked a lot, can't do (read webpage) examples=trip star-spangled-banner paddy twinkle #nereides diff --git a/input/ascii-art/GNUmakefile b/input/ascii-art/GNUmakefile index 9c2b9f48fe..516974621f 100644 --- a/input/ascii-art/GNUmakefile +++ b/input/ascii-art/GNUmakefile @@ -1,8 +1,5 @@ -# input/bugs/Makefile - depth = ../.. LOCALSTEPMAKE_TEMPLATES=ly mutopia include $(depth)/make/stepmake.make - diff --git a/input/template/GNUmakefile b/input/template/GNUmakefile new file mode 100644 index 0000000000..cba7839f6d --- /dev/null +++ b/input/template/GNUmakefile @@ -0,0 +1,7 @@ +depth = ../.. + +LOCALSTEPMAKE_TEMPLATES=ly mutopia +EXTRA_DIST_FILES=README + +include $(depth)/make/stepmake.make + diff --git a/input/template/README b/input/template/README new file mode 100644 index 0000000000..b3c24f9b3f --- /dev/null +++ b/input/template/README @@ -0,0 +1,57 @@ + +* Mention this somewhere in documentation (Tutorial) + +* Better comment-out most header entries, or + move to template/title.ly altogether? + +* Naming conventions for voices/staffs + (think: \autochange, \partcombine)? + +* Add (commented-out) stuff like \time 3/4 + \property Staff.TimeSignature \set #'style = #xxx? + +* Handy emacs shortcuts to (these) templates? + +* Mutopia headers? + +* Another approach would be to not include any music in the templates, + and standardise the naming of the music, so that you'd do: + + title = 'Piano piece' + upper = \notes { ... } + lower = \notes { ... } + + \include "template/piano.ly" + + In this case, we'd also need one simple music example file per + template. This approach can be even easier to use, but is not very + flexible, it only works for simple and uniform pieces. + +* Possibly some of you already have created something like this? I was + thinking of having templates for: + + single melody = melody.ly + melody with lyrics = melody-lyrics.ly + melody with lyrics and chords = melody-lyrics-chords.ly + piano = piano.ly + piano with several voices = piano-4-voices.ly + piano with lyrics (between staffs) = piano-lyrics.ly + piano with melody and lyrics = piano-melody-lyrics.ly + +TODO (Choral templates, anyone?) + piano with lyrics and chords + (string) duet + (string) duet parts + string quartet + string quintet parts + orchestral score + orchestral parts + choral score + choral score with piano reduction (i.e., the piano staves have the + same notes as the choral parts) + choral score with piano accompaniment + choral parts + + + + diff --git a/input/template/melody-lyrics-chords.ly b/input/template/melody-lyrics-chords.ly new file mode 100644 index 0000000000..80dcd6c70d --- /dev/null +++ b/input/template/melody-lyrics-chords.ly @@ -0,0 +1,45 @@ +\version "1.5.1" + +\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" + enteredby = "jcn" + source = "urtext" +} + +melody = \notes \relative c' { + a b c d +} + +text = \lyrics { + Aaa Bee Cee Dee +} + +accompaniment = \chords { + a2: c2 +} + +\score { + < + \context ChordNames \accompaniment + \addlyrics + \context Staff = one { + \property Staff.noAutoBeaming = ##t + \property Staff.automaticMelismata = ##t + \melody + } + \context Lyrics \text + > + \paper { } + \midi { } +} diff --git a/input/template/melody-lyrics.ly b/input/template/melody-lyrics.ly new file mode 100644 index 0000000000..613fa72474 --- /dev/null +++ b/input/template/melody-lyrics.ly @@ -0,0 +1,40 @@ +\version "1.5.1" + +\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" + enteredby = "jcn" + source = "urtext" +} + +melody = \notes \relative c'' { + a b c d +} + +text = \lyrics { + Aaa Bee Cee Dee +} + +\score { + < + \addlyrics + \context Staff = one { + \property Staff.noAutoBeaming = ##t + \property Staff.automaticMelismata = ##t + \melody + } + \context Lyrics \text + > + \paper { } + \midi { } +} diff --git a/input/template/melody.ly b/input/template/melody.ly new file mode 100644 index 0000000000..80739411c6 --- /dev/null +++ b/input/template/melody.ly @@ -0,0 +1,28 @@ +\version "1.5.1" + +\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" + enteredby = "jcn" + source = "urtext" +} + +melody = \notes \relative c' { + a b c d +} + +\score { + \context Staff \melody + \paper { } + \midi { } +} diff --git a/input/template/piano-4-voices.ly b/input/template/piano-4-voices.ly new file mode 100644 index 0000000000..a5bfe1ee6c --- /dev/null +++ b/input/template/piano-4-voices.ly @@ -0,0 +1,55 @@ +\version "1.5.1" + +\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" + enteredby = "jcn" + source = "urtext" +} + +upperOne = \notes\relative c'' { + \voiceOne + a b c d +} + +upperTwo = \notes\relative c' { + \voiceTwo + a2 c +} + +lowerOne = \notes\relative c { + \voiceOne + a2 c +} + +lowerTwo = \notes\relative c { + \voiceTwo + a1 +} + +\score { + \context PianoStaff < + %\time 4/4 + \context Staff = upper < + \context Voice = one \upperOne + \context Voice = two \upperTwo + > + \context Staff = lower < + \clef bass + \context Voice = one \lowerOne + \context Voice = two \lowerTwo + > + > + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/template/piano-lyrics.ly b/input/template/piano-lyrics.ly new file mode 100644 index 0000000000..1d519ed4dd --- /dev/null +++ b/input/template/piano-lyrics.ly @@ -0,0 +1,54 @@ +\version "1.5.1" + +\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" + enteredby = "jcn" + source = "urtext" +} + +upper = \notes\relative c'' { + a b c d +} + +lower = \notes\relative c { + a2 c +} + +text = \lyrics { + Aaa Bee Cee Dee +} + +\score { + \context GrandStaff < + \addlyrics + \context Staff = upper \upper + \context Lyrics \text + \context Staff = lower < + \clef bass + \lower + > + > + \paper { + \translator { + \GrandStaffContext + \accepts "Lyrics" + } + \translator { + %\LyricsVoiceContext + \LyricsContext + \consists "Bar_engraver" + } + } + \midi { } +} \ No newline at end of file diff --git a/input/template/piano-melody-lyrics.ly b/input/template/piano-melody-lyrics.ly new file mode 100644 index 0000000000..a1c2c3ecc9 --- /dev/null +++ b/input/template/piano-melody-lyrics.ly @@ -0,0 +1,58 @@ +\version "1.5.1" + +\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" + enteredby = "jcn" + source = "urtext" +} + +melody = \notes \relative c'' { + a b c d +} + +text = \lyrics { + Aaa Bee Cee Dee +} + +upper = \notes\relative c'' { + a b c d +} + +lower = \notes\relative c { + a2 c +} + +\score { + < + \addlyrics + \context Staff = mel { + \property Staff.noAutoBeaming = ##t + \property Staff.automaticMelismata = ##t + \melody + } + \context Lyrics \text + + \context PianoStaff < + \context Staff = upper \upper + \context Staff = lower < + \clef bass + \lower + > + > + > + \paper { + \translator { \HaraKiriStaffContext } + } + \midi { } +} \ No newline at end of file diff --git a/input/template/piano.ly b/input/template/piano.ly new file mode 100644 index 0000000000..497c8c2e4e --- /dev/null +++ b/input/template/piano.ly @@ -0,0 +1,39 @@ +\version "1.5.1" + +\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" + enteredby = "jcn" + source = "urtext" +} + +upper = \notes\relative c'' { + a b c d +} + +lower = \notes\relative c { + a2 c +} + +\score { + \context PianoStaff < + %\time 4/4 + \context Staff = upper \upper + \context Staff = lower < + \clef bass + \lower + > + > + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/chord-banter.ly b/input/test/chord-banter.ly new file mode 100644 index 0000000000..74327da615 --- /dev/null +++ b/input/test/chord-banter.ly @@ -0,0 +1,54 @@ +\version "1.3.146" +\header{ +filename = "chord-table.ly" +copyright = "public domain" +enteredby = "jcn" +} + +tab = \notes\transpose c'''\chords{ + c1 c:m c:4 c:m4 c:5+ \break + c:5- c:dim c:5-.5+ c:6 c:m6\break + c:4.6 c:7 c:m7 c:4.7 c:m4.7\break + c:5+.7 c:5-.7 c:m5-.7 c:maj c:m.maj\break + c:4.maj c:m4.maj c:5+.maj c:m4+.maj c:5-.maj\break + c1:m5-.maj c:dim7 c:5-.5+.7 c:6.maj c:m6.maj\break + c:4.6.maj c:9 c:m9 c:4.9 c:m.4.9\break +} + +\score{ +% \context StaffGroup < + < + \context Staff=c \notes\transpose c\tab + \context ChordNames=c \notes\transpose c\tab +%{ + \context Staff=cis \notes\transpose cis\tab + \context ChordNames=cis \notes\transpose cis\tab + \context Staff=des \notes\transpose des\tab + \context ChordNames=des \notes\transpose des\tab + \context Staff=d \notes\transpose d\tab + \context ChordNames=d \notes\transpose d\tab + \context Staff=es \notes\transpose es\tab + \context ChordNames=es \notes\transpose es\tab + \context Staff=e \notes\transpose e\tab + \context ChordNames=e \notes\transpose e\tab + \context Staff=fis \notes\transpose fis\tab + \context ChordNames=fis \notes\transpose fis\tab + \context Staff=g \notes\transpose g\tab + \context ChordNames=g \notes\transpose g\tab + \context Staff=as \notes\transpose as\tab + \context ChordNames=as \notes\transpose as\tab + \context Staff=a \notes\transpose a\tab + \context ChordNames=a \notes\transpose a\tab + \context Staff=bes \notes\transpose bes,\tab + \context ChordNames=bes \notes\transpose bes,\tab + \context Staff=b \notes\transpose b,\tab + \context ChordNames=b \notes\transpose b,\tab +%} + > + \paper{ + textheight = \vsize - 4.0 * \staffheight + } + +} + + diff --git a/input/test/title.ly b/input/test/title.ly index 176829a4c5..9ef39c0dc5 100644 --- a/input/test/title.ly +++ b/input/test/title.ly @@ -6,6 +6,7 @@ subtitle = "Subtitle" subsubtitle = "Subsubtitle" composer = "Composer (xxxx-yyyy)" + instrument = "Instrument" arranger = "Arranger" poet = "Poet" % ugr: warning: Identifier name is a keyword: `translator' @@ -14,7 +15,6 @@ copyright = "public domain" enteredby = "jcn" source = "urtext" - instrument = "Instrument" } \score { diff --git a/lily/beam.cc b/lily/beam.cc index 8086632514..6effeba723 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -673,6 +673,11 @@ Beam::set_stem_lengths (Grob *me) stem_y += Stem::get_direction (s) * gh_scm2double (me->get_grob_property ("thickness")) / 2; +#if 0 // doesn't play well with dvips + stem_y += Stem::get_direction (s) + * gh_scm2double (me->get_grob_property ("thickness")) / 2; +#endif + /* caution: stem measures in staff-positions */ Real id = me->relative_coordinate (common, Y_AXIS) - stems[i]->relative_coordinate (common, Y_AXIS); diff --git a/lily/chord.cc b/lily/chord.cc index dd20c964ee..d166c63d43 100644 --- a/lily/chord.cc +++ b/lily/chord.cc @@ -298,6 +298,10 @@ Chord::tonic_add_sub_to_pitches (SCM tonic, SCM add, SCM sub) for (SCM i = add; gh_pair_p (i); i = gh_cdr (i)) { Pitch* p = unsmob_pitch (gh_car (i)); + /* Ugr + This chord modifier stuff should really be fixed + Cmaj7 yields C 7/7- + */ if (p->octave_i () == -100) { p->octave_i_ = 0; @@ -322,7 +326,10 @@ Chord::tonic_add_sub_to_pitches (SCM tonic, SCM add, SCM sub) if (highest_step < 5) tmp = ly_snoc (fifth, tmp); else if (dim_b) - add = lower_step (tonic, add, gh_int2scm (5)); + { + add = lower_step (tonic, add, gh_int2scm (5)); + add = lower_step (tonic, add, gh_int2scm (7)); + } /* find missing thirds */ SCM missing = missing_thirds (tmp); diff --git a/lily/parser.yy b/lily/parser.yy index eacdc63aa8..cf67bb9a93 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -1791,10 +1791,11 @@ chord_step: $$ = gh_cons ($1, SCM_EOL); } | CHORDMODIFIER_PITCH { - $$ = gh_cons ($1, SCM_EOL); + $$ = gh_cons (unsmob_pitch ($1)->smobbed_copy (), SCM_EOL); } | CHORDMODIFIER_PITCH chord_note { /* Ugh. */ - $$ = gh_list ($1, $2, SCM_UNDEFINED); + $$ = gh_list (unsmob_pitch ($1)->smobbed_copy (), + $2, SCM_UNDEFINED); } ; diff --git a/lily/span-bar.cc b/lily/span-bar.cc index fddeb470fe..7f7768b2d1 100644 --- a/lily/span-bar.cc +++ b/lily/span-bar.cc @@ -25,6 +25,116 @@ Span_bar::add_bar (Grob*me, Grob*b) me->add_dependency (b); } +MAKE_SCHEME_CALLBACK (Span_bar,brew_molecule,1); + +/** + * Limitations/Bugs: + * + * (1) Elements from 'me->get_grob_property ("elements")' must be + * ordered according to their y coordinates relative to their common + * axis group parent. Otherwise, the computation goes mad. (TODO: + * apply a sort algorithm that ensures this precondition.) However, + * until now, I have seen no case where lily has not fulfilled this + * precondition. + * + * (2) This method depends on bar_engraver not being removed from + * staff context. If bar_engraver is removed, the size of the staff + * lines is evaluated as 0, which results in a solid span bar line + * with faulty y coordinate. + */ +SCM +Span_bar::brew_molecule (SCM smobbed_me) +{ + Grob *me = unsmob_grob (smobbed_me); + SCM first_elt = me->get_grob_property ("elements"); + Grob *first_staff_bar = unsmob_grob (gh_car (first_elt)); + Grob *last_staff_bar = 0; + + // compute common refpoint of elements & last_staff_bar + Grob *refp = me; + for (SCM elts = first_elt; + gh_pair_p (elts); + elts = gh_cdr (elts)) + { + SCM smobbed_staff_bar = gh_car (elts); + Grob *staff_bar = unsmob_grob (smobbed_staff_bar); + refp = staff_bar->common_refpoint (refp, Y_AXIS); + last_staff_bar = staff_bar; + } + + // determine refp->extent, but ignore lyrics etc. above and below + Interval refp_extent; + refp_extent[LEFT] = + first_staff_bar->relative_coordinate (refp, (Axis)Y_AXIS) - + 0.5 * (first_staff_bar->extent (refp, Y_AXIS)[UP] - + first_staff_bar->extent (refp, Y_AXIS)[DOWN]); + refp_extent[RIGHT] = + last_staff_bar->relative_coordinate (refp, (Axis)Y_AXIS) + + 0.5 * (last_staff_bar->extent (refp, Y_AXIS)[UP] - + last_staff_bar->extent (refp, Y_AXIS)[DOWN]); + + // global yoffs correction (compensate centering around refp) + Real yoffs = 0.5 * (refp_extent[LEFT] - refp_extent[RIGHT]); + + // evaluate glyph + Span_bar::evaluate_glyph(me); + SCM glyph = me->get_grob_property (ly_symbol2scm ("glyph")); + + + /* + glyph may not be a string, when ME is killed by Hara Kiri in + between. + */ + if (!gh_string_p (glyph)) + return SCM_EOL; + + String glyph_str = ly_scm2string (glyph); + + // compose span_bar_mol + Molecule span_bar_mol = Molecule::Molecule (); + Grob *prev_staff_bar = 0; + Real prev_staff_bar_length = 0.0; + for (SCM elts = first_elt; + gh_pair_p (elts); + elts = gh_cdr (elts)) + { + SCM smobbed_staff_bar = gh_car (elts); + SCM smobbed_staff_bar_molecule = + Bar::brew_molecule (smobbed_staff_bar); + Grob *staff_bar = unsmob_grob (smobbed_staff_bar); + Real staff_bar_length = + unsmob_molecule (smobbed_staff_bar_molecule)-> + extent (Y_AXIS).length (); + + if (prev_staff_bar) { + + Interval l; + l[LEFT] = prev_staff_bar->extent (refp, Y_AXIS)[UP]; + l[RIGHT] = staff_bar->extent (refp, Y_AXIS)[DOWN]; + + SCM smobbed_staff_bar = gh_car (elts); + Grob *staff_bar = unsmob_grob (smobbed_staff_bar); + SCM smobbed_interstaff_bar_molecule = + Bar::compound_barline (staff_bar, glyph_str, l.length()). + smobbed_copy (); + + Molecule *interstaff_bar_mol = + unsmob_molecule (smobbed_interstaff_bar_molecule); + + yoffs += prev_staff_bar_length; // skip staff bar + yoffs += 0.5 * (l[RIGHT] - l[LEFT]); // compensate interstaff bar centering + interstaff_bar_mol->translate_axis (yoffs, Y_AXIS); + yoffs += 0.5 * (l[RIGHT] - l[LEFT]); + + span_bar_mol.add_molecule (*interstaff_bar_mol); + } + prev_staff_bar = staff_bar; + prev_staff_bar_length = staff_bar_length; + } + + return span_bar_mol.smobbed_copy (); +} + MAKE_SCHEME_CALLBACK (Span_bar,width_callback,2); SCM Span_bar::width_callback (SCM element_smob, SCM scm_axis) diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 223d9c39f0..827abe8360 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.4.4 -Entered-date: 27JUN01 +Version: 1.4.5 +Entered-date: 15JUL01 Description: @BLURB@ Keywords: music notation typesetting midi fonts engraving Author: hanwen@cs.uu.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert - 1000k lilypond-1.4.4.tar.gz + 1000k lilypond-1.4.5.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.4.4.tar.gz + 1000k lilypond-1.4.5.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.redhat.spec b/make/out/lilypond.redhat.spec index d9044e4aab..09dbbf5528 100644 --- a/make/out/lilypond.redhat.spec +++ b/make/out/lilypond.redhat.spec @@ -1,11 +1,11 @@ %define info yes Name: lilypond -Version: 1.4.4 +Version: 1.4.5 Release: 1 License: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.4.4.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.4.5.tar.gz Summary: Create and print music notation URL: http://www.cs.uu.nl/~hanwen/lilypond BuildRoot: /tmp/lilypond-install diff --git a/make/out/lilypond.suse.spec b/make/out/lilypond.suse.spec index 864cd17a94..670c9e4be3 100644 --- a/make/out/lilypond.suse.spec +++ b/make/out/lilypond.suse.spec @@ -14,11 +14,11 @@ Distribution: SuSE Linux 7.0 (i386) Name: lilypond -Version: 1.4.4 +Version: 1.4.5 Release: 2 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.4.4.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.4.5.tar.gz # music notation software for.. ? Summary: A program for printing sheet music. URL: http://www.lilypond.org/ diff --git a/scm/chord-name.scm b/scm/chord-name.scm index 98a9270875..5afd9e34f0 100644 --- a/scm/chord-name.scm +++ b/scm/chord-name.scm @@ -52,7 +52,11 @@ (((0 . 0) (3 . 0) (4 . 0)) . ("" (super "4") " " )) ;; Cdim iso Cm5- (((0 . 0) (2 . -1) (4 . -1)) . ("dim")) - ; Co iso Cm5-7- + ; URG: Simply C:m5-/maj7 iso Cdim maj7 + (((0 . 0) (2 . -1) (4 . -1) (6 . 0)) . ("m" (super "5-/maj7" " "))) + ; URG: Simply C:m5-/7 iso Cdim7 + (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . ("m" (super "5-/7" " "))) + ; Co iso C:m5-/7- (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . ("" (super "o") " ")) ; Cdim9 (((0 . 0) (2 . -1) (4 . -1) (6 . -2) (1 . -1)) . ("dim" (super "9") " ")) @@ -309,18 +313,19 @@ ;; additions, subtractions and bass or inversion into chord name (define (chord::inner-name-banter tonic exception-part additions subtractions bass-and-inversion steps) - (let ((tonic-text (pitch->chord-name-text-banter tonic steps)) - (except-text exception-part) - (sep-text (if (and (string-match "super" (format "~s" exception-part)) + (let* ((tonic-text (pitch->chord-name-text-banter tonic steps)) + (except-text exception-part) + (sep-text (if (and (string-match "super" (format "~s" except-text)) (or (pair? additions) (pair? subtractions))) (list simple-super "/"))) - (adds-text (chord::additions->text-banter additions subtractions)) - (subs-text (chord::subtractions->text-banter subtractions)) - (b+i-text (chord::bass-and-inversion->text-banter bass-and-inversion))) + (adds-text (chord::additions->text-banter additions subtractions)) + (subs-text (chord::subtractions->text-banter subtractions)) + (b+i-text (chord::bass-and-inversion->text-banter bass-and-inversion))) (text-append - tonic-text except-text sep-text - (list (list simple-super) adds-text subs-text) + tonic-text except-text " " sep-text + ;;(list (list simple-super) adds-text subs-text) + (list (list '((raise . 1) (font-relative-size . -1))) adds-text subs-text) b+i-text))) (define (chord::name-banter tonic exception-part unmatched-steps diff --git a/scm/grob-description.scm b/scm/grob-description.scm index 9d19e537d0..257dac1b5c 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -518,7 +518,7 @@ (SpanBar . ( (break-align-symbol . Staff_bar) (bar-size-procedure . ,Span_bar::get_bar_size) - (molecule-callback . ,Bar::brew_molecule) + (molecule-callback . ,Span_bar::brew_molecule) (visibility-lambda . ,begin-of-line-invisible) (X-extent-callback . ,Span_bar::width_callback) (Y-offset-callbacks . (,Span_bar::center_on_spanned_callback)) diff --git a/scm/lily.scm b/scm/lily.scm index 2b9d42b5cb..a0bfc1dec2 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -5,7 +5,7 @@ ;;;; (c) 1998--2001 Jan Nieuwenhuizen ;;;; Han-Wen Nienhuys -;;; Library funtions +;;; Library functions (use-modules (ice-9 regex)) diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index e4efd1652a..e70fe1037f 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -401,7 +401,9 @@ output_dict= { @end tex @html

- + +[picture of music] + @end html """, } diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index 5ac6d69667..1e9a7329b3 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -65,6 +65,7 @@ import shutil import __main__ import operator import tempfile +import traceback datadir = '@datadir@' sys.path.append (datadir + '/python') @@ -353,6 +354,7 @@ option_definitions = [ ('', '', 'no-lily', _ ("don't run LilyPond")), ('', 'm', 'no-paper', _ ("produce MIDI output only")), (_ ("FILE"), 'o', 'output', _ ("write ouput to FILE")), + (_ ("FILE"), 'f', 'find-pfa', _ ("find pfa fonts used in FILE")), # why capital P? ('', 'P', 'postscript', _ ("generate PostScript output")), (_ ("KEY=VAL"), 's', 'set', _ ("change global setting KEY to VAL")), @@ -622,11 +624,39 @@ def generate_dependency_file (depfile, outname): df.write ('\n') df.close (); +def find_file_in_path (path, name): + for d in string.split (path, os.pathsep): + if name in os.listdir (d): + return os.path.join (d, name) + +# Added as functionality to ly2dvi, because ly2dvi may well need to do this +# in future too. +PS = '%!PS-Adobe' +def find_pfa_fonts (name): + s = open (name).read () + if s[:len (PS)] != PS: + # no ps header? + errorport.write (_( "error: ") + _ ("not a PostScript file: `%s\'" % name)) + errorport.write ('\n') + sys.exit (1) + here = 0 + m = re.match ('.*?/(feta[-a-z0-9]+) +findfont', s[here:], re.DOTALL) + pfa = [] + while m: + here = m.end (1) + pfa.append (m.group (1)) + m = re.match ('.*?/(feta[-a-z0-9]+) +findfont', s[here:], re.DOTALL) + return pfa + + (sh, long) = getopt_args (__main__.option_definitions) try: (options, files) = getopt.getopt(sys.argv[1:], sh, long) -except getopt.error, s: - errorport.write ("\nerror: getopt says `%s\'\n\n" % s) +except getopt.error, s: + errorport.write ('\n') + errorport.write (_( "error: ") + _ ("getopt says: `%s\'" % s)) + errorport.write ('\n') + errorport.write ('\n') help () sys.exit (2) @@ -639,6 +669,13 @@ for opt in options: elif o == '--help' or o == '-h': help () sys.exit (0) + elif o == '--find-pfa' or o == '-f': + fonts = map (lambda x: x + '.pfa', find_pfa_fonts (a)) + files = map (lambda x: + find_file_in_path (os.environ['GS_FONTPATH'], x), + fonts) + print string.join (files, ' ') + sys.exit (0) elif o == '--include' or o == '-I': include_path.append (a) elif o == '--postscript' or o == '-P': @@ -702,8 +739,10 @@ include_path = map (abspath, include_path) original_output = output_name + if files and files[0] != '-': + # Ugh, maybe make a setup () function files = map (lambda x: strip_extension (x, '.ly'), files) (outdir, outbase) = ('','') @@ -738,40 +777,44 @@ if files and files[0] != '-': os.chdir (tmpdir) - extra = extra_init - if lily_p: -## try: + try: run_lilypond (files, outbase, dep_prefix) -## # except: -## # TODO: friendly message about LilyPond setup/failing? -## # -## # TODO: lilypond should fail with different -## # error codes for: -## # - guile setup/startup failure -## # - font setup failure -## # - init.ly setup failure -## # - parse error in .ly -## # - unexpected: assert/core dump -## # targets = {} + except: + # TODO: friendly message about LilyPond setup/failing? + # + # TODO: lilypond should fail with different + # error codes for: + # - guile setup/startup failure + # - font setup failure + # - init.ly setup failure + # - parse error in .ly + # - unexpected: assert/core dump + targets = {} + traceback.print_exc () if targets.has_key ('DVI') or targets.has_key ('PS'): -# try: - run_latex (files, outbase, extra) + try: + run_latex (files, outbase, extra_init) # unless: add --tex, or --latex? del targets['TEX'] del targets['LATEX'] -# except Foobar: -# # TODO: friendly message about TeX/LaTeX setup, -# # trying to run tex/latex by hand -# if targets.has_key ('DVI'): -# del targets['DVI'] -# if targets.has_key ('PS'): -# del targets['PS'] - - # TODO: does dvips ever fail? + except: + # TODO: friendly message about TeX/LaTeX setup, + # trying to run tex/latex by hand + if targets.has_key ('DVI'): + del targets['DVI'] + if targets.has_key ('PS'): + del targets['PS'] + traceback.print_exc () + if targets.has_key ('PS'): - run_dvips (outbase, extra) + try: + run_dvips (outbase, extra_init) + except: + if targets.has_key ('PS'): + del targets['PS'] + traceback.print_exc () # add DEP to targets? if track_dependencies_p: @@ -780,6 +823,7 @@ if files and files[0] != '-': if os.path.isfile (depfile): progress (_ ("dependencies output to `%s'...") % depfile) + # Hmm, if this were a function, we could call it the except: clauses for i in targets.keys (): ext = string.lower (i) cp_to_dir ('.*\.%s$' % ext, outdir) @@ -799,7 +843,7 @@ if files and files[0] != '-': cleanup_temp () else: - # FIXME + # FIXME: read from stdin when files[0] = '-' help () errorport.write ("ly2dvi: " + _ ("error: ") + _ ("no files specified on command line.") + '\n') sys.exit (2) -- 2.39.5