Debian Codegraph @

docs/plugins/bpm.rst

raw
1 BPM Plugin
2 ==========
3
4 This ``bpm`` plugin lets you to get the tempo (beats per minute) of a song by
5 tapping out the beat on your keyboard.
6
7 Usage
8 -----
9
10 To use the ``bpm`` plugin, first enable it in your configuration (see
11 :ref:`using-plugins`).
12
13 Then, play a song you want to measure in your favorite media player and type:
14
15 ::
16
17 beet bpm <song>
18
19 You'll be prompted to press Enter three times to the rhythm. This typically
20 allows to determine the BPM within 5% accuracy.
21
22 The plugin works best if you wrap it in a script that gets the playing song. for
23 instance, with ``mpc`` you can do something like:
24
25 ::
26
27 beet bpm $(mpc |head -1|tr -d "-")
28
29 If :ref:`import.write <config-import-write>` is ``yes``, the song's tags are
30 written to disk.
31
32 Configuration
33 -------------
34
35 To configure the plugin, make a ``bpm:`` section in your configuration file. The
36 available options are:
37
38 - **max_strokes**: The maximum number of strokes to accept when tapping out the
39 BPM. Default: 3.
40 - **overwrite**: Overwrite the track's existing BPM. Default: ``yes``.
41
42 Credit
43 ------
44
45 This plugin is inspired by a similar feature present in the Banshee media
46 player.