5
5
6
6
# Xtractor (Beets Plugin)
7
7
8
- The * beets-xtractor * plugin lets you, through the use of the [ Essentia] ( https://essentia.upf.edu/index.html ) extractors,
8
+ The _ beets-xtractor _ plugin lets you, through the use of the [ Essentia] ( https://essentia.upf.edu/index.html ) extractors,
9
9
to obtain low and high level musical information from your songs.
10
10
11
11
Currently, the following attributes are extracted for each library item:
12
- ` bpm ` , ` danceability ` , ` beats_count ` , ` average_loudness ` , ` danceable ` , ` gender ` , ` is_male ` , ` is_female ` ,
12
+ ` bpm ` , ` danceability ` , ` beats_count ` , ` average_loudness ` , ` danceable ` , ` gender ` , ` is_male ` , ` is_female ` ,
13
13
` genre_rosamerica ` , ` voice_instrumental ` , ` is_voice ` , ` is_instrumental ` , ` mood_acoustic ` ,
14
14
` mood_aggressive ` , ` mood_electronic ` , ` mood_happy ` , ` mood_sad ` , ` mood_party ` , ` mood_relaxed ` , ` mood_mirex ` ,
15
15
` mood_mirex_cluster_1 ` , ` mood_mirex_cluster_2 ` , ` mood_mirex_cluster_3 ` , ` mood_mirex_cluster_4 ` , ` mood_mirex_cluster_5 `
16
16
17
17
## Installation
18
+
18
19
The plugin can be installed via:
19
20
20
21
``` shell script
21
- $ pip install beets-xtractor
22
+ pip install beets-xtractor
22
23
```
24
+
23
25
and activated the usual way by adding ` xtractor ` to the list of plugins in your configuration:
24
26
25
27
``` yaml
26
28
plugins :
27
- - xtractor
29
+ - xtractor
28
30
` ` `
29
31
30
32
### Install the Essentia extractors
31
33
32
- You will also need the ` streaming_extractor_music` binary extractor from the [Essentia project](#credits). You will need
33
- to compile this extractor yourself.
34
- The [official installation documentation](https://essentia.upf.edu/installing.html#compiling-essentia-from-source)
35
- is somewhat complex but with some cross searching on the internet you will make it. If you are stuck you can use
36
- the [Issue tracker](https://github.com/adamjakab/BeetsPluginXtractor/issues). Make sure you compile it with Gaia
37
- support (`--with-gaia`) otherwise will not be able to use the high level models.
38
-
34
+ You will also need the ` streaming_extractor_music` binary extractor from the [Essentia project](#credits).
35
+ Please refer to the [official installation documentation](https://essentia.upf.edu/installing.html#compiling-essentia-from-source)
36
+ for the installation procedure for your OS. If you are stuck you can use
37
+ the [Issue tracker](https://github.com/adamjakab/BeetsPluginXtractor/issues). If you are compiling Essentia from source,
38
+ make sure you compile it with Gaia support (`--with-gaia`) otherwise will not be able to use the high level models.
39
39
40
40
# ## Download the SVM models
41
41
42
- The second extractor uses prebuilt trained models for prediction. You need to download these from
43
- here : [SVM Models](https://essentia.upf.edu/svm_models/). I suggest that you download the more recent beta5 version.
42
+ For computing the high-level descriptors you will need the prebuilt trained models for prediction. You need to download these from
43
+ here : [SVM Models](https://essentia.upf.edu/svm_models/). I suggest that you download the most recent beta5 version.
44
44
This means that your binaries must match this version. Put the downloaded models in any folder from which they can be
45
45
accessed.
46
46
47
-
48
47
# # Configuration
48
+
49
49
All your configuration will need to go under the `xtractor` key. This is what your configuration should look like :
50
50
51
51
` ` ` yaml
52
52
xtractor:
53
- auto: no
54
- dry-run: no
55
- write: yes
56
- threads: 1
57
- force: no
58
- quiet: no
59
- keep_output: yes
60
- keep_profiles: no
61
- output_path: /mnt/data/xtraction_data
62
- essentia_extractor: /mnt/data/extractors/beta5/streaming_extractor_music
63
- extractor_profile:
64
- highlevel:
65
- svm_models:
66
- - /mnt/data/extractors/beta5/svm_models/danceability.history
67
- - /mnt/data/extractors/beta5/svm_models/gender.history
68
- - /mnt/data/extractors/beta5/svm_models/genre_rosamerica.history
69
- - /mnt/data/extractors/beta5/svm_models/mood_acoustic.history
70
- - /mnt/data/extractors/beta5/svm_models/mood_aggressive.history
71
- - /mnt/data/extractors/beta5/svm_models/mood_electronic.history
72
- - /mnt/data/extractors/beta5/svm_models/mood_happy.history
73
- - /mnt/data/extractors/beta5/svm_models/mood_sad.history
74
- - /mnt/data/extractors/beta5/svm_models/mood_party.history
75
- - /mnt/data/extractors/beta5/svm_models/mood_relaxed.history
76
- - /mnt/data/extractors/beta5/svm_models/voice_instrumental.history
77
- - /mnt/data/extractors/beta5/svm_models/moods_mirex.history
53
+ auto: no
54
+ dry-run: no
55
+ write: yes
56
+ threads: 1
57
+ force: no
58
+ quiet: no
59
+ keep_output: yes
60
+ keep_profiles: no
61
+ output_path: /mnt/data/xtraction_data
62
+ essentia_extractor: /mnt/data/extractors/beta5/streaming_extractor_music
63
+ extractor_profile:
64
+ highlevel:
65
+ svm_models:
66
+ - /mnt/data/extractors/beta5/svm_models/danceability.history
67
+ - /mnt/data/extractors/beta5/svm_models/gender.history
68
+ - /mnt/data/extractors/beta5/svm_models/genre_rosamerica.history
69
+ - /mnt/data/extractors/beta5/svm_models/mood_acoustic.history
70
+ - /mnt/data/extractors/beta5/svm_models/mood_aggressive.history
71
+ - /mnt/data/extractors/beta5/svm_models/mood_electronic.history
72
+ - /mnt/data/extractors/beta5/svm_models/mood_happy.history
73
+ - /mnt/data/extractors/beta5/svm_models/mood_sad.history
74
+ - /mnt/data/extractors/beta5/svm_models/mood_party.history
75
+ - /mnt/data/extractors/beta5/svm_models/mood_relaxed.history
76
+ - /mnt/data/extractors/beta5/svm_models/voice_instrumental.history
77
+ - /mnt/data/extractors/beta5/svm_models/moods_mirex.history
78
78
` ` `
79
79
80
80
First of all, you will need adjust all paths. Put the path of the extractor binary in `essentia_extractor` and
81
81
substitute the location of the SVM models with your local path under the `svm_models` section. Finally, set
82
82
the `output_path` to indicate where the extracted data files will be stored. If you do not set this, a temporary path
83
- will be used.
83
+ will be used.
84
84
85
- **Note on shell tilde expansion**: Please note that you cannot use shell expansion on the `svm_models` (i.e.: do not use `~` for your home folder).
85
+ **Note on shell tilde expansion**: Please note that you cannot use shell expansion on the `svm_models` (i.e.: do not use `~` for your home folder).
86
86
The entire section of `extractor_profile` is passed as-is to the essentia extractor binary and it will not do tilde expansion on your paths.
87
87
The rest of the path keys such as `essentia_extractor` and `output_path` are used by the plugin itself and it will take
88
- care of expanding the tilde symbol (`~`) to the home directory of the user running the script.
88
+ care of expanding the tilde symbol (`~`) to the home directory of the user running the script.
89
89
90
90
By default both `keep_output` and `keep_profile` options are set to `no`. This means that after extraction (and the
91
91
storage of the important information) the profile files used to pass to the extractors, and the json files created by
@@ -107,22 +107,20 @@ The `dry-run` option shows what would be done without actually doing it.
107
107
108
108
**NOTE**: Please note that the `auto` option is not yet implemented. For now you will have to call the xtractor plugin manually.
109
109
110
-
111
110
# # Usage
112
111
113
112
Invoke the plugin as :
114
113
115
114
$ beet xtractor [options] [QUERY...]
116
-
115
+
117
116
For a more verbose reporting use the `-v` flag on `beet` :
118
117
119
118
$ beet -v xtractor [options] [QUERY...]
120
-
119
+
121
120
The plugin has also got a shorthand `xt` so you can also invoke it like this :
122
121
123
122
$ beet xt [options] [QUERY...]
124
123
125
-
126
124
The following command line options are available :
127
125
128
126
**--dry-run [-d]**: Only show what would be done - displays the extracted values but does not store them in the library.
@@ -141,14 +139,13 @@ The following command line options are available:
141
139
142
140
These command line options will override those specified in the configuration file.
143
141
144
-
145
142
# # Issues
143
+
146
144
- If something is not working as expected please use the Issue tracker.
147
145
- If the documentation is not clear please use the Issue tracker.
148
146
- If you have a feature request please use the Issue tracker.
149
147
- In any other situation please use the Issue tracker.
150
148
151
-
152
149
# # Other plugins by the same author
153
150
154
151
- [beets-goingrunning](https://github.com/adamjakab/BeetsPluginGoingRunning)
@@ -159,19 +156,18 @@ These command line options will override those specified in the configuration fi
159
156
- [beets-bpmanalyser](https://github.com/adamjakab/BeetsPluginBpmAnalyser)
160
157
- [beets-template](https://github.com/adamjakab/BeetsPluginTemplate)
161
158
162
-
163
159
# # Credits
164
- Essentia is an open-source C++ library with Python bindings for audio analysis and audio-based music information retrieval. It is released under the Affero GPLv3 license and is also available under proprietary license upon request. This plugin is just a mere wrapper around this library. [Learn more about the Essentia project](http://essentia.upf.edu)
165
160
161
+ Essentia is an open-source C++ library with Python bindings for audio analysis and audio-based music information retrieval. It is released under the Affero GPLv3 license and is also available under proprietary license upon request. This plugin is just a mere wrapper around this library. [Learn more about the Essentia project](http://essentia.upf.edu)
166
162
167
163
# # References
164
+
168
165
- [Essentia](https://essentia.upf.edu/index.html)
169
166
- [SVM Models](https://essentia.upf.edu/svm_models/)
170
167
- [Essentia Licensing](https://essentia.upf.edu/licensing_information.html)
171
168
- [MTG Github - Music Technology Group](https://github.com/MTG)
172
169
- [Acousticbrainz Downloads](https://acousticbrainz.org/download)
173
170
174
-
175
171
# # Final Remarks
176
- Enjoy!
177
172
173
+ Enjoy!
0 commit comments