]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/test/staff-container.ly: update file
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 17 Jul 2003 14:52:02 +0000 (14:52 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 17 Jul 2003 14:52:02 +0000 (14:52 +0000)
* input/test/stem.ly: remove

* lily/event.cc (LY_DEFINE): add ly: prefix.

16 files changed:
ChangeLog
input/test/staff-bracket.ly
input/test/staff-container.ly
input/test/staff-size.ly
input/test/stem.ly [deleted file]
input/test/time.ly
input/test/timing.ly
input/test/trills.ly
input/test/vertical-extent.ly
lily/event.cc
lily/include/event.hh
lily/key-performer.cc
lily/music-iterator.cc
lily/sequential-iterator.cc
scm/define-music-types.scm
scm/music-functions.scm

index 0feb5c81f20de56334e95f066d49012c5a805e48..5a53f5dd0ba4fde417c729473c1d67e09eb51f72 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2003-07-17  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
+       * input/test/staff-container.ly: update file
+
+       * input/test/stem.ly: remove
+
+       * lily/event.cc (LY_DEFINE): add ly: prefix.
+
        * input/test/clef-manual-control.ly: from manual-clef
 
        * input/test/repeat-shorter-bracket.ly: move from coda-kludge 
index 015c1cb85f114276c33886a7cd0e91bb147504b2..b8db965e8908a44f9fcb24f63238a82257720d91 100644 (file)
@@ -6,26 +6,21 @@ Here's an example of staff brackets. "
 
 \score
 {
-  \context StaffGroup = a < 
-    % this is broken until further notice -- see refman
-    % \property Staff.StaffSymbol \override #'line-count = #4
-    \context Staff \outputproperty #(make-type-checker 'staff-symbol-interface)
-      #'line-count = #4
-    \context PianoStaff = b <
-      \context Staff = "c" \notes\relative c'' { b1 }
-      \context Staff = "d" \notes\relative c'' { b1 }
-    >
+  \context StaffGroup = "a" \notes \relative c'' <
+      \context Staff = "a" {  b1 }
+    \context PianoStaff = "b" <
+      \context Staff = "c" \notes { b1 }
+      \context Staff = "d" \notes { b1 }
+    > 
   >
 
   \paper {
-       indent=100.0\mm
-       linewidth=150.0\mm
     \translator
     {
       \StaffContext
       \consists Instrument_name_engraver
     }
-       raggedright=##t
+    raggedright=##t
   }
 }
 
index acd307e6b80bf3c8d4eeb7482fe819569c7d81c2..4c4f628b7f1b00a603c8000afe20985bf9ef48d7 100644 (file)
@@ -1,18 +1,43 @@
 \version "1.7.18"
 
-\header { texidoc = "@cindex Staff Container
-By splitting the grouping (Axis_group_engraver) and
-creation functionality into separate contexts, you can override
-interesting things. You can also drop the \consistsend feature. "
-}
+\header {
+
+    texidoc = "
+
+Container By splitting the grouping (Axis_group_engraver) and creation
+functionality into separate contexts, you can override interesting
+things.
+
+Notation like this is used in modern scores. Note that Lilypond is not
+especially prepared for it: the clefs and time-signatures don't do
+what you would expect.
+
+    "
+
+      }
 
 
+
+%% 
+%% s4 would create a staff.
+%%
+quarterSkip = #(make-nonevent-skip (ly:make-duration 2 0))
+
 \score  {
- \notes <
-       \context StaffContainer = SA { \property StaffContainer.StaffSymbol \set
-         #'staff-space = #0.8
-         \context Staff {        c4 c4 } }
-       \context StaffContainer =SB { \context Staff { d f  } }
+ \notes \relative c'' <
+       \context StaffContainer = SA {
+
+           %% need < >, otherwise we descend to the voice inside SA  
+           < \context Staff = SA { c4 c4 } >
+           \quarterSkip
+           
+           < \context Staff = SB { b4 b4 } > 
+       }
+       \context StaffContainer =SB {
+           \quarterSkip
+           < \context Staff { e d f } >
+           \quarterSkip
+       }
  >
 
 \paper {
@@ -23,14 +48,18 @@ interesting things. You can also drop the \consistsend feature. "
        }
        \translator {
                \type Engraver_group_engraver
-               \consists "Axis_group_engraver"
+               \consists Clef_engraver
+               \consists Time_signature_engraver
+               \consistsend "Axis_group_engraver"
                \accepts "Staff"
+               
                \name StaffContainer
-
        }
        \translator {
                \StaffContext
                \remove Axis_group_engraver
+               \remove Clef_engraver
+               \remove Time_signature_engraver
        }
        raggedright=##t
 }
index c36f1a923886f40d2d4a188dbead87f3f495c48c..05d7cde1b1dd52777dcec3d6e9784c0553deded2 100644 (file)
@@ -1,9 +1,11 @@
 \version "1.7.18"
 
 \header { texidoc = "@cindex Staff Size
-Setting staff sizes is a little clumsy.  There
-are two options: using StaffContainer and override/revert, or
-\outputproperty. Both methods are shown in this example. "
+
+Setting staff sizes is a little clumsy.  There are two options: using
+@code{StaffContainer} and override/revert, or
+@code{\outputproperty}. Both methods are shown in this example. "
+
 }
 
 \score {
@@ -19,7 +21,7 @@ are two options: using StaffContainer and override/revert, or
        c8 d  e-[ f g a] b c -\ff
   }
 
-\context Staff = SB { \dynamicDown c,,4 -\ff c c c  }
+\context Staff = SB \relative c'' { \dynamicDown c,,4 -\ff c c c  }
 \context Staff = SC {
   \context Staff \outputproperty #(make-type-checker 'staff-symbol-interface)
     #'staff-space =  #0.8
diff --git a/input/test/stem.ly b/input/test/stem.ly
deleted file mode 100644 (file)
index 4e8e7af..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-\version "1.7.18"
-% regression, _so_ regression.  :)  =-gp
-
-\header{ texidoc = "
-This file tests the length of stems and placement 
-of beams"
-}
-
-beamintervals = \notes{
-  \time 7/4
-  \stemUp
-  \transpose c c'{
-    [ c8 d ] [ c e ] [ c f ] [ c g ] [ c a ] [ c b ] [ c c' ] |
-    [ c b, ] [ c a, ] [ c g, ] [ c f, ] [ c e, ] [ c d, ] [ c c, ] |
-  }
-  \transpose c c''{
-    [ c b, ] [ c a, ] [ c g, ] [ c f, ] [ c e, ] [ c d, ] [ c c, ] |
-    \stemDown
-  }
-  \transpose c c'''{
-    [ c b, ] [ c a, ] [ c g, ] [ c f, ] [ c e, ] [ c d, ] [ c c, ] |
-  }
-  \transpose c c''{
-    [ c b, ] [ c a, ] [ c g, ] [ c f, ] [ c e, ] [ c d, ] [ c c, ] |
-    [ c d ] [ c e ] [ c f ] [ c g ] [ c a ] [ c b ] [ c c' ] |
-  }
-}
-
-\score{
-  \notes{
-    \time 19/4
-
-    %% 3.50 (standard) - 0.24 (beam-thickness / 2) = 3.26 ...
-    %% yields beams almost as [Ross] wants them.
-    
-    %% Differences are only half a beam-thickness, probably giving
-    %% Lily's beams a slightly better slope
-    
-    \property Staff.Stem \set #'beamed-lengths = #'(3.26)
-
-    \relative c'{
-      \stemUp
-      g4 a b c d e f g a b c d e f g a b c d
-      \stemDown
-      d c b a g f e d c b a g f e d c b a g
-    }      
-    \beamintervals
-    \transpose c d \beamintervals
-    \transpose c e \beamintervals
-    \transpose c f \beamintervals
-    \transpose c g \beamintervals
-    \transpose c a \beamintervals
-    \transpose c b \beamintervals
-  }
-  \paper{
-    indent = 0.0\mm
-    }
-}
-
-%%% Local variables:
-%%% LilyPond-indent-level:2
-%%% End:
-
index 699a5cf34de4ac0c4bd4a0b24695d0f756311243..90458d854e48b9abbb84d7b284b74233ee47a9d5 100644 (file)
@@ -2,12 +2,8 @@
 % TODO: This file could be old.  Ask about it later.  -gp
 
 \header { texidoc =  "@cindex Time
-IMPORTANT NOTE: The current selection scheme for time signature
-symbols is not flexible enough for future extensions such as various
-flavours of early mensural notation or complex signatures as in
-contemporary music.  Therefore, the semantics of time-signature
-properties will quite definitely change, and maybe the syntax of the
-\time request will possibly be extended. See the input file for TODOs.
+
+Old time signatures. For further information, consult the file. 
     
 "
 }
@@ -30,6 +26,17 @@ style), and "notehead" (which should place a proper notehead to the
 right side of the nominator).  -- jr
 
 
+****************
+
+IMPORTANT NOTE: The current selection scheme for time signature
+symbols is not flexible enough for future extensions such as various
+flavours of early mensural notation or complex signatures as in
+contemporary music.  Therefore, the semantics of time-signature
+properties will quite definitely change, and maybe the syntax of the
+\time request will possibly be extended. See the input file for TODOs.
+
+****************
+
 %}
 
 \score { 
index da749f4243a549b5e4f1e46150953532a0daf6a9..118938056a76ceccb3739e3f2cc819d2dedba3af 100644 (file)
@@ -2,7 +2,9 @@
 % possible rename to bar-something.
 
 \header{ texidoc = "@cindex Bar Length
-You can alter the length of bars in a number of ways. "
+
+You can alter the length of bars by setting
+@code{measureLength} or by resetting @code{measurePosition}. "
 }
 
 \score { 
index 83fd5c7fd2a793f759bf5d74a0ad37f8dec41180..33f869b6fa7175c53e3c04ef2614a5d206f439fb 100644 (file)
@@ -96,7 +96,7 @@ endHorizScript = {
     }
       \context Lyrics=two \lyrics {
        "simple"4
-       "appuy\'e"4.
+       "appuy\\'e"4.
 %{     \skip 1*3
        \skip 4 \skip 4.
        "voix et montant"
index b51a0d91c9d81186f18d9c73ce710e88bf03e3d0..336ae0d8f5600d5bced6ba20b702a97b25b8cab1 100644 (file)
@@ -13,19 +13,16 @@ associated context finishes, so using it in \property works.
     \context Staff = upper {
       \property Staff.verticalExtent = #'(-15.0 . 0.0)
       \clef alto
-      c1 \break c1 
+      c1
     }
     \context Staff = lower {
       \property Staff.verticalExtent = #'(-0.0 . 15.0)
       \clef alto
-      g1 \break g1 
+      g1
     }
   >
   \paper{
-    interscoreline = 13.0\mm
-    interscorelinefill = 0
-    \translator{\ScoreContext \remove "Bar_number_engraver"}
-    \translator{\StaffContext minimumVerticalExtent = #'(-2.0 . 2.0)}
+      raggedright = ##t
   }
 }
 
index fd86b435ef45b9ade9977882fe1433e086647c31..85a94725917cbec2baadb4f806305a481e270355 100644 (file)
@@ -74,7 +74,7 @@ Event::Event ()
 }
 
 ADD_MUSIC(Event);
-LY_DEFINE(music_duration_length, "music-duration-length", 1, 0,0,
+LY_DEFINE(ly_music_duration_length, "ly:music-duration-length", 1, 0,0,
          (SCM mus),
          "Extract the duration field from @var{mus}, and return the length.")
 {
@@ -96,7 +96,7 @@ LY_DEFINE(music_duration_length, "music-duration-length", 1, 0,0,
 }
 
 
-LY_DEFINE(music_duration_compress, "ly:music-duration-compress", 2, 0,0,
+LY_DEFINE(ly_music_duration_compress, "ly:music-duration-compress", 2, 0,0,
          (SCM mus, SCM factor),
          "Extract the duration field from @var{mus}, and compress it.")
 {
@@ -120,7 +120,7 @@ LY_DEFINE(music_duration_compress, "ly:music-duration-compress", 2, 0,0,
 
   TODO: this should use ly:pitch. 
  */
-LY_DEFINE(transpose_key_alist, "ly:transpose-key-alist",
+LY_DEFINE(ly_transpose_key_alist, "ly:transpose-key-alist",
          2, 0,0, (SCM l, SCM pitch),
          "Make a new key alist of @var{l} transposed by pitch @var{pitch}")
 {
@@ -163,7 +163,7 @@ Key_change_ev::transpose (Pitch p)
 {
   SCM pa = get_mus_property ("pitch-alist");
 
-  set_mus_property ("pitch-alist", transpose_key_alist (pa, p.smobbed_copy()));
+  set_mus_property ("pitch-alist", ly_transpose_key_alist (pa, p.smobbed_copy()));
   Pitch tonic = *unsmob_pitch (get_mus_property ("tonic"));
   set_mus_property ("tonic",
                    tonic.smobbed_copy ());
index 1782226e4f30ac7715953314daf31ffc2b3ec89e..47864b2e56dcce2a9af242efe1909ed4b00216ed 100644 (file)
@@ -47,7 +47,7 @@ protected:
   void transpose (Pitch  d);
 };
 
-SCM transpose_key_alist (SCM,SCM);
+SCM ly_transpose_key_alist (SCM,SCM);
 
 
 
index 8ebe88b0ebf3f8256eca9bb43b55e513066719e4..52d5f42e6cd901db1c5fcf62925b6364ccc3d6a8 100644 (file)
@@ -63,7 +63,7 @@ Key_performer::create_audio_elements ()
       my_do = my_do.transposed (to_c);
       to_c = my_do.transposed (Pitch(0,0,- my_do.get_alteration ()));
 
-      SCM c_pitchlist = transpose_key_alist (pitchlist, to_c.smobbed_copy());
+      SCM c_pitchlist = ly_transpose_key_alist (pitchlist, to_c.smobbed_copy());
 
       /*
        MIDI keys are too limited for lilypond scales.
index cdb214167f88a46db117668b0a29846c49555c92..9964be5b7b94f2e0efae799dafb25bc3339c1789 100644 (file)
@@ -9,13 +9,14 @@
 /*
   UGH. too many includes.
  */
+#include <stdio.h>
+
 #include "warn.hh"
 #include "music-iterator.hh"
 #include "translator-group.hh"
 #include "music-wrapper.hh"
 #include "music-wrapper-iterator.hh"
 #include "simple-music-iterator.hh"
-#include "ly-smobs.icc"
 
 #include "ly-smobs.icc"
 
@@ -203,9 +204,13 @@ Music_iterator::mark_smob (SCM smob)
 }
 
 int
-Music_iterator::print_smob (SCM , SCM port, scm_print_state*)
+Music_iterator::print_smob (SCM sm , SCM port, scm_print_state*)
 {
-  scm_puts ("#<Music iterator>", port);
+  char s[1000];
+
+  Music_iterator *iter = unsmob_iterator (sm);
+  sprintf (s, "#<%s>", classname (iter));
+  scm_puts (s, port);
   return 1;
 }
 
index e5ef71e315383419d03601c96baf32d3286d6092..e8812c486ea859b508e435140fd486677f947636 100644 (file)
@@ -252,7 +252,7 @@ Sequential_iterator::descend_to_child ()
 */
 
 SCM
-Sequential_iterator::get_pending_events (Moment until)const
+Sequential_iterator::get_pending_events (Moment until) const
 {
   SCM s = SCM_EOL;
   if (until <  pending_moment ())
index e23324770ca8560d707255c9819ced676e6582a1..546dcca2836232ee5fb4be40a326c5a07fe1d24b 100644 (file)
@@ -498,7 +498,16 @@ For example, transposed music.")
        (internal-class-name . "Event")
        (types . (general-music event))
        ))
-    
+
+    (NonEventSkip
+     . (
+       (description .  "Filler that takes up duration, but does not print anything. This also does not create any event-accepting contexts. ")
+       (internal-class-name . "Music")
+       (length . ,ly:music-duration-length)
+       (iterator-ctor . ,Simple_music_iterator::constructor)
+       (types . (general-music event rhythmic-event skip-event))
+       ))
+     
     (SkipEvent
      . (
        (description .  "Filler that takes up duration, but does not print anything.")
index 2ffc50f9514e76a475d6ec65d5489ab6fbe8f2ed..ac26282fe39885e7f2c532c967042ef09f2f7ed5 100644 (file)
@@ -230,7 +230,14 @@ i.e.  this is not an override"
     m
     ))
 
+(define-public (make-nonevent-skip dur)
+  (let*  ((m (make-music-by-name 'NonEventSkip)))
+    (ly:set-mus-property! m 'duration dur)
+    m
+  ))
+
 ;;;;;;;;;;;;;;;;
+
 ;; mmrest
 (define-public (make-multi-measure-rest duration location)
   (let*