Peter Crighton <[email protected]> writes: > Hello, > > I am working on a Scheme function that improves ties when writing in > rhythmic notation (improvisationOn). Now I have the problem that I > don’t know how many post events a duration might have – my current > function works only for one event (the tie). > Can this function be made more general for an arbitrary number of post > events? And ideally I’d also like it to be expecting either > ly:duration? or ly:music?, since I might also be writing c8~, instead > of 8~. > > > \version "2.19.33" > > tieFixSlash = #(define-music-function (parser location rhythm > tie)(ly:duration? ly:event?) > #{ > \shape #'((0.5 . 0) (0.5 . 0) (0.8 . 0) (0.8 . 0)) Tie > $rhythm $tie > \once \override TieColumn.tie-configuration = #'((2 . 1)) > #}) > > \new Voice \with { > \consists "Pitch_squash_engraver" > } { > \improvisationOn > 8 8 8 \tieFixSlash 8~ 8 8 8 8 | > 8 8 8 \tieFixSlash 8(~ 8 8 8 8) | > }
Sigh. I don't really see much of an option other than accepting 8 and consequently also 8(~ as an expression of type ly:music? (assuming that 8 is not accepted as either number or duration) and then dissembling its 'articulations field. That requires a change in the parser. If you put up a respective request, I'll take a look whether I can implement it in one of the next versions. -- David Kastrup _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
