Automatic ottava handling

classic Classic list List threaded Threaded
32 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Automatic ottava handling

David Bellows
This is probably asking a lot, but is there a way to have ottava markings used automatically? It sounds like a complicated function since you'd also want it to be able to span consecutive notes but being able to specify when (as in how many ledger lines above the staff) it would kick in would be really nice. The project I'm working on automatically generates Lilypond files so I can't do this manually. I have given some thought as to how I would do it in my software but was hoping someone else had already tackled the problem from a Lilypond perspective.

Thanks,
Dave Bellows

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

lilypond-5
There is a pitch-dependent staff switching automatism in LilyPond (I
don’t know how it works but you can have a look at piano/harp section in
the notation reference) so I think what you are asking for should at
least not be impossible.

Am 05.10.2014 um 17:52 schrieb David Bellows:

> This is probably asking a lot, but is there a way to have ottava markings
> used automatically? It sounds like a complicated function since you'd also
> want it to be able to span consecutive notes but being able to specify when
> (as in how many ledger lines above the staff) it would kick in would be
> really nice. The project I'm working on automatically generates Lilypond
> files so I can't do this manually. I have given some thought as to how I
> would do it in my software but was hoping someone else had already tackled
> the problem from a Lilypond perspective.
>
> Thanks,
> Dave Bellows
>
>
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

Gilberto Agostinho
Malte Meyn-3 wrote
There is a pitch-dependent staff switching automatism in LilyPond (I
don’t know how it works but you can have a look at piano/harp section in
the notation reference) so I think what you are asking for should at
least not be impossible.
You are talking about \autochange (see: http://lilypond.org/doc/v2.18/Documentation/notation/common-notation-for-keyboards#changing-staff-automatically ).

And indeed an automatic function to add ottava markings for every pitch higher than a certain threshold (and ottava bassa lower than another defined threshold) would be a fantastic addition to LilyPond.

Best,
Gilberto Agostinho
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

David Bellows
I ended up creating my own solution to use in my code that generates scores. Unfortunately it doesn't really translate into anything usable by anyone else. Likewise I created my own staff switching method as well so that rests would be printed in the other staff.

Still, I think the automatic ottava marking would be a good idea and maybe even doable. Alas, I am not the one to do it, though.

On Sun, Oct 5, 2014 at 2:14 PM, Gilberto Agostinho <[hidden email]> wrote:
Malte Meyn-3 wrote
> There is a pitch-dependent staff switching automatism in LilyPond (I
> don’t know how it works but you can have a look at piano/harp section in
> the notation reference) so I think what you are asking for should at
> least not be impossible.

You are talking about \autochange (see:
http://lilypond.org/doc/v2.18/Documentation/notation/common-notation-for-keyboards#changing-staff-automatically
).

And indeed an automatic function to add ottava markings for every pitch
higher than a certain threshold (and ottava bassa lower than another defined
threshold) would be a fantastic addition to LilyPond.

Best,
Gilberto Agostinho




--
View this message in context: http://lilypond.1069038.n5.nabble.com/Automatic-ottava-handling-tp167190p167195.html
Sent from the User mailing list archive at Nabble.com.

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

David Nalesnik
Hi,

On Mon, Oct 6, 2014 at 3:51 PM, David Bellows <[hidden email]> wrote:
I ended up creating my own solution to use in my code that generates scores. Unfortunately it doesn't really translate into anything usable by anyone else. Likewise I created my own staff switching method as well so that rests would be printed in the other staff.

Still, I think the automatic ottava marking would be a good idea and maybe even doable. Alas, I am not the one to do it, though.

On Sun, Oct 5, 2014 at 2:14 PM, Gilberto Agostinho <[hidden email]> wrote:
Malte Meyn-3 wrote
> There is a pitch-dependent staff switching automatism in LilyPond (I
> don’t know how it works but you can have a look at piano/harp section in
> the notation reference) so I think what you are asking for should at
> least not be impossible.

You are talking about \autochange (see:
http://lilypond.org/doc/v2.18/Documentation/notation/common-notation-for-keyboards#changing-staff-automatically
).

And indeed an automatic function to add ottava markings for every pitch
higher than a certain threshold (and ottava bassa lower than another defined
threshold) would be a fantastic addition to LilyPond.


I think this should be doable.

Here's a preliminary experiment.  It will add an automatic \ottava 1 before passages where notes have at least a specified number of ledger lines.

Right now this is pretty limited.  It won't handle \relative, for one thing.  I'll have to get deeper into the music representation for that, but this should serve as a proof-of-concept.

Another issue is adapting to different clefs.  The function \octavate is hard-coded for treble clef at the moment.  The problem is that 'clefMiddleCPosition is a context property, and I'm not sure how to get at context properties through a music function.  Any ideas?  With this property it's easy to have this work automatically with different clefs.  (The number -6 in the function represents the value of 'clefMiddleCPosition for treble clef--middle C is 6 staff-steps below the center line.)

