From 3fd7b0e9eaa4d3450a86153350fe94b1de3d3de8 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 6 May 2006 00:21:04 +0000 Subject: [PATCH] new function featherDurations --- ChangeLog | 2 ++ input/regression/beam-feather.ly | 5 +++++ ly/music-functions-init.ly | 8 +++++--- 3 files changed, 12 insertions(+), 3 deletions(-) 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))) -- 2.39.5