Over Engineered Light Bulb

back
If it ain't broke
don't
fix it.
Mii Chat

Isn't this image so satisfying?
(o´▽`o)

Dynamic Ambient Lighting

I have a huge collection of music and wanted to make the listening experience in Navidrome better and more immersive. So I used a Philips WiZ light bulb and designed a system that smoothly transitions my room lighting between the 5 most dominant colors of the currently playing album art to keep the experience intimate and cohesive.
 Somehow, that led me into the embedding model rabbithole. Soon enough, I had a system where I could type a prompt like "soft relaxing bright" or "campfire" or "deep sea" or anything at all and my room's lights would change to that. I learnt a lot of things like, why bigger model is not always better, etc.

Table of contents →

  1. Navidrome
  2. The lighting
  3. Semantic Search Setup
  4. Semantic Search Implementation
  5. YouTube Demo

Navidrome

  • I was checking my PS Vita's app store and came across this music streaming client, Nekodrome by NekoMimi which looked cooler than the Jellyfin client on PSV. That's when I thought I needed a Navidrome server. It took me some time to understand how it works and how I can make it truly mine.
  • The web client was working, the PSV client was working, Android client was working. I soon discovered a problem where the metadata and artist tags were not perfect. And some albums missed Album Art. It reminded me of MusicBrainz Picard as I had seen it in GSOC organizations list. With Picard and Navidrome, one can essentially host their own music streaming service with no ads or low quality music.
  • I carefully added Metadata to all my music using Picard and got Supersonic on my PC. I saw the blur in the background and thought, "How cool would it be if that background leaked outside the monitor...".
  • MCR's 'I Brought You My Bullets, You Brought Me Your Love' album playing on Supersonic with a background blur
Mii Chat

It's good that I'm immune to seizure-inducing graphics or else i'd be
(°o°:;)

The Lighting

  • I used the dotenv library to setup the variables like so. There are 2 modes in the script. Mode 1 ends the lighting show after the current album stops playing . Whereas Mode 2 dynamically checks everytime album has changed and crossfades the colors.
  • dotenv variables, like navidrome passoword, light bulb ip address, brightness and finally a 'mode' fror lighting
  • Hues are extracted using pillow. First, the Album-Art image is reduced to 64x64. Then the colorspace is changed to the HSV format. I intentionally reduced the hue resolution and cranked up saturation and brightness, so that I can get sharp colors instead of having to deal with 100 different shades of red. Now, I can have upto 32 colors as input.
Mii Chat

32 colors here does not limit me to 32 light colors, I have a trick to get the full 16.7 million colors (^_-)

Semantic Search Setup

  • I realised I had one embedding model in Ollama I never used: nomic-embed-text. I looked around duckduckgo for a while and came across color-names. It is a list of colors with the name of the color being something a human would say, like the ones below. I knew this was perfect for semantic search. screenshot of https://codepen.io/meodai/full/pXNpXe showing the color index from meodai/color-names
Mii Chat

So... uhh....
A thesaurus that needs a graphics card
(ㆆ_ㆆ)

Semantic Search Implementation

  • I searched ollama's model directory for newer and smaller models. I found a few that would fit my use case. all-minilm, and snowflake-arctic-embed and IBM's embedding model: Granite. I went on to benchmark some of the Embedding Models (I call it the great Embedding Model BakeOff May Week-4 2026 Edition to see which of these cooks my PC first).

  • Model Time Taken Quality (opinionated) Notes Results
    granite:33m 00:16:03 linkedin 🧠📉
    i would use rapidfuzz or pywal instead, like a caveman Truth be told, it seems like this is better for RAG than creative tasks. Still very 🧠🪦
    check here
    all-minilm:22m 00:09:52 excellent it's better than 33m variant, but feels robotic check here
    all-minilm:33m 00:11:13 good no soul + a bit corpo check here
    snowflake-arctic-embed:22m 00:08:07 excellent perfect model for this use case check here
    snowflake-arctic-embed:33m 00:09:36 good loses character compared to smaller model check here
    larger models nomic-embed-moe, bge-m3, mxbai-embed-large
    1-2 hours bad not really good for this use case
    NA not gonna waste any more time

Mii Chat

I just like Qwen alirght?
Definitely not sponsored by Alibaba...
shhh...

Mii Chat

So it finds the "direction" of the input phrase.
Get it? Get it?
(✖╭╮✖)
Ugh... nevermind

Youtube Demo

  • A few screenshots of the colors being generated by the semantic engine.
  • Yet to record, edit and upload video