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: http://sonic-pi.net. 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 specific in the Sound Preference Pane. Soundflower (https://rogueamoeba.com/freebies/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. (Logic: https://www.apple.com/logic-pro/). 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 rythyms 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.