A tool to create ball folk playlist from tagged mp3/flac music
(Not yet working)
Install Python
Based on https://kivy.org/docs/installation/installation-windows.html#install-win-dist
On a commandline:
python -m pip install --upgrade pip wheel setuptools
python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
python -m pip install kivy
Get it at https://www.videolan.org/vlc/download-windows.html
Install instructions for Ubuntu 16.04. These instructions are not tested on any other platform. There should be no OS dependend prerequisites however, so if you managed to install it on an other platform, feel free to add the info.
Taglib, Mutagen, PyDub and Kivy
sudo apt install libtag1-dev
sudo apt install git
sudo apt install python3-pip python3-dev
sudo apt install python3-taglib python3-mutagen ffmpeg python3-numpy libvlc-dev vlc python3-scipy python3-matplotlib aubio-tools libaubio-dev libaubio-doc
sudo pip3 install pydub
sudo pip3 install aubio
sudo add-apt-repository ppa:kivy-team/kivy
sudo apt-get update
sudo apt-get install python3-kivy
There are several tools to create playlists
- danceAudioTagger.py : Prepends the annoucement of the type of the dance to the songs.
- staticPlaylistGenerator.py : Generates a m3u playlist according to some metrics.
danceAudioTagger.py [music/path] [genre/path] [output/path]
- music/path : The directory the songs can be found. The complete underlying tree will be traversed
- genre/path : The directory the announcements of the dance types can be found
- output/path : The directory the tagged songs will be exported to
If no corresponding announcement is found for a genre, the file is not exported.
staticPlaylistGenerator.py [music/path] [playlist/metrics/path] [output/filename] [duration (min)]
- music/path : The directory the songs can be found. The complete underlying tree will be traversed
- playlist/metrics/path : The file containing the metrics for the playlist
- output/filename : The filename of the playlist
- duration (min) : The duration of the playlist. The playlist will be at least this long, and finish the latest song. So it will be slightly longer.
The metrics file is a file containing the relative occurence of a dance in the playlist.
The syntax is [dance] = [occurence]
.
Example:
scottish = 5
wals = 2
mazurka = 3
This will generate a playlist with a relative occurence of 50% scottishes, 20% walzes and 30% mazurkas. To keep the example simple evertyhing added up to 10. But the list will be normalized by the program, so you don't need to keep the total into account.
- Every song will be used only once.
- There will be no two times the same dance after eachother.
- Don't make playlists longer than the music you have, or the program will keep on trying. There is no check on this yet.
- If you don't have enough songs of a specific dance to fulfil your occurence creterium for the length of your playlist, it will occure less. If the discrepancy is large, this will reduce the performance somewhat, but don't cause any other problems.
This program will continuously generate songs that fullfil the given metrics. It will only play a song once and will not play to dances of the same type after eachother.
playPlaylist.py [path/to/music/] [path/to/playlist/metrics] [enable announcement 0/1] [path/to/genres/] <announcement delay (s)>
- path/to/music/ : The directory the songs can be found. The complete underlying tree will be traversed
- path/to/playlist/metrics : The file containing the metrics for the playlist
- enable announcement 0/1 : Enable or disable the announcements
- path/to/genres/ : (needed if the announcements are enabled) The directory in which the announcements for the dances can be found.
- announcement delay (s) : The delay in between the two announcements in seconds (can be floating point)
See staticPlaylistGenerator.py for the explanation about the metrics file.
This program will generate a list of the different dances and allow you to filter on them.
player.py [path/to/music/]
- path/to/music/ : The directory the songs can be found. The complete underlying tree will be traversed
python -m pip install --upgrade pip wheel setuptools
python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
python -m pip install kivy
- Numpy
python -m pip install numpy
- python-vlc
python -m pip install python-vlc
- Mutagen
python -m pip install mutagen
- taglib : See supermihi/pytaglib#36
python -m pip install Cython
python -m pip install pytaglib
- Pydub
python -m pip install pydub
- Aubio
python -m pip install aubio