Light frequency to RGB value?

Good morning all;

I’m currently doing a project where I want to convert the frequency of a sound into a color.

So far I’ve got the audio frequency to light frequency conversion; however now I’ve no idea how to get that number into a RGB value.

So my chain so far looks like:

f (audio) * 2^40 = f (light)

But I need to get:

f (audio) * 2^40 = f (light) ??? = RGB value

Anyone have any idea on how to do this?

Thank you :)

… no text …

Spectrum (Color)