From 0c699fd4abfeafa3318eb2224a55ac78139f77d3 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 02:47:40 +0000 Subject: [PATCH] lilypond-1.5.48 --- ChangeLog | 43 +++++++ VERSION | 2 +- input/mozart-hrn-3.ly | 58 +++++++++ input/mozart-hrn3-allegro.ly | 160 ++++++++++++++++++++++++ input/mozart-hrn3-romanze.ly | 87 +++++++++++++ input/mozart-hrn3-rondo.ly | 179 +++++++++++++++++++++++++++ lily/bar-line.cc | 4 +- lily/beam.cc | 15 ++- lily/dynamic-engraver.cc | 2 + lily/include/multi-measure-rest.hh | 4 + lily/multi-measure-rest.cc | 190 +++++++++++++++++------------ lily/slur.cc | 2 +- lily/staff-symbol-referencer.cc | 2 - lily/voice-devnull-engraver.cc | 7 -- ly/grace-init.ly | 3 +- ly/spanners-init.ly | 2 +- mf/feta-eindelijk.mf | 13 -- scm/grob-description.scm | 5 +- tex/lilyponddefs.tex | 7 +- 19 files changed, 676 insertions(+), 109 deletions(-) create mode 100644 input/mozart-hrn-3.ly create mode 100644 input/mozart-hrn3-allegro.ly create mode 100644 input/mozart-hrn3-romanze.ly create mode 100644 input/mozart-hrn3-rondo.ly diff --git a/ChangeLog b/ChangeLog index 363e387395..8ffd169bb7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,46 @@ +2002-03-27 Han-Wen + + * lily/multi-measure-rest.cc (symbol_molecule): split off from + brew_molecule() + (set_spacing_rods): Use symbol_molecule() to determine minimum + width + (church_rest): split off from brew_molecule() + (big_rest): split off from brew_molecule(). Construct using + variable shape. + + * mf/feta-eindelijk.mf: junk multi measure rest. + +2002-03-26 Han-Wen + + * lily/multi-measure-rest.cc (add_column): remove columns property. + + * lily/dynamic-engraver.cc (process_music): add more verbose warning + + * input/mozart-hrn3-romanze.ly (romanze): add mozart horn concerto + 3 as test piece. + +2002-03-26 Heikki Junes + + * lilypond-font-lock.el (LilyPond-font-lock-keywords): most new + keywords covered, dropped some non-keywords, include R- and 128-notes + +2002-03-25 Juergen Reuter + + * Code clean-up: Junk multiple implementations of ledger line + creation in note_head, custos, and porrectus. This is important + since there soon will be some more applications of ledger lines to + come (e.g. ambitus engraver). + + * Make thickness of ledger lines adjustable. This is essential + for mensural notation. + + * Fix some bugs in the current ledger_line implementation, most + notably that of the horizontal extent of ledger lines which equals + at least the extent of the metafont ledger_line character, and + which grows(!) if the desired extent shrinks below this limit. + + * roundfilledbox: variable blotdiameter + 2002-03-24 Han-Wen * VERSION: 1.5.47 released diff --git a/VERSION b/VERSION index e6d9e5925e..322e260b3d 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=5 -PATCH_LEVEL=47 +PATCH_LEVEL=48 MY_PATCH_LEVEL= diff --git a/input/mozart-hrn-3.ly b/input/mozart-hrn-3.ly new file mode 100644 index 0000000000..9c2fc28ff6 --- /dev/null +++ b/input/mozart-hrn-3.ly @@ -0,0 +1,58 @@ +\header{ + title = "Konzert Nr. 3 Es dur" + subtitle = "f\\\"ur Horn und Orchester" + composer = "Wolfgang Amadeus Mozart (1756-1792)" + enteredby = "HWN" + opus = "K.V. 447" + + copyright = "public domain" + instrument = "Horn in F" + editor = "Henri Kling" + mutopiatitle = "Horn Concerto 3" + mutopiacomposer = "W.A.Mozart" + mutopiaopus = "KV447" + style = "classical" + maintainer = "hanwen@cs.uu.nl" + maintainerEmail = "hanwen@cs.uu.nl" + maintainerWeb = "http://www.cs.uu.nl/~hanwen/" + lastupdated = "2002/March/26" + source = "Edition Breitkopf 2563" + + tagline = "\\parbox{\hsize}{\\thefooter\\quad\\small This music is part of the Mutopia project, \\texttt{http://sca.uwaterloo.ca/Mutopia/}. 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!}" + +} +%{ + +This is the Mozart 3 for horn. It's from an Edition Breitkopf EB +2563, edited by Henri Kling. Henri Kling (1842-1918) was a horn +virtuoso that taught in Geneva. + +%} + + +#(set! point-and-click line-column-location) + +longgrace = \property Voice.Stem \override #'flag-style = #'() +endlonggrace = \property Voice.Stem \revert #'flag-style +ritenuto = \textscript #'(italic "rit.") + +\version "1.5.47" + +\paper{ + \translator { \ScoreContext + skipBars = ##t + midiInstrument = #"french horn" + RehearsalMark \override #'font-series = #'bold + } + \translator { \StaffContext + MinimumVerticalExtent = #'(-4.5 . 4.5) + } + indent = 10. \mm + linewidth = 189. \mm +} + +\include "mozart-hrn3-allegro.ly" +\include "mozart-hrn3-romanze.ly" +\include "mozart-hrn3-rondo.ly" + + diff --git a/input/mozart-hrn3-allegro.ly b/input/mozart-hrn3-allegro.ly new file mode 100644 index 0000000000..c81bb95b5b --- /dev/null +++ b/input/mozart-hrn3-allegro.ly @@ -0,0 +1,160 @@ +\version "1.3.146" + +allegro = + \notes + \relative c' +{ + \time 4/4 + \key c \major + \property Score . measurePosition = #(make-moment 3 4) + r4 + | + R1*4 + c'2^"Tutti" g + c, r + R1*1 + r8 [g' g g] [g g e c] + g'4 g, r2 + R1*18 + r2 r4 g'4^"Solo" | + e'4. () c8 [f (d c )b ] + [b()c] g4 r8 [g-. c-. e-.] + g2. ( [g16-.( f e ))f] + dis4 () e4-- r8 [c8-. c-. c-.] + c4.( [d16 e] f4 ) e + a,( d g,) c + d-. d-. \grace e16( [)d8. c16 d8. e16] + c4 r r2 + R1*3 + c,2 ~ [c8 e( g )c] + [c () b ] b4-. r2 + [c,8 () e g c] [e()g e c] + [c()b] b4-- r2 + c4.( g8 e'4.) c8 + [g'()d ] d4-- r4 d + [d8 () c] c4.( [d16 e] [d8 )c] + [c8(-\trill )b] b4 r2 | + d2( ~ [d8 e16 d] [c8 )b] | + [b()a-.] a4-> r8 [a-. a-. a-.] + a4( cis e )g + \grace { \longgrace g16( \endlonggrace } + [ )fis8( e16 )d] d4-. r2 | + \mark "B" + R1*3 + r2 r4 [d8(_#'(italic "con espressione") )b ] + [a( )g d'( )b] [a( )g e'( )c ] + [b8( )a] a4 r4 [a8-. a-.] + [a( \< b c \!cis\> ] d4 \! )c + [ais8() b] r8 b [b()c] r c + [cis ()d] r4 r2 + g,1 ~ g2 ~ [g8 a16 b] [c()d e c] + f4-. d-. b-. g-. + r1 + \emptyText + c,2\p e4 g c \cresc e g4. e8 | + d4. [e16 fis] [g () fis e d] [c() b a g] + \endcresc + < a1(-\trill + { s2. \grace{ [g16 a] } } > + )g4 r r2 + R1*15 + \mark "D" + bes2-\mf d4 f + g,2~ [g8 g'( es )c]| + bes4( )a4. [c8 d es] + cis4()d r8 [bes (c )d] + es2 () d4 r + es2\p () d4 r + [c8(\mf g' es )c] bes4()c-. + c4.( cis8 )d4 r + R1*2 + es1~es1| + e! + d + c + c, + e' + e, + c'2 [b8( a gis )a] + [gis8 e gis b ] e4 r | + r8 [e, a c] dis4 r + r8 [e, a c] dis4 r + r8 [e, g b] e4 r + r8 [fis, b dis] fis4 r + r8 [gis, b d] f4 r + r8 [g, b d_\ritenuto ] f4 r + \mark "E" + R1*8 + r2 r8 [g,-. g-. g-.] + e'4.() c8 [f( d c )b] + [b()c] g4 r8 [g c e] | + g2. ( [g16( f e ))f] + dis4()e r8 [c-. c-. c-.] + c4.( [d16 e] f4 )e + a, ( d g, )c + d d + \grace { e8( } + [)d8. c16 d8. e16] + c4 r r2 + \mark "F" + R1*3 + c,2~[c8( e g )c] + [c8()b] b4 r2 + [c,8 e g c ] [e ()g e c] + [c()b] b4 r2 + c2 (bes )a [a8(b c )cis] + d2( ~ [d8 e16 d] \grace { \longgrace d16( \endlonggrace } [)c8 b16 )c] + \grace { \longgrace c16 \endlonggrace }[ b8( a16 )g] g4 r2 | + R1*3 + r2 r4 [g'8()e] + \mark "G" + [d()c g'()e] [d()c a'()f] + [e()d] d4 r [d8 d] + d4(~ [d16 e d )e] [g8() f e d] | + c4 r r2 + r1 + c1 ~ + c | + [c8-. c-.] r c-. [cis()d] r d-. | + [dis()e] r e-. [e()f] r f-. | + g4-.-\f e-. c-. bes-. | + g-.\ff e-. c-. r | + a'2 ~ [a8_#'((font-shape . italic) "sempre " (dynamic "f")) b16 c] [d( e d )e]%TODO + + f4. () d8 [f8 ()d f d] + [c (e] )g2 \grace { \longgrace f16( \endlonggrace } [)e8( d16 )c] + + < d1-\trill ( + { s2. \grace { [c16 d] } } > + + ) c4 r r2 + r1 | + \mark "H" + \times 2/3 { [ c8 ()b a ] } \times 2/3 { [ g a b] } \times 2/3 { [ c d e] } \times 2/3 { [ f()e d] } | + \times 2/3 { [ c () b a ] } \times 2/3 { [ g a b] } \times 2/3 { [ c d e] } \times 2/3 { [ f()e d] }| + c4 \times 2/3 { r8 [g'()e]} c4 \times 2/3 { r8 [e () c]} | + g4 \times 2/3 { r8 [c8() g] } \times 2/3 { [ e ()g e-. ] } \times 2/3 { [c () e c-.] }| + g4 r8 g'\f [a b c d]| + + < d1(-\trill + { s2. \grace { [c16 d] } } > + )c4 r r2 + R1*3 + + c4._"Cadenza ad lib." () d8 d4.-\trill ( [c16 )d] + c4 r r2 + R1*8 + r4 [c8.^"tutti"-\f c16] c4 c + c [c,8. c16] c4 c| + c2 r2 \bar "|." + +} + + +\score +{ + \notes { \transpose bes \allegro } + \paper{ } + \header { piece = "allegro" opus = "" } + \midi{ \tempo 4=90 } +} diff --git a/input/mozart-hrn3-romanze.ly b/input/mozart-hrn3-romanze.ly new file mode 100644 index 0000000000..020d1a9226 --- /dev/null +++ b/input/mozart-hrn3-romanze.ly @@ -0,0 +1,87 @@ + +\version "1.3.146" + +romanze = \notes \relative c' { + \key f \major + \time 2/2 + + c'4.( _#'(italic (dynamic "p") " con molto espressione") + )f8 a,4 a + [bes8( c d bes] )g4 r8 g + a r bes r c r [d()bes] + a2( [)g8 a( bes )b] + c4. () f8 a,4 a | + % 6 + [bes8 (c d) bes] g4 r8 c,-. + [c8( e g )bes] [a( c f ) d] + c r e r f r r4 + \mark "A" + R1*8 + g4. ()f8 [e( d c) bes] + % 18 + [bes( a d )c] c4 r + R1*2 + g'4.() f8 [e( d c) bes] + [bes (a d ) c] c4 r + r1 + % 25 + [c16\mf ( d c )d] [e ( f e )f] [g()e c-. c-.] [f()d b-. b-.] + [c16\p () d c )d] [e ( f e )f] [g()e c-. c-.] [f()d b-. b-.] + [c8 \< c, c c] [c c c \! c ] + \mark "B" + c1\f + R1*9 + f'4.(\p )d8 b4 r8 g + g'4.() e8 c4 r8 cis | + % 39 + d4(~ [d16 e d )e] [f8 () d f() d] + c2()b4 r + R1*4 + e4. ()g8 c,4 ()cis + [d8( e f )d] b4 r8 g + [c ()e g g] [g( f e )d] + c4( + \grace { e16 } + [d8. )c16] [c8 c--( c-- )c--] + \mark "C" + des1\sfp + g,1\sfp + c\sfp + c,\sfp + R1*3 + r8 [c-\p c c] c2~ + [c8 c' c c] c2~ + [c8 \< e( g f] [e \! d \> c bes] + \mark "D" + \! )a4 r r2 + R1*3 + c4.-\p () f8 a,4 a | + [bes8 (c d) bes] g4 r8 c,-. + [c8( e g )bes] [a( c f ) d] + c-. r e-. r f4 r4 + R1*3 + r2 r4 r8 c,8 + [c8( e g )bes] [a( c f ) d] + c-. r e-. r f4 r4 + g,1\pp + c,2~c4. c8 + [c8( e g )bes] [a( c f ) d] + c r e r f4 r4 % -. ? + + r1 + c8-. r e-. r f4 r4 + + % Finish with F if played separately + c8-.( r c,-. r ) c4 r4| + \bar "|." +} + + + +\score +{ + \notes { \transpose bes \romanze } + \header { piece = "romanze" opus = "" } + \midi{ \tempo 4 = 70 } + \paper{} +} diff --git a/input/mozart-hrn3-rondo.ly b/input/mozart-hrn3-rondo.ly new file mode 100644 index 0000000000..aab198ee6c --- /dev/null +++ b/input/mozart-hrn3-rondo.ly @@ -0,0 +1,179 @@ +\version "1.3.146" + +rondotheme = \notes \relative c' { + [c'8 c c] [c c c] + c4( cis8 )d r g, + [d'8 d d] [d d d] + d4( dis8 )e r c | + [c()d e] [f g a] + [g ()e c] c4 d8 + e4()d8 e4()f8 + e4.()d8 r r | +} + +lipbreaker = \notes \relative c' +{ + r8 [g'-. g-.] [c()e g,-.] + [c()e g,-.] [c()e g,-.] + [c c, c] [c c c] + [c c c] [c c c] +} + +rightsixteenth = { \property Voice.stemLeftBeamCount = 1 + \property Voice.stemRightBeamCount = 2 } +leftsixteenth = { \property Voice.stemLeftBeamCount = 2 + \property Voice.stemRightBeamCount = 1 } +bothsixteenth = { \property Voice.stemLeftBeamCount = 2 + \property Voice.stemRightBeamCount = 2 } + +rondo = \notes \relative c' +{ + \partial 8 + \time 6/8 + \key c \major + + g'8-\p | + + \rondotheme + + R2.*13 | + r8 r-\fermata d [d e f] + [g ()e c-.] [d()e d-.] + c4 c8 [d e f] + [g()e c-.] [d()e d-.] + c4 r8 r4 r8 | + R2.*7 + \mark "A" + c4.\p \grace { e16( } [)d8 c d] + c4 r8 r4 r8 + e4. \grace g16( [)f8 e f] + e4 r8 r4 r8 + g4. e4 c8 + g2.~ + [g8 a b] [c d e ] + e4.()d8 r r + R2.*4 + e2.~ | + [e8 d c] [c b a] + d2.~ + [d8 c b] [b a g] + g'4()e8 b4()cis8 + \mark "B" + d4 r8 r4 r8 + R2.*3 | + r8 [d-. d-.] [d()g d-.] + [d()g d-.] [d d d] + [d()g] r r4 r8 + R2.*1 + \lipbreaker + c4 r8 [c' d e] + d4()g8 [c, d e] + d4 r8 r4 r8 + R2. | + r4 r8 [c-. d-. e-.] + d4()g8 [c, d e] + [d()g fis] [e d c] + [b () e d] [c b a] + \mark "C" + g4 r8 r4 r8 + r2. | + % + r8 [g g] [g( )b b] + [b()d d-.] [d()g g-.] + g2.~ + [g8 a g] [f e d] + < \rondotheme + { s8-\p } > + + R2.*12 + r4 r8 r4 c8 + \mark "D" + c4 f8 c4 a8 + a4.~a4 a8 + bes4 c8 d4 bes8 + g4. ~ g8 r r + R2.*3 + r4 r8 r4 c8 + a4. c + f ~ [f8. \rightsixteenth e16( \bothsixteenth d )c] + bes4 g8 e4 g8 + c,4. ~ c8 r r + R2.*3| + r4 r8 r4 c'8 + b4()c8 b4()c8 + bes4. ~ bes4 g8 + a4 c8 [f () d b] + d4. () c8 r r + \mark "E" + R2.*9 | + \lipbreaker + [c8 c' c] c4.~ + [c8 c d] [e e fis] + g4 r8 r4 r8 + r2. + r8 [g, g] [g g g] | + es'4. ~ [es8 d c] + b4 r8 r4 r8 + r2. | + r8 [g g] [g g g] + es'4. ~ [es8 d c] + \cresc b4. c4. d4. e4. + \mark "F" + \endcresc + + f2.\f ~ | + f4 r8 r4 r8 + r8 [g,\> g] [g g g] + [fis g gis] % Edition breitkopf says a-flat (silly!) + [a bes \! b] + < \rondotheme + { s8-\p } > + R2.*7 + \mark "G" + R2.*4 + c,4.\mf c4 c8 + c4. e4 c8 + g'4. g4 g8 + g4. g,4 g8 + c4 r8 r4 r8 + r4 r8 r4 g'8 + [c ()e g,-.] [c ()e g,-.] + [c ()e g,-.] [c ()e g,-.] + \mark "H" + \cresc g'2. bes,2. + a4. [b16 c d e f g] + a4. f4 d8 + [c8\f g' e] [c g e] + [\stemUp c \stemDown e' c] \stemBoth [g e c] + g4 r8 [g''8 e c] + + + < d2.(-\trill + { s2 \grace { [c16 d] } } > + + \endcresc + + )c4 r8 r4 r8 + R2.*5 + r8 r8-\fermata d8\p [d e f] + [g ()e c] [d()e d] + \cresc [c c c] [d e f] + [g()e c] [d()e d] + \endcresc c4\f r8 r4 r8 + R2.*5 + [c8\f c, c] [c c c] + c4 r8 c4 r8 + c4 r8 r4 \bar "|." % B&H do another r8. +} + + + + + +\score +{ + \notes { \transpose bes \rondo } + \header { piece = "rondo" opus = "" } + \midi{ \tempo 4 = 100 } + \paper { } +} diff --git a/lily/bar-line.cc b/lily/bar-line.cc index e1bd060ccc..d4228dcc25 100644 --- a/lily/bar-line.cc +++ b/lily/bar-line.cc @@ -54,8 +54,6 @@ Bar_line::compound_barline (Grob*me, String str, Real h) Real staffline = me->paper_l ()->get_var ("stafflinethickness"); Real staff_space = Staff_symbol_referencer::staff_space (me); - Real staffspace = me->paper_l ()->get_var ("staffspace") - * staff_space; kern *= staffline; thinkern *= staffline; @@ -67,7 +65,7 @@ Bar_line::compound_barline (Grob*me, String str, Real h) Molecule colon; Molecule dot = Font_interface::get_default_font (me)->find_by_name ("dots-dot"); Real dist = ( Staff_symbol_referencer::line_count (me) & 1 ? 1 : - staff_space<2 ? 2 : .5 ) * staffspace; + (staff_space<2 ? 2 : .5) ) * staff_space; dot.translate_axis(dist/2,Y_AXIS); colon.add_molecule(dot); dot.translate_axis(-dist,Y_AXIS); diff --git a/lily/beam.cc b/lily/beam.cc index 98b674ce84..23bd41dbaa 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -1341,6 +1341,19 @@ ADD_INTERFACE (Beam, "beam-interface", "A beam. #'thickness= weight of beams, in staffspace - ", + + +We take the least squares line through the ideal-length stems, and +then damp that using + + damped = tanh (slope) + +this gives an unquantized left and right position for the beam end. +Then we take all combinations of quantings near these left and right +positions, and give them a score (according to how close they are to +the ideal slope, how close the result is to the ideal stems, etc.). We +take the best scoring combination. + +", "concaveness-threshold dir-function quant-score auto-knee-gap gap chord-tremolo beamed-stem-shorten shorten least-squares-dy direction damping flag-width-function neutral-direction positions thickness"); diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 7ddff09e1f..05c5a04ba7 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -215,6 +215,8 @@ Dynamic_engraver::process_music () (current_cresc_req_->get_span_dir () == 1 ? _ ("already have a crescendo") : _ ("already have a decrescendo")); + + current_cresc_req_->origin ()->warning (_("Cresc started here")); } else { diff --git a/lily/include/multi-measure-rest.hh b/lily/include/multi-measure-rest.hh index c6f7c94432..0d46900ec7 100644 --- a/lily/include/multi-measure-rest.hh +++ b/lily/include/multi-measure-rest.hh @@ -23,6 +23,10 @@ public: DECLARE_SCHEME_CALLBACK (percent, (SCM)); static void add_column (Grob*,Item*); DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM )); + + static Molecule big_rest (Grob*,Real); + static Molecule symbol_molecule (Grob*); + static Molecule church_rest (Font_metric*, int,Real, Real); }; #endif /* MULTI_MEASURE_REST_HH */ diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index d7f6f04144..8353e19812 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -15,11 +15,11 @@ #include "rest.hh" #include "molecule.hh" #include "misc.hh" -#include "group-interface.hh" #include "spanner.hh" #include "staff-symbol-referencer.hh" #include "text-item.hh" #include "percent-repeat-item.hh" +#include "lookup.hh" bool Multi_measure_rest::has_interface (Grob*me) @@ -31,7 +31,6 @@ MAKE_SCHEME_CALLBACK (Multi_measure_rest,percent,1); SCM Multi_measure_rest::percent (SCM smob) { - Grob *me = unsmob_grob (smob); Spanner *sp = dynamic_cast (me); @@ -80,26 +79,10 @@ SCM Multi_measure_rest::brew_molecule (SCM smob) { Grob *me = unsmob_grob (smob); - if (to_boolean (me->get_grob_property ("skip-timestep"))) - { - me->set_grob_property ("skip-timestep", SCM_EOL); - return SCM_EOL; - } - Spanner * sp = dynamic_cast (me); SCM alist_chain = Font_interface::font_alist_chain (me); - - SCM style_chain = - Font_interface::add_style (me, ly_symbol2scm ("mmrest-symbol"), - alist_chain); - - Font_metric *musfont - = Font_interface::get_font (me,style_chain); - - Real staff_space = Staff_symbol_referencer::staff_space (me); - Interval sp_iv; Direction d = LEFT; do @@ -126,7 +109,41 @@ Multi_measure_rest::brew_molecule (SCM smob) */ x_off += sp_iv.length ()/ 2; - + mol.add_molecule (symbol_molecule (me)); + + int measures = 0; + SCM m (me->get_grob_property ("measure-count")); + if (gh_number_p (m)) + { + measures = gh_scm2int (m); + } + + if (measures > 1) + { + Molecule s = Text_item::text2molecule (me, + ly_str02scm (to_str (measures).ch_C ()), + alist_chain); + s.align_to (X_AXIS, CENTER); + s.translate_axis (3.0, Y_AXIS); + mol.add_molecule (s); + } + mol.translate_axis (x_off, X_AXIS); + return mol.smobbed_copy (); +} + + +Molecule +Multi_measure_rest::symbol_molecule (Grob *me) +{ + SCM alist_chain = Font_interface::font_alist_chain (me); + + SCM style_chain = + Font_interface::add_style (me, ly_symbol2scm ("mmrest-symbol"), + alist_chain); + + Real staff_space = Staff_symbol_referencer::staff_space (me); + Font_metric *musfont + = Font_interface::get_font (me,style_chain); Molecule s; int measures = 0; @@ -139,7 +156,7 @@ Multi_measure_rest::brew_molecule (SCM smob) SCM limit = me->get_grob_property ("expand-limit"); if (measures <= 0) - return SCM_EOL; + return s; if (measures == 1) { s = musfont->find_by_name (Rest::glyph_name (me, 0, "")); @@ -148,66 +165,87 @@ Multi_measure_rest::brew_molecule (SCM smob) ugh. */ if (Staff_symbol_referencer::position_f (me) == 0.0) - s.translate_axis (Staff_symbol_referencer::staff_space (me), Y_AXIS); + s.translate_axis (staff_space, Y_AXIS); } else if (measures <= gh_scm2int (limit)) { - /* - Build a rest from smaller parts. Distances inbetween are - really variable, see Wanske pp. 125 */ - - int l = measures; - while (l) - { - int k; - if (l >= 4) - { - l-=4; - k = -2; - } - else if (l>= 2) - { - l -= 2; - k = -1; - } - else - { - k = 0; - l --; - } - - Real pad = s.empty_b () - ? 0.0 : gh_scm2double (me->get_grob_property ("padding")) * staff_space; - - Molecule r (musfont->find_by_name ("rests-" + to_str (k))); - if (k == 0) - r.translate_axis (staff_space, Y_AXIS); - - s.add_at_edge (X_AXIS, RIGHT, r, pad); - } - - - s.align_to (X_AXIS, CENTER); + Real pad = gh_scm2double (me->get_grob_property ("padding")) * staff_space; + s = church_rest (musfont, measures, staff_space, pad); } else { - String idx = ("rests-") + to_str (-4); - s = musfont->find_by_name (idx); + Real w = gh_scm2double (me->get_grob_property ("width")); + s = big_rest (me, w); } + return s; +} + +Molecule +Multi_measure_rest::big_rest (Grob *me, Real width) +{ + Real thick = gh_scm2double (me->get_grob_property ("thickness")); + Real ss = Staff_symbol_referencer::staff_space (me); + + Real slt = me->paper_l ()->get_var ("stafflinethickness"); + Real y = slt * thick/2 * ss; + Box b(Interval (0, width), Interval (-y, y)); + Real ythick = slt * ss; - mol.add_molecule (s); + Molecule m = Lookup::filledbox (b); + Molecule yb = Lookup::filledbox (Box (Interval (-ythick, ythick), Interval (-ss, ss))); - if (measures > 1) + m.add_at_edge (X_AXIS, RIGHT, yb, -ythick); + m.add_at_edge (X_AXIS, LEFT, yb, -ythick); + + m.align_to (X_AXIS, CENTER); + + return m; +} + +/* + Kirchenpause (?) + + */ +Molecule +Multi_measure_rest::church_rest (Font_metric *musfont, int measures, + Real staff_space, Real padding) +{ + Molecule s; + /* + Build a rest from smaller parts. Distances inbetween are + really variable, see Wanske pp. 125 */ + + int l = measures; + while (l) { - Molecule s = Text_item::text2molecule (me, - ly_str02scm (to_str (measures).ch_C ()), - alist_chain); - s.align_to (X_AXIS, CENTER); - s.translate_axis (3.0 * staff_space, Y_AXIS); - mol.add_molecule (s); + int k; + if (l >= 4) + { + l-=4; + k = -2; + } + else if (l>= 2) + { + l -= 2; + k = -1; + } + else + { + k = 0; + l --; + } + + Real pad = s.empty_b () ? 0.0 : padding; + + Molecule r (musfont->find_by_name ("rests-" + to_str (k))); + if (k == 0) + r.translate_axis (staff_space, Y_AXIS); + + s.add_at_edge (X_AXIS, RIGHT, r, pad); } - mol.translate_axis (x_off, X_AXIS); - return mol.smobbed_copy (); + + s.align_to (X_AXIS, CENTER); + return s; } /* @@ -216,8 +254,6 @@ Multi_measure_rest::brew_molecule (SCM smob) void Multi_measure_rest::add_column (Grob*me,Item* c) { - Pointer_group_interface::add_grob (me, ly_symbol2scm ("columns"),c); - add_bound_item (dynamic_cast (me),c); } @@ -255,11 +291,13 @@ Multi_measure_rest::set_spacing_rods (SCM smob) rod.item_l_drul_[LEFT] = l; rod.item_l_drul_[RIGHT] = r; - /* - should do something more advanced. - */ + /* + should do something more advanced. + */ + Molecule m = symbol_molecule(me); + rod.distance_f_ = l->extent (l, X_AXIS)[BIGGER] - r->extent (r, X_AXIS)[SMALLER] - + gh_scm2double (me->get_grob_property ("minimum-width")) * staff_space; + + m.extent (X_AXIS).length () + 2.5*staff_space; rod.add_to_cols (); } @@ -275,4 +313,4 @@ numbers, fields from font-interface may be used. padding is the space between number and rest. Measured in staffspace. ", - "columns measure-count expand-limit minimum-width padding"); + "thickness measure-count expand-limit padding"); diff --git a/lily/slur.cc b/lily/slur.cc index 2e0e9b57f7..dcdea460ab 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -50,7 +50,7 @@ void Slur::add_column (Grob*me, Grob*n) { if (!gh_pair_p (n->get_grob_property ("note-heads"))) - me->warning (_ ("Putting slur over rest. Ignoring.")); + me->warning (_ ("Putting slur over rest. Ignoring rest.")); else { Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-columns"), n); diff --git a/lily/staff-symbol-referencer.cc b/lily/staff-symbol-referencer.cc index 7e1b083883..abb66fa954 100644 --- a/lily/staff-symbol-referencer.cc +++ b/lily/staff-symbol-referencer.cc @@ -53,11 +53,9 @@ Staff_symbol_referencer::staff_space (Grob*me) if (st) return Staff_symbol::staff_space (st); - return 1.0; } - Real Staff_symbol_referencer::position_f (Grob*me) { diff --git a/lily/voice-devnull-engraver.cc b/lily/voice-devnull-engraver.cc index 5fbcbe171e..d580a91b2f 100644 --- a/lily/voice-devnull-engraver.cc +++ b/lily/voice-devnull-engraver.cc @@ -97,13 +97,6 @@ Voice_devnull_engraver::acknowledge_grob (Grob_info i) for (char const **p = junk_interfaces; *p; p++) if (i.grob_l_->has_interface (ly_symbol2scm (*p))) { -#if 0 - /* Ugh: virtual mmrest::suicide () ? */ - if (i.grob_l_->has_interface (ly_symbol2scm ("multi-measure-rest-interface"))) - i.grob_l_->set_grob_property ("skip-timestep", SCM_BOOL_T); - else - ; -#endif /* Ugh, we can suicide them, but they remain living */ i.grob_l_->suicide (); return; diff --git a/ly/grace-init.ly b/ly/grace-init.ly index c03ea803d4..858e4d0057 100644 --- a/ly/grace-init.ly +++ b/ly/grace-init.ly @@ -10,7 +10,6 @@ startGraceMusic = { #(map (lambda (x) (* 0.8 x)) '(0.0 1.5 1.25 1.0)) \property Voice.Stem \override #'no-stem-extend = ##t \property Voice.Stem \override #'flag-style = #"grace" - \property Voice.Beam \override #'thickness = #0.384 % Can't use Staff.fontSize, since time sigs, keys sigs, etc. will @@ -18,9 +17,11 @@ startGraceMusic = { \property Voice.fontSize = #-2 \property Staff.Accidentals \override #'font-relative-size = #-2 + \property Voice.Slur \override #'direction = #-1 } stopGraceMusic = { + \property Voice.Slur \revert #'direction \property Staff.Accidentals \revert #'font-relative-size \property Voice.Beam \revert #'thickness diff --git a/ly/spanners-init.ly b/ly/spanners-init.ly index 3fdf1b7b31..d2f5457236 100644 --- a/ly/spanners-init.ly +++ b/ly/spanners-init.ly @@ -7,7 +7,7 @@ rced = \spanrequest \stop "decrescendo" cresc = \notes { \commandspanrequest \start "crescendo" - \property Voice.crescendoText = #"cresc." + \property Voice.crescendoText = #'((font-shape . italic) "cresc.") \property Voice.crescendoSpanner = #'dashed-line } diff --git a/mf/feta-eindelijk.mf b/mf/feta-eindelijk.mf index 5192fe3a7f..2a3bb4fa77 100644 --- a/mf/feta-eindelijk.mf +++ b/mf/feta-eindelijk.mf @@ -92,8 +92,6 @@ save breve_rest_y, breve_rest_x; breve_rest_y# = staff_space#; breve_rest_x# = 3/5 staff_space#; -multi_rest_x# = 4 staff_space#; -multi_beam_height# = 1/3 staff_space#; define_pixels(breve_rest_y, breve_rest_x, multi_rest_x, multi_beam_height); @@ -109,17 +107,6 @@ fet_endchar; tracingvariables := 1; -fet_beginchar("multi rest", "-4", "multirest"); - set_char_box(multi_rest_x#, multi_rest_x#, - breve_rest_y#, breve_rest_y#); - draw_block ((- b, - multi_beam_height), - (w, multi_beam_height)); - draw_block ((- b,-breve_rest_y), - (rthin - b, breve_rest_y)); - draw_block ((w - rthin,-breve_rest_y), - (w, breve_rest_y)); -fet_endchar; - fet_beginchar("Quarter rest","2","quartrest"); % draw_staff (-2, 2, 0.0); save alpha, yshift, height; diff --git a/scm/grob-description.scm b/scm/grob-description.scm index f28a50c4bc..d35e4ac032 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -433,8 +433,9 @@ (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) (staff-position . 0) (expand-limit . 10) - (padding . 2.0) ; staffspace - (minimum-width . 12.5) ; staffspace + (width . 5.5) + (thickness . 6.6) + (padding . 1.5) ; staffspace (font-family . number) (font-relative-size . 1) (meta . ((interfaces . (multi-measure-rest-interface rest-interface font-interface staff-symbol-referencer-interface)))) diff --git a/tex/lilyponddefs.tex b/tex/lilyponddefs.tex index 3ad96eaec7..1b16819e35 100644 --- a/tex/lilyponddefs.tex +++ b/tex/lilyponddefs.tex @@ -38,7 +38,12 @@ \def\leftalign#1{\hbox to 0pt{#1\hss}} % Attempt to keep lilypiecetitle together with the piece: -\def\myfilbreak{\par\vfil\penalty200\vfilneg} + +% +% TODO: figure this out. +% + +\def\myfilbreak{} %\par\vfil\penalty200\vfilneg} \ifundefined{lilypondpaperinterscorelinefill} -- 2.39.5