Hi everyone,
I am about to create a lot of cues, and in the attached MnWE I wrote a
helper function to create cues quickly.
Why does the function expect the third argument to be a string when the
type clearly seems to be ly:music?
A similar function using \cueDuringWithClef works fineā¦
Cheers,
Vaughan
\version "2.26.0"
%{
% This similar function works fine:
myCueWithClef = #(define-music-function
(instrument direction clef musicBefore musicDuring)
(markup? integer? markup? ly:music? ly:music?)
#{
<<
\tag #'scoreOnly { #musicBefore #musicDuring }
\tag #'partOnly {
#musicBefore
<>^\markup \tiny #instrument
\override Voice.MultiMeasureRestNumber.stencil = ##f
\cueDuringWithClef #instrument #direction #clef #musicDuring
\revert Voice.MultiMeasureRestNumber.stencil
}
>>
#}
)
%}
myCue = #(define-music-function
(instrument direction rests)
(markup? integer? ly:music?)
#{
<<
\tag #'scoreOnly { #rests }
\tag #'partOnly {
<>^\markup \tiny #instrument
\override Voice.MultiMeasureRestNumber.stencil = ##f
\cueDuringWithClef #instrument #direction #rests
\revert Voice.MultiMeasureRestNumber.stencil
}
>>
#}
)
ClarinetOne = \relative {
\time 4/4
\key f \minor
f,4(\p c'2 bes4 |
aes4) f( ees8 f g4~ |
g4 f2.) |
}
\addQuote "Clarinet 1" \ClarinetOne
FluteOne = \relative {
\time 4/4
\key f \minor
% why is argument 3 expecting a string?????
% error: wrong type for argument 3. Expecting string, found (make-music (quote MultiMeasureRestMusic) (quote duration) (ly:make-duration 0 0 3) (quote articulations) (quote ()))
\myCue "Clarinet 1" #DOWN { R1*3 }
aes''2.~(\mf aes8 bes) |
}
\score {
\removeWithTag #'scoreOnly
\new Staff \new Voice \FluteOne
\layout{}
}