Music with Beets

Beets is an incredible tool for organizing a local music library. It’s a little geeky, but does such a stellar job integrating metadata from MusicBrainz with auto-matching, album art, lyrics, etc. It supports deduplication, transcoding, and a ton more with plugins.

Anyone with a love of both local music and infra-as-code would be in paradise.

I just hit over 10k songs, which is managed like a dream with beets:

1
2
3
4
5
6
7
❯ beet stats
Tracks: 10008
Total time: 3.9 weeks
Approximate total size: 63.9 GiB
Artists: 2754
Albums: 2016
Album artists: 1280

One particularly cool plugin is smartplaylist, which is similar to the Smart Playlist in iTunes but defined all in yaml!

It looks like a nightmare without some kind of const for all the World music, but it’s really not so bad considering the utility.

Here is my entire beets config:

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
directory: ~/Music/songs
library: ~/Music/beets.db
import:
  move: yes
  detail: yes
  write: yes
#    quiet_fallback: asis
#    duplicate_action: skip

plugins:
  - fetchart
  - embedart
  - inline
  - chroma
#  - convert
  - duplicates
  - info
  - lyrics
  - missing
  - playlist
  - badfiles
  - thumbnails
  - smartplaylist
  - lastgenre
# - oldestdate
# - recordingdate

lastgenre:
  source: track
  
#recordingdate:
#    auto: true
#    force: false # If songs should be rescanned
#    write_over: true

oldestdate:
  auto: false
  ignore_track_id: yes
  filter_on_import: yes
  prompt_missing_work_id: yes
  force: yes
  overwrite_year: yes
  filter_recordings: yes
  approach: 'releases'

musicbrainz:
  searchlimit: 20
  
convert:
  auto: false

acoustid:
  apikey: [REDACTED]

