[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Looking for advice on "looping" through all keys
From: |
David Kastrup |
Subject: |
Re: Looking for advice on "looping" through all keys |
Date: |
Mon, 13 Nov 2017 13:11:53 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Patrick Smith <address@hidden> writes:
> 2-week-old LilyPond newbie here.
>
> I've completed my first transcription of J. S. Bach Contrapuntus I for
> brass quartet and I must say that LilyPond is totally amazing!
>
> I'm now working on creating a Book of Basic Routines for the brass quartet.
> I'd like to have each scale routine printed in all keys. I've searched
> through the LilyPond manuals and I've scanned the Scheme materials in
> search of an algorithmic way of cycling through all transpositions but I
> haven't found anything yet. I suspect there is a way to do it but it might
> just be easier to "hard code" by creating variables (one for each key) and
> then transposing the scale music into each of the variables.
>
> But, if there is a way to create a "for" loop combined with a
> "transposition index" (i.e., rather than "\transpose c bes" instead
> "\transpose c 2" where 2 is equal to 2 half steps), I would prefer that.
> I'm not really prepared at this point to use makefiles for this purpose.
>
> Are there ways of creating "for" loops and/or transposition indices?
$@(map
(lambda (p)
#{ \transpose c' #p { \key c \major c'4 e' g' c' \bar "|." } #})
(music-pitches #{ c' d' e' f' g' a' b' des' es' fis' as' bes' #}))
--
David Kastrup