Janek Warchoł <janek.lilyp...@gmail.com> 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 _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel