lilypond-devel
[Top][All Lists]
Advanced

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

Re: critical issues


From: David Kastrup
Subject: Re: critical issues
Date: Wed, 04 Jan 2012 09:12:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Janek Warchoł <address@hidden> writes:

>>  \layout {
>>    \context {
>>      \Score
>>      \with \settingsFrom { \compressFullBarRests }
>>    }
>>    \context {
>>      \Staff
>>      \with \settingsFrom { \accidentalStyle modern }
>>    }
>>  }
>> }
>> \end{lilypond}
>>
>> \ph is a music function written in Scheme.  Can you understand it?
>
> Yes, but i get lost on \parallellMusic :(

It's intended for using.  And yes, it likely could be simpler given
useful APIs for manipulating Scheme.

>> \settingsFrom is actually returning a Scheme expression for \with to
>> use.  It makes things rather simpler than more complex, even though it
>> constitutes a Scheme expression.
>
> Um... i would really love to be able to type
>  \layout {
>      \compressFullBarRests
>      \override Score.SpacingSpanner #'common-shortest-duration =
> #(ly:make-moment 6 10)
>      etc...
> }

Well, create a layout modification type, let \layout accept Scheme
expressions of that type, write a Scheme function \layout-from in
analogue to \settingsFrom, and it becomes

\layout {
   \layout-from { \compressFullBarRests
     \override Score.SpacingSpanner #'common-shortest-duration =
     #(ly:make-moment 6 10)
   }
   etc...
}

Stuff like that is reasonably straightforward to implement.  It would
have the advantage that you don't have to know what contexts
\settingsFrom should be placed in.

Again:

>> Scheme is not hard.  Programming is hard.

And sane program design is, apparently, even harder.  People _don't_
_ever_ think about improving things.  Instead they hobble along in
whatever clunky way they see others doing, complaining how clunky it is,
and likely making it much clunkier by bending it to situations fitting
even worse than what they have seen.

-- 
David Kastrup



reply via email to

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