The result of playing around with a few features of vorpal, but also a useful cli utility.
Tap for bpm, or set set bpm directly and play them. Can also play arbitrary sine tones.
npm install -g metronome-cliRun metronome to start an immersive session with the following commands:
Tapping space while holding ctrl will set the bpm.
startaliasplay: starts the metronomestopaliasend: stops the metronomebpm <bpm>: set or print the current bpmadd: add to the current bpmmul <factor>aliasmultiply <factor>: multiply the current bpm with factorfreq <frequency>aliasfrequency <frequency>: set or print the pitch to use. Accepts written representation of a note, which is parsed using note-parsertone [frequency] [seconds]: play the current or given frequencytapwindow [window]: set or print the integer which specifies how many of the last taps should be used when setting bpm by tappingtaptolerance: set or print the factor that determines when tapping stopped when setting bpm by tapping- example: when tapping at 60 bpm with tolerance of 0.5, tempo resets if you don't tap for (60sec/60bpm)*((1 + 0.5)bpm) = 1.5 sec, or if you tap to fast (twice in (60sec/60bpm)*((1 - 0.5)bpm) = 0.5 sec)
length [seconds]: set or print the length of the metronome ticks
Shortcuts:
- use
ctrl + pto toggle playing - use
ctrl + arrow_leftandctrl + arrow_rightto decrement/increment bpm - use
alt + arrow_leftandalt + arrow_rightto decrement/increment bpm by 4 - writing an integer without any command sets the bpm to that integer