DAW scripting
September 17, 2009 11:22 PM   Subscribe

What tools and/or DAW software do I need to automate DAW actions through scripts?

Digital music recording and production is very new to me, but I have some programming experience. It occurs to me that being able to write scripts to automate DAW actions (setting EQ, effects, mix levels etc) would be fun and useful. The ideal DAW would allow running of scripts just as easily as triggering other DAW events using automation tracks, or even the generation of automation tracks via scripts.

Are there any DAWs that support this out of the box? What languages and tools do I need to know/have?

For reference, I have the following software at the moment: REAPER, RiffWorks, GarageBand on OS X; Ardour and LMMS on Linux, though I find working with audio on Linux too trying to bother most of the time.

Apologies if this is an RTFM question; if this is the case, some pointers to FMs would be perfect.
posted by vanar sena to Media & Arts (11 answers total) 1 user marked this as a favorite
 
Best answer: One option would be setting up midi channels for the controls, and then using midish for the scripting, this should work with any of the programs you listed, though it would be less integrated (the way I would set it up is send a midi event from the DAW, which triggers one of the midish scripts, which sends the appropriate midi actions back to the DAW).

For real programmability, check out supercollider, csound, chuck, puredata, or one of the other wonderful dedicated DSP environment programming languages.

I am less clear on the details, but you should be able to use csoundvst to embed csound code in a vst instrument within a DAW. I think supercollider and puredata have similar things available.
posted by idiopath at 11:33 PM on September 17, 2009


Also, regarding the frustration of Linux audio, get jack working and start jack before you start any other programs when you log in. If an app on Linux does not use jack, you don't need audio from that app. Use qjackctl to configure, launch, and control the jack daemon, and to connect the audio and midi ports of your running apps. (If you want to be able to hear audio output from the adobe flash player, install the pulseaudio jack sink module, and run pulseaudio and load that module before starting any other programs, after running jack).
posted by idiopath at 11:37 PM on September 17, 2009 [1 favorite]


Best answer: If you have Reaper, you should investigate the JS/Jesusonic functionality, which enables you to script many things in the DAW, and to create you own DSP/MIDI plug ins. Basic documentation here but there are loads of JS plugins bundled with the program which can be edited and tweaked to learn how it all works.
posted by benzo8 at 1:14 AM on September 18, 2009


Also, while audacity is more of an old school sound file editor than it is a DAW, it embeds the nyquist programming language for creating effects plugins, which is one of the best designed DSL's I have ever used, not to mention being an excellent embedded language for audio (it is a lisp family language though, and not every programmer is OK with that).
posted by idiopath at 7:09 AM on September 18, 2009


Posted too soon. One other option is blue, which is a DAW-like program for algorithmic composition and custom DSP design, using csound as its backend, oriented for experimental composers. It is scriptable in java, python, javascript, and csound, as well as any programming language that reads from stdin and prints to stdout. Cecilia is similar, but much more like an IDE and less like a DAW. These programs both have a pretty steep learning curve which pretty much requires learning csound language to get full usage out of them, but in my experience they will greatly reward the effort - blue is mostly a superset of cecilia and is much easier to use. They are both composition tools rather than recording studio tools.

Also, blender has DAW functionality alongside its 3d modeling image editing and video editing tools, and is fully scriptable using python. I would compare it to emacs, but less discoverable - it can do so very much, but none of the functionality is obvious from looking at the user interface. Using blender requires reading manuals and tutorials.
posted by idiopath at 7:24 AM on September 18, 2009


Response by poster: Wow, thanks guys, that's a lot to take in. I was dimly aware of jesusonic but it seems it does a lot more than I initially thought. I'm going to try every single thing mentioned here.

Re: audio and linux; my problems are threefold. First the hardware support is not great. I love my Pod X3 but it just doesn't work, and the M-Audio FastTrack iface drops down to 16/44 (USB audio spec bog standard) on Linux. Second, the software is limited - ardour is inscrutable (to put it mildly) and a lot of the other apps are usually one of unfinished, buggy or just not very easy to use. Third - xruns (though this gets better or worse from kernel to kernel). As a fairly strident FOSS guy it pains me greatly but I'm just not up to the challenge of spending time making it work.
posted by vanar sena at 8:19 AM on September 18, 2009


Regarding hardware support the issue is that usb2 has no implemented standard for audio drivers, and no co-operative vendors. Eventually some Linux developer will be masochistic enough to reverse engineer each and every usb2 device, but given the presence of firewire and usb1.1, which do have a standards that the vendors actually follow and helpful vendors where they diverge from standards, it will be a while.

Regarding xruns, it is a tradeoff between realtime performance and processor power. Larger buffer sizes will help. Don't run ubuntu because ubuntu ships with all sorts of crap that causes overruns. At the very least disable networkmanager if you want to do audio on ubuntu.

Ardour is excellent, but you really need to read the documentation in order to use it. And yeah, the open source world is full of buggy not-really-finished applications.

Of course I don't condemn anyone for considering Linux audio more work than they have the energy for. If you ever start doing real time stuff where you want low latency as a priority, no other mainstream OS beats Linux with an rt-patched kernel and a pci or firewire sound card, by the way.
posted by idiopath at 8:34 AM on September 18, 2009


Whilst I'm totally with you on the F/OSS aspect, I'm a composer and musician by trade. All of my computers are Linux save my DAW, which is still Windows XP - audio under Linux is just not mature enough yet, particularly when you talk about the ability to interchange sessions with other composers...

That said (and I'm really an advocate these days), Reaper is definitely less evil than most. I was a Steinberg user for many years - first Cubase VST, the SX and then onto Nuendo when I needed music-to-picture. But I've recently changed wholesale to Reaper. It's developed by the guy who developed WinAmp and the approach is very similar - totally unprotected (save a nag screen) and a $60 buy-in after 30-days (although the product continues to work beyond that, apparently). The openness of the development is refreshing too - bugs in Nuendo took months to be acknowledged, let alone squashed - Reaper has a very open attitude and the forums are alive with contributions from both users and developers.

So, it's a bit of derail, but it's obviously a hot-button for you - Reaper isn't F/OSS, and doesn't run under Linux, but it's the best choice in a "slightly less evil" way!
posted by benzo8 at 12:06 PM on September 18, 2009


benzo8: "Reaper isn't F/OSS, and doesn't run under Linux"

Actually Reaper's developers put in the effort to make it work 100% under wine, which I think is awesome and worth rewarding. I sometimes use Reaper myself.
posted by idiopath at 12:09 PM on September 18, 2009


idiopath: "benzo8: "Reaper isn't F/OSS, and doesn't run under Linux"

Actually Reaper's developers put in the effort to make it work 100% under wine, which I think is awesome and worth rewarding. I sometimes use Reaper myself.
"

Yes. I was thinking natively, but, of course, it does run under Wine... Another layer when you're looking for low-latency is not ideal, of course, but it was an oversight in my post - thanks for pointing it out.
posted by benzo8 at 3:15 PM on September 18, 2009


With the jack plugin under wine, it runs with identical latency with the rest of the jack setup. Wine is not an emulator but a set of compatibility libraries, so it is actually running natively, remarkably enough.
posted by idiopath at 3:30 PM on September 18, 2009


« Older upgraded to snow leopard, or should that be slow...   |   Missed a Promise to Appear Newer »
This thread is closed to new comments.