[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 15 KB, 2000x380, 2000px-Linear_visible_spectrum.svg.png [View same] [iqdb] [saucenao] [google]
[ERROR] No.3722192 [Reply] [Original]

Sup /Sci/?
I need to interpret audio frequencies as colours, that way you could see which colour represents which audio tone.

Is there a system for which light frequency in Hz represent which colour in some kind of colour-code-system?

>> No.3722216

The bottom of human hearing is about 20 hertz. The top is around 20,000 hertz. Also humans hear logarithmicly, so the interval between 20 and 40 hertz sounds the same as the interval between 1,000 and 2,000 since they are both double.

Thats what I know about sound.

>> No.3722238

I would google for winamp-exstensions if I were u...

JUST SAYING'
>derp

>> No.3722242

>>3722216
use this

Map the audible sound spectrum to the visible light spectrum using a logarithmic to linear mapping, e.g. k * log(<sound frequency>) + c = <light frequency>.

>> No.3722248

>>3722216

I know a lot about sound, since I am on a 3 year long university education in sound engineering, but I don't know shit about light : /
From what I can read on wiki, it seems that colours are very relative, but there should definately be a way to calculate what colour a light frequency translates to, given a certain colour-encoding-system. Question is; what system, and how does it work?

>> No.3722259

>>3722248
The visible spectrum is much smaller than the audible.

You might want to wrap the light spectrum over each octave of sound.

>> No.3722270
File: 36 KB, 375x375, green.gif [View same] [iqdb] [saucenao] [google]
[ERROR]

>>3722259

Yes, sure! But what exactly is the light spectrum? Where can I see which lightfrequency is percieved as which colour?

>> No.3722295
File: 867 KB, 747x1869, Music Theory.jpg [View same] [iqdb] [saucenao] [google]
[ERROR]

That's all I got
I think I understand what you mean OP, but it probably doesn't exist. You mean a pre-established correspondance, some sort of standard set at one point of history for whatever reason ? ie. something with some legitimacy ?
This one's just a trick if you're learning music.

>> No.3722305

>>3722270
http://en.wikipedia.org/wiki/File:Electromagnetic-Spectrum.png
Come on.

>> No.3722307

>>3722242
This.

wiki says:"Visible light has wavelength in a range from about 380 nanometres to about 740 nm"
So map that logarithmically to a range of 20-20000Hz and you're done:)

>> No.3722318

Im the first responder.

If you associate color with audible tone, you can wrap the spectrum a few times.

For instance, make 100 hertz blue, and thus 200, 400, 800, and 1600 are all blue. And then make 133 hertz red, so 133, 266, 533, 1066 are all red. Then do the same for yellow and 166 hertz.

The reason this works is because human beings (rightfully) perceive octaves as the same identity. And an octave up or down is just a double or half of frequency. I think audio tone is analogous to color tone.

>> No.3722319
File: 9 KB, 279x180, images.jpg [View same] [iqdb] [saucenao] [google]
[ERROR]

>>3722270

Uh, Google?

Come on man:

>> No.3722322

>>3722307
So, If I were to ask any one of you to give me the exact colour-code of a light frequency of for example 540 nm. You could do that? Didn't think so.

>> No.3722337

>>3722322

Why not find a wavelength color chart online, open it with photoshop or gimp, sample the color for 540nm, then plug that hex number into your scale.

Or are you lazy?

>> No.3722354

>>3722337
Well, that's what I've been trying to do. But I can't find any color-charts that are exact enough. The highest resolution I've been able to find is this: http://www.oksolar.com/led/led_color_chart.htm
I need some type of equation for translating exact wavelengths into exact color-codes.

>> No.3722353

wouldzou post result? Interesting idea.

>> No.3722385

>>3722354

You'll likely have to do a combination of ideas posted above (wrapping the spectrum).

Find a hex chart online. Google the wavelength for specific ones and you might stumble on an exhaustive chart of wavelengths.

>> No.3722565
File: 327 KB, 1140x1260, CIExy1931 (1).png [View same] [iqdb] [saucenao] [google]
[ERROR]

Okay, so it seems as though a certain wavelength of light only translates as a "monochromatic" colour. If you look at the pic I attached, only the outer line of the horseshoe-shaped diagram represent these monochromatic colors. the rest cannot be produced with one wavelength. (I guess it's like they need an intermodulation between wavelengths to apear).

Furthermore, http://en.wikipedia.org/wiki/Spectral_color seems to state that these monochromatic (or "spectral") colors: "...of sufficiently close wavelengths are indistinguishable in a continuous spectrum."
So one can only make an aproximation, there is no exact colorcode for an exact wavelength of light. (The various color ranges indicated in the diagram on the right are an approximation: the spectrum is continuous, with no clear boundaries between one color and the next -http://en.wikipedia.org/wiki/Visible_spectrum#Spectral_colors))

>> No.3722585

>>3722565

Fine work. Now you'll have to pick out a range of monochromatic colors to use. Then devise an equation that wraps the various sound waves to that set of colors. It won't be 1-to-1 obviously, but you could make it work reasonably well.

>> No.3722688

>>3722565
...wait, so you just learned nature was continuous ?...

>> No.3722771

>>3722688
well, no. but in the audiofield, for example, nature is still measurable even though it's continuous.
I can pin-point an exact audio frequency and say; this is an A, it's 440 Hz.
but apparently, one cannot do the same with color, because (if I'm not misstaken) it's a relative perception of lightfrequencies.
I really thought there'd be some kind of computer program where you could input any frequency in the visible spectra of light, and it'd give you the equivalent colour.
but that doesn't seem to exist. instead, the most common way to calculate different colors is through a percentage mix of RGB. Like this; http://en.wikipedia.org/wiki/List_of_colors

>> No.3722788

OP, this is like asking, is there any way to map temperatures of 100,000K+ to what it would fell like to humans from 50-100F? It just isn't necessary and anything you find will be an arbitrary choice by that one person.

>> No.3722820

20Hz = #000000 (0 in decimal)
20,000Hz = #FFFFFF (16777215 in decimal)

X Hz = (X - 20) * (16777215/19980) in decimal

>> No.3722831

>>3722820

THIS IS VERY CLEVER

>> No.3722848

Five seconds of Google:

http://www.fourmilab.ch/documents/specrend/

All you have to do is map audio frequencies periodically to light frequencies, then use this mapping into RGB (or into whatever you like) to get the colors. The basic arguments are all here.

>> No.3722864

>>3722788
This anon is correct. For your application, there's no reason that your mapping has to take the lowest frequency in the visual spectrum and map it to the lowest frequency of an octave. If all you want to do is make a periodic relationship for visual effect, you can translate the mapping as you see fit. That much was hopefully evident.

>> No.3722877

>>3722771
Nobody's going to complain if you're off by +/- 1% of the spectrum.

>> No.3722891

>>3722820
I like you.

>>3722848
You are also nice.

>> No.3723313

http://www.efg2.com/Lab/ScienceAndEngineering/Spectra.htm

YESSSSSSSSSSSSSSSSSSSSSSS

>> No.3723333
File: 3 KB, 493x160, visible_spectrum.png [View same] [iqdb] [saucenao] [google]
[ERROR]

>>3722192

I'm trying to use the octave structure we are used to:

audible frequency range expressed in octaves:
fh=20000Hz, fl=20Hz
2^xa=20000/20
xa*log(2)=log(1000)
xa=10

visible frequency range expressed in octaves:
fh=c/380e-9m, fl=c/760e-9m
2^xv=2
xv=1

mapping to visible range ('octave factor'):

a_1=2^(xv/xa)=2^(1/10)

for any audible frequency fn:

n=log(fn/20)/log(2)
a_n=2^(n/10)

fl/a_n = corresponding visible wavelength:

20Hz -> 760nm (almost IR)
40Hz -> 709nm
80Hz -> 662nm (red)
160Hz -> 617nm (orange)
320Hz -> 576nm (yellow)
...
440Hz -> 558nm (yellow/green)
...
1kHz -> 514nm (cyan/green)
5kHz -> 438nm (blue)
10kHz -> 408nm (violet)
20kHz -> 380nm (almost UV)

Interestingly, 440Hz leads almost exactly to the wavelength of maximum sensitivity (555nm).

Please carefully verify all this because I is techie, can't science, can't math.