Sounds like your first idea may be a bit beyond my level, how could I implement the rgb2hsl operator to do the job?
Yeah, it's kinda beyond my level too. However, today... today is a good day - for me and you and any other hue-rotating yahoos in maxspace.
I managed to create a drop-in [jit.hue] replacement in genexpr that actually does a better job at maintaining constant color-brightness with smoother hue transitions + saturation adjustments that also maintain constant luma... yee haw.
The issue is that certain colors are brighter than others. If hue is changed without adjusting for that difference, there is a secondary shift in brightness. That's the idea behind [jit.hue] which does a better job at maintaining constant luma than the quick and easy HSL breakout.
For example, you might map amplitude to brightness and pitch to hue. But as hue is adjusted, amplitude gets affected. Maybe you want that, maybe you don't. To keep the secondary param from fluctuating, the space can be rotated and sheared so that changes to the hue-angle map to the same luma plane. The visual difference is very obvious with less banding and distortion. Of course you might want those artifacts, so be sure to test using different gradients and textures. Either way, this is as close to [jit.hue] on the GPU as I have seen in Max.