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: Thu, 05 Jan 2012 08:12:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Janek Warchoł <address@hidden> writes:

> 2012/1/4 David Kastrup <address@hidden>:
>>>> \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...
>> }
>
> ok...  However - i'm very sorry to say this :/ - it would be better if
> i wouldn't have to type \layout-from at all.

\layout is not the place to accept arbitrary music.

> I know that it's not much typing, and that \layout-from is an
> improvement, but from the end-user perspective it's in fact PITA: when
> use \layout, when \layout-from?

\layout-from takes music and extracts context definitions.

> :( Again, i'm very sorry beacause from the programmer's perspective
> it's nothing, but for simple users understanding what \layout does is
> hard enough;

\layout definitions don't have a syntax compatible with music.  For
example, \layout-from is a command you could not even write in music.

If \layout accepted music and mostly ignored it, simple users would not
understand what it does, and advanced users would not either.

> And i want to enter notes, not some \overridden << \layoutish
> ##Scheme## >> :( :( :(

Nobody keeps you from entering \compressFullBarRests and stuff right in
your music.  That's their default place of writing them.

As a programmer, I prefer putting the declarations where they make sense
and apply document-wide.  Nobody forces you to do it in that manner if
you prefer jamming everything explicitly into the music which, after
all, is the designed user interface for it.

[\layout-from]

>> It is a bit wonky, but should work for most purposes.
>>
>> At least it works with
>>
>>    \layout-from \accidentalStyle "dodecaphonic"
>>
>> and with the above example.
>
> Wow, thanks!  I hope that i understand what it does and that i'll be
> able to use it :)

It is wonky mostly because we don't have a Scheme interface to context
definitions (so I have to use #{ ... #} and fudge around with module-ref
and module-set! inside).  I am actually surprised it works.

-- 
David Kastrup




reply via email to

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