|
|
|
|
|
by setrofim_
5230 days ago
|
|
>Is the color->note map arbitrary or is there some logic behind it? One way of doing this would be to map from the electromagnetic wavelength of the color to a corresponding audible frequency. Audible range is something like 32 to 32768 Hrz. Assuming speed of sound in air of 343 m/s, this translates to wavelength range of 0.010437 to 10.6875 m . This can then be mapped onto the visible spectrum of 390 to 750 nm. light_range = (750 * 10^-9) - (390 * 10^-9) sound_range = 10.6875 - 0.010437 light_wavelength = (light_range * ((343 / sound_freq) - 0.010437) / sound_range) + (390 * 10^-9) |
|