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<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).




_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to