]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/breathing-sign.cc (railtracks): another caesura.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 4 Mar 2003 23:11:57 +0000 (23:11 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 4 Mar 2003 23:11:57 +0000 (23:11 +0000)
* mf/feta-schrift.mf: caesura symbol

ChangeLog
NEWS
input/regression/breathing-sign.ly
lily/breathing-sign.cc
lily/include/breathing-sign.hh
lily/include/molecule.hh
mf/feta-generic.mf
mf/feta-schrift.mf

index 02f39b1ce4d4102614f98f99cf7f40651827d157..330b1a5151315142f8da9b6b72df66b95eec64d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-03-05  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * lily/breathing-sign.cc (railtracks): another caesura.
+
+       * mf/feta-schrift.mf: caesura symbol
+
 2003-03-04  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
        * scripts/convert-ly.py (FatalConversionError.conv): add
diff --git a/NEWS b/NEWS
index 24293eedd0013eedd6f01413c54d643a3ca1fa33..cd0895eedcf5d6d0c87cc7cb3ff1dc111e7d1e0d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -78,6 +78,9 @@ completely modular way.
 
 ** Gregorian ligatures.
 
+** Texts on multi-measure rests.
+
+
 
 New features in 1.6 since 1.4
 
index a0e9a09c9c661b5fd36f242e7e5bd08d79aa0e12..aa8f376ef1685673c733e8b2344efb03557b3453 100644 (file)
@@ -24,8 +24,8 @@ two measures all have the same distance from each other:
 % Change to wedge:
     \property Voice.BreathingSign \override #'text = #"scripts-upbow"
     es8 d es f g8 \breathe f |
-% Revert to old layout:
-    \property Voice.BreathingSign \override #'molecule-callback = #Breathing_sign::brew_molecule
+
+    \property Voice.BreathingSign \set #'text = #"scripts-caesura"
     [es8 d] \breathe [es f g f] |
     es2 r4 \bar "||"
   }
index 730a3f496485574b2a8a33e826708be9de3a506d..63067deff1847cc86749361243101fa268246c5d 100644 (file)
@@ -34,6 +34,30 @@ Breathing_sign::brew_molecule (SCM smob)
   return Lookup::filledbox (b).smobbed_copy ();
 }
 
+/*
+  Simplistic caesura.
+ */
+MAKE_SCHEME_CALLBACK (Breathing_sign,railtracks,1);
+SCM 
+Breathing_sign::railtracks (SCM smob)
+{
+  Grob * me = unsmob_grob (smob);
+  Real space = Staff_symbol_referencer::staff_space (me);
+  Real th = me->get_paper ()->get_var ("linethickness");
+  SCM lt =  me->get_grob_property ("thickness");
+  if (gh_number_p (lt))
+    th *= gh_scm2double (lt);
+  
+  Offset x1 (0, -space);
+  Offset x2 (space / 3, space);
+  Molecule l1 (Lookup::line (th, x1, x2));
+  Molecule l2 (l1);
+  l2.translate_axis (space *0.6 , X_AXIS);
+  l1.add_molecule (l2);
+  return l1.smobbed_copy();
+}
+
+
 MAKE_SCHEME_CALLBACK (Breathing_sign,offset_callback,2);
 SCM
 Breathing_sign::offset_callback (SCM element_smob, SCM)
index 96a99de9922583b277caa71567124167c40efac4..d2ad496ffb93f8dc832baeeeb0d4c7a1187d6eea 100644 (file)
@@ -20,6 +20,7 @@ class Breathing_sign
 {
 public:
   DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (railtracks, (SCM ));
   DECLARE_SCHEME_CALLBACK (offset_callback, (SCM element, SCM axis));
   
   static bool has_interface (Grob*);
index 8397851713f364c6af82ca1173756ab94ba79b83..b25922ac0b38b3af03af856d6b72c6a19f4cb503 100644 (file)
@@ -41,7 +41,7 @@
 */
 class Molecule
 {
-  friend SCM ly_set_molecule_extent_x (SCM, SCM, SCM);
+  friend SCM ly_molecule_set_extent_x (SCM, SCM, SCM);
   
   Box dim_;
   SCM expr_;
index 188f060b7d515c203329e2a32aa1faf89b763680..b00d089e27a34b4cbbbc2c3bd98557c4d399a41b 100644 (file)
@@ -43,8 +43,8 @@ else:
 %      input feta-banier;
 %      input feta-eindelijk;
 %      input feta-klef;
-       input feta-toevallig;
-%      input feta-schrift;
+%      input feta-toevallig;
+       input feta-schrift;
 %      input feta-haak;
 %      input feta-timesig;
 %      input feta-pendaal;
index e5ac069ffac91b47a3b43b14f182bd8755c9f845..0339af08691d07c9b0f6fa023b1c2069ae7083a8 100644 (file)
@@ -857,6 +857,54 @@ fet_endchar;
 % Hmm
 input feta-slag;
 
+% railroad tracks.
+%
+% I actually have no clue how they should look, so we use a slightly curvy  
+% and tapered shape. 
+%
+fet_beginchar("Caesura", "caesura", "caesura");
+  save slant, space_between, clearance;
+  save alpha, p;
+  save botthick, topthick;
+  save krom ;
+
+  path p;
+
+  botthick = 1.5 stafflinethickness;
+  topthick = 2.5 stafflinethickness;
+  pickup pencircle scaled botthick;
+
+
+  slant = 3.5 ;
+  space_between# = 0.6 staff_space#;
+  clearance# = 0.2 staff_space#;
+  height# = 1.2 staff_space#;
+
+  set_char_box(0, 2.0 staff_space#, staff_space# - clearance#, height#);
+  define_pixels (space_between, clearance, height);
+
+  bot y1 = -d;
+  top y2 = h;
+  lft x1 = 0;
+  x2 = (y2 - y1) / slant;
+
+  krom = 10;
+
+  alpha = angle (z2 - z1);
+  penpos1 (botthick, alpha - krom);
+  penpos3 (botthick, alpha - krom + 90);
+
+  penpos2 (topthick, alpha + krom );
+  penpos4 (topthick, alpha + krom + 90);
+  z3 = z1; z4 = z2; 
+  penlabels (1,2,3,4);
+
+  p  := z3r{(z1r - z1l)} .. z4r{z2r-z2l} .. z2r{z4l-z4r} .. z4l{z2l-z2r} .. z3l{z1l-z1r} .. z1l{z3r-z3l} .. cycle;
+  fill p;
+  fill p shifted (space_between , 0);
+
+fet_endchar; 
 
 
 fet_endgroup("scripts");