Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-use barcodes already on CDs ? #2

Open
azrdev opened this issue May 27, 2021 · 2 comments
Open

Re-use barcodes already on CDs ? #2

azrdev opened this issue May 27, 2021 · 2 comments

Comments

@azrdev
Copy link

azrdev commented May 27, 2021

Searching for a nice way to physically select music to be played, I built a TonUINO based on NFC tags that I put into the jewelcases. This works (and using a pi would probably easily work without having to put the music onto a built-in SD-card first but using NFS/SMB), but requires an extra token for each album.
Since every?/most CDs already feature a Barcode on their backsides, I think it would be ideal to scan these and use the contained UPC/EAN code to lookup and play the album. I'd even try to get rid of the mapping code→path in the config file, utilizing barcodes in (ID3)tags (Musicbrainz already has those, it's just a matter of importing them into your local metadata).

Do you have any more thoughts / suggestions?

@bsaund
Copy link
Owner

bsaund commented May 27, 2021

@azrdev Cool Project! I plan to use something like NFC tags on arbitrary objection in addition to my binder of barcodes, one day.

Using the existing CD barcode is elegant, and a good suggestion. There still needs to be some mapping from [barcode -> URIs]. Currently I generate arbitrary barcodes and save an arbitrary mapping.

Using musicbrainz (or similar) we could get a mapping from [CD_barcode -> album_ID]. A possible architecture would be:

  1. During creation, store a map from album_ID -> {path or URIs} for each album (some details would still need to be worked out. e.g. if you remove/add songs to the album folder, is it still the same album?
  2. On scanning a barcode, if barcode maps to URIs, play
  3. (optional 1) If barcode mapping fails, using musicbrainz map from barcode -> album_ID. Search locally for album with the same name (or other search criteria)
  4. (optional 2) Using musicbrainz map from barcode -> album_ID. Lookup and play album from spotify

(3) means you can rip a CD to your local music folder, then scan the CD barcode. No further updates needed.
(4) enables a neat party trick, your friend comes over with a new CD, you can just scan the barcode and it plays. (Who brings CDs anymore though)

Note that I will never purely rely on CD barcodes, as I want to group collections of songs that were never on the same CD, or include some songs that were never on a CD in the first place.

Let me know if you have other thoughts

@azrdev
Copy link
Author

azrdev commented Jun 10, 2021

I'd like to avoid the need to "setup" a new CD with the "scan barcode to play" component (i.e. musicbox). Ideally, replace 1-3 with a beets query for the read barcode (again, requiring it fetching that tag from mb: beetbox/beets#3172 ). E.g. configure something like mpc add in beets as music player, then just call beets play barcode:123456.

I like the idea of 4 very much, although it should be possible to completely disable that feature for privacy reasons.

Note that I will never purely rely on CD barcodes, as I want to group collections of songs that were never on the same CD, or include some songs that were never on a CD in the first place.

Now it's getting tricky. The only sane way I see to get there is to open a separate namespace of user-defined IDs. Maybe as simple as choosing a barcode format not yet used on CDs like QR (I hope so, at least), or prefixing user-defined IDs with some (magic) string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants