From ecb2d2a4616dad68e3468a5155796fa3996ab3d3 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 00:58:55 +0000 Subject: [PATCH] lilypond-1.3.142 --- CHANGES | 48 ++++++- Documentation/regression-test.tely | 51 ++++---- Documentation/user/refman.itely | 144 ++++++--------------- VERSION | 2 +- buildscripts/mf-to-table.py | 1 + input/GNUmakefile | 2 +- input/ascii-art/GNUmakefile | 8 ++ input/ascii-art/asciscript5.ly | 19 +++ input/ascii-art/r-as.ly | 19 +++ input/ascii-art/standchen-as5.ly | 40 ++++++ input/ascii-art/standchen-as9.ly | 38 ++++++ input/ascii-art/twinkle-as5.ly | 69 ++++++++++ input/les-nereides.ly | 10 ++ input/no-notation/GNUmakefile | 8 ++ input/no-notation/parse.ly | 4 + input/no-notation/parse2.ly | 8 ++ input/no-notation/parse3.ly | 8 ++ input/no-notation/parse4.ly | 11 ++ input/praeludium-fuga-E.ly | 2 +- input/regression/arpeggio-collision.ly | 6 +- input/regression/hairpin-ending.ly | 14 ++ input/regression/volta-broken-left-edge.ly | 5 +- input/scarlatti-paper.ly | 18 +-- input/scarlatti-properties.ly | 5 +- input/test/ac-extra-voice.ly | 15 +-- input/test/as2.ly | 1 + input/test/different-time-signatures.ly | 10 +- input/test/equaliser.ly | 3 + input/test/fake-grace.ly | 18 +++ input/test/font-body.ly | 5 + input/test/font11.ly | 2 +- input/test/font13.ly | 13 +- input/test/font16.ly | 14 +- input/test/font20.ly | 8 +- input/test/font26.ly | 11 +- input/test/hara-kiri.ly | 10 +- input/test/keys2.ly | 22 ---- input/test/slur-mininum.ly | 8 +- input/test/spacing.ly | 2 +- input/test/stem.ly | 3 - input/test/tchaikovsky.ly | 2 +- input/tricks/smart-transpose.ly | 12 +- input/tricks/staff-container.ly | 2 + input/tutorial/os-music.ly | 2 + lily/dynamic-engraver.cc | 3 +- lily/font-metric.cc | 16 +++ lily/hairpin.cc | 101 ++++++++++----- lily/instrument-name-engraver.cc | 14 +- lily/lexer.ll | 34 +++-- lily/parser.yy | 5 + lily/stem.cc | 33 ++++- ly/dynamic-scripts.ly | 2 +- mf/GNUmakefile | 4 +- scm/grob-description.scm | 92 +++++++------ 54 files changed, 673 insertions(+), 334 deletions(-) create mode 100644 input/ascii-art/GNUmakefile create mode 100644 input/ascii-art/asciscript5.ly create mode 100644 input/ascii-art/r-as.ly create mode 100644 input/ascii-art/standchen-as5.ly create mode 100644 input/ascii-art/standchen-as9.ly create mode 100644 input/ascii-art/twinkle-as5.ly create mode 100644 input/no-notation/GNUmakefile create mode 100644 input/no-notation/parse.ly create mode 100644 input/no-notation/parse2.ly create mode 100644 input/no-notation/parse3.ly create mode 100644 input/no-notation/parse4.ly create mode 100644 input/regression/hairpin-ending.ly create mode 100644 input/test/fake-grace.ly diff --git a/CHANGES b/CHANGES index 9d254b09da..1365620208 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,52 @@ -1.3.140.jcn6 +1.3.141.jcn3 ============ +* some mup2ly progress. + +* Bugfix: ly2dvi: don't include empty set fo latexheaders, don't use +python-1.5.2 abspath func. + +* Setup for new mup converter, based on pmx2ly. + +* Bugfix: lilypond-book: accept \documentclass{article}. + +* scripts/update-lily.py: fancy source rebuild update tool that we're +probably not going to use on www.lilypond.org. Check it out! + +* Bugfix: building of topdocs. + +1.3.141.hwn2 +============ + +* Fix: instrument names on piano staffs. + +* Bugfix: don't left-align absolute dynamics. + +* Bugfix: don't make spacing rods for absolute dynamics. + +* Various bugfixes for examples (thanks Laura!). + +* Bugfix: clean up of hairpin ending logic. Crescendi start under +notes now. + +* Don't substitute '\ ' for '\_' in lyrics. (Suggestion by Roy Rankin) + +* In computing text lengths handle the following cases \['`"^_]. (the same) + +* Made directories input/no-notation, input/ascii-art + +* Doco fixes. + +* Beat repeats, double measure repeats; removed repeat sign character +from the font (WARNING: FONT CHANGED). + +* Cleanups in (de)crescendo code, fixed continued (de)crescendi. + +* German chords (Rune Zedler) + +1.3.141 +======= + * po update. * Renamed remaining mudela -> lilypond (except for old change logs). diff --git a/Documentation/regression-test.tely b/Documentation/regression-test.tely index 53d356514c..7cfcc81e57 100644 --- a/Documentation/regression-test.tely +++ b/Documentation/regression-test.tely @@ -38,7 +38,6 @@ and documenting bugfixes. @lilypondfile[printfilename]{accidental-single-double.ly} - @section Stems @lilypondfile[printfilename]{stem-tremolo.ly} @@ -55,13 +54,17 @@ and documenting bugfixes. @lilypondfile[printfilename]{staccato-pos.ly} -@lilypondfile[printfilename]{dynamics-line.ly} - @lilypondfile[printfilename]{arpeggio.ly} @lilypondfile[printfilename]{glissando.ly} -@lilypondfile[printfilename]{follow-thread.ly} +@section Dynamics + +@lilypondfile[printfilename]{dynamics-line.ly} + +@lilypondfile[printfilename]{hairpin-ending.ly} + +@lilypondfile[printfilename]{dynamics-broken-hairpin.ly} @@ -78,7 +81,7 @@ and documenting bugfixes. -@section Beams, slurs and other spanners +@section Beams @lilypondfile[printfilename]{beaming.ly} @@ -100,9 +103,12 @@ and documenting bugfixes. @lilypondfile[printfilename]{triplets.ly} +@section Slurs @lilypondfile[printfilename]{slur-nice.ly} + @lilypondfile[printfilename]{slur-symmetry.ly} + @lilypondfile[printfilename]{slur-symmetry-1.ly} @lilypondfile[printfilename]{slur-broken-trend.ly} @@ -115,15 +121,14 @@ and documenting bugfixes. @lilypondfile[printfilename]{phrasing-slur.ly} +@section Ties + @lilypondfile[printfilename]{tie.ly} @lilypondfile[printfilename]{tie-chord.ly} @lilypondfile[printfilename]{tie-accidental.ly} -@lilypondfile[printfilename]{beam-cross-staff.ly} - -@lilypondfile[printfilename]{slur-cross-staff.ly} @lilypondfile[printfilename]{tup.ly} @@ -145,9 +150,7 @@ and documenting bugfixes. @lilypondfile[printfilename]{repeat-line-break.ly} -@lilypondfile[printfilename]{auto-change.ly} - - +@lilypondfile[printfilename]{volta-broken-left-edge.ly} @section Lyrics @@ -185,6 +188,14 @@ and documenting bugfixes. @section PianoStaff +@lilypondfile[printfilename]{beam-cross-staff.ly} + +@lilypondfile[printfilename]{slur-cross-staff.ly} + +@lilypondfile[printfilename]{auto-change.ly} + +@lilypondfile[printfilename]{follow-thread.ly} + @section Global stuff @@ -224,24 +235,6 @@ and documenting bugfixes. @lilypondfile[printfilename]{keys.ly} - -@ignore -@c the input file is too long and does not test for specific bugs - -By default, time signatures are written with two numbers. With style -``C'', 4/4 and 2/2 are written with their corresponding symbols and -with style ``old'', 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and -9/8 are typeset with symbols, all other signatures retain the default -layout. The style ``1'', gives single number signatures for all -signatures. -% -\mu delafile{time.ly} -@end ignore - - - - - @section Hacks and Features @lilypondfile[printfilename]{generic-output-property.ly} diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 3ec6395039..ee400db07a 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -41,7 +41,6 @@ revision of this document was for LilyPond 1.3.141. * Page layout:: * Sound:: * Music entry:: -* Using LilyPond:: * Interpretation context:: * Syntactic details:: * Lexical details:: @@ -1367,11 +1366,9 @@ want to get several marks during one note, you must use spacer notes. @lilypond[fragment,verbatim,center] c'' \< \! c'' d'' \decr e'' \rced - < f''1 { s4 \< \! s2 \> \! s4 } > + < f''1 { s4 s4 \< \! s4 \> \! s4 } > @end lilypond -[BUG in \> ! ] - You can also use a text saying @emph{cresc.} instead of hairpins. Here is an example how to do it: @@ -1384,7 +1381,11 @@ is an example how to do it: @end lilypond +@refbugs +When using spacer notes to subdivide note dynamics and @code{linewidth = +-1}, starting a hairpin on the first spacer note (the one coinciding +with the real note) exposes an embarassing bug. @@ -1583,10 +1584,15 @@ In the @code{percent} style, a note pattern can be repeated. It is printed once, and then the pattern is replaced with a special sign. @lilypond[verbatim,singleline] - \context Voice { \repeat "percent" 5 { c'1 } } + \context Voice { \repeat "percent" 4 { c'4 } + \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 } +} @end lilypond -At present, only repeats of whole measures are supported. +@refbugs + +You can not nest percent repeats, filling in the first measure with +slashes, and repeating that measure with percents. @node Rhythmic music @section Rhythmic music @@ -2169,7 +2175,7 @@ scheme = \notes { \score { < - \context ChordNamesVoice \scheme + \context ChordNames \scheme \context Staff \scheme > } @@ -2611,6 +2617,29 @@ Formally the syntax for these constructions is Here @var{symbol} is a Scheme expression of symbol type, @var{context} and @var{grobname} are strings and @var{value} is a Scheme expression. +If you want to be +Correct nesting of @code{\override}, @code{\set}, @code{\revert} is as +follows + +@example +\override \set \set \set \set +\revert +@end example + +This is always correct, but if you know the default value, you can also use +@example +\set \set \set \set +\set @var{to default value} +@end example + +If there is no default (i.e. by default, the grob property is unset), +then you can use +@example +\set \set \set \set \set +\revert +@end example + + @refbugs LilyPond will hang or crash if @var{value} contains cyclic references. @@ -3338,107 +3367,6 @@ will complain about not finding @code{src:X:Y} files. Those complaints are harmless, and can be ignored. -@c . {Using LilyPond} -@node Using LilyPond -@section Using LilyPond -@cindex Using LilyPond -@cindex Generating output - -@c slaat dit ergens op? - -@c direct postscript? - -@table @code -@item plain lilypond -@example -lilypond foo.ly -@end example -For more information on how to use lilypond see -@ifnottex -@ref{Invoking LilyPond}. -@end ifnottex -@iftex -the online manual. -@end iftex - -@item ly2dvi -Ly2dvi produces titling from @code{\header} fields. -@example -ly2dvi foo.ly -@end example -For more information on how to use ly2dvi see -@ifnottex -@ref{ly2dvi}. -@end ifnottex -@iftex -the online manual. -@end iftex - -@item lilypond-book -Lilypond-book supports interleaving text and music. -@example -lilypond-book foo.doc -@end example -For more information on how to use lilypond-book see -@ifnottex -@ref{lilypond-book}. -@end ifnottex -@iftex -the online manual. -@end iftex -@end table - - -An emacs mode for LilyPond is included with the source archive as -@file{lilypond-mode.el} and @file{lilypond-font-lock.el}. If you have -an RPM, it is in @file{/usr/share/doc/lilypond-X/}. You have to install -it yourself. - -Add this to your ~/.emacs or ~/.emacs.el: -@example - (load-library "lilypond-mode.el") - (setq auto-mode-alist - (cons '("\\.ly$" . LilyPond-mode) auto-mode-alist)) - (add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock))) -@end example - -If you have the latest LilyPond-1.3.x Debian package, LilyPond-mode -is automatically loaded, so you need not modify your ~/.emacs file. - -@menu -* Pre-cooked makefile:: -@end menu - -@node Pre-cooked makefile -@subsection Pre-cooked makefile - -@c waar deze info? is uiteindelijk wel handig, schat ik. -[TODO: cut blabla] -If you have a big music project, or just a lot of LilyPond input files, -all generated output from LilyPond, @TeX{} and metafont will clutter -your working directory. LilyPond comes with a one-size-fits-all -pre-cooked makefile that helps you manage producing ouptut. It will -produce all output in @file{out}, generate and track dependencies. -Also, it helps in preparing your submission to the @ref{Mutopia -project}. - -@file{make/ly.make} -@example -mkdir my-project -cd my-project -cp /usr/share/lilypond/make/ly.make GNUmakefile -cp /usr/share/doc/lilypond/examples/input/tutorial/menuet.ly . -make menuet -[..] -Generated out/menuet.ps for target menuet. -@end example - -Type @samp{make help} to see possible targets. - -[TODO] -@file{/usr/share/lilypond/doc/lilypond/examples/input/mutopia-header.ly} - - @node Interpretation context @section Interpretation context diff --git a/VERSION b/VERSION index e2374e6412..7882a31f64 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=141 +PATCH_LEVEL=142 MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a diff --git a/buildscripts/mf-to-table.py b/buildscripts/mf-to-table.py index 1dfb64f4e2..8feec727d6 100644 --- a/buildscripts/mf-to-table.py +++ b/buildscripts/mf-to-table.py @@ -44,6 +44,7 @@ class Char_metric: def tfm_checksum (fn): + sys.stderr.write ("Reading checksum from `%s'\n" % fn) s = open (fn).read () s = s[ 12 * 2 : ] cs_bytes = s[:4] diff --git a/input/GNUmakefile b/input/GNUmakefile index e49533f076..b3ceba7c44 100644 --- a/input/GNUmakefile +++ b/input/GNUmakefile @@ -2,7 +2,7 @@ depth = .. -SUBDIRS=bugs tricks test regression tutorial +SUBDIRS=bugs tricks test regression tutorial no-notation ascii-art examples=trip star-spangled-banner paddy scarlatti-test flexamples= diff --git a/input/ascii-art/GNUmakefile b/input/ascii-art/GNUmakefile new file mode 100644 index 0000000000..659a10c8d0 --- /dev/null +++ b/input/ascii-art/GNUmakefile @@ -0,0 +1,8 @@ +# input/bugs/Makefile + +depth = ../.. + +LOCALSTEPMAKE_TEMPLATES=mutopia +include $(depth)/make/stepmake.make + + diff --git a/input/ascii-art/asciscript5.ly b/input/ascii-art/asciscript5.ly new file mode 100644 index 0000000000..726b0cacde --- /dev/null +++ b/input/ascii-art/asciscript5.ly @@ -0,0 +1,19 @@ + +% ascii art + +\include "paper-as5.ly" + +\score { + \notes\relative c''{ + \time 4/4; + g1 a b c + g2 a b c + g4 a b c + } + \paper { + \paperAs_five + \translator { \StaffContext barSize = #5 } + } + +} + diff --git a/input/ascii-art/r-as.ly b/input/ascii-art/r-as.ly new file mode 100644 index 0000000000..09ab543a35 --- /dev/null +++ b/input/ascii-art/r-as.ly @@ -0,0 +1,19 @@ + +\score{ + < + \context Staff \notes\relative c'{ + c d e f + \repeat "volta" 2 { g a b c } + \alternative { { c b a g } { f e d c } } + } + \context Lyrics \lyrics { + De eer- ste < { maat } { moet } > + \repeat fold 2 { } + \alternative { + { en dan twee keer } + { een koe- plet _ } + } + en dan nog dit er ach- ter aan + } + > +} diff --git a/input/ascii-art/standchen-as5.ly b/input/ascii-art/standchen-as5.ly new file mode 100644 index 0000000000..876c449dc5 --- /dev/null +++ b/input/ascii-art/standchen-as5.ly @@ -0,0 +1,40 @@ + +% asci art output + + + +\include "paper-as5.ly" + +\score { + \context StaffGroup < + \context Staff=upper \notes\relative c{ + \key f \major; + \time 3/4; + r8^"Moderato" %\pp + | + r8 + } + \context Staff=lower \notes\relative c{ + \key f \major; + \time 3/4; + \clef "bass"; + r4 + r4 + } + > + \paper { +% \paperAs_nine + indent=4.0\char; + linewidth=78.0\char; + \translator { \StaffContext barSize = #4.5 } + %\translator { \VoiceContext beamHeight = #0 } + \translator { + \VoiceContext + beamHeight = ##f + autoBeamSettings \override (begin * * * *) = #(make-moment 0 1) + textNonEmpty = ##f + } + } + +} + diff --git a/input/ascii-art/standchen-as9.ly b/input/ascii-art/standchen-as9.ly new file mode 100644 index 0000000000..00a7b257bb --- /dev/null +++ b/input/ascii-art/standchen-as9.ly @@ -0,0 +1,38 @@ + +% asci-art output, TODO: include how-to-use-this + +\include "paper-as9.ly" + +\score { + \context GrandStaff < + \context Staff=upper \notes\relative c{ + \key f \major; + \time 3/4; + r8^"Moderato" %\pp + | + r8 + } + \context Staff=lower \notes\relative c{ + \key f \major; + \time 3/4; + \clef "bass"; + r4 + r4 + } + > + \paper { +% \paperAs_nine + indent=4.0\char; + linewidth=78.0\char; + %\translator { \StaffContext barSize = #9 } + %\translator { \VoiceContext beamHeight = #0 } + \translator { + \VoiceContext + beamHeight = ##f + autoBeamSettings \override #(begin * * * *) = #(make-moment 0 1) + textNonEmpty = ##f + } + } + +} + diff --git a/input/ascii-art/twinkle-as5.ly b/input/ascii-art/twinkle-as5.ly new file mode 100644 index 0000000000..f99d5a502e --- /dev/null +++ b/input/ascii-art/twinkle-as5.ly @@ -0,0 +1,69 @@ +% ascii art output + +\header{ +filename = "twinkle.ly"; +title = "Twinkle Twinkle Little Star"; +composer = "Traditional"; +enteredby = "hwn and jcn"; +copyright = "public domain"; +} + + + +\include "paper-as5.ly" + +melody = \notes \relative c'' { + \time 2/4; + c4 c | g' g | a a | g g | +%{ + f f | e e | d d8.( e16 | )c2 | + + g'4 g | f f | e e | d d | + g g | f f | e( e8. f16 | e4 )d | + + c c | g' g | a a | g g | + f f | e e | d d8.( e16 | )c2 | +%} +} + +accompany = \notes \relative c { + \clef "bass"; + \time 2/4; + c4 c' | e c | f c | e c | +%{ + d b | c a | f g | c,2 | + + e'4 g, | d' g, | c g | b g | + e' g, | d' g, | c c8.( d16 | c4 )b | + + c, c' | e c | f c | e c | + d b | c a | f g | c,2 +%} +} + + +text = \lyrics{ + Twin -- kle, twin -- kle, lit -- tle star, " " +%{ + How I won -- der what you " " are. + Up a -- bove the world so high, " " + Like a dia -- mond in the " " sky. " " + Twin -- kle, twin -- kle, lit -- tle star, " " + How I won -- der what you " " are! +%} +} + +\score{ + \context GrandStaff < + \addlyrics + \context Staff=upper \melody + \context Lyrics=between \text + \context Staff=lower \accompany + > + \paper{ + \translator { \GrandStaffContext \accepts "Lyrics"; } + indent=4.0\char; + linewidth=78.0\char; + } +} + diff --git a/input/les-nereides.ly b/input/les-nereides.ly index d4efc7d037..2bae5fe900 100644 --- a/input/les-nereides.ly +++ b/input/les-nereides.ly @@ -1,6 +1,16 @@ %{ + +You should preprocess this file with the C preprocessor. The one with +FAKE_GRACE looks best. + +1. + cpp -P -traditional -o l.ly les-nereides.ly + +2. + cpp -P -traditional -o l-fake.ly -DFAKE_GRACE les-nereides.ly + %} diff --git a/input/no-notation/GNUmakefile b/input/no-notation/GNUmakefile new file mode 100644 index 0000000000..659a10c8d0 --- /dev/null +++ b/input/no-notation/GNUmakefile @@ -0,0 +1,8 @@ +# input/bugs/Makefile + +depth = ../.. + +LOCALSTEPMAKE_TEMPLATES=mutopia +include $(depth)/make/stepmake.make + + diff --git a/input/no-notation/parse.ly b/input/no-notation/parse.ly new file mode 100644 index 0000000000..1c165825ac --- /dev/null +++ b/input/no-notation/parse.ly @@ -0,0 +1,4 @@ + +% Test parser error + +\score{ diff --git a/input/no-notation/parse2.ly b/input/no-notation/parse2.ly new file mode 100644 index 0000000000..8339c274dc --- /dev/null +++ b/input/no-notation/parse2.ly @@ -0,0 +1,8 @@ + +% Test parser error + +foo = \notes{ + + +\score{ +} diff --git a/input/no-notation/parse3.ly b/input/no-notation/parse3.ly new file mode 100644 index 0000000000..b167ae49a7 --- /dev/null +++ b/input/no-notation/parse3.ly @@ -0,0 +1,8 @@ + +% Test parser error + +foo = \notes{ + + +\score{ + diff --git a/input/no-notation/parse4.ly b/input/no-notation/parse4.ly new file mode 100644 index 0000000000..ecb5abd6cb --- /dev/null +++ b/input/no-notation/parse4.ly @@ -0,0 +1,11 @@ + +% Test parser error + +foo = \notes{ +} + + +\score{ + burp +} + diff --git a/input/praeludium-fuga-E.ly b/input/praeludium-fuga-E.ly index b63607a78d..bd43a715a1 100644 --- a/input/praeludium-fuga-E.ly +++ b/input/praeludium-fuga-E.ly @@ -130,7 +130,7 @@ fugaIIRight = \notes \relative c'' { } \context Voice=four { \stemDown\slurDown\tieDown - \property Voice.horizontalNoteShift=-1 + \property Voice.NoteColumn \override #'horizontal-shift = #-1 fis } > diff --git a/input/regression/arpeggio-collision.ly b/input/regression/arpeggio-collision.ly index 7a8d7f0aee..82a4ff48dc 100644 --- a/input/regression/arpeggio-collision.ly +++ b/input/regression/arpeggio-collision.ly @@ -1,8 +1,8 @@ -header = { +\header { texidoc = "arpeggio stays clear of accidentals and flipped note heads. -Since Arpeggio engraver is Voice, it does nothing for voice collisions." -}; +Since Arpeggio engraver is Voice, it does nothing for voice collisions."; +} hairyChord = \context Staff \notes\relative c' < \context Voice=one { diff --git a/input/regression/hairpin-ending.ly b/input/regression/hairpin-ending.ly new file mode 100644 index 0000000000..3d510d1275 --- /dev/null +++ b/input/regression/hairpin-ending.ly @@ -0,0 +1,14 @@ + +\header { + +texidoc = "Hairpin dynamics start under notes if there are +no text-dynamics. If there are text dynamics, the hairpin does not run +into them."; + +} + + +\score { +\notes \relative c'' { c4 \> c4 \! c4 c4_\ff \> c4 \! c4 \p } +\paper { linewidth = -1.;} +} diff --git a/input/regression/volta-broken-left-edge.ly b/input/regression/volta-broken-left-edge.ly index 1eeef6e003..f0998be1ed 100644 --- a/input/regression/volta-broken-left-edge.ly +++ b/input/regression/volta-broken-left-edge.ly @@ -1,7 +1,8 @@ \header { -texidoc ="Broken volta spanners behave correctly at left edge in all cases." -}; +texidoc ="Broken volta spanners behave correctly at left edge in all cases."; + +} %{ diff --git a/input/scarlatti-paper.ly b/input/scarlatti-paper.ly index 8627c7b475..7836ecff3d 100644 --- a/input/scarlatti-paper.ly +++ b/input/scarlatti-paper.ly @@ -2,30 +2,30 @@ \paper{ %my standard paper block - % figure out a way to do this cleanly. % 0=\font "feta19" % -1=\font "feta16" % \stylesheet #(make-style-sheet 'paper19) - arithmetic_multiplier=7.\pt; indent=0.; linewidth=188.\mm; - forced_stem_shorten0=0.; - forced_stem_shorten1=0.; - forced_stem_shorten2=0.; - forced_stem_shorten3=0.; + \translator{ \PianoStaffContext - maxVerticalAlign=8.4; - minVerticalAlign=8.4; + VerticalAlignment \set #'forced-distance = #8.4 } \translator{\StaffContext TimeSignature \override #'style = #'C } - \translator{\VoiceContext + \translator { + \ScoreContext + SpacingSpanner \override #'arithmetic-multiplier = #1.4 + } + \translator{ + \VoiceContext noStemExtend = ##t tupletVisibility = ##f + Stem \override #'stem-shorten = #'(0.0) } } diff --git a/input/scarlatti-properties.ly b/input/scarlatti-properties.ly index aa7d6611e0..67701eb6d8 100644 --- a/input/scarlatti-properties.ly +++ b/input/scarlatti-properties.ly @@ -1,7 +1,4 @@ - - - - +% include file for scarlatti-test rh=\property Thread.NoteHead \override #'style = #'default lh=\property Thread.NoteHead \override #'style = #'diamond diff --git a/input/test/ac-extra-voice.ly b/input/test/ac-extra-voice.ly index ca1dc4e8b0..07277383f7 100644 --- a/input/test/ac-extra-voice.ly +++ b/input/test/ac-extra-voice.ly @@ -1,4 +1,6 @@ - +% +% TODO: what's this? +% global = \notes { @@ -39,18 +41,14 @@ accompany = \notes \relative c{ \context Staff=down < \global \clef bass; - \autochange Staff \accompany + \autochange Staff \context Voice \accompany > > \paper { - gourlay_maxmeasures = 4.; indent = 8.\mm; textheight = 295.\mm; - % ugly is beautiful - slur_beautiful = 5.0; - \translator{ \PianoStaffContext defaultBarType = #"" @@ -63,8 +61,9 @@ accompany = \notes \relative c{ defaultBarType = #"" \remove "Time_signature_engraver"; - slurVerticalDirection = #1 - verticalDirection = -1 + Slur \override #'direction = #1 + + autoBeamSettings \override #'(end * * * *) = #(make-moment 1 2) } } diff --git a/input/test/as2.ly b/input/test/as2.ly index 1dc7fef399..71995c12dc 100644 --- a/input/test/as2.ly +++ b/input/test/as2.ly @@ -1,4 +1,5 @@ +% test for ascii-art output \include "paper-as9.ly" diff --git a/input/test/different-time-signatures.ly b/input/test/different-time-signatures.ly index 954268be9c..b4a04ae5e2 100644 --- a/input/test/different-time-signatures.ly +++ b/input/test/different-time-signatures.ly @@ -2,22 +2,21 @@ % barline spacing disrupts visual rhythm. -#(set! space-alist (assoc-set! space-alist '("Staff_bar" "begin-of-note") '(minimum_space 0.0))) -#(set! space-alist (assoc-set! space-alist '("Staff_bar") '(minimum_space 0.0))) +#(define nbal (acons '("Staff_bar" "begin-of-note") '(minimum_space 0.0) default-break-align-space-alist)) \score{ \notes \relative c' < \context Staff= AS { - \time 3/4; + \property Staff.timeSignatureFraction = #'(3 . 4) c4 c c | c c c | } \context Staff=BS { - \time 2/4; + \property Staff.timeSignatureFraction = #'(2 . 4) c4 c | c c | c c } % TODO: make c4. here align with c4 there. \context Staff =CS { - \time 3/8; + \property Staff.timeSignatureFraction = #'(3 . 8) c4. c8 c c c4. c8 c c } > @@ -26,6 +25,7 @@ linewidth = -1.0\cm; \translator{ \ScoreContext + BreakAlignment \override #'space-alist = #nbal \remove Timing_engraver; } \translator{ diff --git a/input/test/equaliser.ly b/input/test/equaliser.ly index 6a4d8588da..68533109b8 100644 --- a/input/test/equaliser.ly +++ b/input/test/equaliser.ly @@ -1,3 +1,6 @@ +% +% TODO: junkme. +% flauti = \notes \relative c' { diff --git a/input/test/fake-grace.ly b/input/test/fake-grace.ly new file mode 100644 index 0000000000..cebfdf4fb2 --- /dev/null +++ b/input/test/fake-grace.ly @@ -0,0 +1,18 @@ +\score { + \context Voice \notes\relative c { + % to see the magic: uncomment size stuff in init/paper20.ly + + c'4 c4 + + \property Voice.fontSize= #-2 + b16 (*1/2 + \property Voice.fontSize= #0 + + ) g4 *31/32 + + a a g2 + + } + \paper { } + \midi { } +} diff --git a/input/test/font-body.ly b/input/test/font-body.ly index a2536530ef..157531acba 100644 --- a/input/test/font-body.ly +++ b/input/test/font-body.ly @@ -1,4 +1,6 @@ +% body for the font test. Does not work standalone + FontBody= \notes\transpose c''{ \bar "|:"; @@ -65,3 +67,6 @@ c\longa*1/4 c\breve*1/2 c1 c2 c4 c8 c2\sustainDown c\sustainUp | } } +\score { + \FontBody +} diff --git a/input/test/font11.ly b/input/test/font11.ly index c283b7aab0..c978c0aa99 100644 --- a/input/test/font11.ly +++ b/input/test/font11.ly @@ -17,7 +17,7 @@ description = "This file tests the Feta music font, 11pt"; \paper{ \paperEleven linewidth = 17.5 \cm; - gourlay_maxmeasures =5.; + } } diff --git a/input/test/font13.ly b/input/test/font13.ly index d738759ac0..47e38188f7 100644 --- a/input/test/font13.ly +++ b/input/test/font13.ly @@ -1,5 +1,3 @@ - - \header{ title= "The Feta Font"; subtitle = "proofsheet"; @@ -11,13 +9,8 @@ description = "This file tests the Feta music font, 11pt"; \include "paper13.ly" -\include "font-body.ly" -\score{ - \FontBody - \paper{ - \paperThirteen - linewidth = 17.5 \cm; - gourlay_maxmeasures =5.; - } +\paper{ +linewidth = 17.5 \cm; } +\include "font-body.ly" diff --git a/input/test/font16.ly b/input/test/font16.ly index 54ce1e0cef..9ef98f46e4 100644 --- a/input/test/font16.ly +++ b/input/test/font16.ly @@ -9,16 +9,10 @@ description = "This file tests the Feta music font"; \include "paper16.ly" -\include "font-body.ly" - -\score{ - \FontBody \paper{ % don't change this. % otherwise 16pt and 20pt layouts differ. - \paperSixteen - linewidth = 12.5 \cm; - gourlay_maxmeasures =5.; - } -} - + + linewidth = 12.5 \cm;} + + \include "font-body.ly" diff --git a/input/test/font20.ly b/input/test/font20.ly index 8233c2c68a..7ee14b33d4 100644 --- a/input/test/font20.ly +++ b/input/test/font20.ly @@ -8,14 +8,10 @@ TestedFeatures = "(Feta definitively is not an abbreviation of Font-En-TjA)"; } -\include "font-body.ly" - -\score{ - \context Staff { \FontBody} \paper{ linewidth = 17.5 \cm; - gourlay_maxmeasures =5.; } -} + +\include "font-body.ly" diff --git a/input/test/font26.ly b/input/test/font26.ly index d30ec2c093..69aaede984 100644 --- a/input/test/font26.ly +++ b/input/test/font26.ly @@ -9,14 +9,11 @@ description = "This file tests the Feta music font"; } \include "paper26.ly" -\include "font-body.ly" - -\score{ - \FontBody \paper{ - \paperTwentysix + linewidth = 17.5 \cm; - gourlay_maxmeasures =5.; + } -} + + \include "font-body.ly" diff --git a/input/test/hara-kiri.ly b/input/test/hara-kiri.ly index c67a6648f7..5799357740 100644 --- a/input/test/hara-kiri.ly +++ b/input/test/hara-kiri.ly @@ -1,4 +1,10 @@ +\header { +texidoc = "Hara kiri staffs disappear when empty "; +} + + +% todo: use partcombine?, junk? toeterI = \notes\relative c <{ \property Staff.instrument = #"Toeters" @@ -29,8 +35,8 @@ toeterIi = \notes \relative c \context Voice = together { } toeters = \context Staff = toeters < - \toeter_i - \toeter_ii + \toeterI + \toeterIi > zager = \context Staff = zager \notes \relative c'' { diff --git a/input/test/keys2.ly b/input/test/keys2.ly index caf59fe006..b28b04f643 100644 --- a/input/test/keys2.ly +++ b/input/test/keys2.ly @@ -1,25 +1,3 @@ -blah = \notes { - -\transpose c'' { - \time 4/4; - \keysignature es; - [cis8 d e f] [e! a b cis'] | - es e f e a a' a a' | - \clef "bass"; } - [es16 c' b a] [g f es d] [c d es d] [c bes, as, g,] | - -\clef "violin"; - \keysignature c; - cis4 c cis cis | - cis dis2 ~ | - \time 2/4 ; - dis4 dis ~ | c cis~ | c -} - -\score{ - \context Staff \blah - -} diff --git a/input/test/slur-mininum.ly b/input/test/slur-mininum.ly index f12280b73c..83a153caa5 100644 --- a/input/test/slur-mininum.ly +++ b/input/test/slur-mininum.ly @@ -1,12 +1,12 @@ +\header { +texidoc = "" ; +} \score{ \notes\relative c''{ \time 2/4; + \property Voice.Slur \set #'minimum-length = #40 c()c c~c\break } - \paper{ - linewidth=-1.\mm; - slur_x_minimum=40.0*\interline; - } } diff --git a/input/test/spacing.ly b/input/test/spacing.ly index 46e752aa12..809dc44a26 100644 --- a/input/test/spacing.ly +++ b/input/test/spacing.ly @@ -91,6 +91,6 @@ singlepart = \notes{ } \paper { % linewidth= 18.\cm; -% gourlay_maxmeasures = 4.0 + } } diff --git a/input/test/stem.ly b/input/test/stem.ly index cdba9179ba..0831f3b074 100644 --- a/input/test/stem.ly +++ b/input/test/stem.ly @@ -41,7 +41,4 @@ beamintervals = \notes{ \transpose a \beamintervals \transpose b \beamintervals } - \paper{ - gourlay_maxmeasures = 2.; - } } diff --git a/input/test/tchaikovsky.ly b/input/test/tchaikovsky.ly index a57f7035f1..42387d2570 100644 --- a/input/test/tchaikovsky.ly +++ b/input/test/tchaikovsky.ly @@ -34,7 +34,7 @@ instrument= "Violoncello"; \clef "bass"; \key c \major; | | - ~ ~ | + | ~ ~ } \header{ piece="example 2"; diff --git a/input/tricks/smart-transpose.ly b/input/tricks/smart-transpose.ly index 27d4df98b6..05170116f2 100644 --- a/input/tricks/smart-transpose.ly +++ b/input/tricks/smart-transpose.ly @@ -6,8 +6,8 @@ texidoc=" @quotation Your task, if you accept it is to implement a \smarttranspose command> that would translate such oddities into more natural - notations. Double accidentals should be removed, as well as #E - (-> F), bC (-> B), bF (-> E), #B (-> C). + notations. Double accidentals should be removed, as well as E-sharp + (-> F), bC (-> B), bF (-> E), B-sharp (-> C). @end quotation You mean like this. (Sorry 'bout the nuked indentation.) @@ -15,14 +15,6 @@ You mean like this. (Sorry 'bout the nuked indentation.) "; } -% Btw, I've leant an el-neato trick for formatting code in email messages, -% using inderect buffers. -% -% M-x make-indirect-buffer RET RET foo RET C-x b foo RET -% Select region and then narrow: C-x n n -% Set mode, eg: M-x sch TAB RET -% - #(define (unhair-pitch p) (let* ((o (pitch-octave p)) (a (pitch-alteration p)) diff --git a/input/tricks/staff-container.ly b/input/tricks/staff-container.ly index 647a3765ce..baa7cd2518 100644 --- a/input/tricks/staff-container.ly +++ b/input/tricks/staff-container.ly @@ -35,3 +35,5 @@ interesting things. You can also drop the \consistsend feature."; \remove Axis_group_engraver; } } +} + diff --git a/input/tutorial/os-music.ly b/input/tutorial/os-music.ly index 4625b12d72..b20a12288b 100644 --- a/input/tutorial/os-music.ly +++ b/input/tutorial/os-music.ly @@ -1,3 +1,5 @@ +% include file for tutorial + \header { title = "Zo, goed lieverd?"; subtitle = "How's, this babe?"; diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index ee563516c0..1bda7ea01f 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -175,8 +175,7 @@ Dynamic_engraver::process_music () script_req_l_->get_mus_property ("text")); Side_position_interface::set_direction (script_p_, LEFT); - Side_position_interface::set_axis (script_p_, X_AXIS); - + if (Direction d = script_req_l_->get_direction ()) Directional_element_interface::set (line_spanner_, d); diff --git a/lily/font-metric.cc b/lily/font-metric.cc index 7ce615a859..b421075119 100644 --- a/lily/font-metric.cc +++ b/lily/font-metric.cc @@ -29,6 +29,22 @@ Font_metric::text_dimension (String text) const switch (text[i]) { case '\\': + // accent marks use width of base letter + if (i +1 < text.length_i ()) + { + if (text[i+1]=='\'' || text[i+1]=='`' || text[i+1]=='"' || + text[i+1]=='^') + { + i++; + break; + } + // for string width \\ is a \ and \_ is a _. + if (text[i+1]=='\\' || text[i+1]=='_') + { + break; + } + } + for (i++; (i < text.length_i ()) && !isspace (text[i]) && text[i]!='{' && text[i]!='}'; i++) ; diff --git a/lily/hairpin.cc b/lily/hairpin.cc index 23de3362d4..6471957ecf 100644 --- a/lily/hairpin.cc +++ b/lily/hairpin.cc @@ -37,35 +37,54 @@ Hairpin::brew_molecule (SCM smob) /* Ugh, must be same as Text_spanner::brew_molecule. */ Real padding = gh_scm2double (me->get_grob_property ("if-text-padding")); - Real broken_left = spanner->get_broken_left_end_align (); - Real width = spanner->spanner_length (); - width -= broken_left; - + Drul_array broken; - Drul_array extra_off; + Drul_array bounds ; Direction d = LEFT; do { - Item *b = spanner->get_bound (d); - broken[d] = b->break_status_dir () != CENTER; + bounds[d] =spanner->get_bound (d); + broken[d] = bounds[d]->break_status_dir () != CENTER; + } + while (flip (&d) != LEFT); - if (!broken [d]) + Grob *common = bounds[LEFT]->common_refpoint (bounds[RIGHT], X_AXIS); + Drul_array x_points ; + + do + { + Item *b = bounds[d]; + x_points[d] = b->relative_coordinate (common, X_AXIS); + if (broken [d]) { - - Interval e =b->extent (b, X_AXIS); - Real r = 0.0; - if (!e.empty_b ()) - r = e[-d] + padding; - width += d * r; - extra_off[d] = r; + if (d == LEFT) + x_points[d] = b->extent (common,X_AXIS)[RIGHT] ; + } + else + { + if (dynamic_cast (b)) + { + /* + If we're hung on a paper column, that means we're not + adjacent to a text-dynamic, and we may move closer. We + make the padding a little smaller, here. + */ + Interval e =b->extent (common, X_AXIS); + x_points[d] = e.center () - d * padding /3; // ugh. + } + else + { + Interval e =b->extent (common, X_AXIS); + if (!e.empty_b ()) + x_points[d] = e[-d] - d*padding; + } } } while (flip (&d) != LEFT); - // FIXME: ecs tells us - width += gh_scm2double (me->get_grob_property ("width-correct")); - /* /Ugh */ - + + Real width = x_points[RIGHT] - x_points[LEFT]; + if (width < 0) { warning (_ ((grow_dir < 0) ? "decrescendo too small" @@ -76,18 +95,42 @@ Hairpin::brew_molecule (SCM smob) bool continued = broken[Direction (-grow_dir)]; Real height = gh_scm2double (me->get_grob_property ("height")); Real thick = line * gh_scm2double (me->get_grob_property ("thickness")); + + Real starth, endh; + if (grow_dir < 0) + { + starth = height; + endh = continued ? height/2 : 0.0; + } + else + { + starth = continued ? height/2 : 0.0; + endh = height; + } - const char* type = (grow_dir < 0) ? "decrescendo" : "crescendo"; - SCM hairpin = gh_list (ly_symbol2scm (type), - gh_double2scm (thick), - gh_double2scm (width), - gh_double2scm (height), - gh_double2scm (continued ? height/2 : 0.0), - SCM_UNDEFINED); - - Box b (Interval (0, width), Interval (-2*height, 2*height)); + /* + TODO: junk this and, make a general + + Lookup::line (XY1, XY2). + */ + SCM hairpin = gh_list (ly_symbol2scm ("hairpin"), + gh_double2scm (thick), + gh_double2scm (width), + gh_double2scm (starth), + gh_double2scm (endh), + SCM_UNDEFINED); + + /* + We make the hairpin too large in Y direction, so it stays at + proper distance from the staff. + */ + Interval yext = 2* height * Interval (-1,1); + Box b (Interval (0, width), yext); Molecule mol (b, hairpin); - mol.translate_axis (broken_left + extra_off[LEFT], X_AXIS); + + mol.translate_axis (x_points[LEFT] + - bounds[LEFT]->relative_coordinate (common, X_AXIS), + X_AXIS); return mol.smobbed_copy (); } diff --git a/lily/instrument-name-engraver.cc b/lily/instrument-name-engraver.cc index 261cb2e054..e58439dc9b 100644 --- a/lily/instrument-name-engraver.cc +++ b/lily/instrument-name-engraver.cc @@ -95,12 +95,18 @@ Instrument_name_engraver::acknowledge_grob (Grob_info i) if (dynamic_cast (i.elem_l_) && i.elem_l_->has_interface (ly_symbol2scm ("dynamic-interface"))) return; - + + /* + Hang the instrument names on the staffs, but not on the alignment + groups enclosing that staff. The alignment has no real location, + but is only a vehicle for the placement routine it contains, and + therefore the location of its refpoint won't be very useful. + + */ if (dynamic_cast (i.elem_l_) && ((Axis_group_interface::has_interface (i.elem_l_) - && Axis_group_interface::axis_b (i.elem_l_, Y_AXIS)) - || (Align_interface::has_interface (i.elem_l_) - && Align_interface::axis (i.elem_l_) == Y_AXIS))) + && Axis_group_interface::axis_b (i.elem_l_, Y_AXIS))) + && !Align_interface::has_interface (i.elem_l_)) { SCM nl = gh_cons (i.elem_l_->self_scm (), get_property ("instrumentSupport")); diff --git a/lily/lexer.ll b/lily/lexer.ll index d08ee082cf..7deca514b0 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -49,6 +49,7 @@ RH 7 fix (?) void strip_trailing_white (String&); void strip_leading_white (String&); +String lyric_fudge (String s); bool @@ -321,14 +322,7 @@ HYPHEN -- return yylval.i = EXTENDER; if (s == "--") return yylval.i = HYPHEN; - int i = 0; - while ((i=s.index_i ("_")) != -1) // change word binding "_" to " " - * (s.ch_l () + i) = ' '; - if ((i=s.index_i ("\\,")) != -1) // change "\," to TeX's "\c " - { - * (s.ch_l () + i + 1) = 'c'; - s = s.left_str (i+2) + " " + s.right_str (s.length_i ()-i-2); - } + s = lyric_fudge (s); char c = s[s.length_i () - 1]; if (c == '{' || c == '}') // brace open is for not confusing dumb tools. @@ -607,3 +601,27 @@ valid_version_b (String s) return true; } + +String +lyric_fudge (String s) +{ + char * chars =s.copy_ch_p (); + + for (char * p = chars; *p ; p++) + { + if (*p == '_' && (p == chars || *(p-1) != '\\')) + *p = ' '; + } + + s = String (chars); + delete[] chars; + + int i =0; + if ((i=s.index_i ("\\,")) != -1) // change "\," to TeX's "\c " + { + * (s.ch_l () + i + 1) = 'c'; + s = s.left_str (i+2) + " " + s.right_str (s.length_i ()-i-2); + } + + return s; +} diff --git a/lily/parser.yy b/lily/parser.yy index 966edc80ba..54d0ce9400 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -1122,6 +1122,11 @@ command_element: scm_unprotect_object (p->self_scm ()); $$ = sp; + +/* + TODO: should make alias TimingContext for Score +*/ + sp-> set_mus_property ("context-type", ly_str02scm ( "Score")); } ; diff --git a/lily/stem.cc b/lily/stem.cc index f17dcae0b2..13272bc71b 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -456,7 +456,7 @@ Stem::dim_callback (SCM e, SCM ax) } return ly_interval2scm (r); } - + MAKE_SCHEME_CALLBACK (Stem,brew_molecule,1); @@ -478,14 +478,39 @@ Stem::brew_molecule (SCM smob) Real dy = Staff_symbol_referencer::staff_space (me)/2.0; Real head_wid = 0; - Real angle =0.0; + /* +TODO: + + I don't really get the idea of the attachment-angle. + It seems like that you attach the Stem to the NoteHead at point + (1,tan(aa)/2), making it still nessesary to have special CENTER-STEMS + option - and if I would like to attach stem i.e. here: + + | + | + | + XXX + XXXXX + XXXXX + XXX + + That would be impossible. + Why haven't you just made ATTACHMENT-COORDINATES as a pair of reals, + with (0 . 0) meaning CENTER, (1 . 1) upper right, etc...? + +-Rune + + + */ + + Real slope =0.0; if (Grob *hed = support_head (me)) { head_wid = hed->extent (hed,X_AXIS).length (); - angle = gh_scm2double (hed->get_grob_property ("attachment-angle")); + slope = gh_scm2double (hed->get_grob_property ("attachment-slope")); } - stem_y[Direction (-d)] += d * head_wid * tan (angle)/ (2*dy); + stem_y[Direction (-d)] += d * head_wid * slope/ (2*dy); if (!invisible_b (me)) { diff --git a/ly/dynamic-scripts.ly b/ly/dynamic-scripts.ly index bf6c3e74f9..94d9b9bab2 100644 --- a/ly/dynamic-scripts.ly +++ b/ly/dynamic-scripts.ly @@ -2,7 +2,7 @@ % % declare the standard dynamic identifiers. % - +ppppp = \dynamicscript #"ppppp" pppp = \dynamicscript #"pppp" ppp = \dynamicscript #"ppp" pp = \dynamicscript #"pp" diff --git a/mf/GNUmakefile b/mf/GNUmakefile index 18da207eec..a2a9463991 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -55,7 +55,9 @@ export MFINPUTS:=.:$(MFINPUTS) default: $(ALL_GEN_FILES) -$(outdir)/%.afm $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log +## +## todo: this also depends on .tfm, FIXME. +$(outdir)/%.afm $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log $(PYTHON) $(buildscript-dir)/mf-to-table.py --package=$(topdir) --outdir=$(outdir) --dep $(outdir)/$(