lilypond-devel
[Top][All Lists]
Advanced

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

Possible improvement to stringTunings architecture


From: Carl Sorensen
Subject: Possible improvement to stringTunings architecture
Date: Fri, 24 Dec 2010 17:42:29 -0700

Hi,

I've managed to get the new stringTunings architecture to work.  It's based
on changing the contents of the stringTunings list from a list of semitones
to a list of pitches.

Each of the tunings is a separate variable.  And the chords that define them
are in the file ly/string-tunings-init.ly, but they aren't particularly
reusable.

It would be nice if it were possible to put all of the tuning variables and
the defining chords into an alist, then create the string-tunings by
processing the alist.  The documentation could then be produced by
processing the same alist, and that would ensure that the documentation
matches the actual code.

The challenge I'm having is that the alist would be in scheme, and the
chords in the alist should be in .ly code, and I don't know how to combine
them.

I'd like to be able to do something like

default-string-tunings =
#'((guitar-tuning . <e, a, d g b e'>)
   (bass-tuning . <e,, a,, d, g,>)
   (mandolin-tuning . <g d' a' e''>))


Of course, this won't work.  I'd be happy if I could make something like
this work, as well:

default-string-tunings =
#`((guitar-tuning . ,(lily->scheme <e, a, d g b e'>))
   (bass-tuning . ,(lily->scheme <e,, a,, d, g,>))
   (mandolin-tuning . ,(lily->scheme <g d' a' e''>)))


But I haven't been able to figure out any function that will work as the
lily->scheme function.

Can anybody give me any help on this?

Thanks,

Carl

P.S. You can see the patch at http://codereview.appspot.com/3842041/




reply via email to

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