On 03/06/2020 15:55, Francesco Petrogalli wrote:
Hi all,
I need to add a metronome click sound to the MIDI generated with
lilypond, to allow people sync up a record-from-home session. A quick
web search didn't bring up anything that I could have used. Is there a
special midi instrument I could use for that?
Hi Francesco,
The solution I use for click tracks uses this:
https://lists.gnu.org/archive/html/lilypond-user/2019-12/msg00346.html
That will give you a definition of clickTrackForMusic. All you need to
do then is to provide the time signature and the music.
When I use it I do this:
-----
clickPart = \clickTrackForMusic \timeSignature \music
% Click track:
clickStaff = \new DrumStaff = "click" {
\set DrumStaff.instrumentName = #"Click "
\clickPart
}
-----
It automatically adjusts the length of the click track to the length of
the music, but does not handle changes of time signature or tempo.
Matt