|
From: | Urs Liska |
Subject: | Re: Writing score definition in Scheme |
Date: | Tue, 27 Mar 2018 14:12:22 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
Am 26.03.2018 um 18:36 schrieb Jan-Peter Voigt:
OK here's a short hint created with the help of displayMusic: % a dummy definition of create-staff #(define (get-staff what) (make-music 'ContextSpeccedMusic 'create-new #t 'property-operations '() 'context-type 'Staff 'element #{ c''4 #})) % a scheme representation of \new StaffGroup $(make-music 'ContextSpeccedMusic 'create-new #t 'property-operations '() 'context-type 'StaffGroup 'element (make-music 'SimultaneousMusic 'elements (map get-staff '(oboe flute))))
OK, I see how I can go about this.But actually I have the impression that this will cause much more pain that the original state with switching between LilyPond and Scheme. I must say I get totally lost in that (considering that there are numerous properties to get from function calls.
The point I got to (https://git.openlilylib.org/bfsc/kayser/blob/Change-make-staff/includes/lib/make-staff.ily#L240) does compile and seems to produce Staff objects but obviously the music in it doesn't get through (note that this is another point than the original make-score, this is in make-staff instead) ...
Well, maybe I return to that WIP commit after my brain cools down a little bit again ...
Best Urs
HTH Jan-Peter Am 26.03.2018 um 18:23 schrieb Urs Liska:Am 26. März 2018 15:35:42 MESZ schrieb Jan-Peter Voigt<address@hidden>: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).
[Prev in Thread] | Current Thread | [Next in Thread] |