hckrnws
Show HN: LatentScore – Type a mood, get procedural/ambient music (open source)
by prabal97
Hey HN,
I've used Generative.fm for years and love it, but I always wanted to just describe what I was in the mood for instead of scrolling through presets. So I built this.
You type a text description of anything - from "mountain sunrise" to "neon city" - and it generates a procedural/ambient stream matching that mood. It runs locally, no account, no tracking, no ads.
Under the hood it's a custom synthesizer driven by sentence embeddings, not a generative AI model (although you can choose to use one!) — so there's no GPU, no API calls, and it starts playing almost instantly. The whole thing is open source: https://github.com/prabal-rje/latentscore
If you're a developer and want to use it programmatically it's also a Python library - pip install latentscore — one line to render audio. But honestly I just use the web player myself when I'm working.
Fair warning: it's still alpha and the synth has limits, so please don't expect full songs or vocals. It's ambient/procedural only. But for focus music or background atmosphere, I think it's pretty good.
Would love to know what vibes you try and whether they land!
- Prabal
The Fast demo model is already very impressive. It was way better than expected, but still required being a bit verbose since it didn't seem to understand rarer words ("sauna" didn't get me anything pleasant, "hot sauna" did).
The generated palette seem to be a great indicator of whether the model understood the prompt or not.
I Haven't checked out the Python SDK yet, but it seems very interesting!
I'm curious to know if there is any reason for why you picked Gemma 1B for the Expressive model. Did it generate more cohesive parameters than other 1B models? Or was it just the first one you picked?
BTW - we used Gemma 270m model - not the 1B model. It's sheerly the size - I wanted to see if I could get a really, really tiny LLM to generate coherent music. Tbh, it didn't quite work as well as I expected. It barely beats a randomly generated track.
In fact, the 'fast' model (literally embedding lookup over a pre-generated library of music ... generated using Best-of-N on Gemini Flash) beats nearly everything - including Gemini Flash, Claude Opus, Gemma models.
I really like the idea. But my one attempt was disappointing. "playful energetic urban fantasy at night" ended up set to "very slow" by default.
I would really like to be able to run this on my phone. Use my Brilliant smart glasses to periodically take a picture, ask a model to describe the mood/setting, and get an ambient stream to match the mood.
I tried, “In the mood for country cowboy-ish music played for someone like John Wick bleeding out on a cold, snow-covered park bench.”
I ended up with kinda shrill. I was hoping for something that would sound like I’m listening to something while the coffee gets cold in a cabin.
I get clicks and pops every few seconds, using Librewolf.
But otherwise very cool!
Yeah ... that's a bit of an issue - it's because I built a custom simple synthesizer that's not quite as good as a full blown one. Thank you for the feedback! This is something I intend to tackle in upcoming releases.
Same, on Vanadium. Very cool nonetheless
Thank you!!!
I kinda liked how well you can fine-tune parameters of the music. Could be useful as dynamic soundtracks for games in low resource settings
Yeah! That's one of the reasons I've exposed the Python SDK ... you could, in theory, even attach some sort of DAW that manipulates the music in real-time.
Thats pretty cool! Some games like Gothic had dynamic composing of existing sound themes. It would be interesting to research how these could fit together
Really elegant approach - mapping sentence embeddings to a deterministic synth feels more like building an instrument than generating content, and the instant playback makes it great for flow.
Would love to know if the same prompt always yields the same sound (reproducibility could be powerful), and whether you’ve considered semantic morphing between two moods over time.
Thanks!
The same prompt yields largely the same song because the 'Fast' (default) mode retrieves the synth parameters from a pre-existing library.
But if you use the 'Custom LLM' model, it can generate new and creative music every time you play something - even for the same input!
Server is down :(
Could you try again, please? Just redeployed with a tiny change. Should work now!
Crafted by Rajat
Source Code