Move mesh according to sound frequency


#1

Hello all, been studying up on openframeworks (v0.10.0) and was wondering if anyone has any tips or advice in trying to make a visual music player where mesh will move based on specific sound frequencies coming from any music file i input. I’ve been successful in creating my mesh system but i’m not to familiar in working with sound.
Any help would be appreciated!


#2

Hello @slugz, first, you need to analyze the sound. This is a pretty big topic but for now, what you could do, is to get a beat detection working. I would suggest you ofxMaxim https://github.com/falcon4ever/ofxMaxim to do this, and this chapter of the book https://openframeworks.cc/ofBook/chapters/sound.html to know how sound works. If you get stucked, here a simple example on how to do beat detection with ofxMaxim https://github.com/edap/examplesOfxMaxim/tree/master/07-beatDetection

Once you have a value that defines the beat, you could pass it to a vertex shader, and deform your geometries with that value. This technique is called “vertex displacement”, if you are new to shaders, have a look at this https://openframeworks.cc/ofBook/chapters/shaders.html


#3

wow thank you! i appreciate the resources and you taking the time for the response! i’ll be reading up on these topics and build my way up, thank you again!