Best,
David


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

auto-ottava-music-function.ly (3K) Download Attachment
auto-ottava-music-function.png (28K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

David Bellows
>Here's a preliminary experiment.  It will add an automatic \ottava 1 before passages where notes have at least a specified number of ledger lines.

This is a terrific start! The solution I'm using in my program counts the number of commas or single quotes and applies the ottava marking based on that which works fine but doesn't give as aesthetically a pleasing result as your method does. I will totally ditch my method if this one progresses much further.

On Tue, Oct 7, 2014 at 4:32 PM, David Nalesnik <[hidden email]> wrote:
Hi,

On Mon, Oct 6, 2014 at 3:51 PM, David Bellows <[hidden email]> wrote:
I ended up creating my own solution to use in my code that generates scores. Unfortunately it doesn't really translate into anything usable by anyone else. Likewise I created my own staff switching method as well so that rests would be printed in the other staff.

Still, I think the automatic ottava marking would be a good idea and maybe even doable. Alas, I am not the one to do it, though.

On Sun, Oct 5, 2014 at 2:14 PM, Gilberto Agostinho <[hidden email]> wrote:
Malte Meyn-3 wrote
> There is a pitch-dependent staff switching automatism in LilyPond (I
> don’t know how it works but you can have a look at piano/harp section in
> the notation reference) so I think what you are asking for should at
> least not be impossible.

You are talking about \autochange (see:
http://lilypond.org/doc/v2.18/Documentation/notation/common-notation-for-keyboards#changing-staff-automatically
).

And indeed an automatic function to add ottava markings for every pitch
higher than a certain threshold (and ottava bassa lower than another defined
threshold) would be a fantastic addition to LilyPond.


I think this should be doable.

Here's a preliminary experiment.  It will add an automatic \ottava 1 before passages where notes have at least a specified number of ledger lines.

Right now this is pretty limited.  It won't handle \relative, for one thing.  I'll have to get deeper into the music representation for that, but this should serve as a proof-of-concept.

Another issue is adapting to different clefs.  The function \octavate is hard-coded for treble clef at the moment.  The problem is that 'clefMiddleCPosition is a context property, and I'm not sure how to get at context properties through a music function.  Any ideas?  With this property it's easy to have this work automatically with different clefs.  (The number -6 in the function represents the value of 'clefMiddleCPosition for treble clef--middle C is 6 staff-steps below the center line.)

Best,
David



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

David Nalesnik
Hi,

On Wed, Oct 8, 2014 at 9:48 AM, David Bellows <[hidden email]> wrote:
>Here's a preliminary experiment.  It will add an automatic \ottava 1 before passages where notes have at least a specified number of ledger lines.


The attached function will work with more complex music expressions.

The only problem here is with the handling of chords.  Right now, the function either ignores them or attempts to add the ottava within the EventChord expression (which causes an error).  This shouldn't be too hard to fix, though it will take some thought.

Hope this proves useful!

David
  


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

