The Renoise CDP Tool : An Installation Guide For Linux Users

Early in 2014 the excellent Create Digital Music/Motion news site published a brief notice regarding an interesting tool for the Renoise DAW. The tool incorporates the power of software created by the Composers Desktop Project (CDP), a collective of composers and programmers guided primarily by the work of Trevor Wishart. The CDP software includes a suite of audio processors that perform a fantastic variety of sound-altering functions, some of which are found only in the CDP suite. The software was sold as a commercial product until February 2014 when it was released as an open-source project licensed under the LGPL.

The following presentation provides detailed instructions on installing the CDP software and subsequently installing the CDP Tool for Renoise.

The CDP For Linux

I've assumed that your system has been set up for compiling software from source code. If not, see your distribution's documentation on configuring a software development environment. I've also assumed that you know what is a terminal window, the command line, and a prompt. Beyond those basics I'll walk you through the entire process of downloading, compiling, and installing the CDP software for Linux.

To begin, go to the CDP Free Downloads page :

https://www.unstablesound.net/cdp.html

Read the page, then download the Linux sources (beta, 64-bit compatible) :

https://www.unstablesound.net/downloads/CDPrelease7src-linuxbeta.tar.gz

Open the package in your source directory (e.g. /home/dave/src), and enter the newly created directory. If you don't already have a source directory either create one using your file manager or follow these steps at the command-line :

  cd $HOME
  mkdir $HOME/src
  cd $HOME/src/CDPrelease7src

Read the file named linux-howtobuild.txt, then read it again. If you've never compiled and installed software at the command-line you're going to need some help, so here's the step-by-step method. Follow it exactly as presented. First, let's satisfy the need for libaaio :

  cd $HOME/src/CDPrelease7src/libaaio
  bunzip2 libaaio-0.3.1.tar.bz2
  tar xvf libaaio-0.3.1.tar
  cd libaaio-0.3.1
  ./configure --prefix=/usr/local
  make
  sudo make install

The howto includes instructions on building the Portaudio library. Portaudio isn't strictly necessary for our purposes, so you can safely ignore the instructions. However, if you do want to build the CDP programs that require it, you should install Portaudio from your distribution's software repositories. Be sure to install the development package as well. On Fedora that package is called portaudio-devel, on Ubuntu it's portaudio-dev, so you might have to use your package manager's search and info functions to find the correct files.

Now you're ready to compile the CDP processors. First, enter their source directory :

  cd $HOME/src/CDPrelease7src/dev

Next, open a text editor and load the makeprograms.sh script. Make sure that the PABUILD variable is set to your preference - it's either "yes" or "no" - then save the file and close it. Now run this command to insure it's an executable file :

  chmod +x makeprograms.sh

Now run it :

  ./makeprograms.sh

The script will build the processors and install them to the Release directory. Enter that directory to view the binaries you've just built :

  cd $HOME/src/CSPrelease7src/dev/Release
  ls -l

The ls command should yield a listing like this one :

  -rwxr-xr-x 1 dlphilp dlphilp  48469 Sep 18 11:36 abfdcode
  -rwxr-xr-x 1 dlphilp dlphilp  52865 Sep 18 11:36 abfpan
  -rwxr-xr-x 1 dlphilp dlphilp  52802 Sep 18 11:36 abfpan2
  ...

To verify your build, run one of the commands, e.g. :

  ./blur

You should receive a helpful text that tells you how to use the processor. For example, here's the help from running the blur effect :

  ./blur
  CDP Release 7 2014

  BLURRING OPERATIONS ON A SPECTRAL FILE

  USAGE: blur NAME (mode) infile outfile parameters: 

  where NAME can be any one of

  avrg      blur      suppress    chorus      drunk
  shuffle   weave     noise       scatter     spread

  Type 'blur avrg' for more info on blur avrg..ETC.

Most processors have multiple modes of operation, and each mode has its own parameter set. For instance :

  ./blur avrg
  CDP Release 7 2014

  blur avrg infile outfile N

  AVERAGE SPECTRAL ENERGY OVER N ADJACENT CHANNELS

  N must be ODD and <= to half the -N param used in original analysis.

  N may vary over time.

And here's the report for another mode of the blur effect :

  ./blur spread
  CDP Release 7 2014

  blur spread infile outfile -fN|-pN [-i] [-sspread]

  SPREAD PEAKS OF SPECTRUM, INTRODUCING CONTROLLED NOISINESS

  -f   extract formant envelope linear frqwise,
       using 1 point for every N equally-spaced frequency-channels.
  -p   extract formant envelope linear pitchwise,
       using N equally-spaced pitch-bands per octave.
  -i   quicksearch for formants (less accurate).

  spread    degree of spreading of spectrum (Range 0-1 : Default 1).

  spread may vary over time.

