Lukas-Fabian Moser <l...@gmx.de> writes: > Well, duration-or-music? already exists and it's used by \skip. > > Ah, my bad, I didn't think of looking whether it might already > exist. I'm surprised that such an either-/or type predicate doesn't > wreak havoc with the parser.
The parser doesn't have a hardwired notion of predicates for music/scheme/void functions. It throws various interpretations at the predicate and then decides which syntax to pursue. That makes the syntax tree/table Bison can produce comparatively pointless for figuring out how things are going to get interpreted. Partly because many syntactic decisions in the context of music functions are not actually determined by the grammar but by code poking at predicate functions and directing the parser by using synthetic tokens. And partly because a lot of stuff that was previously visible in the syntax has been moved into music functions. > However, this makes for the slight oddity that \skip 4 ... does not set the > default duration for the following music, whereas \skip {4} does. > > Which reminds me: Making the current parser default duration > scheme-accessible is a long-standing project of mine. This might > creating well-behaved music functions a little easier. (ly:music-property #{ q #} 'duration) -- David Kastrup