lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Combining \markup and \override in a variable


From: Thomas Morley
Subject: Re: Combining \markup and \override in a variable
Date: Fri, 18 Nov 2016 21:40:34 +0100

2016-11-18 20:36 GMT+01:00 David Sumbler <address@hidden>:
> I have a bar which contains 3 notes, e.g.
>
> fs4 ds as' |
>
> It comes after a passage which is pizzicato, but the 2nd and 3rd notes
> of this bar need to be arco.  However, a normal "arco" marking over the
> d sharp does not make it sufficiently clear that that is what is
> intended: particularly because of some earlier passages, a player might
> easily think that the arco applies only to the 3rd note.
>
> So I have a marking
>
> larco = \markup { \larger \italic "┌ arco" }
>
> The extra character is intended to make it clear that the 2nd note of
> the bar has to be played arco.  In order to do that, the mark needs to
> be moved to the left so that the little bracket clearly includes the
> note, rather than pointing directly to it.
>
> So that bar is now
>
> fs4 \once \override TextScript.self-alignment-X = #-0.6 ds^\larco as' |
>
> This works well.
>
> My question is this: is there some way to include the position override
> or a tweak within the definition of "larco", so that I don't have to
> add it separately every time I use the marking?
>
> I have tried a number of experiments with this, but so far I haven't
> figured out how to get it to work.
>
> David
>



Hi David,

there are many possibilities, here two of them

larco = \tweak self-alignment-X  #-0.6 -\markup { \larger \italic "┌ arco" }

{
  f4 d^\larco a'
}

larcoII = \markup { \translate #'(-0.8 . 0) \larger \italic "┌ arco" }

{
  f4 d^\larcoII a'
}

Both could be turned into a function with argument(s) for the amount
of moving and the markup itself.
Probably even an automagically procedure could be set up to take the
extent of the NoteColumn into account, which is ofcourse variable,
with respect to suspended NoteHeads and Accidentals.

Cheers,
  Harm

P.S. Please post always a minimal and _compilable_ example, including
the LilyPond-version you use.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]