lilypond-user
[Top][All Lists]
Advanced

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

Re: How to transpose a custom slur


From: David Nalesnik
Subject: Re: How to transpose a custom slur
Date: Fri, 20 Dec 2013 18:08:29 -0600

Hi Marten,


On Fri, Dec 20, 2013 at 5:12 PM, Marten Visser <address@hidden> wrote:
Hi all,

When transposing a score, how can I make sure that custom slurs will also
get transposed? Is there any way to read out how much the notes in the
score have moved up/down, so that I can use that as a variable in the
custom slur definition?

Please see the example below how a custom slur becomes ugly when
transposing from c to e.

Instead of directly overriding control-points, you could use \shape. which offsets the control points from where they are in the default slur LilyPond would draw.  This is documented here: 
 
http://www.lilypond.org/doc/v2.17/Documentation/notation/modifying-shapes

Note that this documentation is for a later version than you're using.  The syntax for 2.16 was different, and didn't allow for tweaks.

This should work for you:

\version "2.16.2"


myMusic = {

  \shape #'((0 . 0.25) (1.5 . 1) (0 . 1) (0 . 0.5)) Slur 

  bes8.[( c32 bes] as2.)

}


\relative c'' {

  \key c \minor

  \myMusic

}


\transpose c e {

  \relative c'' {

    \key c \minor

    \myMusic

  }

}


%%%%


P.S,  Did you mean to place \transpose where you did and keep the same key signature?


--David



reply via email to

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