lilypond-user
[Top][All Lists]
Advanced

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

Re: Custom caesura command


From: David Kastrup
Subject: Re: Custom caesura command
Date: Fri, 07 Feb 2014 07:23:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Paul Scott <address@hidden> writes:

> On Wed, Feb 05, 2014 at 09:17:53PM -0800, Matthew wrote:
>> Not wanting to type a long \override command in every staff I want a 
>> caesura, I
>> tried defining a command to shorten things for me :) . This is what I've 
>> tried
>> so far:
>> 
>> caesura = {
>>   \override BreathingSign.text = \markup { \musicglyph 
>> #"scripts.caesura.straight" }
>>   \breathe
>>   \override BreathingSign.text = \markup { \musicglyph #"scripts.rcomma" }
>> }
>> 
>> As you might guess, it doesn't work. Specifically, the breathe mark that 
>> appears
>> is an rcomma, which also happens when I inline this. I guess this is because 
>> I
>> need another note to appear before the next override. It works if I remove 
>> the
>> rcomma override, though I'd like to "un-override" BreathingSign.text within 
>> the
>> command.
>> 
>> My question is, is there a way to accomplish this? Some way to make that 
>> command
>> there take the next note as a parameter? I realize I could come up with an
>> \uncaesura command, though I'd rather keep this to one command if possible. I
>> wouldn't be surprised if a proper Scheme function will be needed to this,
>> actually.
>
> Here's what I use:
>
> caesuraOn = \override BreathingSign #'text = 
> #(make-musicglyph-markup "scripts.caesura.straight") 
>
> caesuraOff = \revert BreathingSign #'text 
> caesura = { \once \caesuraOn \revert BreathingSign #'Y-offset \breathe }
> breath  = { \caesuraOff \override BreathingSign #'Y-offset = #5 \breathe }
>
> I then use \caesura or \breath where I need them.

That's rather awful code.  \override/\revert are not really working all
too well for single canned commands like that.

I'd rather use something like

caesura =
\tweak #'text #(make-musicglyph-markup "scripts.caesura.straight")
\tweak #'Y-offset #0 \breathe

{ c'\caesura d' e' f' }


-- 
David Kastrup



reply via email to

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