blame
# Groove Basin
Music player server with a web-based user interface.
All clients listen to the same music at the same time, sharing access to
playback controls, the play queue, and the music library.
Groove Basin operates based on a directory of files. It does not stream content
from third parties. However, it integrates with third parties for various
features.
## Status
The web app is not usable yet, however there are a handful of proof-of-concept
example applications.
The "playlist" example plays a queue of audio files, gaplessly, over the
default output device. It also shows printing metadata tags.
The "analyze" example spawns a thread for each input file and computes:
- true peak (EBU R.128)
- integrated loudness (EBU R.128)
- true duration
- compressed waveform image generation
The "fingerprint" example computes an acoustid fingerprint for an input file,
looks it up via the acoustid.org API, then looks up the result in the
musicbrainz.org API, and displays the results.
CPython is built from source and provided along with the music player. You can
use it to fetch YouTube videos like this (from the installation prefix):
```
PYTHONPATH=python/Lib python/cpython yt-dlp \
-f ba \
--no-check-certificates \
"https://www.youtube.com/watch?v=--9kqhzQ-8Q&pp=ygUGaHljeWJo"
```
The project can be built into a statically linked executable when musl libc is
used as the target, for example `-Dtarget=x86_64-linux-musl`.
Support for other operating systems besides Linux is not far away but will
require some porting work in the dependency tree.
## Building From Source
```
zig build
```
## Development
This extension makes it easy to debug Zig WebAssembly code:
[C/C++ DevTools Support (DWARF)](https://chromewebstore.google.com/detail/cc++-devtools-support-dwa/pdcpmagijalfljmkmjngeonclgbbannb)
## Roadmap
* send pause message to clients
* disable pause button when playing and vice versa
* playback UI element that shows waveform, duration, position, title
* prev, next, stop
* display the queue
* seeking
* bug: when the websocket disconnects and reconnects data gets duplicated
- it could clear the db and receive the full update again
- there could be a incrementing integer that describes the DB so the client
can avoid re-downloading if it has up-to-date data.
* implement queue item sort keys
* when scanning the file system, detect files that are in the database but have
been deleted from the file system
* apply loudness information to playback
* example that transcodes a list of input files
* Serving both https and http on the same port
* Automatic SSL Certificate obtaining and renewal
* youtube-dl example
- automated ytdl nightly fetching. keep it cached, check for release on fetch
error. https://github.com/yt-dlp/yt-dlp-nightly-builds/releases
- bundle python executable and python Lib directory into the example binary
- upx?
* integration with https://coverartarchive.org/
* [picard tag mapping](https://picard-docs.musicbrainz.org/en/appendices/tag_mapping.html)