]> git.donarmstrong.com Git - lilypond.git/commitdiff
2002-07-31 Rune Zedeler <rune@zedeler.dk>
authorRune Zedeler <rune@lilypond.org>
Wed, 31 Jul 2002 06:42:48 +0000 (06:42 +0000)
committerRune Zedeler <rune@lilypond.org>
Wed, 31 Jul 2002 06:42:48 +0000 (06:42 +0000)
* ly/engraver-init.ly: remove alias "Current" from all contexts.

* lily/translator-group (find_existing_translator): If
n=="Current", return this context.

* lily/rest.cc:
* lily/time-signature.cc: spacing for even number of staff lines.

ChangeLog
lily/rest.cc
lily/time-signature.cc
lily/translator-group.cc
ly/engraver-init.ly

index d22ce13402b212a701a6eaba6f2fd3e220a54ab6..bae70b349afba301da3f96c2d1cb21a51383e9ba 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2002-07-31  Rune Zedeler <rune@zedeler.dk>
+
+       * ly/engraver-init.ly: remove alias "Current" from all contexts.
+
+       * lily/translator-group (find_existing_translator): If
+       n=="Current", return this context.
+       
+       * lily/rest.cc:
+       * lily/time-signature.cc: spacing for even number of staff lines.
+       
 2002-07-31  Han-Wen  <hanwen@cs.uu.nl>
 
        * input/bugs/: remove various files.
@@ -14,6 +24,9 @@
        * ly/property-init.ly: Use "Current" context in the accidental
        macros. TODO: Do the same in some of the other macros?
        
+       * scm/output-lib.scm (tablature-stem-attachment-function): add
+       duration argument. Now the function can be called again :-)
+
 2002-07-30  Han-Wen  <hanwen@cs.uu.nl>
 
        * lily/parse-scm.cc (parse_handler): add better error message,
index 7375e107f5f4e195ba9301f0d3102a44929c5776..9cdd9078c71148974e9852771f5105dd42209192 100644 (file)
@@ -21,9 +21,18 @@ Rest::after_line_breaking (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
   int bt = gh_scm2int (me->get_grob_property ("duration-log"));
-  if (bt == 0 && Staff_symbol_referencer::line_count (me) > 1)
+  int lc = Staff_symbol_referencer::line_count (me);
+  Real ss = Staff_symbol_referencer::staff_space (me);
+  if(lc % 2)
     {
-      me->translate_axis (Staff_symbol_referencer::staff_space (me) , Y_AXIS);
+      if (bt == 0 && lc > 1)
+       {
+         me->translate_axis (ss , Y_AXIS);
+       }
+    }
+  else
+    {
+      me->translate_axis (ss/2 , Y_AXIS);
     }
 
   Grob * d = unsmob_grob (me->get_grob_property ("dot"));
@@ -93,7 +102,7 @@ Rest::brew_internal_molecule (SCM smob)
     Molecule res = Font_interface::get_default_font (me)->find_by_name (idx);
     if(res.empty_b() && style!="")
       style="";
-    else             
+    else
       return res.smobbed_copy();
   }
 }
index ef04a4f33619a13d6b48a60eba7177db96a3f240..d3f496b6113a04da022acd936dd4e81d64a8c5e8 100644 (file)
@@ -14,6 +14,7 @@
 #include "paper-def.hh"
 #include "font-interface.hh"
 #include "warn.hh"
