From: hanwen Date: Sat, 6 May 2006 00:21:04 +0000 (+0000) Subject: new function featherDurations X-Git-Tag: release/2.8.2~9^2~7 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ed7f568b5ece865ac7573cdf4433bdf1d4933b45;p=lilypond.git new function featherDurations --- diff --git a/ChangeLog b/ChangeLog index 8993bbb6e5..a6931c8a04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2006-05-06 Han-Wen Nienhuys + * ly/music-functions-init.ly: new function featherDurations + * lily/beam.cc: read grow-direction for feathered beaming. * Documentation/topdocs/NEWS.tely (Top): typo. diff --git a/input/regression/beam-feather.ly b/input/regression/beam-feather.ly index 0d541df622..2145764a57 100644 --- a/input/regression/beam-feather.ly +++ b/input/regression/beam-feather.ly @@ -13,6 +13,11 @@ indent = #0.0 } +% +% Unfortunately this quickly bumps into overflow problems. Should use +% a linear decrease instead? +% + \featherDurations #(ly:make-moment 3 4) \relative c'' { \override Beam #'grow-direction = #LEFT c16[ diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index a7818e7e45..16ac73ef72 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -442,10 +442,13 @@ parenthesize = featherDurations= #(define-music-function (parser location factor argument) (ly:moment? ly:music?) + + "Rearrange durations in ARGUMENT so there is an +acceleration/deceleration. " + (let* ((orig-duration (ly:music-length argument)) - (multiplier (ly:make-moment 1 1)) - ) + (multiplier (ly:make-moment 1 1))) (music-map (lambda (mus) @@ -458,7 +461,6 @@ featherDurations= mus) argument) - (display (list (ly:music-length argument) orig-duration)) (ly:music-compress argument (ly:moment-div orig-duration (ly:music-length argument)))