Re: All grobs at a given time/in a note column in all or certain contexts

2019-10-24 Thread Klaus Blum
Hi Urs, 

Urs Liska-3 wrote
> is it possible from either a music function or a callback or an engraver
> to get to all the grobs in a certain note column, either across the whole
> score or within specific contexts?

a few years ago, David Nalesnik wrote an interesting engraver: 
http://lilypond.1069038.n5.nabble.com/box-around-notes-td35581.html
  

IIUC, it iterates through all grobs inside a music expression to determine
the dimensions of a box around it. 

I learned a lot from that thread, but most of the magic there is far beyond
anything I can understand.  :(
But maybe it's helpful for you... 

Cheers, 
Klaus




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


All grobs at a given time/in a note column in all or certain contexts

2019-10-23 Thread Urs Liska
Hi all,

is it possible from either a music function or a callback or an engraver to get 
to all the grobs in a certain note column, either across the whole score or 
within specific contexts? And/or the skylines in these.

I want to learn how to write a music function that takes some music and does 
something taking all relevant grobs into account, e.g. drawing a bounding 
rectangle around everything. I *assume* I would have to somehow "mark up" 
everything enclosed in the music expression (i.e. attach some arbitrary 
property values to the elements) and later process these properties in a 
callback. I think an engraver would be the appropriate tool for that, but I 
don't really recall how I'd have to approach this.

If an example is easier than an explanation or a pointer I'd be happy about an 
example that includes
- a music expression taking arbitrary music and an optional list of context 
names
- something that produces a list of all grobs that are included in/produced by 
that music expression
  and optionally at the same time in all/given other contexts
- is able to act upon the total of these grobs, e.g. drawing a rectangle around 
the extreme extents
  (although I can figure out that last one if I have the list of grobs and a 
suitable callback
  where I can use it)

Thank you for any suggestions!
Urs

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user