lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding metronome click track to MIDI


From: Valentin Villenave
Subject: Re: Adding metronome click track to MIDI
Date: Wed, 3 Jun 2020 18:04:13 +0200

On 6/3/20, Francesco Petrogalli <francesco.petrogalli@gmail.com> wrote:
> Is there a special midi instrument I could use for that?

Not that I know.
BTW, here’s a quick-and-dirty way of adding a click track, in case you
might find it useful:

%%%%%%

addTicks =
#(define-music-function (m) (ly:music?)
   #{ << $m
         \new Devnull \with {
           \consists Drum_note_performer
           \consists Staff_performer
           \consists Dynamic_performer
           midiInstrument = #"woodblock"
         } \drummode {
           <>\ff \repeat unfold
           $(ly:moment-main-numerator
             (ly:moment-div
              (ly:music-length m)
              (ly:make-moment 1 4)))
           rb4 }>> #})

music = \relative  c' { c2 d e f g a b c }

\score {
  \new Staff \addTicks \music
  \layout {}
  \midi {}
}

%%%%

Cheers,
-- V.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]