forked from albertz/music-player
-
Notifications
You must be signed in to change notification settings - Fork 0
/
defs
48 lines (36 loc) · 892 Bytes
/
defs
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
states :=
stopped,
playing.
stopped state :=
do nothing.
playing state :=
play music.
play music :=
play current song.
current song finished ->
switch to next song.
switching to new song :=
set current song to new song.
current, next, previous song without context :=
song in DJ playlist.
# N is a constant which can be configured.
# If a variable is not marked as a free variable (e.g. "for all N"),
# it is a constant which has to be configured.
while num songs before current song are more than N ->
delete first song.
while num songs after current song are less than N ->
intelligently add song.
intelligently add song :=
randomly select song from database,
take liked songs more likely,
take related song more likely.
database :=
collection of songs.
song :=
filesystem source,
artist,
name,
album,
genre,
liked-state,
last.fm-link.