lilypond-user
[Top][All Lists]
Advanced

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

Re: Creating click tracks for an arbitrary time signature and length of


From: Matt Wallis
Subject: Re: Creating click tracks for an arbitrary time signature and length of music
Date: Fri, 20 Dec 2019 10:09:05 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.1

On 20/12/2019 01:10, Aaron Hill wrote:
On 2019-12-19 3:03 pm, Matt Wallis wrote:
What I want to do is to automatically create a click track for any
length of music, and any time signature. For example, if the music is
L measures in length, and the numerator of the time signature is N,
and the denominator is D, then I want a click track that looks like
this:

  \repeat unfold <L> \drummode { wbh<D> \repeat unfold <N-1> { wbl\pp }}

Here's a quick-and-dirty way to achieve close to what you want:

See brilliant solution in previous message:
https://lists.gnu.org/archive/html/lilypond-user/2019-12/msg00346.html


Firstly, \clickTrack is a function for generating one measure of clicking based on a desired beat and meter.  The beat defaults to the denominator of the meter if unspecified.  If the beat duration does not divide the measure perfectly, a final rest is inserted to pad out the measure.  Here are examples of use:

%%%%
   \repeat unfold 8 \clickTrack 2  4/4 % click on 1 and 3
   \repeat unfold 8 \clickTrack    4/4 % click on all four
   \repeat unfold 8 \clickTrack 4. 6/8 % click on 1 and 4
   \repeat unfold 8 \clickTrack 4  6/8 % click on 1, 3, and 5
   \repeat unfold 8 \clickTrack    6/8 % click on all six
%%%%

Secondly, \clickTrackDuring is a very basic wrapper for \clickTrack that automatically repeats the click measure to cover the duration of the specified music.  Note that no attempt is made to handle music that changes time signature nor music with \partial measures or other funny business.  If you had a anacrusis, you would need to manually offset the music:

%%%%
   % Assume \musicWithPickup begins with \partial 4
   \clickTrackDuring 3/4 { s2 \musicWithPickup }
%%%%

Thanks Aaron. That is amazing, and I think it over-achieves! I appreciate your attention to detail - with the option to specify the beat, and to add a final rest if the beat does not perfectly divide the measure.

The fact that is does not handle music with \partial measures, nor changes of time signature is not a problem to me at all, and it's simple to work around both of these 'limitations'.

Starting with a \partial measure is never an issue for me - if I want a click track, then I always want it to start at the beginning of a measure.

Thanks again. This will now be added to my standard template. Never again will I find that my click track ends before the music because I've added to the music and forgotten to update the repeat count for the click track :-)

Matt Wallis



reply via email to

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