midiclick - generates a metronome click-track on MIDI channel 9
midiclick -t 108 # tempo is (starts at) 108 beats/min midiclick -t 108 -b 4 # Four beats in a bar midiclick -Q -t 108 -b 4 # Quiet mode; no User-Interface midiclick -o 14:1 -t 108 # Output to ALSA-port 14:1 midiclick -p # starts up in Paused mode xterm -geometry 80x7-1+1 -exec 'midiclick -t 165 -b 5' & ~> midiclick -o TiMidity -t 144 -b 5 -p ALSA client 129 midiclick pid=2157 Output port 129:1 is connected to 128:0 Tempo 144 beats/min BarLength 5 beats PAUSED Volume 100 _ t=Tempo b=Barlength <spacebar>=Play v=Volume q=Quit http://www.pjb.com.au/midi/midiclick.html
The MIDI::ALSA module is used to create an ALSA client.
The keyboard interface, allows real-time adjustment of the delay parameters. If you don't want the interface (e.g. in a Makefile), the -Q option sets Quiet-mode.
The Tempo will be set; to 72 beats per minute in this example. The default is 120.
The Bar length will be set; the bell will sound every 3 beats in this example The default is 0, which means every beat clicks and there are no bells.
This option sets the Volume (or Velocity) of the midi output. The default is 100.
This option starts midiclick in Paused state; you can then start it Playing with spacebar. This option is ignored in -Q Quiet mode.
This option sets the ouput-port to which the midi output will be sent. You can check out the available ports with the command aplaymidi -l or aconnect -ol. The default ouput-port is the environment variable $ALSA_OUTPUT_PORTS
This option runs midiclick in Quiet mode; there is no user-interface, and the metronome just runs with its Tempo and BarLength as given on the command-line, until it is interrupted. It can be useful in scripts.
This option displays the Version number.
Peter J Billam http://www.pjb.com.au/comp/contact.html
Based on the MIDI::Perl CPAN module in midi-file mode, and the MIDI::ALSA CPAN module in real-time mode.