3D Objects that react to sound

Ash22's picture

Hi Everyone,

I'm working with Max/MSP with DIPS not sure if this is the right forum but I hope you'll be able to help anyway.

I'm working on a current project that hopefully will do the following once finished.

  1. 5 sub patches for 5 different 3D objects with lighting effects
  2. I would like each of these 3D objects to receive a sound signal and react (louder=bigger)
  3. I would like to integrate all these sub patches in a WindowMixer
  4. Be able to change the position of each 3D object individually within the window mixer

At the moment I just have the 5 different 3D objects in the Sub windows, I can't control their position from the main window I've tried a picslider, atm just using DGLTranslate in the sub patches. The objects won't receive the signal either I'm not sure why?? I have an ADC input set up with a "s amd" and I have a "r amd" attached to all the objects with a scale 0 100 3 40 but nothing, I don't know if i'm completely missing something or what, but ANY advice would be appreciated.

Thanks a million

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Ash22's picture
Re: 3D Objects that react to sound

I'll post a screen shot of it just incase no one got my unspecific babble

Screen Shot 2012-05-24 at 21.43.20.png
Screen Shot 2012-05-24 at 21.43.20.png315.5 KB

itsthejayj's picture
Re: 3D Objects that react to sound

:) think your looking for http://cycling74.com/forums/

This is a Quartz Composer forum, much like Max in it visual node based programming, but a completely different (even better) ball game

harrisonpault's picture
Re: 3D Objects that react to sound


For your specific example, it would be easy to drop Max from the equation entirely, and do it all in Quartz Composer. There are audio input and analysis patches, you can place your 3d models within a Lighting patch (using the built in, Kineme, or v002 model handlers),and you are pretty much done.

For MAX and DIPS you may find support @ the cycling74 forums. There are some threads here about DIPS, but they aren't too encouraging. You may also find it is more straightforward to do this entirely in Max: use Jitter. Or one of the vj frameworks that integrates spiffy audio controls for quartz compositions: e.g., VDMX, CoGe, etc. I'm not sure whether there is a QC-friendly framework that will let you integrate multiple 3d objects within a scene and add audio elements. For more complex stuff with not only object animation, but consistent lighting, reflections, occlusion and such you might be better off in the Unity game engine or possibly Blender rather than QC. These are not QC oriented, so you should pursue them elsewhere.


harrisonpault's picture
Re: 3D Objects that react to sound

Here ya go... the basic idea for doing this in QC. Please see my prior comment for additional thoughts.

pth_Audio Reactive 3d Object Test.qtz10.7 KB

dust's picture
Re: 3D Objects that react to sound

your screen shot doesn't really help me as you have some patch cords hidden. i can defiantly see somethings that do not look right. like the mixer section looks a bit off. your sending your signal from a meter ? i trouble shoot a lot of max patches in school and i can defiantly tell you that placing floatnums and int boxes every where will help you trouble shot your patch. you need to find up stream from your sub patch what the problem is. your screen shot is useless in these regards. i can not even tell what your sending with s amd and where it is your are receiving it etc... if you say you are sending the output of a meter then your scaling is all off.

first off the digital signals in max are in the range of -1 to 1 you can use a gain fader or msp math *~ to go over this number but then you would be in distortion. when you run a signal through a meter the meter objects only takes the positive values 0 - 1 which is good because if using peak amplitude to change the size of an object the negative values will screw it up. so on the most basic level without getting into fft and spectrum stuff the metered object is perfect for you. it takes you -1 to 1 signal at 44100 times a second and converts it to a max float in the 0 - 1 range at a specified refresh rate of 50 milliseconds.

so by using a scale of 0 100 3 40 your not going to get correct output of your scale object to transform any of your objects. first off make sure to use the . for floating number the scale object will not work if you plug a float into and its set to 0 100 3 40 you would need to use a ... or 0. 100. 3. 4. now 0. 100. is not your range. the range output of the meter object would 0. 1. see the picture for a correct use of the scale object. now the meter object can report values greater than the 0-1 range. like it could report 0-3 but that is bad and means you are way over unity gain and distorted.

also you didn't specify if your using jitter to draw meshes or if your using quartz. I'm assuming quartz composer seeing your on this forum. it would be totally possible add a sphere to a quartz file publish the radius of the sphere as an input load it up in dips inside max and use dips to send a signal to the radius of your sphere inside quartz with a set radius $1. it looks to me like you have copied and pasted some of the dips example sound interaction code specifically the sphere example, which really has nothing to do with quartz composer. so I'm unclear as to why you have addressed this forum.

try integrating qc with dips look at the examples. the first quartz composer example shows you how to send mouse and color data to a qc file. did you install dips correctly can you see the quartz examples. do your dips externals look like the ones in the second picture ? if not you need to copy the PkgInfo file to your mxo's contents folder. you need to do this for all dips external mxo files that look like folders. see vade's description. http://abstrakt.vade.info/?p=62. v002 says to rename as a bundle then to mxo again but all i needed to do was copy the PkgInfo file to mxo contents file.

as you would see in the sphere sound example the r amd is connected to a scale with its initial inputs at 0. 1. not like your saying 0 100 remember the period for floating point. we covered this all ready. remember if using a qc file that qc's dimensions are different than max pixels etc.. so if you publish spheres radius in qc as r then you load that file up in dips and send your r amd to qc with a message box that says set r $1 connected to a dips qc render object. now you will need to scale 0. 1. 0. 2. if doing this. what this will do is make the sphere in qc go from 0 nothing to 2 based on audio input. qc screen dimensions being -1 to 1 which makes a total of 2. so scale 0. 1. 0. 2. in this case.

i suggest maybe doing this project in qc and max separately then trying to do it with qc and max via dips. you should learn a lot if you do this. i suggest to not copy and paste as well. its so easy to do but until you know what you are copying and pasting it complicates things. the max help files are great and you will find one of the things that makes max map so great is the ability to copy help files etc.. so take what i said with a grain of salt copy and pasting is ok.

check out the example dips qc render with sound project for a push in the right direction.