A look at PyDAW

This article brought to you by LWN subscribers Subscribers to LWN.net made this article — and everything that surrounds it — possible. If you appreciate our content, please buy a subscription and make the next set of articles possible.

Linux offers a great many components from which a powerful digital audio workstation (DAW) can be built. But, as an heir to the UNIX design philosophy of modularization, Linux does not offer much in the way of high-level, monolithic audio applications. Thus, an electronic musician coming into Linux from Windows may have a difficult time piecing together and configuring a self-contained audio production environment. Composer/developer Louigi Verona has written extensively about the trials and tribulations of his own switch to Linux, and would-be converts are well-advised to study Louigi's notes and commentary before taking the plunge.

Developer Jeff Hubbard wants to provide a solution to this problem with his PyDAW project, a singular environment for the Linux-based musician working in contemporary electronic music. PyDAW supports audio/MIDI sequencing in a well-designed GUI that includes a piano-roll interface for MIDI event entry, an audio sample editor, and a set of graphical editing tools for designing control curves for various integrated sound parameters. An audio mixer, a suite of instruments, and a set of signal processors round out PyDAW to make it a self-contained system for producing electronic music with Linux.

PyDAW has been designed to appeal to users who want to avoid the difficulties presented by excessive modularity. No external plugin architecture is supported, and the author has indicated that its JACK deployment may be discontinued in favor of direct communication with ALSA. While these decisions may seem heretical to other Linux audio developers and users, they proceed from PyDAW's basic design philosophy, i.e. to provide a complete system for immediate and uncomplicated use by musicians working in a specific genre.

PyDAW requires modern hardware, and its performance reflects the host machine's capabilities. A sufficiently powerful laptop is usable, but the author prefers a desktop system equipped with an audio interface designed for high-quality sound. A dual-core 64-bit CPU with 4G memory is a base system for adequate performance, a quad-core system with 8G memory is recommended. An eight-core or better system with 16G memory would be optimal for fully exploiting PyDAW's capabilities.

You can download PyDAW in pre-built versions for Ubuntu and other deb-based systems, as a source tarball for a local build, and in an ISO image for a bootable DVD or USB stick. The bootable images include a plain-vanilla Ubuntu 12.04 for AMD64 systems, PyDAW's target Linux distribution.

A Git repository is also available for anyone with an interest in the project's most recent development. Building PyDAW is uncomplicated, with minimal and readily available dependencies, though it should be noted that the project expects Python 2. To be clear, Python is required for the program's PyQt4 user interface bindings. The DSP components — synths, fx, sampler, etc. — are written in standard C, with their Qt4 GUIs written in C++. PyDAW is licensed under GPLv3.

Unfolding PyDAW

PyDAW is a work in progress, with a fast rate of development, so be aware that the descriptions here are subject to change. This review is based on versions from the 12.xx series through 13.03-8. Subsequent versions may change the program's internal and/or external aspects significantly. See the PyDAW Web site for current information about project development and the latest release.

The program opens to the main arrangement screen seen to the right. The top menu bar offers some basic file operations, an offline rendering dialog, a theme manager, and links to the program's Web site and online manual. Immediately below the top menu we see the PyDAW transport and tempo controls, the active region and loop mode indicators, and the MIDI input port selector. Beneath the transport control bar we see six editor tabs, with the Song/MIDI tab set as the default. The top row of the Song/MIDI tab presents a series of empty grey boxes, numbered 0 through 12. Click any box to open the region creation dialog.

Double-click on an item to open the default item editor, a "piano-roll" display for MIDI events recorded from an external device or entered manually. Other editors include GUI and numeric list displays for designing envelopes for parameter controllers, pitch-bend, and velocity values. Multiple items can be edited as a single item — a very cool workflow amenity — with all editors expanded to the specified range.

The CC Map tab displays the default MIDI controller assignments. Controller maps have been prepared for PyDAW's instruments and processors, another workflow amenity that speeds up the design and application of gain curves for synthesis/processing parameters such as filter cutoff frequency, volume control, and low-frequency oscillator (LFO) modulation depth.

