Re: change clef inside a grob-callback?

2009-07-17 Thread Mark Polesky
Joe Neeman wrote: Is there a way to change the clef from within a grob callback? Not really. You can change the clef's glyph, but you can't really change the clef's influence on the following notes. I presume you mean I can change the clef stencil, or do you mean that it's possible to

Re: change clef inside a grob-callback?

2009-07-17 Thread Joe Neeman
On Thu, 2009-07-16 at 23:06 -0700, Mark Polesky wrote: Joe Neeman wrote: Is there a way to change the clef from within a grob callback? Not really. You can change the clef's glyph, but you can't really change the clef's influence on the following notes. I presume you mean I can

Re: change clef inside a grob-callback?

2009-07-17 Thread Mark Polesky
Okay, I feel like I could be a lot closer. I rewrote the function using \applyOutput and a music-function. Everything is fine except: 1) using \ottava confuses the function, and 2) the clef changes one chord too late. At the moment, the \ottava issue is not a problem (I'll deal with that

Re: change clef inside a grob-callback?

2009-07-17 Thread Han-Wen Nienhuys
On Fri, Jul 17, 2009 at 6:58 PM, Mark Poleskymarkpole...@yahoo.com wrote: Okay, I feel like I could be a lot closer. I rewrote the function using \applyOutput and a music-function. Everything is fine except: This all looks very confused. There is a mechanism to make voices switch between

change clef inside a grob-callback?

2009-07-16 Thread Mark Polesky
Is there a way to change the clef from within a grob callback? I'm trying to create an auto-clef-change function that will find the average staff-position within a chord and change the clef if needed. But I'm a little stuck. I found a way to calculate each chord's average staff-position, but

Re: change clef inside a grob-callback?

2009-07-16 Thread Joe Neeman
On Thu, 2009-07-16 at 19:10 -0700, Mark Polesky wrote: Is there a way to change the clef from within a grob callback? Not really. You can change the clef's glyph, but you can't really change the clef's influence on the following notes. Reason being, the NoteHead grobs are created around the same