Click-trackΒΆ

maelzel has a dedicated module for generating click tracks. A click track can be extracted from any score structure. It generated a Score with notes for each click, allowing to differentiate between strong, weak and compound beats.

[1]:
from maelzel.core import *
from maelzel.core import clicktrack

scorestruct = ScoreStruct(r'''
4/4, 72
.
3/8+2/8
3/8
2/4, 96
.
5/4
3/4
''')
clicktrack = clicktrack.makeClickTrack(scorestruct)
clicktrack.show()

../_images/notebooks_clicktrack_1_0.png
[2]:
clicktrack.rec('clicktrack.flac', nchnls=1)
[2]:
OfflineRenderer(outfile="clicktrack.flac", 1 channels, 17.60 secs, 44100 Hz)

A clicktrack can be exported as MIDI and imported in any DAW to use for rehearsal / performance.

[4]:
clicktrack.write('~/tmp/clicktrack.mid')

This is, for example, the result in Reaper:

image0

[ ]: