From: Han-Wen Nienhuys Date: Tue, 4 Mar 2003 23:11:57 +0000 (+0000) Subject: * lily/breathing-sign.cc (railtracks): another caesura. X-Git-Tag: release/1.7.14~13 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5010bff384ba8243dd75dc2b2fcc0be5dc2a14da;p=lilypond.git * lily/breathing-sign.cc (railtracks): another caesura. * mf/feta-schrift.mf: caesura symbol --- diff --git a/ChangeLog b/ChangeLog index 02f39b1ce4..330b1a5151 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-03-05 Han-Wen Nienhuys + + * lily/breathing-sign.cc (railtracks): another caesura. + + * mf/feta-schrift.mf: caesura symbol + 2003-03-04 Han-Wen Nienhuys * scripts/convert-ly.py (FatalConversionError.conv): add diff --git a/NEWS b/NEWS index 24293eedd0..cd0895eedc 100644 --- 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 diff --git a/input/regression/breathing-sign.ly b/input/regression/breathing-sign.ly index a0e9a09c9c..aa8f376ef1 100644 --- a/input/regression/breathing-sign.ly +++ b/input/regression/breathing-sign.ly @@ -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 "||" } diff --git a/lily/breathing-sign.cc b/lily/breathing-sign.cc index 730a3f4964..63067deff1 100644 --- a/lily/breathing-sign.cc +++ b/lily/breathing-sign.cc @@ -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) diff --git a/lily/include/breathing-sign.hh b/lily/include/breathing-sign.hh index 96a99de992..d2ad496ffb 100644 --- a/lily/include/breathing-sign.hh +++ b/lily/include/breathing-sign.hh @@ -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*); diff --git a/lily/include/molecule.hh b/lily/include/molecule.hh index 8397851713..b25922ac0b 100644 --- a/lily/include/molecule.hh +++ b/lily/include/molecule.hh @@ -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_; diff --git a/mf/feta-generic.mf b/mf/feta-generic.mf index 188f060b7d..b00d089e27 100644 --- a/mf/feta-generic.mf +++ b/mf/feta-generic.mf @@ -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; diff --git a/mf/feta-schrift.mf b/mf/feta-schrift.mf index e5ac069ffa..0339af0869 100644 --- a/mf/feta-schrift.mf +++ b/mf/feta-schrift.mf @@ -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");