Hi Lukas/Samuel, On Thu, Apr 30, 2020 at 10:24:27AM +0200, Lukas-Fabian Moser wrote: > in contrast to my above definition of "lyric?" using music-is-of-type?. > > 1) Which variant is to be preferred? > 2) What is the difference between 'LyricEvent and 'lyric-event ?
Looking at the code, it appears that, for a lyrics event, the 'name property of the music object will be 'LyricEvent whereas 'lyric-event will be one of its 'types: (LyricEvent . ((description . "A lyric syllable. Must be entered in lyrics mode, i.e., @code{\\lyrics @{ twinkle4 twinkle4 @} }.") (iterator-ctor . ,ly:rhythmic-music-iterator::constructor) (types . (rhythmic-event lyric-event event)) )) The music-is-of-type function checks the 'types list, so you would need to check for 'lyric-event. If you are using ly:music-property, then you would need to check the 'name for 'LyricEvent. It looks like 'LyricEvent is the only class that includes lyric-event in its 'types, so as long as that is true the two checks are equivalent (as far as I can tell). Kevin