From: Han-Wen Nienhuys Date: Tue, 22 Aug 2006 00:00:51 +0000 (+0000) Subject: * Documentation/topdocs/NEWS.tely (Top): doc new feature. X-Git-Tag: release/2.10.0-2~366 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=208441f33fca5d70dab94a12a7e708d480c84155;p=lilypond.git * Documentation/topdocs/NEWS.tely (Top): doc new feature. * input/regression/tie-chord-untied.ly: new file. * lily/tie-engraver.cc (acknowledge_note_head): check 'untied property. * scm/define-music-properties.scm (all-music-properties): add 'untied property. --- diff --git a/ChangeLog b/ChangeLog index a478c2616d..31c7ca876b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2006-08-22 Han-Wen Nienhuys + * Documentation/topdocs/NEWS.tely (Top): doc new feature. + + * input/regression/tie-chord-untied.ly: new file. + + * lily/tie-engraver.cc (acknowledge_note_head): check 'untied property. + + * scm/define-music-properties.scm (all-music-properties): add + 'untied property. + * buildscripts/mutopia-index.py (allfiles): look for .ly rather than .ly.txt. (headertext_nopics): sanitize no-examples text. diff --git a/Documentation/topdocs/NEWS.tely b/Documentation/topdocs/NEWS.tely index 3c98cbdd09..a38dc07ef3 100644 --- a/Documentation/topdocs/NEWS.tely +++ b/Documentation/topdocs/NEWS.tely @@ -66,10 +66,19 @@ which scares away people. @end ignore +@item Ties may be switched off for individual notes in tied chords, + +@lilypond[ragged-right,relative,fragment] + ~ < c e g b > +@end lilypond + +This feature was sponsored by Steve Doonan. + @item Lyric extenders now have tunable padding. This feature was sponsored by David Griffel + @item Instrument changes are better supported: names in the margin can be changed half-way during a staff, and cues are printed automatically. diff --git a/input/regression/tie-chord-untied.ly b/input/regression/tie-chord-untied.ly new file mode 100644 index 0000000000..d810cdd5b4 --- /dev/null +++ b/input/regression/tie-chord-untied.ly @@ -0,0 +1,17 @@ + +\header +{ + + texidoc = "With the @code{untied} music function, notes may be + tagged as untied in chords." + +} +\version "2.9.15" + +\paper { + ragged-right = ##t +} + +\relative { + ~ < c e g b > +} diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index 3496686fff..17a6f3fc3a 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -111,6 +111,7 @@ Tie_engraver::acknowledge_note_head (Grob_info i) maybe should check positions too. */ if (right_ev && left_ev + && !to_boolean (left_ev->get_property ("untied")) && ly_is_equal (right_ev->get_property ("pitch"), left_ev->get_property ("pitch"))) { diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index 7aa6dede08..1fb36ffaad 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -362,11 +362,6 @@ pitchedTrill = (display sec-note-events))) main-note)) - - - - - parenthesize = #(define-music-function (parser loc arg) (ly:music?) @@ -571,3 +566,17 @@ tag = #(define-music-function (parser location tag arg) unfoldRepeats = #(define-music-function (parser location music) (ly:music?) (unfold-repeats music)) + +untied = +#(define-music-function (parser location note) (ly:music?) + "Specify that @var{note} should not have ties. " + (set! (ly:music-property note 'untied) #t) + note) + +withMusicProperty = +#(define-music-function (parser location sym val music) (symbol? scheme? ly:music?) + "Set @var{sym} to @var{val} in @var{music}." + + (set! (ly:music-property music sym) val) + music) + diff --git a/scm/define-music-properties.scm b/scm/define-music-properties.scm index dc4bc2c0f7..8e0bab912f 100644 --- a/scm/define-music-properties.scm +++ b/scm/define-music-properties.scm @@ -124,6 +124,6 @@ translation property") (void ,boolean? "If this property is #t, then the music expression is to be discarded by the toplevel music handler.") (what ,symbol? "What to change for auto-change. FIXME, naming") - + (untied ,boolean? "Set for note in chord that should not be tied.") (untransposable ,boolean? "If set, this music is not transposed.") )))