[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing score definition in Scheme

From: Jan-Peter Voigt
Subject: Re: Writing score definition in Scheme
Date: Mon, 26 Mar 2018 18:36:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

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
  'create-new #t
  'property-operations '()
  'context-type 'StaffGroup
  'element (make-music
            'elements (map get-staff '(oboe flute))))

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]