lilypond-devel
[Top][All Lists]
Advanced

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

Re: A usability anecdote


From: David Kastrup
Subject: Re: A usability anecdote
Date: Wed, 14 Dec 2011 15:41:58 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Colin Campbell <address@hidden> writes:

> On 11-12-14 04:51 AM, David Kastrup wrote:
>
>> made Lilypond complain.  convert-ly was able to fix this and produced:
>>
>>    \midi {
>>      \context {
>>        \Score
>>        tempoWholesPerMinute = #(ly:make-moment 80 4)
>>        }
>>      }
>>
>> That is not particularly pretty, so I tried something else, and lo and
>> behold:
>>
>>    \midi {
>>      \context {
>>        \Score
>>        \with \settingsFrom { \tempo 4 = 80 }
>>        }
>>      }
>>
>> actually works fine.

> If you care to send me a few words, I could add this to the docs, David.

tempoWholesPerMinute is pervasive in the docs and likely because of
convert-ly.  So I guess that I will try to change this using another
convert-ly rule, and one will have to check where additional
documentation is called for.

At the current point of time, \settingsFrom is both heavily
underdocumented (concerning the range of applications where it would be
beneficial) and underused in the LilyPond code base.

Basically, \settingsFrom is a Scheme function taking a music expression
and converts all contained layout instructions (\set, \override, \unset,
\revert) into a context modification.

And \with is able to take a context modification in the form of a Scheme
expression.

That's all there is to it, but as a result, you can pretty much employ
everything in ly/property-init.ly in the form of a context modification
when needed.

So it is probably a proper goose hunt to find all places in the docs
where making use of this information might improve things.

-- 
David Kastrup




reply via email to

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