2 # I, Ian Kelling, follow the GNU license recommendations at
3 # https://www.gnu.org/licenses/license-recommendations.en.html. They
4 # recommend that small programs, < 300 lines, be licensed under the
5 # Apache License 2.0. This file contains or is part of one or more small
6 # programs. If a small program grows beyond 300 lines, I plan to switch
9 # Copyright 2024 Ian Kelling
11 # Licensed under the Apache License, Version 2.0 (the "License");
12 # you may not use this file except in compliance with the License.
13 # You may obtain a copy of the License at
15 # http://www.apache.org/licenses/LICENSE-2.0
17 # Unless required by applicable law or agreed to in writing, software
18 # distributed under the License is distributed on an "AS IS" BASIS,
19 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 # See the License for the specific language governing permissions and
21 # limitations under the License.
25 ## cross-genre tags that dont really make a playlist
27 # songs i like but they get old fast due to feeling gimicky, or cringy after a while.
29 # anything sad which i sometimes like or avoid.
35 # favorite songs pump up songs
37 # favorite rap pump up songs, allows more songs than pump1
39 # heart rending, spine tickling
48 # alternate version of a song we already have which isn't as good
52 nav_convert_query
="^genre:spoken-w ^genre:skit ^lesser_version:t rating:3..5"
57 # gangsta rap / angry rap. something like g-rap would make beet queries for genre:rap include it
61 # slow instrumental. todo: reclassify some ambient into this.
65 # lyrical edm. todo: some pop needs reclassification to this
70 # nonvocal / instrumental
74 # mq = mac quale. similar to the mr robot soundtracks.
75 # slow, foreboding. usually electronic.
80 # like rain by brian crain. mostly slow airy/broody piano
86 # because we were destined to run out of single key buttons.
95 all_genres
=(${common_genres[@]} ${rare_genres[@]})
99 #### playlist things #####
102 declare -A ignore_genres_a
108 declare -A slow_genres_a
125 declare -A bpla
# beet playlist associative array
126 beetapl
() { # beet add playlist
134 # this function is just so we can have some local vars
135 # and not mess with the global var namespace.
136 _beet-gen-global-vars
() {
140 for g
in ${ignore_genres[@]}; do
141 ignore_genres_a
[$g]=t
143 for g
in ${slow_genres[@]}; do
147 # genres that have a beat
152 # relatively upbeat genres to listen, eg while biking
154 for g
in ${all_genres[@]}; do
155 if [[ ${ignore_genres_a[$g]} ]]; then continue; fi
157 if [[ ${slow_genres_a[$g]} ]]; then continue; fi
167 # generate regex for beat playlist
170 for g
in ${beat_genres[@]}; do
179 # generate regex for upbeat playlist
182 for g
in ${upbeat_genres[@]}; do
192 for g
in ${genres[@]}; do
196 beetapl
${g}-${r} rating:${r}.
.5 genre
::^
$g\$ ^expl
:t ^gimicky
:t ^lesser_version
:t
197 beetapl
${g}-x-${r} rating:${r}.
.5 genre
::^
$g\$ ^gimicky
:t ^lesser_version
:t
200 beetapl
${g}-${r} rating:${r}.
.5 genre
:$g ^gimicky
:t ^lesser_version
:t
206 for t
in ${tags[@]}; do
208 beetapl
${t}-${r} rating:${r}.
.5 $t:t ^lesser_version
:t
213 beetapl beat-
${r} rating
:${r}.
.5 genre
::$beat_regex ^expl
:t ^gimicky
:t ^lesser_version
:t
214 beetapl beat-x-
${r} rating
:${r}.
.5 genre
::$beat_regex ^gimicky
:t ^lesser_version
:t
215 beetapl upbeat-
${r} rating
:${r}.
.5 genre
::$upbeat_regex ^expl
:t ^gimicky
:t ^lesser_version
:t ^sad
:t
216 beetapl upbeat-x-
${r} rating
:${r}.
.5 genre
::$upbeat_regex ^gimicky
:t ^lesser_version
:t ^sad
:t
217 beetapl gimicky-
${r} rating
:${r}.
.5 gimicky
:t ^lesser_version
:t
222 sy
$r rating
:${r}.
.5 genre
::$upbeat_regex ^gimicky
:t ^lesser_version
:t
'artist:sonic youth'
225 for t
in ${nav_tags[@]}; do
229 _beet-gen-global-vars