|
From: | Urs Liska |
Subject: | Re: Flat slurs |
Date: | Tue, 14 Feb 2017 10:09:39 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 |
Hi Abraham, Am 13.02.2017 um 23:49 schrieb Abraham
Lee:
Thanks for this. I hope to find the time to inspect it more closely. Interestingly (and unfortunately) there seems to be more or less nothing in it that I could simply take over since you followed a completely different approach. But there are interesting ways to interact with the internals that I will want to study to enhance my repertoire. As said, "my" version is a special case for multi-segment slurs, and the approach to get robust flat slurs/ties would rather be writing wrapper functions for these. As a suggestion I wrote an alternative wrapper function (very basic initial version) that you may or may not find interesting: %%%%%%%%% flattenedSlur = #(define-music-function (mod)(ly:context-mod?) (let* ((props (map (lambda (m) (cons (second m) (third m))) (ly:get-context-mods mod))) (start-y (assq-ref props 'start-y)) (left-height (assq-ref props 'left-height)) (left-width (assq-ref props 'left-height)) (right-width (assq-ref props 'right-width)) (right-height (assq-ref props 'right-height)) ) #{ \once \override Slur.stencil = #(flattened-slur start-y left-height left-width right-width right-height) #} )) %%%%%%%%%% which can be used as %%%% \flattenedSlur \with { start-y = 0 left-height = 2 left-width = 4 right-width = 6 right-height = 3.5 } %%%% Initially this seems much more to type, but on the other hand it's much easier to read. And most importantly you can incorporate defaults (e.g. mirroring the height and width arguments if only one is given, or you could add the 'ratio to optionally override its value). |
[Prev in Thread] | Current Thread | [Next in Thread] |