openlilylib / snippets

A place to store useful pieces of LilyPond code - custom functions, engravers, hacks, templates, examples etc.
Other
119 stars 39 forks source link

Additional interface functions for edition-engraver #142

Open uliska opened 8 years ago

uliska commented 8 years ago

There are so many instances where you'll use \editionMod ... \once \override ... so I think we should add new functions for this kind of use case. Something like

\eeOOverride fullscore 13 0/4 TextScript.Y-Offset 5

which will internally translate to

\editionMod fullscore 13 0/4 \once \override TextScript.Y-Offset = 5

This approach would also make it possible to automatically add a conditional coloring based on the state of, say \getOption default.draft.


Additionally I think of things like

\eeOverrideFor fullscore 13 0/4 4*17 TextScript.color #red

=>

\editionMod fullscore 13 0/4 \temporary \override TextScript.color = #red
\editionMod fullscore #(add-duration 13 0/4 4*17) \revert TextScript.color

Of course the existing functions should be kept to allow arbitrary music expressions to be applied. But there could be more use cases for other specialized interface functions.

I think things like these shouldn't be hard to implement, the most complicated thing probably being the naming ;-)


However, I'm thinking if it wouldn't be a good idea not to improve the edition-engraver and then move it into a new-style library. There have now been multiple experiences with the tool, ideas for subtle and substantial improvements, and a completely new use case. Maybe it's time for a restart, collaboratively creating that new library from scratch and simply leaving the current tool as it is. This should go along with a new ID based approach.

@jpvoigt @kierenmacmillan ideas? opinions?

kierenmacmillan commented 8 years ago

Hi Urs,

Maybe it's time for a restart, collaboratively creating that new library from scratch and simply leaving the current tool as it is. This should go along with a new ID based approach

@jpvoigt @kierenmacmillan ideas? opinions?

I think we shouldn’t rule out a from-scratch approach. Regardless, I’ve got a wealth of experience (several years and dozens of scores) from which I can speak to this.

Cheers, Kieren.


Kieren MacMillan, composer ‣ website: www.kierenmacmillan.info ‣ email: info@kierenmacmillan.info

uliska commented 8 years ago

Maybe you could start speaking (aside and maybe privately) to me with hints on how the edition-engraver can successfully interact with multiple bookparts?