r/raspberry_pi • u/simon_trst • 5d ago
Show-and-Tell VinylPi64 - Music Detection device
Hey everyone,
For the last few months, I’ve been working on a Raspberry Pi hobby project, trying to solve a problem that was never really there. But I had a lot of fun building it, and I’m kind of proud that it actually worked in the end :’)
It’s basically a “now playing” system for my turntable, with a Raspberry Pi Zero 2 W running the whole thing.
I’m using an Audio-Technica LP120XUSB turntable which, as the name suggests, has a USB audio output. That made me wonder whether I could connect it directly to a Pi, listen to the audio input and automatically figure out what record/song is currently playing.
For the output I chose a 64×64 Divoom Pixoo pixel display. Pretty much any display could work, but I really liked the pixel-art aesthetic.
The basic pipeline is fairly simple:
Turntable → USB audio → Raspberry Pi → song recognition → metadata/album cover → Pixoo display
The Pi records a few seconds of audio, sends the snippet through ShazamIO for recognition, fetches the song information and album artwork, generates a 64×64 layout and sends it to the display over the local network.
But I kind of got carried away and went way overboard with it xD. It can now:
- switch between vinyl recognition and Spotify as the input source
- connect to Discogs and check whether the detected record is in my collection
- control and monitor everything through a local web app
- fetch lyrics and additional song information
- configure the display layout, fonts, colors, scrolling text, etc.
- keep listening statistics for songs, albums, artists and genres
- automatically discover and communicate with the Pixoo on the network
The code is on GitHub if anyone wants to have a look, build something similar, or use parts of it for another Raspberry Pi display project.
Let me know what you think! I’d also be interested in ideas for other things I could add or improve :)
Cheers!
6
u/FlashyResearcher4003 5d ago
I have an older deck though I really like this, I wonder if I could have it sample audio with a mic and work the same
7
u/Baltisotan 5d ago
I can’t think of why it wouldn’t. The only thing that would be a problem is an always on microphone in your house. Splicing off the audio from the source allows you to skip that. You could use an RCA splitter to achieve the same effect.
3
3
u/DaddyBigBoy 5d ago
Yeah, I don’t like the hot mic idea (looking at you, LG) but a monitor-out type situation from the amplifier would be ideal.
4
u/luckyjarms 5d ago
This is cool! I was looking for a new project, definitely gonna check out the GitHub
5
u/jonkpirateboy 5d ago
Already got one. :) Mine scrobbles too. https://github.com/jonkpirateboy/shazall
3
5
3
u/CircuitSyn 5d ago
Looks great! Can the Pixoo displays be rooted or flashed? Or is it using their API?
2
u/simon_trst 5d ago
I’m using their API. The main benefit is that whenever I’m not listening to music I can use the Pixoo as intended, by displaying one of the many designs/GIFs by the community through their app or draw individual designs.
3
u/Kevin_Cossaboon 5d ago
excellent project. I am doing something similar via Home Assistant sending data to the panel based on PLEX AMP playing.
Question as I am thinking of switching to this. The Audio in, is it just Line Level in to a USB ADC ? can I use a line in to USB Analog to Digital Converter?
thinking of Audio Line level (2nd output of amp) to a USB Dongle on the Pi
would that work?
3
u/simon_trst 5d ago
Yes, that should work! The LP120XUSB basically does the ADC part internally, but VinylPi only needs an audio input that the Pi can see as a USB audio device. So using a line-level output from your amp into a USB audio interface/ADC connected to the Pi should work just fine. Just make sure you’re using a proper line-level output rather than an amplified speaker output.
1
u/Kevin_Cossaboon 5d ago
Thank You kind Sir.
Good tip on the line level, it is but for other readers, this is important.
3
u/mrcoffee09 5d ago
I bet the record sleeves are barcoded and you could do that instead of song detection. It's probably a UPC you can look up.
4
u/simon_trst 5d ago
I mean yes, I see your point, you probably could. Especially since vinyls are meant to be listened to as a whole. But with the recognition API(which is free and uncomplicated) you can skip songs or sides of a record and start where ever you want to and still get the current song. You are a bit more unrestricted basically
1
2
2
u/Official_RaspberryPi 4d ago
But I kind of got carried away and went way overboard with it
never read something more relatable, story of our lives
1
u/boognishbeliever 5d ago edited 5d ago
Im all for fun pi projects, but what is the actual album cover and sleeve and doing while you are spinning the record?
I have a ‘now playing’ shelf that is above the record player
1
u/simon_trst 5d ago edited 4d ago
It’s not only about the album but the current song? I have over 150 albums in my collection. Although they are like my all time favourites, I might not know every song name at every given time. Also I’m lazy and at the end of the day it’s a fun gimmick :D
1
u/Embarrassed_Call_101 4d ago
I was gunna say. Why not just get up and look at what you put on :) Now I see the point.
1
u/troop3rs 5d ago
Legal eu tenho um aparelho que adaptei um USB nele vou tentar conectar mas antes preciso medir a saída da energia para não ter problemas tbm com rpi
2
u/tagd 5d ago
You definitely cherry picked the song metadata. Let’s see “Set the Controls for the Heart of the Sun”.
I have one of these 64x64s and the pixelated art by itself is good about half the time but no way you can fit meaningful amounts of text on them.
1
u/simon_trst 5d ago
Yeah you’re right. Song or Artist names exceeding the 64 pixels will “scroll” through. For me personally it’s not a problem, but I see why it might bother some people. At the end of the day it’s just a concept. If you don’t want the pixel aesthetic you could use a regular OLED display to display long names.
1
u/cturnr 5d ago
I did something similar, but found ShazamIO to be very unreliable. I'll check out your repo, but wonder, how often are you sampling and sending out requests?
1
u/simon_trst 4d ago
Configurable, but for clean audio tracks from USB I use 3-5 seconds. ShazamIO is not the greatest, for popular music it works very well, but the less known an artist is the more likely it will be off.



21
u/buknaykid 5d ago
Dude this is awesome! Can you share the repo url?