Posts tagged 'C++'

2011

In this part of the tutorial, we are going to design a Cocoa UI in order to draw the spectrum graph computed by our unit, in which we'll create widgets so as to configure the FFT analysis. Why using Cocoa? Well, for two reasons: I didn't want to introduce a too complex API in this tutorial (such as OpenGL), and I would like to show you how to mix C++ and Objective-C in the same XCode project. Don't worry, it doesn't bother if you're not experienced with Objective-C: we'll make a straightforward use of it and we'll clearly explain all the interactions between our GUI classes and our C++ code.

We briefly introduced the FFT part of the Accelerated Framework in Part I of this tutorial. We are now going to focus on the vDSP library and create the C++ class responsible for doing the spectral analysis work of our input samples. We want to keep it simple, with a few public methods, however we would like to perform FFT analysis on different frame sizes. So, one of our challenges is to design a circular buffer as member variable, which is a common pattern in audio programming.

Apple usually takes care of their developers community.  Whereas they lately delivered an impressive update of their Xcode IDE with tons of new features (read a [cool  review here](http://pilky.me/view/28)), they surprisingly removed the project template for creating Audio Units. Nevertheless, let's see how to create a new unit from scratch...