What this is
The Syncognizer is a piece of software that listens for ambient music and shows the music clip of the song that's currently playing, making an effort to also synchronize the clip with the song, so it shows roughly the part of the clip that corresponds to the part of the song that's currently playing.
Why I needed it
I thought it would be cool to have an old-school CRT TV in a bar, showing music clips of the songs currently playing. The Syncognizer is the software powering this, the rest is basically just connecting the Raspberry Pi running the Syncognizer to a TV (which... I haven't bothered to do yet).
How I made it
The Syncognizer is a small Python script that continuously listens to ambient sounds and feeds them to an online music recognition service. I didn't really do much more than that, so all the heavy lifting is done by the service, which also returns the approximate timestamp of the time in the video. The Syncognizer then searches YouTube for the clip and launches MPV with the video at the specified timestamp.
In the video, you see a mobile phone playing songs from YouTube. This represents the ambient music playing, and is only there for demonstration. The phone doesn't connect to the computer at all, and all the computer does is listen for the sounds in the environment.