Jump to content

A custom music application


Qhwoeprktiyns

I am always curious to understand how people manage their music collection, and often surprised by the creativity deployed by some.

 

Perhaps reading about what I have designed will be of interest to others, though it is build "from scratch" and hardly replicable "as is". I'll admit that I am quite proud of my work: the results meet my specific needs.

 

I gave Roon a try for a couple years, then gave up, explaining why here (good background on why I embarked on this project): https://community.roonlabs.com/t/bye-roon-why-i-am-not-renewing-my-subscription/67012. Roon is a superb application, but I wanted something different.

 

I have put a lot of effort into designing my "application". I taught myself programming just to do this, because there was nothing available out there that did exactly what I wanted to do. Sounds crazy ? It probably is. But read on...

 

Data management

 

I wanted to have a simple and efficient way to keep track of information on my albums - credits, recording dates, and comments. This does involve some work. I do not do it for all my albums, but it has become a "hobby", and a source of great satisfaction.

 

I wish there were a way of sharing all this information with others: having others benefit from the time I spend entering information on my albums, and being able to "reuse" others' work, but a "collaborative" system simply does not exist today. Information is available, scattered around in varying formats. So I just went ahead and did my "thing", but I hope someday a better system will be available.

 

When I listen to music, I like to know exactly who is playing on what track. When I read interesting comments (in liner notes, reviews, websites, books...), I like to save them as well. In this "digital age", you simply don't always have the information available on hand. Its like eating cereal without being able to read the back of box at the same time - or the box has become so small you can't read the fine print any longer !

 

Inspired by the work done by Baoshan Sheng in his excellent application "Tonal" (https://audiophilestyle.com/ca/bits-and-bytes/introducing-tonal-a-minimalist-music-app-for-collectors-and-audiophiles-r705/), I decided to enter information for each album in a simple text format, not in tags. Tags simply do not offer the same flexibility, and updating them is very tedious.

 

I designed a simple web page with an album grid of all my albums. The albums can be sorted by "date added", "date edited", "artist", "recording date". The search bar has an "auto-suggest" with artist names.

 

album_grid.thumb.JPG.e1a93ce2c29c71baed6d277d96111168.JPG

 

When I click on an album, it opens up a new page to display and edit the album. Here is an example (pdf of my web page):

 

Album Page Example 1

 

And here is the corresponding descriptive file, which edited "online" in each album's web page. I use a "markdown" format to identify key information entered:
- session "title"
- recording date
- credits
- comments

 

Album Descriptive File

 

File.thumb.JPG.1c63f201b9b9141c54a28bb483a58f45.JPG

 

Here is the same information when being edited from the album's web page:

 

Editor.thumb.jpg.6b3f346c7d80271c66be462c7d99c82b.jpg

 

The markdown format can also be used to add links (to other albums, to PDFs I store on a cloud storage).

 

There is a lot of other information I could have added: composers, labels... I chose to focus on data which was essential to me.

 

Entering information on each album is fairly simple and quick (though those large Mosaic box sets can take some time). I do not enter detailed information, however, for all my albums. 

 

When I add an album to my collection, the application scans the tracks and reads some basic tags: album name, track titles, album artist, and genre. It also reads each track's duration, bit size and sample rate. The tracks are copied in the descriptive file of each album, and I can then add comments/credits, reorganizing the tracks if needed, based on recording sessions, by simple copy/paste. Here is another example of an album whose track order has been reorganized to correspond to the different recording sessions. I like to play the tracks in the right order:

 

Album Page Example 2

 

Having all this information available "at the tip of my fingers" is very useful to search through my collection. 

 

 

Music Playback

 

I have integrated my application with two systems for playback:


- ECDesign's UPL (https://www.ecdesigns.nl/en/blog/upl96etl)
- LMS (Logitech Media Server)

 

In both cases, it involves keeping a copy of all my files on a separate drive:


- the UPL only works with a "local" USB drive, so copying the files is unavoidable
- for LMS, I use a separate drive with all my files converted to WAV, by choice

 

In both cases, the copied files are numbered with a unique identifier which is used by my application to identify albums & tracks. The process to copy files from my local "working" directory on my PC to this separate drive is automated.

 

In my application, I have two specific pages for playback:
- the first page displays my current playlist (the albums added to the playlist queue) and the "now playing" track and album cover

 

Playlist.thumb.JPG.256329731dbd9b9bfd0a076afe00eca4.JPG


- the second page displays the "now playing" album with the currently played track highlighted. This page automatically gets refreshed as the playlist progresses.

 

NowPlaying.thumb.JPG.a94816f16796471a62df4d14cd1544c0.JPG

 

In both cases, the web pages are synchronized with the "player" using messaging:
- command line interface on LMS
- ECDesign's serial port communication messages with the UPL

 

With LMS, anything played directly from the LMS webpage will be displayed on my "now playing" pages as well.

 

There are unfortunately very few music "players" available that can be efficiently controlled from an external application. 


Technical aspects

 

I store for each album a copy of the album image (original format and thumbnail) and a copy of the album descriptive file on Google Cloud Storage (this is automated when I scan my folders/add an album).

 

The album tracks and information parsed from the descriptive file are stored in a Postgressql database hosted online (with Heroku). 

Search is performed using Elasticsearch.

 

Everything is written in Javascript. Tags are read using "Exiftool" (which actually only works with Flac files - there are other programs I could have used). Flac files are converted to Wav using the official FLAC program (https://xiph.org/flac/index.html).

3 Comments


Recommended Comments




×
×
  • Create New...