lilypond-user
[Top][All Lists]
Advanced

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

Re: Determining what parameters exist for an item


From: Kieren MacMillan
Subject: Re: Determining what parameters exist for an item
Date: Sun, 24 Jan 2016 08:20:56 -0500

Hi David,

> \new ChordNames
> \chordmode
> {
>  \applyOutput ChordNames.ChordName #(lambda (g c p) (display 
> (ly:grob-property g 'baseline-skip)))
>  c1
> }

That’s a helpful funcion — thanks!

> Those are, unless overriden by a grob, global.

Exactly. As far as the user cares, the setting has a value, even if it’s global.

If I don’t override ChordName.baseline-skip, and my ChordName has a column, the 
baseline still skips a certain/exact/known distance. By trial-and-error, I can 
find that the default is likely 3:

%%%  SNIPPET BEGINS
\version "2.19.35"

testing = \chordmode {
  \override ChordName.stencil = #ly:text-interface::print
  \override ChordName.text = \markup \column { first second }
  c1
  \override ChordName.baseline-skip = #5
  c1
  \override ChordName.baseline-skip = #3
  c1
}

\score {
  \new ChordNames \testing
}
%%%  SNIPPET ENDS

> But their values may well depend on stuff like the
> current staff size and your preferred style sheets so there is not
> really a lot that could actually be listed with some confidence.

At that point, I say, "Let the user beware.”

My question is: Is there a way to iterate your property display function (or 
similar) through all available properties of a grob, and output as a single 
list (alphabetically, if possible) the current/default value [e.g., 
ChordName.baseline-skip appears to be 3 by default, or in any case was at the 
time my snippet began compiling]?

Thanks,
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: address@hidden




reply via email to

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