For its internal sound sources PyDAW comes equipped with two synthesizers. Ray-V is a virtual analog synthesizer constructed in a standard architecture with a single-panel UI for uncomplicated programming. However, there's nothing missing its design: Ray-V provides two oscillators with four source waveforms, filter and amplitude stages with ADSR envelopes, a pitch envelope, noise and distortion generators, an LFO, and a master mixer section with controls for glide and pitchbend. Ray-V's presets indicate its possibilities in a set of synthesizer pads, leads, and percussion sounds.

Way-V is PyDAW's wavetable synthesizer. Sixteen waveforms are available to each of Way-V's two oscillators, the output from the oscillators is sent to their optional ADSR envelopes, move to a non-optional master ADSR, and finally reach the master mixer. The mixer includes glide and pitchbend controls, and a noise generator is available. The PolyFX processing module mixes the synthesizer's output with up to four effects processors, sending the blend on to PolyFX's own LFO and two ADSR output envelopes. Alas, Way-V includes no preset patches, but new sounds can be created quickly and easily. With my laziest method I merely select different wave types for the default patch. In a more energetic mood I apply and modify Way-V's other parameters for more complex sound design.

Per-track effects processing is managed by the Modulex multi-effects device. Up to six processors can be applied, with available modules for nine filter types, two distortions, a limiter, an equalizer, and a panner. Two pre-defined modules are also available for reverb and a tempo-synchronized delay line.

A caveat for the unwary: MIDI track definitions (instrument, FX, level, state, solo/mute status) persist from region to region. Item definitions behave similarly, with changes in an item applied to all instances of the item, i.e. the original and its copies in any regions. Fortunately, items can be "unlinked" for individual edits, but the user is advised to learn what's fixed, what's flexible, and the default status of objects in the PyDAW UI. Hint: Right-click on a region or item to see available operations.

At the macro-composition level PyDAW's tools promote a rapid workflow. Regions and items can be copied and moved singly or as a group, and playback can be looped to region or item bar, allowing realtime arrangement of your material. By the way, items can be copied and pasted between regions, also in realtime.

Audio content can be set into a track either by employing the Euphoria sampler, by recording new audio directly, or by using the audio sequencer (seen to the left). Euphoria supplies the expected sample file handlers — load/save, MIDI key assignment and range, sample tuning, MIDI velocity sensitivity — and provides a hook to the Audacity soundfile editor for more detailed editing. The audio sequencer's Viewer tab is especially useful for arranging recorded material in arbitrary patterns, with snap-to available for bar/region boundaries (or not at all). Double-clicking on a waveform in the Viewer or single-clicking anywhere in the Item List invokes PyDAW's built-in sample editor, a limited-by-design utility for quick and easy work with time-stretching, pitch-shifting, and setting loop points.

The Tracks tab provides a virtual audio mixing board with five input strips and five buses (master plus four). Input can be routed to any of the eight tracks, each of which has its own bus selector, solo/mute switches, and effects processing. PyDAW isn't designed to be a first-choice application for recording and mixing by electroacoustic instrumentalists, but the facilities are there if needed and they are certainly useful for the creation of new sound samples.

A word about PyDAW's offline rendering: The dialog presents good defaults, the process is very fast, and the output format is an acceptable 32-bit stereo WAV file. That's the word, short and sweet.

Using the program

Initial workflow proceeds from the top downwards, from Region to Item to Event. Objects are invoked quickly to sustain creative momentum — left-click in the Region/Item areas to invoke those objects, right-click to open their available operations — and many edits can be accomplished with commonly-used keyboard accelerators (Ctrl-C to copy, Ctrl-V to paste, Del to delete). Mouse behavior is predicated by the active editor. For example, group selection in the piano-roll grid is made by holding down the Ctrl key while sweeping with the mouse with any button held down. In the continuous controller and Pitchbend editors it isn't necessary to hold the Ctrl key while making the selection, again with any button pressed.

