A C C O U N T

B A N   T H E   R E W I N D

My name is Stephen Schieberl. I like making things with computers. I write code to explore creative and interesting ways to experience technology. I produce music as Let's Go Outside and head up Slant Records around. I try to balance it out with a lot of outdoor activities.

Friend on Facebook
Ban the Rewind?

Pictured: An audio visualizer created with KissFFT It's been one year and one day since I posted my original KissFFT block for Cinder and it's time for an update. Cinder has evolved and I've been updating my blocks to evolve with it. Cinder KissFFT 1.0.3 goes well beyond syntax updates with a major makeover. GET KISSFFT FOR CINDER ON GITHUB The zip includes three sample projects for Visual Studio 2010 and XCode 4.2 demonstrating FFT on generated audio, audio loaded from a file, and tempo detection. Just drop the contents of this zip into your "blocks" folder and try out the samples. An audio visualizer created with KissFFT WHAT'S NEW? Static Library A really nice feature of the new block is the option to use either source code or a static linking library. The examples use the static library. This hides the guts of the block and speeds up build time. Concurrency (ie, faster) Probably the most significant improvement to Cinder KissFFT is parallelization. The nature of FFT operations make this a perfect candidate to divide most tasks up across your machine's cores. On Windows, the block now runs about 4 - 7 times faster than the old version. Explicit Pointer The old KissFFT block used what's called an "implicit pointer". It was a standard class with a shared pointer that did all the work. The new class simply returns a shared pointer for you to work with directly. Here's a quick run down on implementing the block. The following code creates an instance of the FFT class, fills a buffer, sends it to the analyzer, and reads the results in the frequency domain. // Create instance of analyzer KissRef fft = Kiss::create(); // Create buffer float * buffer = new float[1024]; // TODO: Fill buffer with generated // or input data -- see example // Pass the data to be analyzed fft->setData(buffer); // Analyze and acquire transformed data float * data = fft->getAmplitude(); // Iterate through frequencies and report their volumes int sampleSize = fft->getBinSize(); for (int32_t n = 0; n < sampleSize; n++) { console() << "Freq: " << n << ", Vol: " << data[n] << "\n"; } A few other improvements: Code re-organized for better portability Cleaner, better performing samples Improved cross-platform compatibility Project for building static library included (VS10) 1.0.1: Upgraded to Kiss FFT 1.2.9 1.0.1: Added memory optimization (thanks Nick Porcino) 1.0.2: Added XCode sample projects 1.0.3: Code cleanup and optimization