Re: How to catch post-events inside chords in an event listener?

2022-02-07 Thread Jean Abou Samra
Le 07/02/2022 à 20:17, Lukas-Fabian Moser a écrit : Wow. Thanks. (And luckily Paris and Salzburg share a time zone.) So here's what made me stumble: In scm/scheme-engravers.scm, we find (define-public (event-has-articulation? event-type stream-event)   "Is @var{event-type} in the

Re: How to catch post-events inside chords in an event listener?

2022-02-07 Thread Valentin Petzel
Hello Lukas, I suppose the reason why Harm makes the detour over the music-cause is because the articulations-property might be deleted. Thus to make sure we get the original full articulations-property he uses the original music instead. Using (memq x l) sounds very reasonable. Afterall memq

Re: How to catch post-events inside chords in an event listener?

2022-02-07 Thread Lukas-Fabian Moser
Hi Jean, (CC'ing Harm because I'm using your code to demonstrate my ignorance.) I'm just still confused as to the terminology of event "classes" vs. event "types" etc. But that's something for next week... Allow me to take advance on next week by an hour, then (in Paris time, that is). The

Re: How to catch post-events inside chords in an event listener?

2022-02-06 Thread Valentin Petzel
Hi Lukas, Yes, memq is totally safe here and theoretically faster. But the performance difference is not really noticeable in usual situations. And in my opinion the whole eq? eqv? and equal? thing is just too confusing for beginners of scheme, so I opt so sacrifice this small theoretical gain

Re: How to catch post-events inside chords in an event listener?

2022-02-06 Thread Jean Abou Samra
> Le 6 févr. 2022 à 22:52, Lukas-Fabian Moser > I'm just still confused as to the terminology of event "classes" vs. event > "types" etc. But that's something for next week... Allow me to take advance on next week by an hour, then (in Paris time, that is). The terms "music class" and

Re: How to catch post-events inside chords in an event listener?

2022-02-06 Thread Lukas-Fabian Moser
Hi Valentin, Am 06.02.22 um 20:57 schrieb Valentin Petzel: one could try something like this. Yes, thanks, that's what did after David's explanations as well. In my situation (where I'm using a custom event type not covered by any standard engravers), I can then dispose of the dedicated

Re: How to catch post-events inside chords in an event listener?

2022-02-06 Thread Valentin Petzel
Hello Lukas, one could try something like this. Valentin Am Sonntag, 6. Februar 2022, 16:31:31 CET schrieb Lukas-Fabian Moser: > Folks, > > probably I'm being stupid: > > \version "2.22" > > #(define (test_engraver ctx) > (make-engraver > (listeners > ((tie-event engraver

Re: How to catch post-events inside chords in an event listener?

2022-02-06 Thread Lukas-Fabian Moser
Hi David, There is no such thing as an event inside chords. Events are broadcast specific to a timestep and have no association with individual notes. Thanks for the explanation! That makes it clear. Lukas

Re: How to catch post-events inside chords in an event listener?

2022-02-06 Thread David Kastrup
Lukas-Fabian Moser writes: > Folks, > > probably I'm being stupid: > > \version "2.22" > > #(define (test_engraver ctx) >    (make-engraver >     (listeners > ((tie-event engraver event) >   (format #t "Tie encountered at ~a.\n" (ly:context-current-moment > ctx)) > > \layout { >  

Re: How to catch post-events inside chords in an event listener?

2022-02-06 Thread Robin Bannister
Lukas-Fabian Moser wrote: What do I have to do to make my custom engraver also see post-events (here, a tie, but in my context it's a custom event type) used inside chords? I had a problem like that with tweaks, because the Tweak_engraver was called too late. See issue 3296. I had to

How to catch post-events inside chords in an event listener?

2022-02-06 Thread Lukas-Fabian Moser
Folks, probably I'm being stupid: \version "2.22" #(define (test_engraver ctx)    (make-engraver     (listeners ((tie-event engraver event)   (format #t "Tie encountered at ~a.\n" (ly:context-current-moment ctx)) \layout {   \context {     \Voice     \consists #test_engraver