[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: startGraceMusic
From: |
Simon Albrecht |
Subject: |
Re: startGraceMusic |
Date: |
Wed, 13 Jan 2016 09:16:53 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
On 13.01.2016 07:27, Andrew Bernard wrote:
There are startGraceMusic and stopGraceMusic functions that are
helpful for adjusting the appearance of grace notes. Are there
startAfterGraceMusic etc functions for \afterGrace? Currently I have
to manually adjust afterGrace notes to be the same as that in the
startGraceMusic function I have. Works fine, but it is tedious and
error prone.
\afterGrace is a music function, defined in ly/music-functions-init.ly
as follows:
%% keep these two together
afterGraceFraction = #(cons 6 8)
afterGrace =
#(define-music-function (main grace) (ly:music? ly:music?)
(_i "Create @var{grace} note(s) after a @var{main} music expression.")
(let ((main-length (ly:music-length main))
(fraction (ly:parser-lookup 'afterGraceFraction)))
(make-simultaneous-music
(list
main
(make-sequential-music
(list
(make-music 'SkipMusic
'duration (ly:make-duration
0 0
(* (ly:moment-main-numerator main-length)
(car fraction))
(* (ly:moment-main-denominator main-length)
(cdr fraction))))
(make-music 'GraceMusic
'element grace)))))))
Just adjust to taste and redefine it.
Best, Simon
- startGraceMusic, Andrew Bernard, 2016/01/13
- Re: startGraceMusic,
Simon Albrecht <=