GNU/GPL copying rules apply, see COPYING
THIS SOFTWARE COMES AS-IS. ALTHOUGH THE AUTHOR DOES ITS BEST TO MAKE
THIS PROGRAM SAFE TO USE, MISTAKE HAPPENS. USE IT AT YOUR OWN RISK.
THE AUTHOR DOES NOT TAKE ANY RESPONSIBILITY FOR WHAT THIS SOFTWARE
DOES TO YOUR PC. BACKUP FREQUENTLY.
Ctronome is a very-very simple programmable metronome for Linux console,
with /dev/dsp audio output. BPM ranges from 30 to 250, tacts like 3/4, 7/8
etc. are possible. It Uses plays external WAV files, so one could use custom
Aim is to keep it as simple as it can be so dummies like me may understand
and modify it. (The source code looks ugly though;)
edit ctronome.h for defaults, the most important ones are:
metronomewav1 = "/usr/share/ctronome/metronome1.wav\0";
metronomewav2 = "/usr/share/ctronome/metronome2.wav\0";
dspdev = "/dev/dsp\0";
They speak for themselves.
Only the very basic C libraries are needed that I believe to exist
on virtally all Linuxes. You need to have Linux kernel header
files installed (they come with the Linux kernel source), and OSS
(or OSS compatible) soundcard support.
Go into ctronome source directory and type 'make'.
It should compile whithout errors.
Ctronome is a single binary. You can put it anywhere you want in
your local or remote filesystem. You need two, preferably short
WAV files as metronome sample, put in the place you specified in
ctronome.h, or specified on the command line.
There are two one-channel and two two-channel (both channels are the same)
included, recorded from a real metronome. You have to install the one that
fits your sound system (see NOTES)
ctronome -b <bpm> -t <bpt> -c <count> -w1 <wav1> -w2 <wav2> -d <dsp_device> \
-p <program> -h -v
-b <bpm> beat per minute default: 60/4, range: 30-250/1-20
-t <bpt> beat per tact default: 1/4, range: 1-50/1-50
-p <filename> program file
-c <count> play tact/program <count> times then exit
-w1 <filename> wav to use for first beat of tact
-w2 <filename> wav to use for other beat of tact
-d <device> dsp device, default /dev/dsp
-h display help screen
-debug display debug messages
See prog_example.txt to learn how to program ctronome.
For BPM you can specify the base note. E.g. 60/4 means:
60 1/4 notes per minute -> length of 1/4 note is 1 second.
For BPT you can also define the base note. E.g. 4/4 means:
4 1/4 notes per tact -> length of a tact is 4 seconds.
As you can see, it is now possible to specify the BPM in 1/4 notes,
and then you can use BPT like 7/8, ctronome calculates lenght of 1/8 note
(which is half of the 1/4 in this example) and plays seven of them for a
If the base note for BPM is not specified, it defaults to the base note
of the tact.
It requires two 16 bit per sample WAV format, mono or stereo, and preferably
at least 44100Hz sample rate. *The two WAV formats must be the same!*
Please note that if your sound system does not support the exact format
provided by the WAV files, it will try its best to play it anyway, but
the result will be unpredictable. Debug mode will tell you the details.
SEND BUGREPORTS TO:
ctronome at kign dot org
dsp code is based on gTick by Alex Roberts <firstname.lastname@example.org>,
and also the OSS Programmers Guide
Patch to eliminate warnings with Gcc4, and included WAV samples digitally
remastered to be more pronounced and precise by Martin Tarenskeen.
and help from my friends: Zola & Arpy.