Using Csound with Pd

As noted in Chapter 1, Pd (http://puredata.info) is a powerful, free, cross-platform-compatible programming language for music. The user interface of Pd is almost entirely graphical; it could hardly be more different from Csound conceptually. Graphical programming is appealing to many musicians.

There’s no denying, however, that Csound has more synthesis opcodes than Pd. (Also, if you have issues with tendinitis or carpal tunnel syndrome, Csound may be a better choice simply because Pd requires far more extensive use of the mouse.) Fortunately, you don’t have to choose one or the other. If you’ve chosen to install the Pd front end, which is an option in the Csound installer dialog, you’ll find a file called csoundapi~.dll in your Csound > bin folder. Copy this into Pd’s “extra” folder, which will be found in the root folder for Pd, wherever you have installed that.

On the Macintosh, Pd needs to see a file called csoundapi~.pd_darwin. You’ll find this in /Library/Frameworks/CsoundLib.framework/Versions/5.2/Resources/PD/. (Note that this is the Library folder on the root of the hard drive, not the Library folder in your own user directory.) This file needs to be copied to a directory that is in Pd’s search path. In my Mac, this is jimaikin > Library > Pd.

Once you’ve copied and pasted the file, you can launch Pd and create a Csound object by typing csoundapi~ in a new object box. If the installation is correct, you’ll see a standard Pd object box, as shown in Figure 10.5. If you haven’t put the.dll in the right place, Pd will send an error message to its Console window. By itself, the csoundapi~ object isn’t much use, however. It needs to receive an argument that tells it what .csd file you want to run. For instance, if you want to run a file called vocaltones .csd, you would leave a space after csoundapi~ and type vocaltones .csd.

Figure 10.5 The csoundapi~ object in Pd has one inlet and four outlets. The two outlets on the left transmit stereo audio from Csound, which can be sent to the Pd dac~ audio output object. After attaching a toggle to the “run $1” message box, as shown, and turning on Pd’s audio by clicking the “; pd dsp 1” message, click an event message box to send a real-time score event to Csound.

image

The csoundapi~ object can receive control, MIDI, and audio signals from Pd, and can transmit control and audio outputs to Pd. You can send new score events to Csound by sending a Pd message beginning with the word “event”. A good article describing the details of the process is available online in the Csound Floss manual (http://en.flossmanuals.net/csound/ch052_csound-inpd). There’s little need to repeat the content of that article here.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.64.172