[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shortening a stem
From: |
David Kastrup |
Subject: |
Re: shortening a stem |
Date: |
Sun, 20 Jan 2013 20:21:58 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Werner LEMBERG <address@hidden> writes:
>>> what must I write to shorten an unbeamed stem by, say, one unit? A
>>> naive approach would be
>>>
>>> \once \override Stem.length #(- ly:stem::calc-length 1)
>>
>> looking for
>>
>> \override Stem.length-fraction = #(magstep -1)
>
> Thanks, but no. I'm interested in shortening the stem by a fixed
> amount, not scaling the whole stem length by a factor.
(define ((stem-reduce amount) grob)
(let ((l (ly:grob-property grob 'length)))
(/ (- l amount) l)))
\override Stem.length-fraction = #(stem-reduce 1)
This is probably slightly absurd (and untested to boot), but it would
likely work.
--
David Kastrup