From: Han-Wen Nienhuys Date: Sat, 4 May 2002 12:32:57 +0000 (+0000) Subject: '' X-Git-Tag: release/1.5.55~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8064f73c9e5c50a4813e04326ced592a0a5459ed;p=lilypond.git '' --- diff --git a/ChangeLog b/ChangeLog index 3ee20538c7..522c32b10c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2002-05-04 Han-Wen + * input/mozart-hrn*.ly: many corrections. + + * lily/dynamic-engraver.cc (acknowledge_grob): add Scripts to + support for dynamic scripts. + + * lily/accidental-placement.cc (position_accidentals): check for + collisions as well: should avoid those heads too. + * lily/beam.cc (check_concave): allow undefined gap and threshold. Change the meaning of threshold/gap == 0.0. (check_concave): skip Stolba concaveness check if we have a knee diff --git a/Documentation/user/invoking.itexi b/Documentation/user/invoking.itexi index 025e7e2c88..23099a43f1 100644 --- a/Documentation/user/invoking.itexi +++ b/Documentation/user/invoking.itexi @@ -28,14 +28,17 @@ Output format for sheet music. Choices are @code{tex} (for @TeX{} output), @code{pdftex} for PDF@TeX{} input, @code{ps} (for PostScript), @code{scm} (for a Scheme dump), and @code{as} (for ASCII-art). +Unless you have special requirements, you should use @TeX{} +output. All other options are experimental. + @c TODO: TFMFONTS -For processing both the @TeX{} and the PostScript output, you must have -appropriate environment variables set. For @TeX{}, you have to set -@code{MFINPUTS} and @code{TEXINPUTS} to point to the directory -containing LilyPond metafont and .tex files. For processing PostScript -output with Ghostscript you have to set @code{GS_FONTPATH} to point to -the directory containing LilyPond PFA files. +For processing both the @TeX{} and the PostScript output, you must +have appropriate environment variables set. For @TeX{}, you have to +set @code{MFINPUTS} and @code{TEXINPUTS} to point to the directory +containing LilyPond metafont and @file{.tex} files. For processing +PostScript output with Ghostscript you have to set @code{GS_FONTPATH} +to point to the directory containing LilyPond PFA files. Scripts to do this are included in @file{buildscripts/out/lilypond-profile} (for sh shells) and diff --git a/input/mozart-hrn-3.ly b/input/mozart-hrn-3.ly index f55d7d328b..45b495d2a8 100644 --- a/input/mozart-hrn-3.ly +++ b/input/mozart-hrn-3.ly @@ -3,7 +3,7 @@ subtitle = "f\\\"ur Horn und Orchester" composer = "Wolfgang Amadeus Mozart (1756-1792)" enteredby = "HWN" - opus = "K.V. 447" + opus = "KV 447" copyright = "public domain" instrument = "Horn in F" @@ -29,7 +29,7 @@ virtuoso that taught in Geneva. %} - +\include "mozart-hrn3-defs.ly" \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 index 5c839d247e..be8e05fb98 100644 --- a/input/mozart-hrn3-allegro.ly +++ b/input/mozart-hrn3-allegro.ly @@ -1,5 +1,5 @@ \version "1.3.146" -\include "mozart-hrn3-defs.ly" +%\include "mozart-hrn3-defs.ly" allegro = \notes @@ -7,7 +7,7 @@ allegro = { \time 4/4 \key c \major - \property Score . measurePosition = #(make-moment 3 4) + \partial 4 r4 | R1*4 @@ -18,25 +18,26 @@ allegro = g'4 g, r2 R1*18 r2 r4 g'4^"Solo" | + \mark "A" 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-.] + [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,2 ~ [c8 e g c] + [c b ] b4 r2 [c,8 () e g c] [e()g e c] - [c()b] b4-- r2 + [c()b] b4 r2 c4.( g8 e'4.) c8 - [g'()d ] d4-- r4 d + [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-.] + [b()a] a4 r8 [a a a] a4( cis e )g \grace { \longgrace g16( \endlonggrace } [ )fis8( e16 )d] d4-. r2 | @@ -44,17 +45,18 @@ allegro = R1*3 r2 r4 [d8(_#`(,italic-bf "con espressione") )b ] [a( )g d'( )b] [a( )g e'( )c ] - [b8( )a] a4 r4 [a8-. a-.] + [b8( )a] a4 r4 [a8 a] [a( \< b c \!cis\> ] d4 \! )c - [ais8() b] r8 b [b()c] r c + [ais8() b] r8 \cresc b [b()c] r c [cis ()d] r4 r2 - g,1 ~ g2 ~ [g8 a16 b] [c()d e c] + \endcresc g,1\f ~ g2 ~ [g8 a16 b] [c()d e c] + %% 64 f4-. d-. b-. g-. R1 c,2\p e4 g c \cresc e g4. e8 | - d4. [e16 fis] [g () fis e d] [c() b a g] - \endcresc + \endcresc d4.-\f [e16 fis] [g () fis e d] [c() b a g] + < a1(-\trill { s2 \grace{ [g16 a] } } > \mark "C" @@ -62,12 +64,12 @@ allegro = R1*15 \mark "D" bes2-\mf d4 f - g,2~ [g8 g'( es )c]| - bes4( )a4. [c8 d es] + 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-. + es2 () d4 r + [c8( g' es )c] bes4()c c4.( cis8 )d4 r R1*2 es1~es1| @@ -87,7 +89,7 @@ allegro = r8 [g, b d_\ritenuto ] f4 r \mark "E" R1*8 - r2 r8 [g,-. g-. g-.] + r2 r8 [g, g g] e'4.() c8 [f( d c )b] [b()c] g4 r8 [g c e] | g2. [g16( f e )f] @@ -100,7 +102,7 @@ allegro = c4 r r2 \mark "F" R1*3 - c,2~[c8( e g )c] + c,2~[c8 e g c] [c8()b] b4 r2 [c,8 e g c ] [e ()g e c] [c()b] b4 r2 @@ -117,12 +119,13 @@ allegro = R1 c1 ~ c | - [c8-. c-.] r c-. [cis()d] r d-. | + [c8-. c-.] r c-. [cis()d] r\cresc d-. | [dis()e] r e-. [e()f] r f-. | - g4-.-\f e-. c-. bes-. | + g4-.-\f\endcresc e-. c-. bes-. | g-.\ff e-. c-. r | - a'2 ~ [a8_#`(,italic-bf "sempre " (dynamic "f")) b16 c] [d( e d )e]%TODO + a'2 ~ [a8_""_#`(,italic-bf "sempre " (dynamic "f")) b16 c] [d( e d )e] + f4. () d8 [f8 ()d f d] [c (e] )g2 \grace { \longgrace f16( \endlonggrace } [)e8( d16 )c] @@ -132,8 +135,10 @@ allegro = ) 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] }| + \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]| diff --git a/input/mozart-hrn3-defs.ly b/input/mozart-hrn3-defs.ly index 288e602036..3d3f528859 100644 --- a/input/mozart-hrn3-defs.ly +++ b/input/mozart-hrn3-defs.ly @@ -94,4 +94,7 @@ startGraceContext = { } indent = 10. \mm linewidth = 189. \mm + + % The piece should fit on 4 pages. + textheight = 275.\mm } diff --git a/input/mozart-hrn3-romanze.ly b/input/mozart-hrn3-romanze.ly index 43491a17df..04370123c8 100644 --- a/input/mozart-hrn3-romanze.ly +++ b/input/mozart-hrn3-romanze.ly @@ -1,6 +1,6 @@ \version "1.3.146" -\include "mozart-hrn3-defs.ly" +%\include "mozart-hrn3-defs.ly" romanze = \notes \relative c' { \key f \major @@ -14,20 +14,20 @@ romanze = \notes \relative c' { a2( [)g8 a( bes )b] c4. () f8 a,4 a | % 6 - [bes8 (c d) bes] g4 r8 c,-. + [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] + g4.\mf f8 [e d c bes] % 18 [bes( a d )c] c4 r R1*2 - g'4.() f8 [e( d c) bes] + 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 ( 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" @@ -43,8 +43,8 @@ romanze = \notes \relative c' { [d8( e f )d] b4 r8 g [c ()e g g] [g( f e )d] c4( - \grace { e16 } - [d8. )c16] [c8 c--( c-- )c--] + \grace { \longgrace e16 } + [d8. )c16 \< ] [c8 c-.( c-. \! )c-.] \mark "C" des1\sfp g,1\sfp @@ -58,14 +58,14 @@ romanze = \notes \relative c' { \! )a4 r r2 R1*3 c4.-\p () f8 a,4 a | - [bes8 (c d) bes] g4 r8 c,-. + [bes8 (c d) bes] g4 r8 c, [c8( e g )bes] [a( c f ) d] - c-. r e-. r f4 r4 + 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 r e r f4 r4 + g,1 c,2 c4. c8 [c8( e g )bes] [a( c f ) d] c r e r f4 r4 % -. ? diff --git a/input/mozart-hrn3-rondo.ly b/input/mozart-hrn3-rondo.ly index 5aee2407f1..f53b86fea9 100644 --- a/input/mozart-hrn3-rondo.ly +++ b/input/mozart-hrn3-rondo.ly @@ -1,5 +1,7 @@ \version "1.3.146" +% \include "mozart-hrn3-defs.ly" + rondotheme = \notes \relative c' { [c'8 c c] [c c c] c4( cis8 )d r g, @@ -78,12 +80,12 @@ rondo = \notes \relative c' g4 r8 r4 r8 R2. | % - r8 [g g] [g( )b b] + r8 [g-\f g] [g( )b b-.] [b()d d-.] [d()g g-.] g2.~ - [g8 a g] [f e d] + [g8 \> a g] [f e d] < \rondotheme - { s8-\p } > + { \! s8-\p } > R2.*12 r4 r8 r4 c8 @@ -102,6 +104,12 @@ rondo = \notes \relative c' r4 r8 r4 c'8 b4()c8 b4()c8 bes4. ~ bes4 g8 + a4 () c8 f4 () b,8 + d4. () 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" @@ -124,8 +132,13 @@ rondo = \notes \relative c' f2.\f ~ | f4 r8 r4 r8 r8 [g,\> g] [g g g] - [fis g gis] % Edition breitkopf says a-flat (silly!) + + % Edition breitkopf says a-flat (silly!) + [fis g gis] [a bes \! b] + + %% EB does the slur in the Rondo differently from the 1st adn 2nd time. + %% why. Should check with MS. < \rondotheme { s8-\p } > R2.*7 @@ -143,15 +156,14 @@ rondo = \notes \relative c' \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] + [\endcresc c8\f g' e] [c g e] + [ c e' c] [g e c] g4 r8 [g''8 e c] < d2.(-\trill { s2 \grace { [c16 d] } } > - \endcresc )c4 r8 r4 r8 R2.*5 @@ -163,7 +175,10 @@ rondo = \notes \relative c' R2.*5 [c8\f c, c] [c c c] c4 r8 c4 r8 - c4 r8 r4 \bar "|." % B&H do another r8. + + %This is technically incorrect, since we started with an 8th + % upstep, but both eulenburg and EB do this as well. + c4 r8 r4 r8 \bar "|." } diff --git a/input/regression/bar-number.ly b/input/regression/bar-number.ly index 488ff856eb..67bd351ce7 100644 --- a/input/regression/bar-number.ly +++ b/input/regression/bar-number.ly @@ -1,19 +1,25 @@ -\version "1.3.146" +\version "1.5.54" \header { -texidoc="Bar number settable and padding adjustable." + +texidoc="Bar number settable and padding adjustable. Bar numbers +start counting after the anacrusis." + } \score { \notes \relative c'' { - c1 c\break - c1 c\break - \property Score.currentBarNumber = #25 - \property Score.BarNumber \override #'padding = #3 - c1 c\break + \partial 4 c4 + c1 c c + \property Score.currentBarNumber = #25 + \property Score.BarNumber \override #'padding = #3 + c1 c } \paper { - linewidth = 40*\staffspace - % \translator { \BarNumberingStaffContext } + linewidth = -1. \mm + \translator { + \ScoreContext + BarNumber \override #'visibility-lambda = #all-visible + } } } diff --git a/input/regression/dynamics-glyphs.ly b/input/regression/dynamics-glyphs.ly index da43da879b..0616f2ecc7 100644 --- a/input/regression/dynamics-glyphs.ly +++ b/input/regression/dynamics-glyphs.ly @@ -1,14 +1,16 @@ \header {texidoc = "Dynamic letters are kerned, and their weight matches that of the hairpin signs. The dynamic scripts should be -horizontally centered on the note head." } +horizontally centered on the note head. Scripts that should appear +closer to the note head (staccato, accent) are reckoned with. +" } \score { \notes\relative c'' { c1-\ff - c \f - c \rfz - c \mf + e,-.-> \f + e \rfz + c' \mf c \mp \> \! c \ppppp \< \! c \sfp diff --git a/lily/accidental-engraver.cc b/lily/accidental-engraver.cc index e998a9a434..adb0d18d34 100644 --- a/lily/accidental-engraver.cc +++ b/lily/accidental-engraver.cc @@ -401,7 +401,6 @@ Accidental_engraver::acknowledge_grob (Grob_info info) { arpeggios_.push (info.grob_l_); } - } void diff --git a/lily/accidental-placement.cc b/lily/accidental-placement.cc index 84e3c6c245..f4576cb022 100644 --- a/lily/accidental-placement.cc +++ b/lily/accidental-placement.cc @@ -17,6 +17,7 @@ source file of the GNU LilyPond music typesetter #include "accidental-placement.hh" #include "note-column.hh" #include "group-interface.hh" +#include "collision.hh" MAKE_SCHEME_CALLBACK(Accidental_placement,extent_callback, 2); SCM @@ -197,6 +198,22 @@ Accidental_placement::position_accidentals (Grob * me) heads.push (head); } } + + /* + This is a little kludgy: to get all notes, we look if there are + collisions as well. + */ + for (int i = note_cols.size() ; i--;) + { + Grob *c = note_cols[i]->get_parent (X_AXIS); + if (Collision::has_interface (c)) + { + Link_array gs = + Pointer_group_interface__extract_grobs (c, (Grob*)0, "elements"); + + note_cols.concat (gs); + } + } for (int i = note_cols.size() ; i--;) { diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 22f19477e9..b72737f4c7 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -18,7 +18,7 @@ #include "directional-element-interface.hh" #include "translator-group.hh" #include "axis-group-interface.hh" - +#include "script.hh" /* TODO: @@ -391,6 +391,9 @@ Dynamic_engraver::typeset_all () void Dynamic_engraver::acknowledge_grob (Grob_info i) { + if (!line_spanner_) + return ; + if (Note_column::has_interface (i.grob_l_)) { if (line_spanner_ @@ -407,6 +410,17 @@ Dynamic_engraver::acknowledge_grob (Grob_info i) } } + else if (Script_interface::has_interface (i.grob_l_) && script_p_) + { + SCM p = i.grob_l_->get_grob_property ("script-priority"); + + if (gh_number_p (p) + && gh_scm2int (p) < gh_scm2int (script_p_->get_grob_property ("script-priority"))) + { + Side_position_interface::add_support (line_spanner_, i.grob_l_); + + } + } } ENTER_DESCRIPTION(Dynamic_engraver, /* descr */ " @@ -416,6 +430,6 @@ which takes care of vertical positioning. ", /* creats*/ "DynamicLineSpanner DynamicText Hairpin TextSpanner", -/* acks */ "note-column-interface", +/* acks */ "note-column-interface script-interface", /* reads */ "", /* write */ ""); diff --git a/lily/include/script.hh b/lily/include/script.hh index 41b7654b08..8773172d82 100644 --- a/lily/include/script.hh +++ b/lily/include/script.hh @@ -18,7 +18,7 @@ Needs support from Staff_side for proper operation. Staff_side handles the positioning. */ -class Script +class Script_interface { public: static Molecule get_molecule (Grob*,Direction d); diff --git a/lily/parser.yy b/lily/parser.yy index cc0c23b87f..88d34227b8 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -788,6 +788,8 @@ Simple_music: } | MUSIC_IDENTIFIER { $$ = unsmob_music ($1)->clone (); + + $$->set_spot (THIS->here_input()); } | property_def | translator_change diff --git a/lily/script.cc b/lily/script.cc index 63afc99f95..50946ff65d 100644 --- a/lily/script.cc +++ b/lily/script.cc @@ -1,5 +1,5 @@ /* - script.cc -- implement Script + script.cc -- implement Script_interface source file of the GNU LilyPond music typesetter @@ -17,7 +17,7 @@ #include "lookup.hh" Molecule -Script::get_molecule (Grob * me, Direction d) +Script_interface::get_molecule (Grob * me, Direction d) { SCM s = me->get_grob_property ("script-molecule"); assert (gh_pair_p (s)); @@ -38,9 +38,9 @@ Script::get_molecule (Grob * me, Direction d) return Molecule (); } -MAKE_SCHEME_CALLBACK (Script,before_line_breaking,1); +MAKE_SCHEME_CALLBACK (Script_interface,before_line_breaking,1); SCM -Script::before_line_breaking (SCM smob) +Script_interface::before_line_breaking (SCM smob) { Grob * me = unsmob_grob (smob); @@ -61,10 +61,10 @@ Script::before_line_breaking (SCM smob) } -MAKE_SCHEME_CALLBACK (Script,brew_molecule,1); +MAKE_SCHEME_CALLBACK (Script_interface,brew_molecule,1); SCM -Script::brew_molecule (SCM smob) +Script_interface::brew_molecule (SCM smob) { Grob *me= unsmob_grob (smob); @@ -94,7 +94,7 @@ ADD_INTERFACE (Text_script,"text-script-interface", "Any text script", "script-priority"); -ADD_INTERFACE (Skript, "script-interface", +ADD_INTERFACE (Script_interface, "script-interface", "", "script-priority script-molecule staff-support"); diff --git a/scm/grob-description.scm b/scm/grob-description.scm index da2ec6f557..bcaa149c15 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -629,13 +629,13 @@ (Script . ( ;; don't set direction here: it breaks staccato. - (molecule-callback . ,Script::brew_molecule) + (molecule-callback . ,Script_interface::brew_molecule) ;; This value is sensitive: if too large, staccato dots will move a ;; space a away. (padding . 0.25) (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent)) - (before-line-breaking-callback . ,Script::before_line_breaking) + (before-line-breaking-callback . ,Script_interface::before_line_breaking) (font-family . music) (meta . ((interfaces . (script-interface side-position-interface font-interface)))) )) diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index 2e54f3b792..0016ae6f8b 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -537,8 +537,9 @@ ly_paper_to_latexpaper = { 'letter' : 'letterpaper', } -def global_latex_definition (tfiles, extra): +#TODO: should set textheight (enlarge) depending on papersize. +def global_latex_definition (tfiles, extra): '''construct preamble from EXTRA, dump Latex stuff for each lily output file in TFILES after that, and return the Latex file constructed. ''' @@ -548,9 +549,10 @@ lily output file in TFILES after that, and return the Latex file constructed. ' options = '' + if extra['papersize']: try: - options = '%s' % ly_paper_to_latexpaper[extra['papersize'][0]] + options = ly_paper_to_latexpaper[extra['papersize'][0]] except KeyError: warning (_ ("invalid value: %s") % `extra['papersize'][0]`) pass