Re: Detect slurred notes in callback function

2016-02-14 Thread Jakub Pavlík
Hi David, as promised, here is my unsuccessful attempt based on a closure preserving state information between invocations. Regards, Jakub --- \version "2.19.32" #(define (contains-slur-event-with-direction? lst direction) (if (null-list? lst) #f (if (music-is-of-type? (car ls

Re: Detect slurred notes in callback function

2016-02-11 Thread Paul Morris
> On Feb 7, 2016, at 5:42 PM, David Nalesnik wrote: > > Slur grobs store a pointer to an array of NoteColumns they encompass. So, > expanding on Paul's solution, you could do something like this: Very nice solution! Might be worth an LSR snippet as a good example of this kind of grob to grob

Re: Detect slurred notes in callback function

2016-02-11 Thread Jakub Pavlík
Hi David, thank you very much - actually this is just what I was looking for! It works great. > It would be interesting to see your code for this. This randomness was > the topic of an earlier thread, and I wonder if your observation is > related: > http://www.mail-archive.com/lilypond-user%40g

Re: Detect slurred notes in callback function

2016-02-07 Thread David Nalesnik
Hi Jakub, On Sun, Feb 7, 2016 at 12:45 PM, Jakub Pavlík wrote: > Thank you very much, now I know at least how to get from a grob to the > corresponding music object. > > In order to "catch" the notes under a slur that aren't slur attach points > ("middle notes") I tried to use a closure as the c

Re: Detect slurred notes in callback function

2016-02-07 Thread Jakub Pavlík
Thank you very much, now I know at least how to get from a grob to the corresponding music object. In order to "catch" the notes under a slur that aren't slur attach points ("middle notes") I tried to use a closure as the callback function and store information on the "slurred state" (in slur / no

Re: Detect slurred notes in callback function

2016-02-07 Thread Paul Morris
Hi Jakub, FWIW, here’s another approach that starts from slurs and goes to note heads. (Adapted from some code for tied notes where this works a little more cleanly since ties connect to note heads directly rather than to note columns…) Unfortunately, this one also doesn’t color notes in the

Re: Detect slurred notes in callback function

2016-02-07 Thread Thomas Morley
2016-02-07 14:30 GMT+01:00 Jakub Pavlík : > Hi, > > is it possible to detect slurred notes in a callback function? I would like > to use a callback function to modify properties of all slurred notes. > > Below is my unsuccessful attempt. > The callback function receives NoteHead grob as argument. T

Detect slurred notes in callback function

2016-02-07 Thread Jakub Pavlík
Hi, is it possible to detect slurred notes in a callback function? I would like to use a callback function to modify properties of all slurred notes. Below is my unsuccessful attempt. The callback function receives NoteHead grob as argument. The grob itself doesn't seem to contain information abo