2012/1/4 David Kastrup <d...@gnu.org>: >>> \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. 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? :( 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; in fact it would be nice to get rid of it but that's impossible. You know, i pretend to be a really dumb user. And i want to enter notes, not some \overridden << \layoutish ##Scheme## >> :( :( :( LilyPond will have a chance of winning large audiences when all input that is needed to create a full Messiah score will be sth like: \version x.x.x \header { ... } \movement = "Sinfony" { violin = { (notes) } ... } \movement = "Comfort ye" { .... .... \makeScore \makeParts :/ >>> 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. :( Have you looked at my patches and if so, does any of them do this? 2012/1/4 David Kastrup <d...@gnu.org>: > "layout-from" = > #(define-void-function (parser location music) > (ly:music?) > (_i "To be used in output definitions. Take the layout instruction > events from @var{music} and do the equivalent of context modifications > duplicating their effect.") > (define (musicop m mods) > (if (music-is-of-type? m 'layout-instruction-event) > (ly:add-context-mod > mods > (case (ly:music-property m 'name) > ((PropertySet) > (list 'assign > (ly:music-property m 'symbol) > (ly:music-property m 'value))) > ((PropertyUnset) > (list 'unset > (ly:music-property m 'symbol))) > ((OverrideProperty) > (list 'push > (ly:music-property m 'symbol) > (ly:music-property m 'grob-property-path) > (ly:music-property m 'grob-value))) > ((RevertProperty) > (list 'pop > (ly:music-property m 'symbol) > (ly:music-property m 'grob-property-path))))) > (case (ly:music-property m 'name) > ((SequentialMusic SimultaneousMusic) > (for-each (lambda (x) > (musicop x mods)) > (ly:music-property m 'elements))) > ((ContextSpeccedMusic) > (module-set! (current-module) > (ly:music-property m 'context-type) > #{ \context { $(module-ref (current-module) > (ly:music-property m > 'context-type)) > $(musicop (ly:music-property m > 'element) > (ly:make-context-mod)) > } #})))) > mods) > (musicop music (ly:make-context-mod))) > > > 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 :) cheers, Janek _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel