lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Urs Liska
Subject: All grobs at a given time/in a note column in all or certain contexts
Date: Wed, 23 Oct 2019 19:59:31 +0000

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]