| 1 |
AutoBPM Plugin |
| 2 |
============== |
| 3 |
|
| 4 |
The ``autobpm`` plugin uses the Librosa_ library to calculate the BPM of a track |
| 5 |
from its audio data and store it in the ``bpm`` field of your database. It does |
| 6 |
so automatically when importing music or through the ``beet autobpm [QUERY]`` |
| 7 |
command. |
| 8 |
|
| 9 |
Install |
| 10 |
------- |
| 11 |
|
| 12 |
To use the ``autobpm`` plugin, first enable it in your configuration (see |
| 13 |
:ref:`using-plugins`). Then, install ``beets`` with ``autobpm`` extra |
| 14 |
|
| 15 |
.. code-block:: bash |
| 16 |
|
| 17 |
pip install "beets[autobpm]" |
| 18 |
|
| 19 |
Configuration |
| 20 |
------------- |
| 21 |
|
| 22 |
To configure the plugin, make a ``autobpm:`` section in your configuration file. |
| 23 |
|
| 24 |
Default |
| 25 |
~~~~~~~ |
| 26 |
|
| 27 |
.. code-block:: yaml |
| 28 |
|
| 29 |
autobpm: |
| 30 |
auto: yes |
| 31 |
force: no |
| 32 |
beat_track_kwargs: {} |
| 33 |
quiet: no |
| 34 |
|
| 35 |
.. conf:: auto |
| 36 |
:default: yes |
| 37 |
|
| 38 |
Analyze every file on import. Otherwise, you need to use the ``beet |
| 39 |
autobpm`` command explicitly. |
| 40 |
|
| 41 |
.. conf:: force |
| 42 |
:default: no |
| 43 |
|
| 44 |
Calculate a BPM even for files that already have a ``bpm`` value. Can also be set |
| 45 |
using the ``-f`` or ``--force`` flag. |
| 46 |
|
| 47 |
.. conf:: overwrite |
| 48 |
:default: no |
| 49 |
|
| 50 |
.. deprecated:: 2.9 Use ``force`` instead. |
| 51 |
|
| 52 |
.. conf:: beat_track_kwargs |
| 53 |
:default: {} |
| 54 |
|
| 55 |
Any extra keyword arguments that you would like to provide to librosa's |
| 56 |
beat_track_ function call, for example: |
| 57 |
|
| 58 |
.. code-block:: yaml |
| 59 |
|
| 60 |
autobpm: |
| 61 |
beat_track_kwargs: |
| 62 |
start_bpm: 160 |
| 63 |
|
| 64 |
.. conf:: quiet |
| 65 |
:default: no |
| 66 |
|
| 67 |
Suppress the message indicating that a file already has a ``bpm`` value. Can also be |
| 68 |
set using the ``-q`` or ``--quiet`` flag. |
| 69 |
|
| 70 |
.. _beat_track: https://librosa.org/doc/latest/api/generated/librosa.beat.beat_track.html |
| 71 |
|
| 72 |
.. _librosa: https://github.com/librosa/librosa/ |