Crates.io | clave |
lib.rs | clave |
version | 0.4.10 |
created_at | 2025-01-12 03:23:35.091319+00 |
updated_at | 2025-01-12 23:06:06.161892+00 |
description | Midi click-track generator |
homepage | |
repository | https://github.com/mikea/clave |
max_upload_size | |
id | 1512926 |
size | 11,559,432 |
Clave is a midi click-track generator. It generates single-track single-channel midi file with a customizable click pattern.
Note: click tracks are percussion in their nature. Because of this clave does not generate note off events (only note on).
A lot of pregenerated tracks are available in tracks folder.
cargo install clave
By default Clave generates 1000 beats of 120bpm 4/4 clicks:
clave --out 44_120.mid
You can use command line arguments to customize the track:
-b, --bpm <BPM> Track tempo (beats per minute) [default: 120]
--channel <CHANNEL> Midi channel [default: 10]
--beats <BEATS> Track length in number of beats [default: 1000]
--vel <VEL> Default note velocity [default: 63]
--acc-vel <ACC_VEL> Accented note velocity [default: 94]
--ghost-vel <GHOST_VEL> Ghost note velocity [default: 31]
--subs <SUBS> Number of subdivisions in a pattern [default: 1]
-p, --pattern <PATTERN> Click pattern [default: m>mmm]
You can use --pattern
together with --subs
to create
more sophisticated click patterns:
m
- metronome clickc
- clave clickh
- closed hi-hatr
- rest>
- accented note,
- ghost noteDefault pattern is m>mmm
which corresponds to 4/4
metronome click with accented first beat.
Some usefull patterns are:
Description | Subs | Pattern |
---|---|---|
4/4 with ghost 8th | 2 |
"m>m,mm,mm,mm," |
Son clave 3-2 | 2 |
"crrcrrcrrrcrcrrr" |
Son clave 2-3 | 2 |
"rrcrcrrrcrrcrrcr" |
Rumba clave 3-2 | 2 |
"crrcrrrcrrcrcrrr" |
Rumba clave 2-3 | 2 |
"rrcrcrrrcrrcrrrc" |
Cascara 2-3 | 2 |
"h>rh>rhh>rhh>rhh>rh>rh" |