[Top][All Lists]

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

Re: Generating scores from Scheme

From: Thomas Morley
Subject: Re: Generating scores from Scheme
Date: Sun, 12 Jul 2015 15:41:27 +0200

2015-07-12 15:15 GMT+02:00 H. S. Teoh <address@hidden>:
> On Sun, Jul 12, 2015 at 08:40:37PM +1000, Andrew Bernard wrote:
>> Hi T,
>> Is this actually a question about Scheme programming, or a question
>> about how to generate parts from a full score?
> About Scheme. I know how to generate parts from a full score, but it
> involves a lot of repetitive copy-n-paste, which I hope to avoid by
> factoring out the common parts into Scheme functions.
> [...]
>> On 12 July 2015 at 12:18:17, H. S. Teoh (address@hidden) wrote:
>> Is it possible to use Scheme to generate \score blocks? What's the
>> correct syntax for doing this? I'm working on a set of Scheme functions
>> to facilitate working with orchestral scores, and I'd like a way to loop
>> over a list of instrument names and generate \score blocks for the
>> corresponding instrument parts.
> --
> Живёшь только однажды.

Probably something at the lines of:

\version "2.19.22"

one = { c''1 }
two = { d''1 }

my-name = #(ly:parser-output-name)

write-scores =
#(define-void-function (parser location scores)
     (map ly:make-score (reverse scores)))

\write-scores  #(list one two)


reply via email to

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