]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.94.jcn2
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 10 Oct 2000 13:50:19 +0000 (15:50 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 10 Oct 2000 13:50:19 +0000 (15:50 +0200)
1.3.94.jcn2
===========

* Made some fixes to les-nereides.

* Fixed output-property (Dankje).

CHANGES
VERSION
input/bugs/assigned-output-property.ly [new file with mode: 0644]
input/bugs/generic-output-property.ly
input/les-nereides.ly
lily/include/output-property-music-iterator.hh [new file with mode: 0644]
lily/music-iterator.cc
lily/output-property-music-iterator.cc [new file with mode: 0644]
lily/parser.yy
scm/lily.scm

diff --git a/CHANGES b/CHANGES
index 6c8d88a90e39d3dee38946d63464678f97db4b63..20a6304c987ba038ad98cabd6ad6bc1ee4cd4d99 100644 (file)
--- 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 b7cebea8a56864185a6712432e4414f4587c277b..4892ecff8c89b6b795d4d90c0e1646d23fa19c6d 100644 (file)
--- 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 (file)
index 0000000..5805f37
--- /dev/null
@@ -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";
+       }
+    }
+}
index 5adbba97c8eb437a5ad5cc0ef566284c31381bba..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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";
-       }
-}
-}
index 4c4500e90d64db3ffc601fd7ac405690c7a0317b..59a1cc1a746463ab731cdf52cb1e734edd824201 100644 (file)
@@ -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
 
-    <e2 g, e d>
+    \property Voice.NoteColumn \push #'force-hshift = #-0.2
+    <e2 gis, e d>
     %r8 cis4. d4 [<cis8-5-4( e,-1> <b-3 d,-1> |
-    r8 cis4. d4 [<cis8( e,> <b-3 d,-1> |
-    <)a-2 cis,-1>] cis4. d4 [<cis8( e,> <b d,> |
+    r8 cis4. d4
+    \property Voice.NoteColumn \pop #'force-hshift
+    [<cis8( e,> <b-3 d,-1> |
+    \property Voice.NoteColumn \push #'force-hshift = #-0.2
+    <)a-2 cis,-1>] cis4. d4 
+    \property Voice.NoteColumn \pop #'force-hshift
+    [<cis8( e,> <b d,> |
     <)a cis,>]
 }
 
@@ -151,6 +165,7 @@ bass = \context Voice=bass \notes\relative c{
     \property Voice.Stem \push #'length = #5
     <a4 a,>
     \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 (file)
index 0000000..6728324
--- /dev/null
@@ -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 <janneke@gnu.org>
+ */
+
+#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 */
+
index 8c3c2fe3a68822abbf0aa33f859717a69d9f24c2..c6020272fdc88a43ede624826e924d19f907bdf8 100644 (file)
@@ -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<Auto_change_music *> (m))
     p = new Auto_change_iterator;
+  else if (dynamic_cast<Output_property *> (m))
+    p = new Output_property_music_iterator;
   else if (dynamic_cast<Part_combine_music *> (m))
     p = new Part_combine_music_iterator;
   else if (dynamic_cast<Music_wrapper   *> (m))
diff --git a/lily/output-property-music-iterator.cc b/lily/output-property-music-iterator.cc
new file mode 100644 (file)
index 0000000..f2376b6
--- /dev/null
@@ -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 <janneke@gnu.org>
+ */
+
+#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);
+}
index 70b04f76806bb37c8af128a4c44b07880e05f489..701f5c363b24a1e0556a33739b63722257c24907 100644 (file)
@@ -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      {
index d15c8bd11aabd0fb6fe60eca55886c002d6a0970..d9a951c9f7a2142d618613a163c1eea254e98633 100644 (file)
 ; 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))))
     ))