Yes, you can make a count-in that you can hear in the midi file, but doesn't show up in the pdf score. The trick is actually to make two score blocks (one with the count-in and one without). Fortunately this is reasonably easy if you use variables.
Normally when using multiple instruments in a score you would want to wrap them both in double chevrons <<
>>
, but this isn't appropriate here as you don't want them to be simultaneous, you want instruments to be sequential — so braces are required {
}
.
\version "2.18.2"
% Clave
clave = {
\new DrumStaff {
\drummode {
cl4 cl cl cl |
}
}
}
% Piano
piano = {
\new Staff {
c'4 d' c' d' |
}
}
%% PDF
\score {
\piano
\layout { }
}
%% MIDI
\score {
{
\clave
\piano
}
\midi { }
}