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: Mon, 13 Oct 2014 20:47:56 -0500

Hi,

On Mon, Oct 13, 2014 at 1:18 PM, David Bellows <address@hidden> wrote:
OK, I've now played around with it and it works very nicely and will be easy to integrate into my software. You've already put a lot of work into this so I hate to point out any of my peculiar preferences, but just in case you feel like putting even more time into it here they are:

1. Add the 15va/vb marking as well.

Done.
 
2. I'm not sure what standard practice is but you'll see in the score that my software produces it does not extend the ottava marking over rests. My music tends to have a lot of rests (a consequence of how it automatically changes staves) so it has a big effect on the overall look.

Fixed.

Standard practice is that an ottava should extend across rests if the note afterwards takes the ottava, too.  If the rest is sufficiently long, the ottava is broken.

I've incorporated the behavior you like, but I definitely believe that there should be a choice for the user to extend across rests.  The function ought to be able to detect whether the ottava can extend: there are rests of sufficient length and the note after the rest needs the ottava.

Under no circumstances should an ottava end over a rest, like you see on the version of your piece using \ottavate!

 
3. Change the text. In my score I just use "8" and "15" which given how crowded the score gets at times makes a big difference.

It turns out that \set Staff.ottavation = #"8" and the like have to be used after \ottava #1, so I had to work it into the function.

In the future I could add an argument to the \ottavate to allow user variations--like "8b," for example.  Right now, I hardcoded "8" and "15," as in your score.

You select the version--default or short names--with a boolean value--that is ##t (short), ##f (default).


%%%
USAGE NOTES:

Take the following example:

musOne = \relative c''' {
  \clef treble
  g2 a b c d e f g a b c d e f g a b c d e f g
}

{
  \ottavate #'(4 . 7) #'(-3 . -6) ##t \musOne
}

##t selects the shortened names "8" and "15"

(4 . 7) specifies the range for "8": any note having 4-7 ledger lines (inclusive) gets an "8."  Anything above this will get "15."

(-3 . -6) specifies the range for "15": here the range is 3-6 ledger lines.  I like the negative numbers because they are visually more expressive, though of course, there's no sense to negative numbers of ledger lines....

Chords are assigned ottavas based on the average of the ledger-line count of their constituent notes.  I'm sure there's a better algorithm.  If you're more mathematically able than me, please feel free to suggest something a bit more elegant :)

In the future, there ought to be some analysis of groups of notes.  So, for example, an out-of-range note within a group of notes receiving an ottava doesn't break the line.  But I'd like to make sure what I have now works before I start enhancing it.


Thanks again for the work you've put into this!

You're very welcome.

--David

Attachment: auto-8-15.ly
Description: Text Data


reply via email to

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