lilypond-user
[Top][All Lists]
Advanced

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

Re: Chapter 3 of "LilyPond Extending" document


From: David Nalesnik
Subject: Re: Chapter 3 of "LilyPond Extending" document
Date: Thu, 27 Nov 2014 14:39:43 -0600

Hi Peter,

On Thu, Nov 27, 2014 at 11:35 AM, Peter Gentry <address@hidden> wrote:
You are spot on David. I spend a lot of time transposing music for a small band of amateur wind players.  I use the said snippet as an include file "enharmonic.ly" to tidy up the accidentals. My issue is that the tidy up takes no account of the current key signature and so sometimes you are left with a Gb say when there is F# in the key signature. I am trying to get at the list of sharps and flats from the keysignature interface use to force the Gb to F# (and adjust any other unpleasant accidentals).
 
I can see that there is such data lurking about but so far I haven't been able to extract it.  This has lead me into a crash course of C++ and Scheme which at 73 is proving interesting but time consuming - (I was brought up on Basic and Fortran)

The trouble here is that details about the key signature are stored as context properties which, as far as I know, are not directly accessible from within a music function.

You could search the music _expression_ for context modifications.  Don't think it will be pretty. 

A simpler solution would be to add an argument which specifies the key you want to "naturalize" against.  This could be annoying if you have multiple key signatures in the course of the piece--you'd need to call \naturalizeMusic each time.

Hope this is somewhat helpful,
David


reply via email to

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