PyDAW allows any number of sequential Items to be edited as a group. The piano-roll and the continuous controller displays will reflect the decision and show the increased time period. A similar feature allows arbitrary grouping of items for copy/paste operations, a welcome device when creating complex arrangements from multiple items across multiple regions.

I had no problems with basic operations in the PyDAW audio sequencer. Audio clips are arranged on a region-assigned timeline, i.e. the clips play along with the passage of the Song's regions. They can be snapped to bar or region boundaries, or they may be freely placed on the timeline. Only one audio item is allowed per line, and only horizontal replacement is permitted. Double-clicking on an audio clip in the audio sequencer will invoke a basic editor for massaging your sound samples. The editor is intentionally feature-limited, with particular attention given to setting loop points, stretching or squashing the sample length, and changing its pitch. Again, all operations are easy to access and can be applied quickly.

Fizz-pluck-bang [MP3] is a short demonstration piece made with PyDAW 13.03-6. With the exception of one problem getting my laptop's internal microphone to work, all my objectives were met in the piece. I created MIDI sequences in the piano-roll editor that drove sound samples in Euphoria and synthesis patches in Ray-V and Way-V, I added drum loops with the audio sequencer, and I applied a simple volume control curve for one of the synthesizers. Macro-level formation was made simple with PyDAW's easy arrangement of Regions and Items, and the offline rendering was flawless.

The PyDAW author has suggested some recommended settings for improving PyDAW's performance with JACK. Discontinuities in the audio stream can be reduced by switching off JACK's realtime option and raising its buffer period size. Latency will increase, but performance is more stable. Until PyDAW is rewritten for direct connection to ALSA I suggest following Jeff's advice, with a little experimentation with your JACK settings to find the happiest numbers.

The documentation

Documentation currently consists of the online manual, a wiki, and a forum for exchanges between users and developers. The online docs may not be up-to-date with the latest changes, so it's a good idea to join the forum where Jeff and his associates are quick to respond to reports and suggestions. Jeff is also available on the PyDAW forum at KVRaudio.

For more examples of music made with PyDAW, check out the PyDAW Music page on SoundCloud. New works are also announced on the KVR forum.

TODO

PyDAW can stand improvement in some areas. More presets for the Ray-V synthesizer would be nice; any presets for Way-V would be nicer. Cut/copy/paste and multiple selection would be welcome in the audio item display, the audio sequencer could be more flexible, documentation needs some love, and a metronome would be helpful. Fortunately Jeff works to fix PyDAW's most egregious bugs as quickly as possible, and I must note that I've encountered no show-stoppers in recent releases.

Personals

I tested PyDAW in three settings. I built it from source code on uniprocessor machines running Arch 64 and KXStudio (Ubuntu 12.04 in i386 mode), platforms clearly underpowered for PyDAW, with predictably poor performance. As I recommended earlier, you'll need a multicore CPU, preferably in native 64-bit mode, with at least 3G memory, to experience PyDAW's full capabilities.

Incidentally, it is worth noting that more audio software is demanding the power of multicore hardware. Harrison's Mixbus and the upcoming Bitwig Studio both require a multicore machine, and explicit support for multiprocessor hardware is present in Ardour3 and Csound.

My best-case reports come from running PyDAW on a dual-core laptop. I built and ran the program under KXStudio (again in i386 mode), and I also ran it from a bootable USB stick created with the 64-bit ISO image from the PyDAW SourceForge site. I followed Jeff's suggestions for improving performance by taking JACK out of realtime mode and increasing its buffer size. My tests weren't realtime-critical, and the higher latency was worth the more pleasant experience while learning how to use the program.

Outro

As stated earlier, PyDAW may not be for everyone but it will surely appeal to many contemporary computer-based musicians. If you're into EDM and other electronic styles you should check it out, with the full understanding that the project is still in development (PyDAW v.3 is already in progress) The author wants to know about any bugs or unexpected behavior you encounter in his program, you can reach him on the KVR forum and on the PyDAW wiki.