ch3 Posted February 21, 2014 Share Posted February 21, 2014 hi, I wanted to create something like an audio analyzer with geometry, where the low frequencies pull one side of a plane and the high the other one. I managed to put something together, but since I am new to houdini, I was wondering if there is a cleaner/better way to do this. I used the pitch CHOP node to create a bunch of different channels. These are then accessed by a point SOP to deform a plane. The problem is that the resolution of the deformation is determined by the 'pitch divisions' and the amount of channels created, which creates a stepped look. I wrote a function to interpolate between the two closest channels, but this just smooths the steps, rather then adding more detail. Is there a different way to get the audio spectrum and use it to offset the surface? thanks georgios If you download the file, just plug an audio file into the 'sample' CHOP node and make sure you have the function defined. getFreq( string path, float f, float n ) { chN = chopn(path); float newF = f* chN; if( floor(newF) == ceil(newF) ) return chop( path+newF ); else { f = floor(newF); c = ceil(newF); t = newF % 1; value = chop(path+f)*(1-t) + chop(path+c)*t; value = value + rand(newF*100+$T)* value *n; return( value ); } } audioAnalyze.hipnc Quote Link to comment Share on other sites More sharing options...
edward Posted February 22, 2014 Share Posted February 22, 2014 Have you tried the Spectrum CHOP ? Quote Link to comment Share on other sites More sharing options...
ch3 Posted February 22, 2014 Author Share Posted February 22, 2014 yeah, I had a go with the spectrum node, but didn't figure out how to use the data coming out of it Quote Link to comment Share on other sites More sharing options...
edward Posted February 23, 2014 Share Posted February 23, 2014 From https://www.derivative.ca/wiki088/index.php?title=Spectrum_CHOP, it says for the Spectrum CHOP To determine the frequency that a given sample represents, use the formula:Freq = 2 x (sample#) x (Sample Rate) / (Channel Length)Where 'Sample Rate' and 'Channel Length' both refer to the Spectrum CHOP's rate and length. Quote Link to comment Share on other sites More sharing options...
DeeLan Posted October 8, 2017 Share Posted October 8, 2017 On 23/02/2014 at 12:09 PM, edward said: From https://www.derivative.ca/wiki088/index.php?title=Spectrum_CHOP, it says for the Spectrum CHOP Quote To determine the frequency that a given sample represents, use the formula: Freq = 2 x (sample#) x (Sample Rate) / (Channel Length) Where 'Sample Rate' and 'Channel Length' both refer to the Spectrum CHOP's rate and length. Please correct me if I'm wrong but "Sample Rate" and "Channel Length" are "Samples/Sec" and "Length Samples" respectively (as seen when middle mousing the spectrum node) right? Also, any suggestions how we would use this to map the magnitude of the frequency onto geometry? 'chopci' expression and a point attribute? (I'm a complete CHOPS noob, so I'm struggling with this a fair bit). Quote Link to comment Share on other sites More sharing options...
mestela Posted October 8, 2017 Share Posted October 8, 2017 This the sort of thing you're after? Just me fumbling around with chops nodes until it sorta looked interesting. The zip is a hip and .wav, the sound is a filter sweep from low to high to low again. spectrum.zip 1 Quote Link to comment Share on other sites More sharing options...
DeeLan Posted October 8, 2017 Share Posted October 8, 2017 That's Perfect! Thanks Mate! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.