From: hanwen Date: Fri, 8 Jul 2005 18:08:24 +0000 (+0000) Subject: * lily/include/dots.hh (class Dots): make has_interface() static. X-Git-Tag: release/2.7.2~70 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=41f70dd526d83114c135a1a2d2e3f13a513a127e;p=lilypond.git * lily/include/dots.hh (class Dots): make has_interface() static. * python/convertrules.py (conv): add rule for ly:grob-default-font * scm/define-grobs.scm (all-grob-descriptions): reorganize in alphabetical order. * input/regression/trill-spanner-pitched.ly: new file. * scm/define-grobs.scm (Module): new grob TrillPitchHead. * lily/pitched-trill-engraver.cc (acknowledge_grob): new file. --- diff --git a/ChangeLog b/ChangeLog index a3180e29d6..42e6cee7cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2005-07-08 Han-Wen Nienhuys + * lily/include/dots.hh (class Dots): make has_interface() static. + + * python/convertrules.py (conv): add rule for ly:grob-default-font + * scm/define-grobs.scm (all-grob-descriptions): reorganize in alphabetical order. diff --git a/Documentation/topdocs/NEWS.tely b/Documentation/topdocs/NEWS.tely index a8310b92fb..5f862f7db8 100644 --- a/Documentation/topdocs/NEWS.tely +++ b/Documentation/topdocs/NEWS.tely @@ -32,6 +32,14 @@ See user manual, \NAME\ @itemize @bullet +@item +Explicit pitches may be added to trills, + +@lilypond[relative,verbatim,fragment] + \pitchedTrill c4\startTrillSpan fis f\stopTrillSpan +@end lilypond + +This feature was sponsored by D. Josiah Boothby and Jamie Bullock @item Markup now supports formatting of text paragraphs, using diff --git a/Documentation/user/advanced-notation.itely b/Documentation/user/advanced-notation.itely index 6d3255042e..fd535ee39f 100644 --- a/Documentation/user/advanced-notation.itely +++ b/Documentation/user/advanced-notation.itely @@ -1422,6 +1422,7 @@ LilyPond is limited. * Clusters:: * Special fermatas:: * Special noteheads:: +* Pitched trills:: * Feathered beams:: * Improvisation:: @end menu diff --git a/THANKS b/THANKS index 1b90cea795..37488a8a4a 100644 --- a/THANKS +++ b/THANKS @@ -16,6 +16,8 @@ Joe Neeman SPONSORS +Jamie Bullock +D. Josiah Boothby Sven Axelsson diff --git a/input/regression/trill-spanner-pitched.ly b/input/regression/trill-spanner-pitched.ly index fe75b1dc88..38d2393f28 100644 --- a/input/regression/trill-spanner-pitched.ly +++ b/input/regression/trill-spanner-pitched.ly @@ -13,5 +13,5 @@ } \relative { - \pitchedTrill c4\startTrillSpan fis f\stopTrillSpan + \pitchedTrill c4.\startTrillSpan fis f\stopTrillSpan } diff --git a/lily/include/dots.hh b/lily/include/dots.hh index a6b1029871..b73c55c07b 100644 --- a/lily/include/dots.hh +++ b/lily/include/dots.hh @@ -16,7 +16,7 @@ class Dots { public: DECLARE_SCHEME_CALLBACK (print, (SCM)); - bool has_interface (Grob *); + static bool has_interface (Grob *); }; #endif // DOTS_HH diff --git a/lily/pitched-trill-engraver.cc b/lily/pitched-trill-engraver.cc index 67c5d83b05..4651a4cc0d 100644 --- a/lily/pitched-trill-engraver.cc +++ b/lily/pitched-trill-engraver.cc @@ -9,6 +9,7 @@ #include "engraver.hh" +#include "dots.hh" #include "group-interface.hh" #include "axis-group-interface.hh" #include "context.hh" @@ -52,7 +53,8 @@ Pitched_trill_engraver::acknowledge_grob (Grob_info info) { Music *mus = info.music_cause (); - if (Note_head::has_interface (info.grob ())) + if (Note_head::has_interface (info.grob ()) + || Dots::has_interface (info.grob ())) { heads_.push (info.grob ()); } @@ -144,6 +146,6 @@ ADD_TRANSLATOR (Pitched_trill_engraver, /* descr */ "Print the bracketed notehead after a notehead with trill.", /* creats*/ "TrillPitchHead TrillPitchAccidental TrillPitchGroup", /* accepts */ "", - /* acks */ "script-interface text-spanner-interface note-head-interface", + /* acks */ "script-interface text-spanner-interface dots-interface note-head-interface", /* reads */ "", /* write */ ""); diff --git a/python/convertrules.py b/python/convertrules.py index da970be7fd..84f5fd3ea6 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -2503,6 +2503,14 @@ conversions.append (((2, 6, 0), conv, 'dummy rule for 2.6')) + +def conv (str): + return re.sub('ly:get-default-font', 'ly:grob-default-font', str) + +conversions.append (((2, 7, 0), conv, + + 'ly:get-default-font -> ly:grob-default-font')) + ################################################################ def str_to_tuple (s): diff --git a/scm/define-grob-interfaces.scm b/scm/define-grob-interfaces.scm index 21dddeb6bc..ffad4afbc1 100644 --- a/scm/define-grob-interfaces.scm +++ b/scm/define-grob-interfaces.scm @@ -10,6 +10,12 @@ +(ly:add-interface + 'pitched-trill-interface + "A note head to indicate trill pitches" + '(accidental-grob) + ) + (ly:add-interface 'dynamic-interface "Any kind of loudness sign" diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 3984c024c2..23ced398cd 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -1332,7 +1332,7 @@ (direction . ,LEFT) (font-size . -4) (print-function . ,Accidental_interface::print) - (meta . ((interfaces . (item-interface font-interface)))) + (meta . ((interfaces . (item-interface side-position-interface font-interface)))) )) (TrillPitchGroup @@ -1342,7 +1342,9 @@ (print-function . ,parenthesize-elements) (direction . ,RIGHT) (padding . 0.3) - (meta . ((interfaces . (font-interface item-interface axis-group-interface)))) + (meta . ((interfaces . (side-position-interface + font-interface accidental-interface + item-interface axis-group-interface)))) )) (TrillPitchHead @@ -1350,7 +1352,9 @@ (duration-log . 2) (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) (font-size . -4) - (meta . ((interfaces . (item-interface font-interface ledgered-interface staff-symbol-referencer-interface)))) + (meta . ((interfaces . (item-interface + font-interface pitched-trill-interface + ledgered-interface staff-symbol-referencer-interface)))) ))