Friday, July 10, 2026

[MusicViz] Spectrochrome - ColorMaps Update

[Disclaimer:  Unfortunately this is still not the full fancy intro post that talks about what this is, and how it came to be... Maybe I'll get around to that someday, or maybe I'll just keep posting the updates, and forget to make that long deferred proper intro... who knows! I certainly don't anymore LOL 😜]

 

Yay! I've just pulled the trigger on getting a major bunch of upgrades done on my Spectrogram project that I've been chipping away at during my free time over the last few weeks.

https://aligorith.github.io/musicviz_playpen/spectrochrome.html


Specifically, I've upgraded the whole "Color Map" / "Legend" functionality so that it now allows all the different colours per pitch to be edited (with each one per pitch + octave now displayed in a nice fancy table in the UI). (I can also load/save these as JSON to test out the tweaks I want)

Technically I still haven't quite finished all this functionality (i.e. the table only shows things for the "common" default naming style, with the other accidentals that are not used unable to be edited, AND the names don't update to match the naming scheme chosen). But, that stuff isn't very fun, and it could've kept this update blocked for ages if not indefinitely (while killing motivation) if I kept waiting to finish it off before releasing it all...

So, who cares! It's my project! That functionality can remain as a "broken" (but well documented!)  TODO in the meantime, while I dive back into doing all the other fun bits that need doing! 😜

 

 

Notes from the Trenches (While I still remember):

* One unexpected hurdle was defining the color picker panel  - I had originally intended to just use "the native" whatever that the browser offered, thinking that that would give me the nice floating panels that everyone uses... Yeah nah!  Turns out, each browser ends up defining its own (usually crippled, and host OS-dependent) color picker, and those are mostly very ugly!

The hottest libraries on the internet however are also a jolly pain to try to integrate (i.e. I did try "coloris" briefly), and would've forced me to finally give up on the "single page" experimental nature of this thing... 

In the end, I just said, "Bugger That!", and just hacked together my own lightweight one, with the bare minimum I could get away with (i.e. just the RGB sliders, and a preview). The code is crap (and needs some cleanup refactoring at some point), but that can wait!  (Heck, I'll likely need to recode this in "Kea" eventually anyway, and this isn't really any serious / critical software or anything! So, quick and dirty it is!)

   

No comments:

Post a Comment