Am 26. März 2018 15:35:42 MESZ schrieb Jan-Peter Voigt <jp.vo...@gmx.de>: >Hi Urs, > >I assume you know to build the music-expression for the score in >scheme.
No, not really. I can replace \score {} with (ly:make-score) but that doesn't really help me. I have no idea how to map the nesting of the parallel contexts to Scheme expressions within a single expression. (get-staff returns Staff objects, but at a later (or earlier) point I will also want to create the Staff with Scheme (the music itself will stay in LilyPond language files). >With that you can make use of #(scorify-music mymusic). >That creates a score object *and* creates the necessary music for << \\ > > >> constructs an thew like. If you don't need that you can simply use >#(ly:make-score mymusic). > >HTH >Jan-Peter > >Am 26.03.2018 um 14:51 schrieb Urs Liska: >> Hi all, >> >> I'm embarrassed to admit I don't know where to start looking in the >> manuals. >> >> I have a scheme-function that returns a \score expression, and I'm >> sure I wouldn't have to hop around between LilyPond and Scheme syntax > >> like this: >> >> make-score = >> #(define-scheme-function (movement-path)(symbol-list?) >> #{ >> \score { >> << >> \new GrandStaff << >> #(get-staff movement-path 'clarino-one) >> #(get-staff movement-path 'clarino-two) >> #(get-staff movement-path 'corno-one) >> #(get-staff movement-path 'corno-two) >> >> >> >> #(get-staff movement-path 'tympano) >> >> \new ChoirStaff << >> #(get-staff movement-path 'soprano) >> #(get-staff movement-path 'alto) >> #(get-staff movement-path 'tenor) >> #(get-staff movement-path 'bass) >> >> >> \new StaffGroup << >> \new GrandStaff << >> #(get-staff movement-path 'violin-one) >> #(get-staff movement-path 'violin-two) >> #(get-staff movement-path 'viola) >> >> >> #(get-staff movement-path 'bc) >> >> >> >> >> \midi {} >> \layout {} >> } >> #}) >> >> >> The function is also called from within Scheme code, so I would like >> to write the same using Scheme only, without switching to LilyPond >> with #{ #} but also back to Scheme within these expressions. >> >> How would I go about this and/or where would I look up the reference >> for this? >> >> Thanks >> Urs >> >> _______________________________________________ >> lilypond-user mailing list >> lilypond-user@gnu.org >> https://lists.gnu.org/mailman/listinfo/lilypond-user > > >_______________________________________________ >lilypond-user mailing list >lilypond-user@gnu.org >https://lists.gnu.org/mailman/listinfo/lilypond-user _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user