I just posted some code from a project I worked on this summer:
You won’t find any OF code on the site, but I wanted to share this because OF was key to the development.
The final “core” code was surprisingly straightforward 150 lines
But it wasn’t obvious that the implementation would look like that when I started staring at pages like this:
The basic idea is to take a signal (an audio input, for example) and decompose it into its components. A fourier transform does something similar when it breaks a sound into its different frequency bins. Empirical mode decomposition (EMD) takes this to another level by breaking a sound into its noisy parts, pitched parts, frequency modulation envelopes, etc. At least, that’s how the theory goes – getting all of that stuff in practice requires a lot of fine-tuning!
The final result here was an external for Max/MSP. Instead of starting by writing a Max/MSP external from the ground up, I wrote a C++ implementation using OF. OF made it easy to visualize things like this:
And also to test the algorithm with microphone input instead of synthesized signals.
Other implementations of this algorithm exist primarily for Matlab in forms that could never possibly run in realtime. With OF I was able to start with a basic C++ outline for the idea, fill it out and test it, experiment with optimizations, and finally convert everything to C and wrap it with a Max external. Way easier than writing straight for Max and restarting Max incessantly!