Originally published on 1/11/2015, 5:58:48 PM

Updates to this, since it’s three years on:

  • I’ve largely replaced Soundflower with LoopBack.
  • I still use Logic Pro, but have also come to love a number of external soft-synths on both the Mac and iOS.
  • Probably for a separate post, but Logic has some interesting capabilities to be able to do live sampling and then using those sounds immediately.
  • I should use Ableton Live more, but Logic is my hammer.

To open up MacTech Conference in 2014, instead of the usual pre-progrmmed audio/video, I decided on a little bit more of a performance. This included some live coding of music, some live performance by playing music, live sampling and pre-recorded segments. I promised a lot of people to detail my setup, so, this post aims to do just that.

I opened it up with some really basic live coding of music using Sonic Pi. Originally created for the Rasberry Pi, there’s a Mac version now, and naturally, that’s what I used. The great thing about running it on a Mac, is that you have a host of other tools at your audio disposal. While Sonic Pi has some basic effects available, it’s much nicer to be able to enable/disable and adjust effects on the fly using, “traditional,” knobs and sliders.

Like many single-use things-that-make-sound on the Mac, sound is sent directly to the default output as specified in the Sound Preference Pane. Soundflower is a system extension that creates a virtual sound interface that then allows you to route audio around internally. Using Soundflower, I set the system default output to Soundflower’s input. If you’re thinking about this, you’ll realize that this means all sound will go into Soundflower’s in, but never get output anywhere. Here’s the real secret sauce: Logic Pro.

I’m not saying Logic Pro is the only tool here, but it’s the one I use. I’ve been using Logic since version 3, before Apple bought eMagic and took over the software, so, it’s pretty ingrained in my brain, muscle memory, and workflow. With Logic, I can set a channel to mix a Soundflower channel in, and output Logic’s master out to any output on the system, overriding the System default. Of course, on that channel, you can apply effects and manipulate them in real time.

So, in this initial example, the flow looks like this:

Sonic Pi -> Soundflower -> Logic -> System Output.

Of course, you can have several tabs in Sonic Pi starting up sounds and rhythms independently (or even synced to a Sonic Pi internal metronome). I did some it-stays-in-sync-because-it-does syncing between Sonic Pi and Logic for some of the later pieces. On my MacBook Pro, I found that Sonic Pi’s tempo command is exactly half of the BPM used in Logic. (So, set the tempo in Sonic Pi to 65, and in Logic to 130.) This is great for effects-only load outs in Logic, where you just want effects to be in time, or even where you’re actually keeping music in sync. I was able to start up a drum beat in Sonic Pi, and then, with a lot of practice, start up Logic’s sequencer and just let that go, and the two stayed in time.

For a little fun, when I let the procedurally generated music go without my input, I’d fire up visualizers that could react to the audio and get that up on the large screens.

Sonic Pi is fun to use on its own, but it does take a little work to get up to speed to anything really interesting. Soundflower is a useful utility in ways outside of audio, but I am also surprised how many electronic musicians don’t know about it. Finally, there’s Logic. Logic may not be the tool for everyone, so, I’d love to hear about alternatives that may be less expensive or less confusing.

If you’re looking to experiment with any of this, have fun! I’m happy to answer questions where I can.