From 6b60f6bfa151ab6e90b6c288ff07eb3e99fb0708 Mon Sep 17 00:00:00 2001 From: hanwen Date: Wed, 14 Jan 2004 10:45:15 +0000 Subject: [PATCH] * lily/text-spanner.cc (brew_molecule): don't do shorten-pair for breakpoints. * lily/break-align-interface.cc: add doco * Documentation/user/refman.itely (Rehearsal marks): add index marks. --- ChangeLog | 9 ++++ Documentation/user/GNUmakefile | 2 +- Documentation/user/refman.itely | 14 ++++++ VERSION | 2 +- input/mutopia/F.Schubert/morgenlied.ly | 25 +++++++--- input/regression/lyric-combine-new.ly | 9 ++-- input/regression/ottava.ly | 19 ++++++++ lily/break-align-interface.cc | 39 +++++++++------ lily/global-translator.cc | 3 ++ lily/include/music-wrapper-iterator.hh | 2 +- lily/include/simultaneous-music-iterator.hh | 3 +- lily/music-wrapper-iterator.cc | 6 +++ lily/new-lyric-combine-music-iterator.cc | 54 +++++++++++++-------- lily/simultaneous-music-iterator.cc | 16 ++++++ lily/text-spanner.cc | 48 ++++++++---------- mf/feta-bolletjes.mf | 49 +++++++++++++++++++ scm/define-grobs.scm | 1 + 17 files changed, 221 insertions(+), 80 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4d483a85ca..9f093a4180 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-01-14 Han-Wen Nienhuys + + * lily/text-spanner.cc (brew_molecule): don't do shorten-pair for + breakpoints. + + * lily/break-align-interface.cc: add doco + + * Documentation/user/refman.itely (Rehearsal marks): add index marks. + 2004-01-13 Han-Wen Nienhuys * VERSION: release 2.1.9 diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile index 627642e481..806e5b72f6 100644 --- a/Documentation/user/GNUmakefile +++ b/Documentation/user/GNUmakefile @@ -81,7 +81,7 @@ ifeq ($(SPLITTING_MAKEINFO),yes) $(outdir)/lilypond.dvi: $(OUT_EPS_IMAGES) $(OUT_PNG_IMAGES) $(outdir)/%.png: %.png - convert -resize 50x50% $< $@ + convert -geometry 50x50% $< $@ $(outdir)/%.eps: %.png convert $< $@ diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 02fd47bb06..046fd056da 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -1220,6 +1220,9 @@ to be instantiated. They bear the names @code{"1"}, @code{"2"}, etc. In each of these contexts, vertical direction of slurs, stems, etc. is set appropriately. +@cindex @code{\voiceOne} +@cindex @code{\voiceFour} + This can also be done by instantiating @internalsref{Voice} contexts by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign a stem directions and horizontal shift for each part: @@ -1232,6 +1235,11 @@ a stem directions and horizontal shift for each part: \new Voice { \voiceTwo fis4~ fis4 f ~ f } >> @end lilypond +@noindent +The command @code{\oneVoice} will revert back to the normal setting. +@cindex @code{\oneVoice} + + Normally, note heads with a different number of dots are not merged, but when the object property @code{merge-differently-dotted} is set in the @internalsref{NoteCollision} object, they are merged: @@ -1278,6 +1286,7 @@ LilyPond also vertically shifts rests that are opposite of a stem: @cindex @code{\voiceFour} @code{\voiceFour}. + The following commands specify in what chords of the current voice should be shifted: the outer voice has @code{\shiftOff}, and the inner voices have @code{\shiftOn}, @code{\shiftOnn}, etc. @@ -4175,6 +4184,11 @@ The mark is incremented automatically if you use @code{\mark \default}. The value to use is stored in the property @code{rehearsalMark} is used and automatically incremented. +@cindex coda on bar line +@cindex segno on bar line +@cindex fermata on bar line +@cindex bar lines, symbols on + The @code{\mark} command can also be used to put signs like coda, segno and fermatas on a barline. Use @code{\markup} to to access the appropriate symbol: diff --git a/VERSION b/VERSION index b4ab327632..9f53de19ed 100644 --- a/VERSION +++ b/VERSION @@ -2,5 +2,5 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=1 PATCH_LEVEL=9 -MY_PATCH_LEVEL= +MY_PATCH_LEVEL=hwn1 diff --git a/input/mutopia/F.Schubert/morgenlied.ly b/input/mutopia/F.Schubert/morgenlied.ly index 51dd4e2da3..e290e47090 100644 --- a/input/mutopia/F.Schubert/morgenlied.ly +++ b/input/mutopia/F.Schubert/morgenlied.ly @@ -52,7 +52,10 @@ melody = \notes \relative c'' \repeat volta 2 \context Voice = singer { s1*0^\markup { \bold \large\bigger\bigger { \hspace #-3.0 Lieblich, etwas geschwind } } R2. r4 r8 c4 g8 | - e4 c8 << { f8. g16 } \\ { f8.[ g16] } >> a8 | + e4 c8 + << + \new Voice { \stemUp f8. g16 } + { \stemDown f8.[ g16] } >> a8 | fis4 g8 c16[ b a g] f[ e] | d4 f8 a16[ g fis g] f[ d] | g4. r8 gis gis | @@ -71,10 +74,19 @@ melody = \notes \relative c'' \repeat volta 2 \context Voice = singer { } +ignoreMelisma = \property LyricsVoice . ignoreMelismata = ##t +ignoreMelismaOff = \property LyricsVoice . ignoreMelismata \unset + + firstVerse = \lyrics { \property LyricsVoice . stanza = "1." - Sü -- ßes Licht! Aus gol -- de -- nen Pfor -- ten brichst du __ \manuscriptBreak | + Sü -- ßes Licht! Aus + \ignoreMelisma + gol -- + \ignoreMelismaOff + + de -- nen Pfor -- ten brichst du __ \manuscriptBreak | sie -- gend durch __ die Nacht. Schö -- ner Tag, du __ bist er -- wacht. __ Mit ge -- | \manuscriptBreak heim -- nis -- vol -- len Wor -- ten, in me -- lo -- di -- schen Ak -- kor -- den, grüß __ ich __ \manuscriptBreak | @@ -83,8 +95,8 @@ firstVerse = \lyrics { secondVerse = \lyrics { \property LyricsVoice . stanza = "2." - - Ach, der Lie -- be sanf "" -- tes We -- hen schwellt mir | + Ach, der Lie -- be sanf + -- tes We -- hen schwellt mir | das be -- weg -- te __ Herz, sanft, wie ein ge -- lieb -- ter Schmerz. __ Dürft ich | nur auf gold -- nen Hö -- hen mich im Mor -- gen -- duft er -- ge -- hen! Sehn -- sucht | zieht mich him -- mel -- wärts, Sehn -- sucht zieht mich him -- mel -- wärts. @@ -138,13 +150,12 @@ pianoLH = \notes \relative c'' \repeat volta 2 { \score { << \time 6/8 - \addlyrics \new Staff { \context Staff \modernAccidentals \melody } \new Lyrics << - \context LyricsVoice = "singer-1" \firstVerse - \context LyricsVoice = "singer-2" \secondVerse + \newaddlyrics "singer" \new LyricsVoice \firstVerse + \newaddlyrics "singer" \new LyricsVoice \secondVerse >> \new PianoStaff << \property PianoStaff.instrument = \markup { diff --git a/input/regression/lyric-combine-new.ly b/input/regression/lyric-combine-new.ly index e075cd7785..c1955edeff 100644 --- a/input/regression/lyric-combine-new.ly +++ b/input/regression/lyric-combine-new.ly @@ -9,11 +9,11 @@ \score { << \notes \context Voice = "bla" \relative c'' { - c2( d4) e4 ( c2 d4) e4 + \autoBeamOff + c2( d4) e8[ c b c] f4 } \newaddlyrics "bla" \lyrics \new LyricsVoice { bla ab blob blob } - \newaddlyrics "bla" - \lyrics \new LyricsVoice { + \newaddlyrics "bla" \lyrics \new LyricsVoice { bla \property LyricsVoice . ignoreMelismata = ##t @@ -26,5 +26,8 @@ blob } + + \new Lyrics << \newaddlyrics "bla" \lyrics \new LyricsVoice { nes ted lyrics voice with more words than no tes } >> >> + } diff --git a/input/regression/ottava.ly b/input/regression/ottava.ly index 06423dbf6e..922d7a79b2 100644 --- a/input/regression/ottava.ly +++ b/input/regression/ottava.ly @@ -12,6 +12,25 @@ with @code{Staff.ottavation}. } \version "2.1.7" +% . There must be a minimum distance between the octavation line and the +% topmost staff line, taking into account the height of the closing +% vertical dashed line. +% +% . Octavation lines broken across staves must always start with `8va' +% (or something similar). +% +% . The `8va' should be slightl offset to the left. +% +% . The final vertical dashed line of the octavation line should be offset +% to the right. +% +% . Octavation lines for `8va bassa' must be below the staff, not above. +% +% . The `8va bassa' string is far too long for short octavation lines. +% LilyPond should select between `8va bassa', `8ba', and `8', depending +% on the available horizontal space (and the octavation style selected +% by the user). The same holds for `8va' and `15ma'. + \paper { raggedright = ##t} \score { diff --git a/lily/break-align-interface.cc b/lily/break-align-interface.cc index 529b1006ad..dcef533e75 100644 --- a/lily/break-align-interface.cc +++ b/lily/break-align-interface.cc @@ -231,22 +231,29 @@ Break_align_interface::do_alignment (Grob *me) ADD_INTERFACE (Break_aligned_interface, "break-aligned-interface", - // -"Items that are aligned in prefatory matter.\n" -"\n" -"The spacing of these items is controlled by the space-alist\n" -"property. It contains a list break-align-symbols with a specification\n" -"of the associated space. The space definition is either (extra-space\n" -". @var{number}), which adds space after the symbol, (minimum-space\n" -". @var{ms}), which pads the space until it it is @var{ms}.\n" -"\n" -"\n" -"Special keys for the alist are 'first-note and 'next-note, signifyign\n" -"the first note on a line, and the next note halfway a line.\n" -"\n" -"Rules for this spacing are much more complicated than this. \n" -"See [Wanske] page 126 -- 134, [Ross] pg 143 -- 147\n", - "break-align-symbol break-alignment-done space-alist"); + "Items that are aligned in prefatory matter.\n" + "\n" + "The spacing of these items is controlled by the space-alist\n" + "property. It contains a list break-align-symbols with a specification\n" + "of the associated space. The space specification can be " + "@table @code\n" + "@item (minimum-space . @var{spc}))\n" + " Pad space until the distance is @var{spc}\n" + "@item (fixed-space} . @var{spc})\n" + " Set a fixed space\n" + "@item (semi-fixed-space . @var{spc})\n" + " Set a space. Half of it is fixed and half is stretchable. \n" + "(does not work at start of line. fixme)\n" + "@item (extra-space . @var{spc})\n" + " Add @var{spc} amount of space.\n" + "@end table\n" + "\n" + "Special keys for the alist are 'first-note and 'next-note, signifying\n" + "the first note on a line, and the next note halfway a line.\n" + "\n" + "Rules for this spacing are much more complicated than this. \n" + "See [Wanske] page 126 -- 134, [Ross] pg 143 -- 147\n", + "break-align-symbol break-alignment-done space-alist"); ADD_INTERFACE (Break_align_interface, "break-alignment-interface", "See @ref{break-aligned-interface}.", diff --git a/lily/global-translator.cc b/lily/global-translator.cc index ce30c74db6..eded9743bc 100644 --- a/lily/global-translator.cc +++ b/lily/global-translator.cc @@ -99,6 +99,9 @@ Global_translator::run_iterator_on_me (Music_iterator * iter) } w = sneaky_insert_extra_moment (w); + if (w.main_part_.is_infinity ()) + break ; + // printf ("proccing %s\n ", w.to_string ().to_str0 ()); if (first) diff --git a/lily/include/music-wrapper-iterator.hh b/lily/include/music-wrapper-iterator.hh index 3283347fde..7207cfd38f 100644 --- a/lily/include/music-wrapper-iterator.hh +++ b/lily/include/music-wrapper-iterator.hh @@ -33,7 +33,7 @@ public: virtual bool ok () const; virtual SCM get_pending_events (Moment)const; virtual void skip (Moment); - + virtual bool run_always () const; protected: virtual void process (Moment); virtual Music_iterator *try_music_in_children (Music *) const; diff --git a/lily/include/simultaneous-music-iterator.hh b/lily/include/simultaneous-music-iterator.hh index c31a5d7304..3689b1348c 100644 --- a/lily/include/simultaneous-music-iterator.hh +++ b/lily/include/simultaneous-music-iterator.hh @@ -30,7 +30,8 @@ public: virtual bool ok () const; virtual SCM get_pending_events (Moment)const; virtual void skip (Moment); - + virtual bool run_always () const; + protected: virtual void process (Moment); virtual Music_iterator *try_music_in_children (Music *) const; diff --git a/lily/music-wrapper-iterator.cc b/lily/music-wrapper-iterator.cc index 38e00b7344..ee19b425e7 100644 --- a/lily/music-wrapper-iterator.cc +++ b/lily/music-wrapper-iterator.cc @@ -83,3 +83,9 @@ Music_wrapper_iterator::try_music_in_children (Music *m) const } IMPLEMENT_CTOR_CALLBACK (Music_wrapper_iterator); + +bool +Music_wrapper_iterator::run_always () const +{ + return child_iter_->run_always (); +} diff --git a/lily/new-lyric-combine-music-iterator.cc b/lily/new-lyric-combine-music-iterator.cc index 77f5e43fe8..03b8a537ea 100644 --- a/lily/new-lyric-combine-music-iterator.cc +++ b/lily/new-lyric-combine-music-iterator.cc @@ -32,7 +32,8 @@ protected: virtual void derived_mark () const; private: bool start_new_syllable () ; - + void find_thread (); + Translator_group * lyrics_context_; Translator_group* music_context_; Music_iterator * lyric_iter_; @@ -98,7 +99,7 @@ New_lyric_combine_music_iterator::run_always () const bool New_lyric_combine_music_iterator::ok () const { - return music_context_ && lyric_iter_->ok (); + return lyric_iter_ && lyric_iter_->ok (); } void @@ -146,35 +147,46 @@ New_lyric_combine_music_iterator::construct_children () Music *m = unsmob_music (get_music ()->get_mus_property ("element")); lyric_iter_ = unsmob_iterator (get_iterator (m)); - SCM voice_name = get_music ()->get_mus_property ("associated-context"); - - - Translator_group * thread = 0, *voice =0; - - if (gh_string_p (voice_name)) + if (lyric_iter_) { - Translator_group *t = report_to (); - while (t && t->daddy_trans_) - t = t->daddy_trans_; - - voice = find_context_below (t, "Voice", ly_scm2string (voice_name)); - if (voice) - thread = find_context_below (voice, "Thread", ""); + lyrics_context_ = find_context_below (lyric_iter_->report_to (), "LyricsVoice", ""); } - - if (thread) + + find_thread (); +} + +void +New_lyric_combine_music_iterator::find_thread () +{ + if (!music_context_) { - music_context_ = thread; - lyrics_context_ = find_context_below (lyric_iter_->report_to (), "LyricsVoice", ""); + SCM voice_name = get_music ()->get_mus_property ("associated-context"); + + if (gh_string_p (voice_name)) + { + Translator_group *t = report_to (); + while (t && t->daddy_trans_) + t = t->daddy_trans_; + + Translator_group* voice = find_context_below (t, "Voice", ly_scm2string (voice_name)); + Translator_group *thread = 0; + if (voice) + thread = find_context_below (voice, "Thread", ""); - if (lyrics_context_) - lyrics_context_->set_property ("associatedVoiceContext", voice->self_scm ()); + if (thread) + music_context_ = thread; + + if (lyrics_context_ && voice) + lyrics_context_->set_property ("associatedVoiceContext", voice->self_scm ()); + } } } void New_lyric_combine_music_iterator::process (Moment ) { + find_thread (); + if (!music_context_->daddy_trans_) { music_context_ = 0; diff --git a/lily/simultaneous-music-iterator.cc b/lily/simultaneous-music-iterator.cc index b875668ef7..8e9eea1e94 100644 --- a/lily/simultaneous-music-iterator.cc +++ b/lily/simultaneous-music-iterator.cc @@ -157,17 +157,33 @@ Simultaneous_music_iterator::pending_moment () const if (!it-> run_always ()) next = next pending_moment (); } + return next; } bool Simultaneous_music_iterator::ok () const { + bool run_always_ok = false; for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr(s)) { Music_iterator * it = unsmob_iterator (gh_car (s)); if (!it->run_always ()) return true; + else + run_always_ok = run_always_ok || it->ok (); + } + return run_always_ok; +} + +bool +Simultaneous_music_iterator::run_always () const +{ + for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr(s)) + { + Music_iterator * it = unsmob_iterator (gh_car (s)); + if (it->run_always ()) + return true; } return false; } diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc index 61de7fbc34..37ca80ae3f 100644 --- a/lily/text-spanner.cc +++ b/lily/text-spanner.cc @@ -57,7 +57,10 @@ Text_spanner::brew_molecule (SCM smob) Grob *common = spanner->get_bound (LEFT)->common_refpoint (spanner->get_bound (RIGHT), X_AXIS); Paper_def * paper = me->get_paper(); - + + SCM flare = me->get_grob_property ("bracket-flare"); + SCM shorten = me->get_grob_property ("shorten-pair"); + Interval span_points; Drul_array broken; Direction d = LEFT; @@ -68,16 +71,22 @@ Text_spanner::brew_molecule (SCM smob) if (broken[d]) { - if (d == LEFT) - span_points[d] = spanner->get_broken_left_end_align (); - else - span_points[d] = b->relative_coordinate (common, X_AXIS); + if (d == LEFT) + span_points[d] = spanner->get_broken_left_end_align (); + else + span_points[d] = b->relative_coordinate (common, X_AXIS); } else { bool encl = to_boolean (me->get_grob_property ("enclose-bounds")); span_points[d] = b->extent (common, X_AXIS)[encl ? d : -d]; + + if (is_number_pair (shorten)) + span_points -= d * gh_scm2double (index_get_cell (shorten, d)); } + + if (is_number_pair (flare)) + span_points -= d * gh_scm2double (index_get_cell (flare, d)); } while (flip (&d) != LEFT); @@ -105,25 +114,6 @@ Text_spanner::brew_molecule (SCM smob) while (flip (&d) != LEFT); } - - Drul_array shorten; - shorten[LEFT] = 0; - shorten[RIGHT] = 0; - - SCM ew = me->get_grob_property ("bracket-flare"); - SCM s = me->get_grob_property ("shorten-pair"); - if (gh_pair_p (s)) - { - span_points[LEFT] += gh_scm2double (ly_car (s)); - span_points[RIGHT] -= gh_scm2double (ly_cdr (s)); - } - if (gh_pair_p (ew)) - { - span_points[LEFT] += gh_scm2double (ly_car (ew)); - span_points[RIGHT] -= gh_scm2double (ly_cdr (ew)); - } - - Real thick = paper->get_realvar (ly_symbol2scm ("linethickness")); SCM st = me->get_grob_property ("thickness"); if (gh_number_p (st)) @@ -132,8 +122,8 @@ Text_spanner::brew_molecule (SCM smob) } Drul_array edge_line; - s = me->get_grob_property ("edge-height"); - if (gh_pair_p (s)) + SCM edge_height = me->get_grob_property ("edge-height"); + if (is_number_pair (edge_height)) { Direction d = LEFT; int dir = to_dir (me->get_grob_property ("direction")); @@ -143,10 +133,10 @@ Text_spanner::brew_molecule (SCM smob) continue; Real dx = 0.0; - if (gh_pair_p (ew)) - dx = gh_scm2double (index_get_cell (ew, d)) * d; + if (gh_pair_p (flare)) + dx = gh_scm2double (index_get_cell (flare, d)) * d; - Real dy = gh_scm2double (index_get_cell (s, d)) * - dir; + Real dy = gh_scm2double (index_get_cell (edge_height, d)) * - dir; if (dy) edge_line[d] = Line_spanner::line_molecule (me, thick, Offset(0,0), Offset (dx, dy)); diff --git a/mf/feta-bolletjes.mf b/mf/feta-bolletjes.mf index fd4a7e9299..07b098cc38 100644 --- a/mf/feta-bolletjes.mf +++ b/mf/feta-bolletjes.mf @@ -183,6 +183,55 @@ fet_beginchar("Quart notehead", "2", "quarthead") black_notehead_width# := charwd; fet_endchar; +fet_beginchar("Quart notehead", "2AA", "quarthead") + draw_outside_ellipse (1.6 - puff_up_factor / 2.0, 32, 0.707, 0); + black_notehead_width# := charwd; +fet_endchar; +fet_beginchar("Quart notehead", "2AB", "quarthead") + draw_outside_ellipse (1.65 - puff_up_factor / 2.0, 32, 0.707, 0); + black_notehead_width# := charwd; +fet_endchar; +fet_beginchar("Quart notehead", "2AC", "quarthead") + draw_outside_ellipse (1.7 - puff_up_factor / 2.0, 32, 0.707, 0); + black_notehead_width# := charwd; +fet_endchar; +fet_beginchar("Quart notehead", "2AD", "quarthead") + draw_outside_ellipse (1.75 - puff_up_factor / 2.0, 32, 0.707, 0); + black_notehead_width# := charwd; +fet_endchar; +fet_beginchar("Quart notehead", "2BA", "quarthead") + draw_outside_ellipse (1.6 - puff_up_factor / 2.0, 35, 0.707, 0); + black_notehead_width# := charwd; +fet_endchar; +fet_beginchar("Quart notehead", "2BB", "quarthead") + draw_outside_ellipse (1.65 - puff_up_factor / 2.0, 35, 0.707, 0); + black_notehead_width# := charwd; +fet_endchar; +fet_beginchar("Quart notehead", "2BC", "quarthead") + draw_outside_ellipse (1.7 - puff_up_factor / 2.0, 35, 0.707, 0); + black_notehead_width# := charwd; +fet_endchar; +fet_beginchar("Quart notehead", "2BD", "quarthead") + draw_outside_ellipse (1.75 - puff_up_factor / 2.0, 35, 0.707, 0); + black_notehead_width# := charwd; +fet_endchar; +fet_beginchar("Quart notehead", "2CA", "quarthead") + draw_outside_ellipse (1.6 - puff_up_factor / 2.0, 38, 0.707, 0); + black_notehead_width# := charwd; +fet_endchar; +fet_beginchar("Quart notehead", "2CB", "quarthead") + draw_outside_ellipse (1.65 - puff_up_factor / 2.0, 38, 0.707, 0); + black_notehead_width# := charwd; +fet_endchar; +fet_beginchar("Quart notehead", "2CC", "quarthead") + draw_outside_ellipse (1.7 - puff_up_factor / 2.0, 38, 0.707, 0); + black_notehead_width# := charwd; +fet_endchar; +fet_beginchar("Quart notehead", "2CD", "quarthead") + draw_outside_ellipse (1.75 - puff_up_factor / 2.0, 38, 0.707, 0); + black_notehead_width# := charwd; +fet_endchar; + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 31fabdd988..2055fcbaec 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -1080,6 +1080,7 @@ (Y-offset-callbacks . (,Side_position_interface::out_of_staff ,Side_position_interface::aligned_side)) (molecule-callback . ,Text_spanner::brew_molecule) + (font-shape . italic) (font-family . roman) (text-repeat-if-broken . #t) (shorten-pair . (0.0 . -0.6)) -- 2.39.5