+#include "staff-symbol-referencer.hh"
 
 MAKE_SCHEME_CALLBACK (Time_signature,brew_molecule,1);
 /*
@@ -33,21 +34,26 @@ Time_signature::brew_molecule (SCM smob)
       d = gh_scm2int (ly_cdr (frac));
     }
 
-  
+  Molecule m;
   if (gh_symbol_p (st))
     {
       String style (ly_scm2string (scm_symbol_to_string (st)));
       if (style[0]=='1')
        {
-         return time_signature (me, n, 0).smobbed_copy ();
+         m = time_signature (me, n, 0);
        }
       else
        {
-         return special_time_signature (me, style, n, d).smobbed_copy ();
+         m = special_time_signature (me, style, n, d);
        }
     }
   else
-    return time_signature (me, n,d).smobbed_copy ();
+    m = time_signature (me, n,d);
+
+  if (Staff_symbol_referencer::line_count (me) % 2 == 0)
+    m.translate_axis (Staff_symbol_referencer::staff_space (me)/2 , Y_AXIS);
+
+  return m.smobbed_copy ();
 }
 
 Molecule
index 8a1e58d746014946b35a36cfa9d63c9c9e4bfa66..629d75c6f88b08df3f6b6d9f497fb1b5f5453f98 100644 (file)
@@ -106,7 +106,7 @@ Translator_group::removable_b () const
 Translator_group *
 Translator_group::find_existing_translator (String n, String id)
 {
-  if (is_alias_b (n) && (id_string_ == id || id.empty_b ()))
+  if ((is_alias_b (n) && (id_string_ == id || id.empty_b ())) || n == "Current")
     return this;
 
   Translator_group* r = 0;
index 3cee9a56ebad19d98032ea96969cd37cbd9ffdcb..6ef0c1e5398b7a72c8e802eb4051ee7f740734a7 100644 (file)
@@ -34,7 +34,6 @@ StaffContext=\translator {
        \consists "Forbid_line_break_engraver"
        \consistsend "Axis_group_engraver"
 
-
        minimumVerticalExtent = #'(-6 . 6)
        extraVerticalExtent = ##f
        verticalExtent = ##f 
@@ -48,7 +47,6 @@ StaffContext=\translator {
        instr = ##f
          
        \accepts "Voice"
-       \alias "Current"
 }
 
 
@@ -62,7 +60,6 @@ StaffContainerContext = \translator {
 
        \accepts Staff
        \name StaffContainer
-       \alias "Current"
 }
 
 InnerChoirStaffContext = \translator {
@@ -79,7 +76,6 @@ InnerChoirStaffContext = \translator {
        \accepts "PianoStaff"
        \accepts "Lyrics"
        \accepts "ChordNames"
-       \alias "Current"
 }
 ChoirStaffContext = \translator {
        \InnerChoirStaffContext
@@ -121,7 +117,6 @@ RhythmicStaffContext=\translator{
        \consists "Instrument_name_engraver"
        \consistsend "Axis_group_engraver"
        \accepts "Voice"
-       \alias "Current"
 }
 
 
@@ -172,7 +167,6 @@ VoiceContext = \translator {
 
        \consists "Skip_req_swallow_translator"
        \accepts Thread % bug if you leave out this!
-       \alias "Current"
 }
 
 ThreadContext = \translator{
@@ -187,7 +181,6 @@ ThreadContext = \translator{
        \consists "Note_head_line_engraver"
        \consists "Output_property_engraver"    
 
-       \alias "Current"
 }
 
 
@@ -202,7 +195,6 @@ GrandStaffContext=\translator{
        systemStartDelimiter = #'SystemStartBrace
 
        \accepts "Staff"
-       \alias "Current"
 }
 
 PianoStaffContext = \translator{
@@ -241,7 +233,6 @@ InnerStaffGroupContext= \translator {
        \accepts "TabStaff"     
        \accepts "Lyrics"
        \accepts "ChordNames"
-       \alias "Current"
 }
 StaffGroupContext = \translator {
        \InnerStaffGroupContext
@@ -269,7 +260,6 @@ LyricsVoiceContext= \translator{
        \consists "Skip_req_swallow_translator"
        phrasingPunctuation = #".,:!?\""
        
-       \alias "Current"
 }
 NoteNamesContext = \translator {
        \type "Engraver_group_engraver"
@@ -283,7 +273,6 @@ NoteNamesContext = \translator {
        
        \consists "Note_name_engraver"
        \consists "Separating_line_group_engraver"
-       \alias "Current"
 }
 
 LyricsContext = \translator {
@@ -298,7 +287,6 @@ LyricsContext = \translator {
        verticalExtent = ##f 
        
        \accepts "LyricsVoice"
-       \alias "Current"
 }
 
 
@@ -317,7 +305,6 @@ ChordNamesContext = \translator {
        minimumVerticalExtent = ##f
        extraVerticalExtent = ##f
        verticalExtent = ##f 
-       \alias "Current"
 }
 
 
@@ -326,7 +313,6 @@ StupidScore = \translator {
        \type "Score_engraver"
        \name Score
        \consists "Note_heads_engraver"
-       \alias "Current"
 }
 
 
@@ -445,7 +431,6 @@ ScoreContext = \translator {
        barCheckSynchronize = ##t
 
        \grobdescriptions #all-grob-descriptions
-       \alias "Current"
 }
 
 OrchestralScoreContext= \translator {
@@ -459,7 +444,6 @@ EasyNotation =  \translator {
 % retain for compatibility reasons (FIXME: convert-ly)
 GraceContext = \translator {
        \type "Engraver_group_engraver"
-       \alias "Current"
 }
 
 FiguredBassContext = \translator {
@@ -467,7 +451,6 @@ FiguredBassContext = \translator {
        \name FiguredBass 
        \consists "Figured_bass_engraver"       
        \consistsend "Axis_group_engraver"
-       \alias "Current"
 }