Forums > MaxMSP

Frequency to Color

September 5, 2013 | 8:00 am

Hello forum,

I’m wondering if there are any objects that can take frequency and amplitude values and translate them into RGB or HSL/HSV values in real time, similar to the following link: http://rohanhill.com/tools/WaveToRGB/

As I’m currently assuming such thing doesn’t exists, I would like to know if any of you have done similar things before and can share some of your knowledge or give me some pointers.

Thanks in advance.


September 6, 2013 | 6:16 am

Bump


September 6, 2013 | 6:23 am

This is basically just math that you can patch together with plain-vanilla Max objects. You can follow the link from the page you cited to the Physics dept. at SFASU, pick an algorithm, and implement it as a Max patch or use Javascript or Java or C or whatever.

I’m not aware of any objects that do all the lifting for you, but you might want to take a look at MaxObjects.com to see if you can find anything there.


September 7, 2013 | 1:33 am

This is a favorite subject of mine.. so forgive the verbosity.

First of all, I’m not a fan of the ol’ wavelengths of light to audio frequency sound mapping (per se). Not only does it make little to no sense in terms of physics (color and sound are two very different beasts) but it’s not based on human experience. It’s comes off as more of a disembodied novelty. To me at least. Of course I’m not talking about potential usefulness as an exercise in programming (I’m sure you would learn a lot).. but rather the relevance and meaningfulness of the approach. I prefer something more grounded in human experience… which typically involves qualities and proportions over quantities and absolute values.

In terms of color.. HSV is probably the most intuitive and useable of all color formats. It’s a bit more natural to map the variables to other forms of media as well … and you can always convert it to RGB whenever you want.

That said.. meaningful relationships between color and sound might include:

pitch/hue
The difference between two hues as a kind of color interval. We readily perceive proportional differences in both pitch and hue. Both colors and musical notes are also commonly mapped onto a circle.

pitch/value(brightness)
Contrast could be considered as a kind of value interval with differences in value relating to differences in pitch. Lower pitch is commonly associated with darker colors and high pitch with brighter colors. You could map notes to hue and consider the various tints/shades of a given hue as different intervals/octaves of that hue.

volume/brightness
The brightness or intensity of a color can be considered as a kind of color volume. A very natural association.

volume/saturation
Saturation is also closely related to value and makes for an interesting analogue to volume. We often perceive saturated fluorescent colors as ‘loud’, etc.

white color and noise
Consider that both white color and white noise consitute an even distribution of more pure, primary elements. Saturation can be thought of as chromatic purity.. with more saturated colors containing less white. The same can be said of sonic purity, with the purity of a given sound containing less noise. There is also a curious relationship between filtering white noise in subtractive sound synthesis and using pigments and other materials to absorb and reflect certain color.

saturation/consonance
The precise midpoint of any two complementary colors is gray.. which is totally desaturated and ‘impure’. The midpoint in a tempered octave is a tritone, which is relatively more dissonant.

color envelopes
You can also play with color relationhips within a given frame of reference as a kind of ‘envelope’.. with sharp, clear colors that pop as a color ‘attack’ and color that blends into the background as a ‘release’. It would also follow that evenness and consistency of a given color could be considered as a kind of ‘sustain’. etc.

There are many approaches… Pick a single simple aspect of both color and sound.. let’s say, frequency/brightness. Then it’s just a matter of getting frequency values from an object or device and processing the values so that another object or device can use those values to affect the brightness of something. Start off with just a linear scaling of input to output and then play around with shaping the initial values before scaling them.


September 9, 2013 | 7:06 am

Hello Metamax,

Certainly, what you say is true, though I wasn’t thinking about just plain mapping frequency to hue, I was considering dividing the mapping into octaves and applying the sum of octaves of a given color as saturation. However, many of the approaches you described are very interesting and I will certainly have your recommendations in mind.

Thank you very much for your interest and taking your time to help me.


September 9, 2013 | 9:27 pm

Hey, that sounds pretty cool. If you get something going, I would be interested in checking it out.


September 10, 2013 | 8:22 am

Hello Metamax,

Working on the subject I’ve decided the best way to work into this is re-synthesizing spectrograms, scaling different octaves in order to fit them in their light spectrum analogues, summing and finally obtaining detailed results in terms of both hue, saturation and brightness based on the spectral contents of a signal, I decided to open a new topic about this, thought I should let you know in case you have any ideas, as my main concern now is how to transform these vectors back into color.

http://cycling74.com/forums/topic/spectrogram-to-color/

Thanks again!


September 10, 2013 | 8:35 am

You could just do the reverse of what is described in this thread (with Jitter) :

http://cycling74.com/forums/topic/turing-video-to-sound/

I used to also load sounds into atmogen – import the images into photoshop – mess around with them – and then turn them back into sound.


Viewing 8 posts - 1 through 8 (of 8 total)