AudioKit

AudioKit is a promising-looking new open source tool set for coding synthesizers, music, and sound on Apple platforms (though it could certainly be ported to other places if you have the time).

The draw: you get not only a robust library but loads of examples and tests, too, for a variety of applications, in both Objective-C and Apple’s new Swift language. And it’s free. The contributors will look familiar – and the core engine comes from community contributions around that most enduring of synthesis tools, Csound. (For those worried about obsolescence and the pace of technology, Csound has its roots in tools developed one half century ago, so in computer terms more or less the dawn of time.) In fact, what AudioKit is in effect is Csound as an audio engine, with Objective-C and Swift as the API – no orchestra/score files required. (And if you don’t know what I just said about “scores” and “orchestras” but do know Objective-C and Swift, well, this is definitely for you.)

There are examples for control and playback, convolution, FM and granular synthesis, and sequencing, among others. Below, they’ve produced a video that shows how a game can be enhanced with generated sound using the library. Features:

  • 100+ synths and effects, including physical models, spectral effects, granular synthesis, reverbs, etc.
  • Built-in sampling, complete with recording and storage functionality.
  • Sequencing you can trigger from code.
  • Examples with granular synthesis, convolution, effects processing, pitch-shifting, and more.
  • Human-readable code. (Yay, humans!) They write: “Conductors control Orchestras, which contain Instruments that produce Notes. Clear methods with Apple-style naming conventions, Xcode completion, documentation and tool-tips.”
  • Sound code you can integrate with your app logic.

AudioKit for Game Audio: Space Cannon from AudioKit on Vimeo.

Now, in some ways this is a mirror image of what we did with libpd. The notion of libpd was to separate sound and synthesis from the code that runs the app. The very same interactions are possible; the workflow emphasis is just different. (The basic principle of embedding a free tool as a library is otherwise the same, and this now means developers can use both Pure Data and Csound on the latest mobile platforms.)

Of course, a lot of us will choose both. For those comfortable with patching, or developers working with composers and sound designers who prefer to patch rather than code, using the two libraries together may make the most sense. For those comfortable with coding who want to sketch app logic and sound in the same environment, working with code directly here will be more appealing. (See also tools like Python’s lovely pyo.)

Add this to libpd, plus the weekend’s announcement of a new sync library, and it’s clear that free software and open source tools can coexist with Apple’s proprietary platform. At the risk of offending more rigid free software zealots, I think that’s only a good thing. It promotes coding literacy and self-sufficiency, and it demonstrates the flexibility, durability, and power of free software licenses to help people work together to solve problems. That can only encourage people to toy with free platforms, whether it’s connecting an Arduino or Raspberry Pi or dual-booting that Apple laptop to Linux. And having more shared code can also benefit platforms outside the walled garden.

Oh, plus it’s kind of fun making apps that make noises. Actually, I think that’s probably the most important bit. Check it out:

http://audiokit.io/features/

http://audiokit.io/blog/

Max Mathews, we miss you; it seems you will also live forever.

  • Clif Marsiglio

    Wow. It looks like you can do a lot of the front panel stuff in swift. I *REALLY* need to get back to learning this language because after a decade of not using C, not going to learn objC.

    • Yep, Swift is awesome and AudioKit instruments are very clean looking and easy to read in Swift. And I’d agree that it sucks to have learn a new language just to do audio, which is one of the reasons why AudioKit is cool – it’s just in the language you’re already writing your apps in, no need to learn a box-to-line-to-box paradigm tool like libpd.

      • Will future versions of AudioKit implement more of the features in Swift? It looks like except for FM that there are more features if you are using OBJ-C. I am programmer(Java, PHP) who is interested trying out IOS audio development and wondering which language I should learn.

        • Learn Swift. The swift version is equally powerful to the Objective-C version, ie. nothing you can do in Objective-C that you can’t do in Swift, plus you get all the Swift goodness.

  • Clif Marsiglio

    Wow. It looks like you can do a lot of the front panel stuff in swift. I *REALLY* need to get back to learning this language because after a decade of not using C, not going to learn objC.

    • Yep, Swift is awesome and AudioKit instruments are very clean looking and easy to read in Swift. And I’d agree that it sucks to have learn a new language just to do audio, which is one of the reasons why AudioKit is cool – it’s just in the language you’re already writing your apps in, no need to learn a box-to-line-to-box paradigm tool like libpd.

      • Will future versions of AudioKit implement more of the features in Swift? It looks like except for FM that there are more features if you are using OBJ-C. I am programmer(Java, PHP) who is interested trying out IOS audio development and wondering which language I should learn.

        • Learn Swift. The swift version is equally powerful to the Objective-C version, ie. nothing you can do in Objective-C that you can’t do in Swift, plus you get all the Swift goodness.

  • Adam Boulanger

    Peter, great article! I’m a co-creator of AudioKit. Thanks for the plug. You’re absolutely right, the best advantage of AudioKit is the possibility to write application code in a building-block manner. Line for line, you’ll find complex audio processes boiling down to single lines of code – fft, pitch tracking, specialization, filtering – single lines of code. This allows the dev to embed the control of audio in modern application design.

    I would also offer, an android version is very very close. Best, build great sound!

    • AudioKit is ready right now in Objective-C and Swift but I’m waiting on the demand for an Android version before putting effort into it. So far that demand has not really come. I’m not sure if this is because Apple has a long history with musicians and artists or if Apple’s core technology is slightly better suited for audio. I’m platform agnostic though, so if anyone would want to collaborate with me on Android, get involved by forking the project on Github and joining the AudioKit google group.

  • Adam Boulanger

    Peter, great article! I’m a co-creator of AudioKit. Thanks for the plug. You’re absolutely right, the best advantage of AudioKit is the possibility to write application code in a building-block manner. Line for line, you’ll find complex audio processes boiling down to single lines of code – fft, pitch tracking, spatialization, filtering – single lines of code. This allows the dev to embed the control of audio in modern application design.

    I would also offer, we’ve made progress on an Android version, and the right collaboration is all that’s missing to go from ˆpossible to done.

    Finally, thank you for mentioning Max, the godfather of everything we do in digital sound. AudioKit is the logical progression of music-n languages into modern application architecture. I only wish I could have shared it with a dear friend.

    Best, build great sound!

    • AudioKit is ready right now in Objective-C and Swift and it’s just a matter of interest to do the Android version. I’m platform agnostic, so if anyone would want to collaborate with me on Android, get involved by forking the project on Github and joining the AudioKit google group.

  • BrettThePark

    This looks pretty neat. Due to the use of the LGPL v3, is this an option to use in an App Store released app? (which is the reason I had avoided straight up csound in the first place).

    • Clif Marsiglio

      Looks like the LGPL is the version of GPL that doesn’t restrict this sort of thing, hence Lesser GPL. You still have to put in notices that you are using this software, and link to it…I’ve seen a few other audio apps link to libraries like this.

      I believe csound is under the LGPL as well.

  • BrettThePark

    This looks pretty neat. Due to the use of the LGPL v3, is this an option to use in an App Store released app? (which is the reason I had avoided straight up csound in the first place).

    • Clif Marsiglio

      Looks like the LGPL is the version of GPL that doesn’t restrict this sort of thing, hence Lesser GPL. You still have to put in notices that you are using this software, and link to it…I’ve seen a few other audio apps link to libraries like this.

      I believe csound is under the LGPL as well.