lilypond-user
[Top][All Lists]
Advanced

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

Re: Automatic ottava handling


From: David Nalesnik
Subject: Re: Automatic ottava handling
Date: Sat, 11 Oct 2014 17:38:11 -0500

Hi David,

On Sat, Oct 11, 2014 at 4:45 PM, David Bellows <address@hidden> wrote:
>The attached function will work with more complex music expressions.

Nicely done! I really like the greater flexibility achieved based on using ledger lines. Fortunately in this project I don't use chords so that's not a problem


Well, in any case the attached now works with chords :)

The rule is that an ottava is only applied if all of the notes within the chord have at least a certain number of ledger lines.

I'm thinking there ought to be some sort of resistance-to-change factor which overrules the strict this-many-ledger-lines-gets-an-ottava rule.  Otherwise, if you hop between chords and single notes, you can get more ottavas than is comfortable to read.

The code for build-new-elts needs to be refactored a bit.

less fortunately is that I need it for the bassa as well. But I will look over the code and see if I can't figure it out for myself.

Yes, you could insert an _expression_ into build-new-elts which would look at the number of ledger lines and insert a (list (makeMusic 'OttavaMusic 'ottava-number -1)) to create the 8va bassa.  Of course, you'd need one to shut it off with (list (makeMusic 'OttavaMusic 'ottava-number 0)).

This will all be better once this thing has the ability to detect the current clef.  It looks like that's possible, because calling \clef ... adds a 'PropertySet event to the mix, and 'clefMiddleCPosition (which the ledger-line counter is designed to work with) is available.

Detecting the clef would be useful for 8va bassa, because it's never used with treble clef (as I remember from Gardner Read).
 
Anyway, hope this is helpful. 

--David

P.S.  It's now \ottavate instead of \octavate

Attachment: auto-ottava-music-function3.ly
Description: Text Data


reply via email to

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