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: Tue, 21 Oct 2014 18:08:17 -0500

Hi Gilberto,

On Tue, Oct 21, 2014 at 4:43 PM, Gilberto Agostinho <address@hidden> wrote:
Hi David,


David Nalesnik-2 wrote
> Actually, no, it averages the ledger lines of the chord members.  If the
> average is above the threshold, we get an ottava.  I'm welcome to better
> algorithms!  (It would be easy enough to implement what you describe.)

I believe that considering the lowest note of a chord for ottava and the
highest note for ottava bassa would be better. This way you'd get more
consistent results (think of some extreme cases like with a xylophone), but
this is obviously up to you. The way it is now also works fine during most
of the cases, but it may come across lacking consistency for someone viewing
the score.


Ok, that's what this version now does.  See what you think.
 

David Nalesnik-2 wrote
> I don't see the problem you've describe.  The attached shows the snippet
> without and with \ottavate, with short names for clarity.

Me neither! I believe I miscounted the ledger lines, or I used your default
settings #'(4 . 7) #'(-3 . -6) instead of #'(4 . 7) #'(-4 . -7) and got
confused. I spent way too much time with LilyPond and Pure Data today, so
forgive my lack of sense sometimes.

No problem!
 


David Nalesnik-2 wrote
> I should say my "goal" was that automatic ottavas would be a simple,
> uncomplicated thing to achieve.  And of course wishing makes it so.
> The alist idea seems like a great alternative to a long list of arguments
> you have to look up every time you use the command.

This alist idea seems very interesting indeed. I am really looking forward
to v3.0 of your function!


This version incorporates the alist idea.  The boolean for short names/default is gone, replaced by the key/value pair (name-style . short).  The value can be long, or default (and you could easily add your own to the definition of naming-options).

I made provision for the clef issue we talked about above.

So, the way to call the function is
\ottavate #'(4 . 7) #'(-4 . -7) #'((name-style . short) (opening-clef . bass)) { ... }

If you leave any elements out of the alist, the default will be chosen.  So

 \ottavate #'(4 . 7) #'(-4 . -7) #'((name-style . long)) { ... }

will result in the treble clef default for opening clef (which is generally what you want).

The alist argument needs to be there.  I don't believe you can have an optional parameter except at the tail end of the music function, but I'll need to verify that. (And you definitely don't want the variable coming after the music _expression_....)

But you can write:
\ottavate #'(4 . 7) #'(-4 . -7) #'() { ... }

and select all the defaults.

There will be room for more selectors once I figure something out about context (the rest issue you mentioned, for one).

Thanks once again for your effort, and take care,
Gilberto

You're welcome.  Thanks for the input!

Best,
David 

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


reply via email to

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