rgb control via sound
Hi
We are 3 students who are doing our semester project right now. We don't really have any experience in programming and Max/MSP, so we hope some of you maybe could help us a little, and give us some clues about how we can proceed our work now.
We are recording live sound and a big room. These sounds should control our light (BlinkM's - rgb LEDS) connected to arduino-boards. So high tones in the room creates light colours, and deep tones creates dark colours.
We have made a patch where the sound volume controls the light. But we still don't know how high tones can create light colours and deep tones can make dark colurs?
sigmund~ : http://crca.ucsd.edu/~tapel/sigmund.05~.zip
You could use the [analyzer~] external to identify the note being played. If there are no individual notes, but instead many ambient sounds at once, you could use the [analyzer~] brightness output, as it gives you an average frequency value.
Use [zmap] or [scale] to map the intended values range and when choosing the color, use the [swatch] object with the "hsl" message (hue, saturation and luminosity).
Good luck.
Im working on a similar project only my color is out put to video. I'm also new to max and have been out of college for almost two years. I got about as far as you, i'm controlling color with my audio level, but I want to use music notes to trigger exact color according to Newton's theories. If [analyzer~] can give me a music note that would be amazing but i think what really needs to happen is we need to get wave length and frequency displayed in a [flonum] box. wiki optics for info on color sound harmonization.
After reading my own post again, I think we might have explained it unclear. (Or maybe we just agreed to change the idea a bit)
So, if the volume in the room are high, the rgb lights have a high intensity, and when the volume in the room are low, the rbg lights have a low intensity.
Can we then still use analyzer~? Or how else to proceed?
if you're only interested in the volume of the input, then try searching for envelope follower to get a smooth value from the changing amplitude. Beyond that perhaps Maxuino can help you
this adc-meter-hls-rgb-prependcolor-panel thing is really cute.
minimalism engineering at its best.
-110
yep, for intensity only, you won't need any kind of analysis besides the amplitude, grab that with number~ or snapshot~. use the float output to scale your color levels equally (using hsl message to swatch), just change the saturation and lightness.
Roman's post says it all in about as compact a way there is...assuming you have the hardware part working, you can make this patch in about 30 seconds, literally.
so... maybe once you have that, you should dig some more?? :) I would vote for using analyzer~ or pitch~ or fiddle~ and go with your original idea, or you can delve into fft~ to get really intricate controls. But using pitch~ etc. will get you a long ways towards "higher tones do this, lower tones do that".
Roman= what is this adc-meter-hls-rgb-prependcolor-panel you talking about? And how to apply it and connect it to what I have done until now? Remember that it is my first time with max/msp:)
One of my earliest projects did something very similar. I don't have max on this computer (my laptop), but I'll take a look at when I get home. I remember using fiddle to get the pitch of an incoming sound, and making adjustments based on that information.
One of the problems that I am having is that you are speaking about sound in somewhat metaphorical terms. Do you mean that if the pitch (frequency) of a sound is within a certain range and increases in amplitude the lights in a certain color range are affected? If so, there seem to be multiple ways to go about this. The simplest way would be to use a split object (there is something better for multiple ranges... maybe an if object?) that controls where the amplitude information goes. So that if bass frequencies are the loudest their amplitude is what modifies the light.
What you would really want... I think, is something that detects the relative amplitude of all three frequency ranges that you have delineated and outputs all three, so that you could use these to directly control whatever it is you are changing about the light information.
Also, you mentioned recording in a big room, and I'm sure you have thought about this, but whatever room you are recording in is going to accentuate certain tones. Depending on how you want this to affect your project, you may want to look at where you place your microphones in relation to whatever is generating sound.
-Ryan
Hi GLC,
were you able to do this project? I'm trying to do something similar and would love to learn from your code.do you mind passing the code to me?
thanks
@GLX, look at the RainbowLips.tiff, that Shanti posted above. Self-explaining. And yeah, very cute!
Hi, i'm looking to do the opposite. All i need is something that will just simply recognize the colours on a video and output a number corresponding to how much of that colour there is in the jit window
HELP ME!
Thanks