Am 21.03.2017 um 12:05 schrieb Malte Meyn: > > Am 21.03.2017 um 11:44 schrieb Malte Meyn: >> Or if you don’t want variants for all \grace variants (i. e. \grace, >> \slashedGrace, \appoggiatura, \acciaccatura, \afterGrace), just make a >> function that takes a music expression and scales it to 1. Maybe this >> could also be nice for cadenza-like things in real time notes (if you >> combine it with \newSpacingSection or a duration argument): >> >> […] > scaleToLength = > #(define-music-function (dur mus) (ly:duration? ly:music?) > (let* ((real-len (ly:music-length mus)) > (mom (ly:duration-length dur)) > (ratio-mom (ly:moment-div mom real-len)) > (ratio (cons (ly:moment-main-numerator ratio-mom) > (ly:moment-main-denominator ratio-mom)))) > #{ > \scaleDurations #ratio #mus > #})) > > % from Chopin’s Nocturne op. 15 No. 2 > \new PianoStaff << > \new Staff \relative { > \time 2/4 > \key fis \major > \teeny > \scaleToLength 2 { > b'8([ ais b) ais( a gis) a( gis a) gis( g fis) g( fis g) > fis\( f e eis fis eis dis( eis fis) ais( gis eis fis dis gis)\)] > } > } > \new Staff \relative { > \clef bass > \key fis \major > << { s8 d4 } \\ { fis,8( d' <gis b> cis,) } >> > }
Cool. We should definitely discuss the proper set of options and include that to LilyPond (or if that's for some reason not desired to openLilyLib). Urs _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user