lilypond-user
[Top][All Lists]
Advanced

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

Re: How to create an extra-offset shortcut


From: David Kastrup
Subject: Re: How to create an extra-offset shortcut
Date: Mon, 22 Jul 2013 19:39:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Rachael Thomas Carlson <address@hidden> writes:

> On Mon, 2013-07-22 at 18:18 +0200, David Kastrup wrote:

>> > Here is what I have (which works with integers but not decimals):
>> >
>> > \version "2.16.2"
>> >
>> > mkMove = #(define-music-function
>> >    (parser location x y)
>> >    ( number? number? ) 
>> >    #{ \once \override TextScript #'extra-offset = #(cons x y) 
>> >    #})
>> >
>> > Any ideas?
>> 
>> Should work just fine with decimals.  Decimal numbers don't really have
>> an input syntax in the LilyPond language proper (not while in music
>> entry mode), so you'll need to escape into Scheme for entering them:
>> 
>> \mkMove #2.3 #-4.5
>> 
> Hello:  Perfect!  I missed the pound signs fixed this.

Well, either that or
<URL:http://code.google.com/p/lilypond/issues/detail?id=3471>.

> How would you do this using a tweak function for extra-offset?

With an additional argument "music" of type ly:music? and writing

#{ \tweak #'extra-offset #(cons x y) #music #}

inside I should guess.

-- 
David Kastrup




reply via email to

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