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