lilypond-user
[Top][All Lists]

## Re: Writing score definition in Scheme

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

```Hi Urs,

```
I assume you know to build the music-expression for the score in scheme. 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.
```
```
```
Thanks
Urs

_______________________________________________
lilypond-user mailing list
```