Lukas-Fabian Moser <[email protected]> writes: > Hi Werner, > >>> Alternatively you may try to use \afterGrace to insert the \clef >>> before the bar line, although this would probably require some >>> manual spacing too. >> This doesn't work at all: `\afterGrace` doesn't accept a clef, as the >> image shows. > > afterGrace is defined as > > #(define-music-function (fraction main grace) ((scale?) ly:music? > ly:music?) ...) > > You write > > \afterGrace 1 { s8 \clef "bass" } | c,1 > > but 1 is a valid scale? because of > > (define-public (scale? x) > (or (and (rational? x) (exact? x) (not (negative? x))) > (fraction? x) > (and (ly:moment? x) (scale? (ly:moment-main x))))) > > in scm/c++.scm.
That begs the question whether it would make sense to restrict afterGrace scales to values below 1. But I think that making syntactic decisions based on values rather than types is really icky. It is probably a bad idea to make syntactic decisions that one would not expect a syntax highlighter to be able to figure out. -- David Kastrup