smartplaylist:
  relative_to: ~/Music/songs
  playlist_dir: ~/Music/lists

  playlists:
    - name: "30s.m3u"
      query: 'year:1930..1939 ^"genre::(Classical|Lo-Fi|Ambient|Opera|Salsa|Early Music|World Music|Bossa Nova|Celtic|Flamenco|Bitpop|Soundtrack|Tango|Italian|World|Tropical|Cuban|Reggae|Samba)"'

    - name: "40s.m3u"
      query: 'year:1940..1949 ^"genre::(Classical|Lo-Fi|Ambient|Opera|Salsa|Early Music|World Music|Bossa Nova|Celtic|Flamenco|Bitpop|Soundtrack|Tango|Italian|World|Tropical|Cuban|Reggae|Samba)"'

    - name: "50s.m3u"
      query: 'year:1950..1959 ^"genre::(Classical|Lo-Fi|Ambient|Opera|Salsa|Early Music|World Music|Bossa Nova|Celtic|Flamenco|Bitpop|Soundtrack|Tango|Italian|World|Tropical|Cuban|Reggae|Samba)"'

    - name: "60s.m3u"
      query: 'year:1960..1969 ^"genre::(Classical|Lo-Fi|Ambient|Opera|Salsa|Early Music|World Music|Bossa Nova|Celtic|Flamenco|Bitpop|Soundtrack|Tango|Italian|World|Tropical|Cuban|Reggae|Samba)"'

    - name: "70s.m3u"
      query: 'year:1970..1979 ^"genre::(Classical|Lo-Fi|Ambient|Opera|Salsa|Early Music|World Music|Bossa Nova|Celtic|Flamenco|Bitpop|Soundtrack|Tango|Italian|World|Tropical|Cuban|Reggae|Samba)"'

    - name: "80s.m3u"
      query: 'year:1980..1989 ^"genre::(Classical|Lo-Fi|Ambient|Opera|Salsa|Early Music|World Music|Bossa Nova|Celtic|Flamenco|Bitpop|Soundtrack|Tango|Italian|World|Tropical|Cuban|Reggae|Samba)"'

    - name: "90s.m3u"
      query: 'year:1990..1999 ^"genre::(Classical|Lo-Fi|Ambient|Opera|Salsa|Early Music|World Music|Bossa Nova|Celtic|Flamenco|Bitpop|Soundtrack|Tango|Italian|World|Tropical|Cuban|Reggae|Samba)"'

    - name: "Party like its 2012.m3u"
      query: 'year:2000..2012 ^"genre::(Jazz|Classical|Blues|Lo-Fi|Ambient|Opera|Salsa|Early Music|World Music|Bossa Nova|Celtic|Flamenco|Bitpop|Disco|Chillout|Downtempo|Soundtrack|Tango|Bluegrass|Italian|Oldies|World|Tropical|Cuban|Reggae|Samba|Classic Rock)"'

    - name: "2014s.m3u"
      query: 'year:2012..2019 ^"genre::(Jazz|Classical|Blues|Lo-Fi|Ambient|Opera|Salsa|Early Music|World Music|Bossa Nova|Celtic|Flamenco|Bitpop|Disco|Chillout|Downtempo|Soundtrack|Tango|Bluegrass|Italian|Oldies|World|Tropical|Cuban|Reggae|Samba|Classic Rock)"'

    - name: "2020s.m3u"
      query: 'year:2020..2021 ^"genre::(Jazz|Classical|Blues|Lo-Fi|Ambient|Opera|Salsa|Early Music|World Music|Bossa Nova|Celtic|Flamenco|Bitpop|Disco|Chillout|Downtempo|Soundtrack|Tango|Bluegrass|Italian|Oldies|World|Tropical|Cuban|Reggae|Samba|Classic Rock)"'

    - name: "Adore Alliteration.m3u"
      query: ['genre::Hard\ Rock', 'genre::Rock', 'genre::Classic\ Rock']

    - name: "Bake My Cookies.m3u"
      query: ['genre::Rap', 'genre::Hip\ Hop']

    - name: "Books & Tea.m3u"
      album_query: "Bach, Debussy, Mozart , Vivaldi"

    - name: "Groovin.m3u"
      query: ['genre::Soft\ Rock', 'genre::Dream\ Pop']

    - name: "By The Pond.m3u"
      album_query: "Pomplamoose , The Avener , Dansu , HONNE , Anne Murray , The Doobie Brothers , Weezer island , slightly stoopid , george harrison , billy joel , hard day night , louis armstrong hello , Fleetwood Mac Dreams , chasing pirates , tieduprightnow , john mayer new light"

    - name: "Piano.m3u"
      album_query: ['piano ^"genere::(Pop|Classic Rock)" ^"artist::(Billy Joel)"', 'chopin']

    - name: "Swingtown.m3u"
      album_query: 'Parov Stelar , Caravan Palace , Jamie Berry , Caro Emerald , Alice Francis , Paloma Faith , Sim Gretina , Waldeck , Soul Square , "genre::(Electro-Swing|Cabaret)" , Belleruche , Mr. Scruff , Tape Five , Jojo , Kormac , free the robots'

    - name: "Guitar.m3u"
      album_query: ['guitar "genre::(Classical|Flamenco)"', 'genre::(Flamenco)']

    - name: "Disco.m3u"
      album_query: 'genre::(Disco)'

    #- name: "Christmas.m3u"
    #  query: "christmas , chimpmunk , smooth carols , reindeer , santa , happy holiday "

    - name: "Chill Dope.m3u"
      query: "'artist::(Men I Trust)' , nombe , title:Sadnecessary , waves probz ,  post malone - circles slowed"

    - name: "Chill Hop.m3u"
      query: 'artist::(Jungle|Monsune|^Glass\ Animals$)' # don't include Denzel curry with GA

    - name: "Dubstep.m3u"
      query: "dubstep , Heuse & Zeus X Crona"
    
    - name: "Too Many Beaches.m3u"
      query: "bob marley , calvin harris 18 , Kauai , Edward maya , Jason Mraz , kala paper planes , stolen dance , artist:'will smith' , summertime ^'artist::(Billie Holiday)' , skizzy mars , miller the joker , miller airliner , artist::(^UB40$) , P.I.M.P , TaKillya , jimmy buffet , poolside , sun is shining , beach boys , American boy kanye , Martin Solveig , tieduprightnow , kid Francescoli"
    
    - name: "Chortling Organs.m3u"
      query: "organ"

    - name: "Spanish Succulents.m3u"
      query: "Lifescapes cancun , Lifescapes mexico , Lifescapes spanish , Lifescapes latin , Suzana Salles"

    - name: "Tapas.m3u"
      query: "Armik , Concha Buika , David De Alva , Gipsy Kings , Jesse Cook , Lhasa de Sela , Nicolas Hernandez , One Day Deep , Strunz & Farah , Maria Rita , Gotan Project"

    - name: "Her Name is Rio.m3u"
      query: "Bossa nova"

    - name: "LSD & XTC.m3u"
      query: "Basshunter , Benny Benassi , AronChupa , The Chainsmokers , The Glitch Mob , Jamrock , Keys N Krates , I took a pill in ibiza , ODESZA , Redlight X Colour , GlitchHop , artist:'tove lo' , Tropkillaz , How to Be a Human Being life itself , SAINt JHN , Overmono , Bonobo , Romare gone ,  Caribou home , tones dance monkey , GOMF , Tiesto , ZHU , Music Sounds Better With You , The Glitch Mob , Galwaro , Fatboy Slim , The Prodigy , Calvin Harris , Daft Punk , The Blaze territory , kid Francescoli"

    - name: "Reign.m3u"
      query: "Jack Johnson , Gordon Lightfoot , John Mayer battle studies , Sam Smith , norah jones sinkin soon , David Gray , Ed Sheeran lego , Wayne how to love , Michael Franti , probz waves , artist::(Passenger) , Melody Gardot , Milky Chance sadnecessary , sweater weather , Grape Soda"

    - name: "Just Fine.m3u"
      query: "Norah Jones come away , willie nelson stardust , simon garfunkel , 'artist::(Bread|The Carpenters)' , Anne Murray"

    - name: "Derelict Coffee Shop.m3u"
      query: "Yo-Yo Ma"

    - name: "Sass Master 3000.m3u"
      query: "Britney Spears , artist:DNCE , Carly Rae Jepsen, Justin Timberlake , Jennifer Lopez , Gwen Stefani , Fifth Harmony , Kat Dahlia , Katy Perry , Kesha , Lorde tennis court , Meghan Trainor , Kylie Minogue , Madonna , Selena Gomez"

    - name: "Mimi's Cafe.m3u"
      query: "Louis Armstrong , Tony Benett , Bobby Darin , Carlos Antonio Jobim"

    - name: "Rapsmiths.m3u"
      query: "Aesop Rock impossible , Eminem curtian call , j cole born sinner , Kanye West all falls , Kanye West my beautiful | Kendrick Lamar damn | The Notorious B.I.G"

    - name: "Ketamine Dreams.m3u"
      query: "Iron & Wine , John Mayer battle studies , Norah jones day breaks , Fleetwood Mac future , Melody Gardot , U2 Joshua Tree , massive attack , post malone - circles slowed"

    - name: "Happy in Havana.m3u"
      query: "Buena Vista Social Club , Cubanismo , Putumayo , Afro-Cuban"

    - name: "Time for Dessert.m3u"
      query: "Rabih Abou-Khalil , Uncharted , Niyaz , Azam Ali , Lebanese Blonde , Feast of Silence , Trio Globo"

    - name: "Wooing.m3u"
      query: "Muskrat love, love me do , sara smile , your song elton , clumsy fergie , why do fools fall , what the world needs now , Johnny mathis , justin timberlake my love , brown eyed girl , put your head on my shoulder , earth angel , rick astley , my girl temptations , not unusual tom jones"

    - name: "Jazz Minus People.m3u"
      query: "Contemporary Smooth Jazz , VooDooBop"

    - name: "French Pop.m3u"
      query: "L’Impératrice , Angèle , artist::(Paradis) , Claire Laffut , ELI ROSE , Dimie Cat"

    - name: "Golden 2000s.m3u"
      query: 'year:1998..2008 "genre::(Rap|Hip\ Hop)" ^"genre::(Classical)" ^"artist::(Aesop Rock)"'

    - name: "Headspace.m3u"
      query: "Alina Baraz , The Beatles tripper , The Beatles strawberry , Built On Glass , The Cure Lullaby , Dim Sum , Flock of Seagulls , K.Flay , Kendrick Lamar PRIDE , Lost Frequencies , Steve Baker , Mari Ferrari , 'artist:The Neighbourhood' , NoMBe , MGMT pretend , Rudimental , Snakehips , All my friends , Snoop Dogg peaches , SoySauce , St. South , Tove Lo , Kiiara , Prayer In C , Kygo , Faul, Wad Ad & Pnau , Tom Tom Club genius of love , Badunkadunk , Kali Uchis , kid Francescoli , La clé des champs"

    - name: "Evenings.m3u"
      query: "Chopin , yo-yo ma , James Galway "

    - name: "Folk.m3u"
      query: "'artist::(Bread|Carole King|^Chicago$|Jim Croce|John Denver|Patsy Cline|Simon & Garfunkel)'"

    - name: "Daffodils in my Dandruff.m3u"
      query: "The Supremes , Elvis Prestley ,  Forrest Gump , Everly Brothers , Lynyrd Skynyrd , The Mamas & The Papas , Mama Cass"

    - name: "Chalk.m3u"
      query: "OneRepublic , Paramore , Sublime , Hot Chelle Rae , Blink-182 , The Offspring , weezer , Radiohead , ZZ Top grange , 3 Doors Down , Heroic , keyframe , Gorillaz , Slightly Stoopid , Max Armfield , Smashing Pumpkins , March to the Grave , Banjax "

    - name: "Dance Mabye.m3u"
      query: "Doja Cat , Taylor Swift shake it off , Taylor Swift blank space , Badunkadunk , Drake hotline bling"

# FIX
# beet list -p genre::^$
# GYVUS/Unknown Album