Skip to content

wjandrea/metronome.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Bash metronome

Originally posted on Ask Ubuntu as an answer to Where can I find a metronome for music practice?

Usage

metronome.sh [-h] [beats per minute] [beats per measure]

Info

  • It plays at 120 bpm in 4 by default
  • Maximum 600 bpm in 16, minimum 1 bpm in 1
  • The first beat is accentuated.
  • You can replace the sound IDs if you want. I just picked ones that sounded good from the Ubuntu 14.04 sound bank. A full list of IDs (names) can be found in the Sound Naming Specification of the freedesktop.org Sound Theme Spec
  • On my system, it's accurate to within about 1.5ms per beat, which is not noticeable. (Though I can't remember now how I tested this.)
  • metronome-core.sh is just the core stuff - no argument checking, help text, or anything fancy, except checking if sleep succeeds. It will bug out if the BPM is too high, for example.

For example

metronome.sh
metronome.sh 75     # 75 BPM
metronome.sh 120 3  # 120 BPM, 3 beats per measure

About

Simple Bash metronome for Ubuntu

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages