qlyoung's wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
music_management [2025/11/04 03:19] – use mermaid plugin qlyoungmusic_management [2026/05/19 03:37] (current) – [Phone] simplify qlyoung
Line 9: Line 9:
 That way the artist gets money for making art and you pay once to own a copy of it instead of renting temporary access. That way the artist gets money for making art and you pay once to own a copy of it instead of renting temporary access.
  
-Streaming is good for the first two steps. Finding new music is hard, and you have to listen to it a few times at different times, since it might only hit in a certain mood. Starting from music you already like and letting the recommender algorithm drive discovery is a good way to find new music. After that though, I prefer to pay the artist for their work instead of paying rent, and prefer to download the data once rather than download it every time I want to listen to music. Bandwidth is a limited resource!+Streaming is good for the first two steps. Finding new music is hard, and you have to listen to it a few times at different times, since it might only hit in a certain mood. Starting from music you already like and letting the recommender algorithm drive discovery is a good way to find new music. After that though, I prefer to pay the artist for their work instead of paying rent, and prefer to download the data once rather than every time I want to listen to it. Bandwidth is a limited resource!
  
-One of the benefits of owning music is that you can put it on whatever device you want and use whatever program you prefer to play it. However, if you have multiple devices then getting your music collection available on all of them becomes an exercise in file management. This article roughly depicts how I solve it.+One of the benefits of owning music is that you can put it on whatever device you want and use whatever program you prefer to play it. However, if you have multiple devices then getting your music collection available on all of them becomes an exercise in file management. Music also has its own inherent taxonomical structure (artist, album, label etc) that benefits from specific treatment in terms of organization. This article roughly depicts how I do all that.
  
 ===== Methods ===== ===== Methods =====
Line 18: Line 18:
  
 <mermaid> <mermaid>
-flowchart TD +flowchart LR 
-    Source -.-> |download| staging +    Source -.-> |download| beet["beet import"] 
-    W["Windows VM"] +    beet --> laptop(("fa:fa-laptop laptop")) 
-    subgraph server["__server"+ 
-        staging --> |beet import| library +    laptop <-.-> |syncthing| desktop(("fa:fa-computer desktop")) 
-        library --> +    laptop <-.-> |syncthing| W["Windows VM"] 
-    end +    desktop <-.-> |syncthing| W 
-    subgraph devices["devices_____"] + 
-        library -.-> |syncthing| desktop(("fa:fa-computer desktop")) laptop(("fa:fa-laptop laptop")) +    W -.-> |tunefusion| phone(("fa:fa-mobile-phone phone")) 
-        W -.-> |tunefusion| phone(("fa:fa-mobile-phone phone")) +    W ~~~ phone 
-    end+
     click phone "https://www.dbpoweramp.com/tunefusion.htm"     click phone "https://www.dbpoweramp.com/tunefusion.htm"
 </mermaid> </mermaid>
Line 34: Line 34:
 In short: In short:
  
-  - Acquire the music from somewhere; for me, usually buy it on [[https://bandcamp.com/|Bandcamp]] +  - Download the music from somewhere onto my desktop or laptopif possible I buy it on [[https://bandcamp.com/|Bandcamp]] 
-  - Download it to a "staging" directory on my [[personal infrastructure|home server]] +  - Run ''beet import'' on the downloaded music; [[https://beets.io|beets]] cleans up tags, pulls and attaches album art, and copies the cleaned files into my "Artist/Album/<files>" library directory structure, applying my file naming scheme.
-  - Log into the server and run ''beet import'', pointing it at the staging directoryThis adds the music to my library database, cleans up tags, pulls album art, properly names the files and copies them into my "Artist/Album/<files>" library directory structure, applying my chosen file naming scheme. [[https://beets.io/|beets slaps]].+
  
-The rest of the diagram depicts how the 3 devices I play my library on end up with access to my music.+Since my music library is just a directory, it's then synced to all other devices using my [[syncing]] setup (except my phone; see below). This way it doesn't matter what device I download the music on. The arrow goes to laptop in the chart but it can go to any of them.
  
-==== Desktop & Laptop ==== +==== Playback ====
- +
-My server, desktop and laptop all run [[https://syncthing.net/|Syncthing]]. The ''music'' directory is synchronized to all devices using that. +
- +
-In the past, both of these devices mounted the directory containing music via NFS. Since they're all on a [[https://tailscale.com/kb/1136/tailnet|Tailnet]] together this worked as long as both the server and client were both online, regardless of the routing environment. This worked pretty well - latency was never an issue, and in any case I rarely needed to play from my laptop since I usually use my phone when I'm outside my home network. However, I didn't like the network requirement and realized disk space is plentiful while bandwidth is a scarce commodity. Since I generally frown upon streaming when it isn't necessary I put my money where my mouth was and switched to file synchronization.+
  
 For playback on the computer, I prefer [[https://tauonmusicbox.rocks/|tauon music box]]. For playback on the computer, I prefer [[https://tauonmusicbox.rocks/|tauon music box]].
 +
 +On my iPhone, I use [[https://apps.apple.com/us/app/foobar2000/id1072807669|foobar2k]]. Although, it has a few drawbacks (okay just one - it doesn't support scrobbling) and in the age of AI I'll probably end up making my own when I have a few spare hours.
  
 ==== Phone ==== ==== Phone ====
  
-The phone is a little trickier. Ideally I would use the same approach as for my desktop and laptop - run a sync program to keep the music library up to date on my iPhone disk. Unfortunately, that's not how things work on iOS, for two reasons:+The phone is a little tricky. Ideally I would use the same approach as for my desktop and laptop - run a sync program to keep the music library up to date on my iPhone disk. Unfortunately, that's not how things work on iOS, for two reasons:
  
   - background daemons cannot really exist on iOS   - background daemons cannot really exist on iOS
   - the concept of a filesystem that is shared between apps does not exist on iOS   - the concept of a filesystem that is shared between apps does not exist on iOS
  
-Regarding backgrounding, in general iOS is very strict about apps performing any work in the background. Since sync programs are designed around running in the background, this more or less precludes the file synchronization strategy. It's worth noting that this could be worked around using iCloud, but since I don't use iCloud, that doesn't work for me.+Regarding backgrounding, in general iOS is very strict about apps performing any work in the background. Since sync programs are designed around running in the background, this more or less precludes the file synchronization strategy. This could be worked around using iCloud, but I don't use iCloud.
  
-Even if a sync program was viable on iOS, we would hit another blocker. iOS does not have the concept of a shared filesystem. Apps are only able to write to their own sandboxed filesystems. Consequently any files downloaded by a sync app would not be accessible by a music player app.+Even if a sync program was viable on iOS, we would hit another blocker. iOS does not have the concept of a shared filesystem. Apps may only write to their sandboxed filesystems. Consequently any files downloaded by a sync app would not be accessible by a music player app.
  
 The upshot is that to solve this problem you need a music playback app that also has its own syncing service built in. Obviously this is [[https://en.wikipedia.org/wiki/Unix_philosophy|heretical]]. A music player should focus solely on playing music, while a syncing application should handle data sync. The result of that being impossible is the app store has a bunch of terrible apps with names like "[[https://apps.apple.com/bf/app/music-player-tube-mp3-player/id1572190372|Network music player ULTIMATE]]" that have varying levels of support for playback and/or sync to/from various data sources - Samba, WebDAV, whatever else you can think of. I've tried most of them and they all suck. The upshot is that to solve this problem you need a music playback app that also has its own syncing service built in. Obviously this is [[https://en.wikipedia.org/wiki/Unix_philosophy|heretical]]. A music player should focus solely on playing music, while a syncing application should handle data sync. The result of that being impossible is the app store has a bunch of terrible apps with names like "[[https://apps.apple.com/bf/app/music-player-tube-mp3-player/id1572190372|Network music player ULTIMATE]]" that have varying levels of support for playback and/or sync to/from various data sources - Samba, WebDAV, whatever else you can think of. I've tried most of them and they all suck.
  
-I can already hear you saying, "why don't you [[just]] play back your music over the network using a network player"? In addition to the available apps sucking, network conditions on mobile are variable enough that streaming from a home server results in a generally poor experience. Industrial streaming services like Spotify have to go to [[https://engineering.atspotify.com/2020/02/how-spotify-aligned-cdn-services-for-a-lightning-fast-streaming-experience/|extreme lengths]] to paper over the network enough to deliver a good experience. "Pinning" - where you stream but select specific items to keep locally on disk - doesn't really work for me because I don't want to choose what music to listen each time I anticipate a no-network scenario.+I can already hear you saying, "why don't you [[just]] stream your music from home using a player"? In addition to the available apps sucking, network conditions on mobile are variable enough that streaming from a home server results in a generally poor experience. Industrial streaming services like Spotify have to go to [[https://engineering.atspotify.com/2020/02/how-spotify-aligned-cdn-services-for-a-lightning-fast-streaming-experience/|extreme lengths]] to paper over the network enough to deliver a good experience. "Pinning" - where you stream but select specific items to keep locally on disk - doesn't really work for me because I don't want to choose what music to listen each time I anticipate a no-network scenario.
    
 Anyway, as luck would have it, the [[https://apps.apple.com/us/app/foobar2000/id1072807669|best music player on iOS]] also has [[https://www.dbpoweramp.com/tunefusion.htm|the best sync solution]] I've seen. The downside is that the companion program that runs on your server Anyway, as luck would have it, the [[https://apps.apple.com/us/app/foobar2000/id1072807669|best music player on iOS]] also has [[https://www.dbpoweramp.com/tunefusion.htm|the best sync solution]] I've seen. The downside is that the companion program that runs on your server
Panorama theme by desbest
music_management.1762226342.txt.gz · Last modified: by qlyoung
CC Attribution-Noncommercial-Share Alike 4.0 International Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International