[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Moving a single note (optical spacing once more)
From: |
Urs Liska |
Subject: |
Re: Moving a single note (optical spacing once more) |
Date: |
Wed, 9 Dec 2015 21:59:07 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
Am 09.12.2015 um 20:37 schrieb Simon Albrecht:
> On 09.12.2015 17:07, Kieren MacMillan wrote:
>> Hi Urs,
>>
>>> It is surprising that LilyPond makes it that hard to move a
>>> single note that doesn't have any dependencies …
>> Is this maybe a case where #'extra-offset is your [current] best option?
>
> It’s possible to wrap into a music function to deal with note head,
> stem, flag, accidental, but the beam won’t move along. That’s the
> complication.
Indeed.
By now I got a suggestion that brings me much farther (thanks, Janek!):
\once \override Staff.NoteColumn.X-offset = #-0.5
Interestingly this will not affect the same noteColumn in the other
staves but the *next* one. This can be avoided by overriding
Score.NoteColumn *after* the note:
Still a bit awkward, but I could wrap this in a sufficiently convenient
function:
\version "2.19.32"
shiftLocal =
#(define-music-function (offset mus)((number?) ly:music?)
(let ((off (or offset -0.25)))
#{
\once \override Staff.NoteColumn.X-offset = #off
#mus
\once \override Score.NoteColumn.X-offset = #(* -1 off)
#}))
<<
\relative c'' {
a8 a a
\shiftLocal a
a a \shiftLocal #-1 a a
}
\relative c'' { a8 a a a a a a a }
>>
Best
Urs
>
> Yours, Simon