Code Monkey home page Code Monkey logo

metronome.sh's Introduction

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

metronome.sh's People

Contributors

wjandrea avatar

Stargazers

 avatar  avatar  avatar  avatar

Forkers

pbergo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.