Home
Name Modified Size InfoDownloads / Week
README 2014-09-29 5.5 kB
ctronome-0.5.6.tar.gz 2014-09-29 27.2 kB
NOTES 2014-09-29 1.0 kB
prog_example.txt 2014-09-29 399 Bytes
ChangeLog 2014-09-29 2.0 kB
COPYING 2014-09-29 18.0 kB
Totals: 6 Items   54.1 kB 0
ctronome v0.5.6

GNU/GPL copying rules apply, see COPYING

DISCLAIMER
   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.

INTRODUCTION
   Ctronome is a very-very simple programmable metronome for Linux console,
   with /dev/dsp (OSS) audio output. BPM ranges from 30 to 250, tacts like 3/4, 7/8
   etc. are possible. It plays external WAV files, so one could use custom
   sound samples.
  
   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;)

   Non-OSS sound systems may need additonal utils/libraries to 
   provide OSS compatibility.


COMPILE-TIME CONFIGURATION:
   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.
 
COMPILATION:
   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.
  
INSTALLATION:
   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)
   wav samples included, recorded from a real metronome. You have to install the one that
   fits your sound system (see NOTES).

   Example compilation and installation into default location:
	tar xzf ctronome-0.5.6.tar.gz
	cd ctronome-0.5.6
	make
	mkdir /usr/share/ctronome
	cp *wav /usr/share/ctronome
	cp ctronome /usr/local/bin

RUNNING:
 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
                         default: /usr/share/ctronome/metronome1.wav
    -w2 <filename>      wav to use for other beat of tact
                         default: /usr/share/ctronome/metronome2.wav
    -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
   tact.

   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.

RUNNING ON SYSTEMS WITH PulseAudio:
   On modern Linux distributions like Ubuntu 12.10 with PulseAudio, you may
   experience the following error when running ctronome:
	FATAL: cannot open dsp device /dev/dsp
	/dev/dsp: No such file or directory		

   The solution is to either install OSS compatibility modules or install
   the pulseaudio-utils package that contains a wrapper program called padsp.
   Use this wrapper to run ctronome:

	padsp ctronome <ctronome options>

   Or you could use a simple shell script:
	#!/bin/sh
	padsp ctronome $@

RUNNING ON SYSTEMS WITH ALSA:
   An ALSA utility similar to PulseAudio's wrapper exists called aoss and is
   part of alsa-oss package - at least in Debian-based distros.

	aoss ctronome <ctronome options>

RUNNING ON SYSTEMS WITHOUT OSS SUPPORT
   As far as I know, Alsa and PulseAudio both have means to emulate OSS
   either by installing compatibility modules or via a wrapper program.
   Please refer to the documentation of the respective audio system.

   If you have a step-by-step guide for a specific configuration, please
   send it in and I will include it in the ctronome documentation.

SEND BUGREPORTS TO:
   ctronome at kign dot org

CREDITS:
   dsp code is based on gTick by Alex Roberts <bse@dial.pipex.com>,
            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.

   Patch to fix amd64 platform bug by Dmitry Kazarov

   and help from my friends: Zola & Arpy.

Source: README, updated 2014-09-29