auto-ottava-music-function2.ly (4K) Download Attachment
auto-ottava-music-function2.png (33K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

David Bellows
>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, 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.

Thanks!

On Sat, Oct 11, 2014 at 7:57 AM, David Nalesnik <[hidden email]> wrote:
Hi,

On Wed, Oct 8, 2014 at 9:48 AM, David Bellows <[hidden email]> wrote:
>Here's a preliminary experiment.  It will add an automatic \ottava 1 before passages where notes have at least a specified number of ledger lines.


The attached function will work with more complex music expressions.

The only problem here is with the handling of chords.  Right now, the function either ignores them or attempts to add the ottava within the EventChord expression (which causes an error).  This shouldn't be too hard to fix, though it will take some thought.

Hope this proves useful!

David
  



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

David Nalesnik
Hi David,

On Sat, Oct 11, 2014 at 4:45 PM, David Bellows <[hidden email]> 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


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

auto-ottava-music-function3.ly (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

David Nalesnik


On Sat, Oct 11, 2014 at 5:38 PM, David Nalesnik 

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.


OK, we've got clefs!

I'll look into fixing up build-new-elts so there won't be so much duplication of code.  Then it will be a lot cleaner to deals with bassas,   I'm too tired to even think about that now.

Best,
David 


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

auto-ottava-music-function4.ly (7K) Download Attachment
auto-ottava-music-function4.png (34K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

David Nalesnik
Hi,

On Sat, Oct 11, 2014 at 9:05 PM, David Nalesnik 

I'll look into fixing up build-new-elts so there won't be so much duplication of code.  Then it will be a lot cleaner to deals with bassas, 

OK, now it will provide automatic bassas as well.

The function \ottavate now takes two numbers, one for the upper threshold and another for the lower.  I decided to specify the lower threshold in negative numbers, but that could be changed.

If you want to turn off one or the other, you can just pick a number out of range.  (So, for example, you can ensure no bassas with treble clef.)

Let me know how this works for you!

Enjoy,
David


 


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

auto-ottava-and-bassa.ly (8K) Download Attachment
auto-ottava-and-bassa.png (39K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

David Bellows
That is amazing work! I don't have the time to experiment with it right now but I will do so tonight and let you know tomorrow the results. But based on your example this looks like it will be perfect. I think the negative numbers for the bassa is a good choice as that was what I was imagining in the first place.

Thanks for all your work on this!

On Sun, Oct 12, 2014 at 12:07 PM, David Nalesnik <[hidden email]> wrote:
Hi,

On Sat, Oct 11, 2014 at 9:05 PM, David Nalesnik 

I'll look into fixing up build-new-elts so there won't be so much duplication of code.  Then it will be a lot cleaner to deals with bassas, 

OK, now it will provide automatic bassas as well.

The function \ottavate now takes two numbers, one for the upper threshold and another for the lower.  I decided to specify the lower threshold in negative numbers, but that could be changed.

If you want to turn off one or the other, you can just pick a number out of range.  (So, for example, you can ensure no bassas with treble clef.)

Let me know how this works for you!

Enjoy,
David


 



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

David Bellows
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.
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.
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. 

My version is the Piano_Standard.pdf whereas yours is auto-ottavate.pdf

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

On Sun, Oct 12, 2014 at 1:20 PM, David Bellows <[hidden email]> wrote:
That is amazing work! I don't have the time to experiment with it right now but I will do so tonight and let you know tomorrow the results. But based on your example this looks like it will be perfect. I think the negative numbers for the bassa is a good choice as that was what I was imagining in the first place.

Thanks for all your work on this!

On Sun, Oct 12, 2014 at 12:07 PM, David Nalesnik <[hidden email]> wrote:
Hi,

On Sat, Oct 11, 2014 at 9:05 PM, David Nalesnik 

I'll look into fixing up build-new-elts so there won't be so much duplication of code.  Then it will be a lot cleaner to deals with bassas, 

OK, now it will provide automatic bassas as well.

The function \ottavate now takes two numbers, one for the upper threshold and another for the lower.  I decided to specify the lower threshold in negative numbers, but that could be changed.

If you want to turn off one or the other, you can just pick a number out of range.  (So, for example, you can ensure no bassas with treble clef.)

Let me know how this works for you!

Enjoy,
David


 




_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Piano_Standard.pdf (103K) Download Attachment
auto-ottavate.pdf (104K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

Janek Warchoł
In reply to this post by David Nalesnik
Awesome work, David!
I think it would be great to actually have some default ottava
settings in official lilypond (e.g. something like \ottavate #4 #-4).

best,
Janek

2014-10-12 21:07 GMT+02:00 David Nalesnik <[hidden email]>:

> Hi,
>
> On Sat, Oct 11, 2014 at 9:05 PM, David Nalesnik
>>
>>
>> I'll look into fixing up build-new-elts so there won't be so much
>> duplication of code.  Then it will be a lot cleaner to deals with bassas,
>
>
> OK, now it will provide automatic bassas as well.
>
> The function \ottavate now takes two numbers, one for the upper threshold
> and another for the lower.  I decided to specify the lower threshold in
> negative numbers, but that could be changed.
>
> If you want to turn off one or the other, you can just pick a number out of
> range.  (So, for example, you can ensure no bassas with treble clef.)
>
> Let me know how this works for you!
>
> Enjoy,
> David
>
>
>
>
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

David Nalesnik
In reply to this post by David Bellows
Hi,

On Mon, Oct 13, 2014 at 1:18 PM, David Bellows <[hidden email]> 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

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

auto-8-15.ly (11K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

David Nalesnik
In reply to this post by Janek Warchoł


On Mon, Oct 13, 2014 at 3:01 PM, Janek Warchoł <[hidden email]> wrote:
Awesome work, David!

Thanks!
 
I think it would be great to actually have some default ottava
settings in official lilypond (e.g. something like \ottavate #4 #-4).


I think so too, but I'd like for the function to be more intelligent first :)

--David 

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

David Bellows
In reply to this post by David Nalesnik

Wow! It works perfectly! I am officially replacing my software method with your Lilypond approach. Not only does it do everything I wanted but it has better fined-grained control since it uses ledger lines and not octave markings (like mine does). And it's got to be more efficient than mine (I had to create two separate loops outside the main Lilypond generating loop to handle both the treble and the bass). It's a superior solution all the way around.

I've attached the same Lilypond file that I used yesterday and you can see that it handles everything just like I wanted. Amazing!

Thank you very much!


On Mon, Oct 13, 2014 at 6:47 PM, David Nalesnik <[hidden email]> wrote:
Hi,

On Mon, Oct 13, 2014 at 1:18 PM, David Bellows <[hidden email]> 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


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Piano_Standard.pdf (103K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

David Nalesnik
In reply to this post by David Nalesnik


On Tue, Oct 14, 2014 at 1:57 AM, Janek Warchoł 

What i find most fascinating about your work is that you say this
after already making the function quite intelligent :)

I appreciate that, but I'd like to have some sort of analysis of context, so you wouldn't end up shutting it off for inconvenient results.

For example, compare the results of this:

{
  \ottavate #'(4 . 7) #'(-3 . -6) ##t {
    \relative c'''' {
      c16 c, c' c c c, c' c
    }
  }
}

with the much more readable:

{
  \relative c'''' {
      \ottava #1 c16 c, c' c c c, c' c
    }
}

But maybe this is an enhancement which could come later?

BTW, I've verified that you can do overrides of individual brackets.  You just don't have the benefit of \ottava #1 and the like in the ly file to tell you where to put them.

--David



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

auto-8-15.png (13K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

David Nalesnik
In reply to this post by David Bellows
David,

On Tue, Oct 14, 2014 at 10:53 AM, David Bellows <[hidden email]> wrote:

Wow! It works perfectly! I am officially replacing my software method with your Lilypond approach. Not only does it do everything I wanted but it has better fined-grained control since it uses ledger lines and not octave markings (like mine does). And it's got to be more efficient than mine (I had to create two separate loops outside the main Lilypond generating loop to handle both the treble and the bass). It's a superior solution all the way around.

I've attached the same Lilypond file that I used yesterday and you can see that it handles everything just like I wanted. Amazing!

Thank you very much!

You're very welcome!  I'm glad to hear that it is working without a hitch.

I'll continue to look at this, and make what improvements I can.

If you run into any problems, please let me know.

All the best,
David  


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Automatic ottava handling

Kieren MacMillan
In reply to this post by David Nalesnik
Hi David,

> But maybe this is an enhancement which could come later?

I was going to chime in a lot earlier in this thread, with a suggestion for a “minimum in/out” parameter… but I thought better of it, since you were pushing ahead with improvements so quickly.  =)
Clearly, such an enhancement would make this just about the perfect ottavator.
Great work.

Best,
Kieren.

_______________________

Kieren MacMillan, composer
www:  <http://www.kierenmacmillan.info>
email:  [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
12