On 11/07/2013 12:31 AM, Paul Morris wrote:
Bric wrote
So, can one throw in conditionals?
(1) Can one, for instance, check/manifest the pitch and duration of
'#the-music' ? And based on those values are, write something or not?
(2) And how DOES one write something extra? For example, add a note, or
add a \markup (again, conditionally, perhaps). I tried adding variants
of the following...
Check out these snippets:
http://lsr.dsi.unimi.it/LSR/Item?id=82
http://lsr.dsi.unimi.it/LSR/Item?id=83
They show examples of how to add things to the music (on the input side)
using scheme. Doing it conditionally would then be the next step.
(3) Is "#the-music" an object, with properties and stuff, and how does
one access/modify those properties?
This should help with this:
http://lilypond.org/doc/v2.16/Documentation/extending/displaying-music-expressions
OK. I've read through the above.
I haven't done much with adding things to the music on the input side like
you are wanting. I have mostly customized what's output by conditionally
modifying grob properties. These are two different sides or angles...
For example, NoteHead.color is a grob property and you could conditionally
change it based on a note's pitch using scheme, for example:
http://lsr.dsi.unimi.it/LSR/Item?id=572
I have SOME understanding of the advanced snippet code
The other two you referred to seem to be vital to my quest -
http://lsr.dsi.unimi.it/LSR/Item?id=82
http://lsr.dsi.unimi.it/LSR/Item?id=83
Development is moving insanely fast here. I just compiled 2.17.29, and
there's already 2.17.95
I guess I need to build the latest frescobaldi, locally(?), so it's in
step with the latest lilypond?
Some feedback on the snippet database: It has a "sort by date" option,
but the dates are not showing. I think it would be of some benefit to
manifest the dates. Also, to juxtapose the code and its rendered
result, on the same page, would also be good (save a lot of time, in the
long run)
So, obviously, just to add a "^markup" to the music function is not
trivial. I'm gathering that (text) markup belongs to an "event
function", rather than a "music function", and the two can't be
integrated ... although, that doesn't sound likely, off the top of my
head, given the power and flexibility of this environment.
I have lots of other reflections but will post this for now.
thanks!
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user