And so on and forth. Given 147 processors, each with multiple modalities, that's a lot of possibilities. It's also a lot of parameters. An actual run of a processor can involve a lengthy command line with arcane parameters in which any misspelling or invalid data ends the run. Adding to the joy, some parameters take text files or specially formatted analysis files that require preparation with external software, i.e. a text editor or a phase vocoder.

The CDP processors were created in the spirit of the UNIX philosophy that favors one good tool for one job. However, UNIX also provides powerful scripting capabilities and the ability to pipe output from one process to another. Thus, a script can be written to automate a lengthy series of transformations upon a single soundfile. Your script could be written as a closed system, with no user input beyond running it, or it could be designed to accept user input. Input values can be specified as variables when the script is started :

  foo.scr $1 $2 $3

where foo.scr is your script and $N takes a value intended for a processor parameter somewhere in the script.

Scripting a CDP processor chain is a powerful working method, but your workflow will likely require a soundfile editor and other GUI-based audio tools. And so at last we come to the CDP tool for the Renoise DAW.

The CDP Tool for Renoise

From this point forward I'll assume you know how to use Renoise.

The Renoise DAW is designed to load tools created by 3rd-party programmers coding the Renoise Lua scripting language. The CDP interface is a good example of a Renoise tool, and yes, once again you'll need to download it and install it yourself.

First, let's get an annoyance out of the way. Open a terminal window and run these commands :

  cd $HOME
  vim .bashrc

I've assumed that your system shell defaults to one called bash and that a bash resource file exist in your home directory, i.e. $HOME/.bashrc on most Linux systems. Vim is merely my favored text editor. It doesn't matter what editor you use - gedit, emacs, vi/vim, LibreOffice, whatever - as long as it supports the plain text file format. Open the file and add the following lines anywhere before the end of the file :

  # For the Renoise CDP tool
  export CDP_SOUND_EXT=wav

The first line isn't really needed, it merely clarifies the purpose of the export, but it's a good idea to comment your code for clarity's sake. Save the file, exit the editor.

Now log out and log back in again. You've just set an important item called an environment variable, without which the CDP tool will fail to produce any output. You can set it at the prompt per session, but why bother ? Set it in the shell resource file, do the login/logout two-step, and let's proceed.

Visit the Renoise tools repository and download the latest version :

https://www.renoise.com/tools/cdp-interface

Open Renoise, open your file manager. Find and drag your newly downloaded file onto Renoise, drop it anywhere in the program display, and voila, you have installed the tool.

Open the Sample editor and load some soundfiles into the samples browser. Add a few extra empty slots and rename them. Select the first file in the browser to load it into the editor. Now open the Renoise Tools menu where you should see an item labelled CDP Interface. Click to enable it, set the path to your CDP binaries, and you're good to go.

The tool defaults to the blur processor. It's a good example, so let's explore it before a first test. The EXE Filter is a drop-down menu of your CDP binaries. Next we see a drop-down menu for the modes of the processor, followed by buttons for parameter reset and activating the process. The terminal output box displays messages to let you know if things succeed or fail. Heed its error messages, they provide the keys to resolving failed runs.

Below the terminal output viewer you'll see the help for the selected processor, followed by the data entry widgets for its parameter set. The input and output selections default to the currently edited sample. The selectors on the left refer to macro definitions that we're going to ignore for now. We're interested in the selectors on the right. They default to the active sample for input and output, i.e. the transformation will be in place of your original file. You can change the output destination to any other slot listed in the drop-down menu. Likewise, you can select a different input file.

By the way, the help text is very informative. The tooltips also provide valuable assistance for every parameter of each processor. Even more help is available from the CDP home site where you'll find links to original documentation, workshop material, soundfiles, related sites, et cetera.

The blur processor depends on the results of a phase vocoder analysis of the input file. At the command-line the processor requires a separate analysis file, but the CDP tool automates that step in the Analysis Settings subpanel. If you don't know what those settings signify you can leave in peace. If you know what you're doing you can fine-tune the analysis resolution. And again, if you don't know you can just play with the settings and learn things.

So much for the blur processor. Other processors add a few other widgets, including those for text input and breakpoint data, but the format just described is the typical layout for the whole suite. If a text file is required, the tool kindly provides a pop-up text editor for creating, applying, loading, and saving such files. Yet another widget calls the active envelope generator in Renoise's Modulation editor.

The tool is seamlessly integrated into Renoise. When a process is complete it automatically loads the output into its designated sample slot. Which means, of course, that it is now subject to the sample editing powers abundantly provided by Renoise.

A Demo

And now, a brief demonstration in six figures.


Figure 1. Load a percussion loop into a sample slot, open the CDP tool.


Figure 2. From the blur mode menu select the Blur Shuffle mode.


Figure 3. Verify that your selected sample is the input, set the output to an empty slot.


Figure 4. Edit the domain-image definition. (Edited here to abcd-adcbabcda.)


Figure 5. Set analysis resolution. (2048 here. Value must be a power of 2.)


