[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Grace notes with fixed spacing
From: |
Sven Axelsson |
Subject: |
Re: Grace notes with fixed spacing |
Date: |
Wed, 29 Dec 2010 23:05:48 +0100 |
On 29 December 2010 22:20, Xavier Scheuer <address@hidden> wrote:
> On 29 December 2010 18:10, Sven Axelsson <address@hidden> wrote:
>>
>> OK, rtfm:ing and testing a bit further.
>>
>> I created a music function like this:
>>
>> pgrace = #(define-music-function (parser location notes) (ly:music?)
>> #{ \newSpacingSection
>> \override Score.SpacingSpanner #'spacing-increment = #0.9
>> % override Score.SpacingSpanner #'strict-grace-spacing = ##t
>> \grace $notes
>> #}
>> )
>
> Just a hint.
> Instead of defining your own music function you could change the default
> behaviour of grace notes by redefining the variables startGraceMusic,
> stopGraceMusic (defined in the file ly/grace-init.ly ) to include this
> \override within the definition of \grace .
> In this way you can continue using normal \grace command without
> having to call your function every time.
In fact I prefer to have a special function for this, because that
lets me use both normal \grace and special behavior \pgrace in the
same score. In some cases, for instance, I want to be able to remove
all (special) grace notes from the output just by setting a variable,
and that is easy using the \pgrace function.
> BTW I think you should consider Score.GraceSpacing instead of
> Score.SpacingSpanner (just an idea).
> http://lilypond.org/doc/v2.13/Documentation/internals/gracespacing
Considered, tested, and working! Using \override Score.GraceSpacing
#'spacing-increment = #0 gives exactly the output I want. Thank you
for that.
It appears like the value of spacing-increment is multiplied with the
spring value from the layout routine, so using zero, or a small value
(up to 0.25 seems to work) will make the grace note group in effect
unstretchable. This is great, but I would not have guessed it worked
that way just from reading the manual.
> Hope that helps.
It did indeed.
--
Sven Axelsson
++++++++++[>++++++++++>+++++++++++>++++++++++>++++++
>++++<<<<<-]>++++.+.++++.>+++++.>+.<<-.>>+.>++++.<<.
+++.>-.<<++.>>----.<++.>>>++++++.<<<<.>>++++.<----.
- Grace notes with fixed spacing, Sven Axelsson, 2010/12/29
- RE: Grace notes with fixed spacing, James Lowe, 2010/12/29
- RE: Grace notes with fixed spacing, James Lowe, 2010/12/29
- Re: Grace notes with fixed spacing, Phil Holmes, 2010/12/29
- Re: Grace notes with fixed spacing, Xavier Scheuer, 2010/12/29
- Re: Grace notes with fixed spacing,
Sven Axelsson <=
- RE: Grace notes with fixed spacing, James Lowe, 2010/12/30
- Re: Grace notes with fixed spacing, Sven Axelsson, 2010/12/30
- Re: Grace notes with fixed spacing, Phil Holmes, 2010/12/30
- Re: Grace notes with fixed spacing, Sven Axelsson, 2010/12/30
- Re: Grace notes with fixed spacing, Xavier Scheuer, 2010/12/30
- Re: Grace notes with fixed spacing, Sven Axelsson, 2010/12/30
- Re: Grace notes with fixed spacing, Phil Holmes, 2010/12/30