lilypond-user
[Top][All Lists]
Advanced

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

Re: Initialize new grob property


From: Paul
Subject: Re: Initialize new grob property
Date: Thu, 26 Jan 2017 08:11:47 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

On 01/26/2017 03:06 AM, Urs Liska wrote:

I want to do that in the initialization code, without requiring the user
to explicitly put an override somewhere in the music or a \layout.

Any suggestions? TIA

This is how I've done this. Just put it in an include file and the user doesn't need to do anything but include the file.


#(set-object-property! 'myprop 'backend-type? integer?)

\layout {
  \context {
    \Staff
    \override SomeGrob.myprop = 1
  }
}


You may be able to swap out \Score for \Staff if you don't want to restrict it to \Staff.

HTH,
-Paul



reply via email to

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