Figure 6. Process. If successful the output will automatically appear in the designated sample slot.

At this point your newborn sample is subject to the attentions of the Renoise sample editor, the operations of which are beyond the scope of this demonstration. See the Renoise documentation for detailed information about its sample editing capabilities.

Tool Tips

In lieu of a manual - and in no particular order - here are a few tips and tricks I picked up while learning to use the tool.

Add a series of empty sample slots in the Sample browser. Fill some with soundfiles but leave some empty. Use the empty slots as output destinations for the CDP transformations to avoid any accidental overwrite of your original samples. Add more samples and empty slots as needed. And by the way, the CDP tool doesn't pick up the default slot labels in the I/O drop-down menus, you'll need to rename them if you want visible names. Which can be helpful.

If you receive an error regarding mismatched soundfiles, use the sample editor's Adjust Sample Format function to prepare your files with matching sample rates, channel number, and bit depth. Fast and easy, you never need to leave Renoise.

Avoid tedious slider positioning. For direct entry, right-click a parameter's numerical value at the right end of the slider. Type in the desired value, press Enter, move on.

Edit/Undo is your friend. The Ctrl-Z keystroke combination is your faster friend. Learn some of Renoise's valuable keystroke accelerators. Ctrl-Z (Undo) is a good combo to know, particularly when you're doing a lot of experimentation. And it's easy to assign new keystroke combinations. For example, the sample editor's playback control has no default keystroke assignment, but a quick visit to Edit/Preferences/Keys resolved that issue in under a minute. I assigned the alt-spacebar combination for playback start/stop, it's easy to operate with my left hand while my right stays in control of the mouse. Again, when you're doing a lot of tests and experiments you need an efficient workflow. Take advantage of Renoise's customization, learn some keystrokes.

If you add/remove samples or alter their order in the browser just click the button to the left of the Process button. Its tooltip says it recalculates the slider ranges, but it also updates the I/O file drop-down menus. Beats closing and re-opening the tool just to reset those menus.

The Powers Behind The Power

The CDP tool relies on three convergent development efforts. The CDP software is first among equals here, sharing the position with the Renoise DAW and its internal support for the Lua programming language. Lua is easy to learn, its integration with Renoise is splendid, and the Renoise community has responded to its implementation by creating a variety of add-on tools to extend the host's already-rather-awesome capabilities, another strong selling point for Renoise to the modern coding musician. Alas, I can say no more on the topic, but I'm happy to report that the Renoise developers have prepared an introduction to programming Lua-based extensions for their host. See the Resources listed with this article for more information.

Outro

The CDP software suite has been justly praised for its powers, but alas, those powers were available only to users proficient with a text-based interface and the command-line. Likewise, the project's Soundloom and SoundShaper GUI utilities are currently available only for Mac and Windows users, leaving Linux users with scripting the command-line processors. Scripting batch processes is a powerful method of using the CDP suite, but it is tedious and error-prone.

The CDP tool for Renoise eliminates those concerns entirely. The software's powers are at last easily accessible to any user, and the capabilities of the Renoise DAW are immediately at hand for viewing, auditioning, and editing your new sounds. Indeed, it's difficult to imagine a better workflow for experimenting with and using the CDP processors. Major respect to developers/users afta8, Djeroek, and EmreK for their work on the tool. Consider it highly recommended for regular Linux audio folk, consider it essential for anyone into unusual sound design possibilities.

Resources

Renoise

Lua Scripting for Renoise

The Composers Desktop Project (CDP)

CDP Downloads page

The CDP Tool for Renoise

Trevor Wishart biography on Wikipedia

Peter Kirn's article for CDM

Category: 

5 comments

Just a quick correction: In fact, the sample viewer does have an assigned "play sample" key in Linux, the Enter key will do the job. So my alt-spacebar key combination isn't really necessary, but OTOH I did learn how to assign keystrokes in Renoise. :)
Hi, I did everything you taught, but keep receiving the message that CDP installing is incomplete, and won't be able to output audio. I presume that this has to do with the text on bashrc file. I did what you said to do, but the problem persists. I use Ubuntu Studio 14.03.02. on a HP laptop. Renoise 3.1.0
Does CDP works in Renoise Demo? I have a copy of both of them installed in my Linux (Ubuntu Studio) system, but it is not working: It always ask me to check my settings. I do it many times, and the same message appears: "An output file was not produced - Check your settings". Help please!!
Just compiled for linux. Download precompiled linux debian/ubuntu packages at this url: bitbucket.com *SLASH* coderofsalvation/cdp-composer-desktop-debian-package
"An output file was not produced - Check your settings" I am having the exact same here on Ubuntu with Renoise Demo. Maybe it is really the Demo, as it can not render to .wav? Does it run in the full version on Linux for anyone? Thx *Edit: I specifyed the wrong CDP-binaries path. dev/Release ... now the distort-tool works. Tools with .ana-files for analyzes dont work here yet...
wurst