From: Jan Nieuwenhuizen Date: Tue, 10 Oct 2000 13:50:19 +0000 (+0200) Subject: patch::: 1.3.94.jcn2 X-Git-Tag: release/1.3.95~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=98781dd292bb9bc43ca766adb85fb388b886a061;p=lilypond.git patch::: 1.3.94.jcn2 1.3.94.jcn2 =========== * Made some fixes to les-nereides. * Fixed output-property (Dankje). --- diff --git a/CHANGES b/CHANGES index 6c8d88a90e..20a6304c98 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,10 @@ +1.3.94.jcn2 +=========== + +* Made some fixes to les-nereides. + +* Fixed output-property (Dankje). + 1.3.94.jcn1 =========== diff --git a/VERSION b/VERSION index b7cebea8a5..4892ecff8c 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=94 -MY_PATCH_LEVEL=jcn1 +MY_PATCH_LEVEL=jcn2 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/bugs/assigned-output-property.ly b/input/bugs/assigned-output-property.ly new file mode 100644 index 0000000000..5805f3728a --- /dev/null +++ b/input/bugs/assigned-output-property.ly @@ -0,0 +1,30 @@ + +% +% Using music-variable breaks output property +% + +foo = \notes\relative c''{ + \outputproperty #(make-type-checker 'note-head-interface) + #'extra-offset = #'(2 . 3) + c2 + c +} + +\score{ + < + \context Staff=a\notes\relative c''{ + \outputproperty #(make-type-checker 'note-head-interface) + #'extra-offset = #'(2 . 3) + c2 + c + } + \context Staff=b \foo + > + \paper{ + linewidth=-1.0; + \translator { + \ScoreContext + \consists "Mark_engraver"; + } + } +} diff --git a/input/bugs/generic-output-property.ly b/input/bugs/generic-output-property.ly index 5adbba97c8..e69de29bb2 100644 --- a/input/bugs/generic-output-property.ly +++ b/input/bugs/generic-output-property.ly @@ -1,23 +0,0 @@ -\score{ - \notes\relative c''{ - \outputproperty #(make-type-checker 'note-head-interface) - #'extra-offset = #'(2 . 3) - c2 - c - \context Score { - \outputproperty #(make-type-checker 'mark-interface) - #'extra-offset = #'(-1 . 4) - } - \mark A; - d1 - \mark; - e -} -\paper{ - linewidth=-1.0; - \translator { - \ScoreContext - \consists "Mark_engraver"; - } -} -} diff --git a/input/les-nereides.ly b/input/les-nereides.ly index 4c4500e90d..59a1cc1a74 100644 --- a/input/les-nereides.ly +++ b/input/les-nereides.ly @@ -14,6 +14,11 @@ cpp -P -traditional -o l-fake.ly -DFAKE_GRACE les-nereides.ly comment = "LilyPond (1.3.93) can't really do this yet, I guess"; } + +%% cpp: don't start on first column + #(define (grace-beam-space-function multiplicity) + (* (if (<= multiplicity 3) 0.816 0.844) 0.8)) + global = \notes{ \partial 2; \key a \major; @@ -61,6 +66,7 @@ treble = \context Voice=treble \notes\relative c''{ )cis8 \property Grace.Stem \pop #'direction \property Grace.Stem \push #'direction = #0 + \property Grace.Beam \push #'space-function = #grace-beam-space-function %urg, dim. during grace dumps core here %%[a16-5( fis dis] [cis'32 a-1 fis-4 dis] [cis a )fis-2] [a16-5( fis dis] [cis32 a-1 fis-4 dis] [cis a )fis-2] @@ -74,6 +80,7 @@ treble = \context Voice=treble \notes\relative c''{ \property Voice.TextScript \push #'font-size = #-1 \property Voice.Slur \push #'font-size = #-1 \property Voice.LocalKey \push #'font-size = #-1 + \property Voice.Beam \push #'space-function = #grace-beam-space-function )cis16 \property Voice.Stem \pop #'direction @@ -87,6 +94,7 @@ treble = \context Voice=treble \notes\relative c''{ \property Voice.TextScript \pop #'font-size \property Voice.Slur \pop #'font-size \property Voice.LocalKey \pop #'font-size + \property Voice.Beam \pop #'space-function #endif % FAKE_GRACE @@ -101,7 +109,7 @@ treble = \context Voice=treble \notes\relative c''{ trebleTwo = \context Voice=trebleTwo \notes\relative c''{ % Broken? - \property Voice.NoteColumn \push #'horizontal-shift = #-1 + \property Voice.NoteColumn \push #'horizontal-shift = #1 s2 s1*2 s4 @@ -113,10 +121,16 @@ trebleTwo = \context Voice=trebleTwo \notes\relative c''{ s32*16 #endif - + \property Voice.NoteColumn \push #'force-hshift = #-0.2 + %r8 cis4. d4 [ | - r8 cis4. d4 [ | - <)a-2 cis,-1>] cis4. d4 [ | + r8 cis4. d4 + \property Voice.NoteColumn \pop #'force-hshift + [ | + \property Voice.NoteColumn \push #'force-hshift = #-0.2 + <)a-2 cis,-1>] cis4. d4 + \property Voice.NoteColumn \pop #'force-hshift + [ | <)a cis,>] } @@ -151,6 +165,7 @@ bass = \context Voice=bass \notes\relative c{ \property Voice.Stem \push #'length = #5 \translator Staff=treble + \property Voice.Stem \pop #'length \property Voice.Stem \pop #'direction \property Voice.Stem \push #'direction = #-1 <)a' fis cis> @@ -215,6 +230,7 @@ bassTwo = \context Voice=bassTwo \notes\relative c{ \property Voice.Stem \push #'direction = #1 \property Voice.Slur \pop #'direction \property Voice.Slur \push #'direction = #1 + cis'4()bis } @@ -232,6 +248,8 @@ middleDynamics = \context Dynamics=middle \notes{ s32 s-"rall." s s s8 s4 + \outputproperty #(make-type-checker 'dynamic-interface) + #'extra-offset = #'(0 . 10) s1\mf-"a tempo" s8 s8\mf s4 s4 s8\> s32 s s \!s } @@ -281,10 +299,11 @@ lowerDynamics = \context Dynamics=lower \notes{ \treble \trebleTwo > - \context Dynamics=middle < - \global - \middleDynamics - > + %\context Dynamics=middle < + % \global + % \middleDynamics + %> + \middleDynamics \context Staff=bass < \clef bass; \global @@ -304,9 +323,12 @@ lowerDynamics = \context Dynamics=lower \notes{ \translator { \type "Engraver_group_engraver"; \name Dynamics; - Generic_property_list = #generic-lyrics-properties + \consists "Output_property_engraver"; + Generic_property_list = #generic-voice-properties + %Generic_property_list = #generic-lyrics-properties \consists "Property_engraver"; DynamicsMinimumVerticalExtent = #(cons -3 -3) + VerticalAlignment \push #'threshold = #'(8 . 8) startSustain = #"Ped." stopSustain = #"*" @@ -322,6 +344,7 @@ lowerDynamics = \context Dynamics=lower \notes{ %GURGURGU, text is initialised using TextScript TextScript \push #'style = #"italic" TextScript \push #'font-size = #2 + \consists "Skip_req_swallow_translator"; \consistsend "Axis_group_engraver"; @@ -334,10 +357,7 @@ lowerDynamics = \context Dynamics=lower \notes{ \translator { \PianoStaffContext \accepts Dynamics; - % aarg, also separates Dynamics context... - %VerticalAlignment \push #'threshold = #'(12 . 12) - %VerticalAlignment \pop #'threshold - VerticalAlignment \push #'threshold = #'(1 . 10) + VerticalAlignment \push #'threshold = #'(8 . 8) } \translator { \GraceContext diff --git a/lily/include/output-property-music-iterator.hh b/lily/include/output-property-music-iterator.hh new file mode 100644 index 0000000000..6728324d3e --- /dev/null +++ b/lily/include/output-property-music-iterator.hh @@ -0,0 +1,25 @@ +/* + output-property-music-iterator.hh -- declare Output_property_music_iterator + + source file of the GNU LilyPond music typesetter + + (c) 2000 Jan Nieuwenhuizen + */ + +#ifndef OUTPUT_PROPERTY_MUSIC_ITERATOR_HH +#define OUTPUT_PROPERTY_MUSIC_ITERATOR_HH + +#include "simple-music-iterator.hh" + +class Output_property_music_iterator : public Simple_music_iterator +{ +public: + VIRTUAL_COPY_CONS (Music_iterator); + /* construction */ +protected: + virtual void process (Moment); +}; + + +#endif /* OUTPUT_PROPERTY_MUSIC_ITERATOR_HH */ + diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index 8c3c2fe3a6..c6020272fd 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -39,6 +39,7 @@ #include "request.hh" #include "simple-music-iterator.hh" #include "output-property.hh" +#include "output-property-music-iterator.hh" #include "chord-tremolo-iterator.hh" Music_iterator::Music_iterator () @@ -137,6 +138,8 @@ Music_iterator::static_get_iterator_p (Music *m) p = new Grace_iterator; else if (dynamic_cast (m)) p = new Auto_change_iterator; + else if (dynamic_cast (m)) + p = new Output_property_music_iterator; else if (dynamic_cast (m)) p = new Part_combine_music_iterator; else if (dynamic_cast (m)) diff --git a/lily/output-property-music-iterator.cc b/lily/output-property-music-iterator.cc new file mode 100644 index 0000000000..f2376b6b8c --- /dev/null +++ b/lily/output-property-music-iterator.cc @@ -0,0 +1,25 @@ +/* + output-property-music-iterator.cc -- implement Output_property_music_iterator + + source file of the GNU LilyPond music typesetter + + (c) 2000 Jan Nieuwenhuizen + */ + +#include "input.hh" +#include "music-list.hh" +#include "output-property-music-iterator.hh" + +void +Output_property_music_iterator::process (Moment m) +{ + if (last_processed_mom_ < Moment (0)) + { + bool accepted = try_music (music_l_); + if (!accepted) + music_l_->origin ()->warning (_f ("Junking request: `%s'", + classname (music_l_))); + } + + skip (m); +} diff --git a/lily/parser.yy b/lily/parser.yy index 70b04f7680..701f5c363b 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -694,7 +694,9 @@ Simple_music: $$ = new Output_property (pred,$3, $5); } - | MUSIC_IDENTIFIER { $$ = unsmob_music ($1)->clone (); } + | MUSIC_IDENTIFIER { + $$ = unsmob_music ($1)->clone (); + } | property_def | translator_change | Simple_music '*' bare_unsigned '/' bare_unsigned { diff --git a/scm/lily.scm b/scm/lily.scm index d15c8bd11a..d9a951c9f7 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -181,6 +181,8 @@ ; Make a function that checks score element for being of a specific type. (define (make-type-checker symbol) (lambda (elt) + ;;(display symbol) + ;;(eq? #t (ly-get-elt-property elt symbol)) (not (eq? #f (memq symbol (ly-get-elt-property elt 'interfaces)))) ))