Paradiddle Tutorial

Paradiddle is a Cocoa Framework to allow Pd (pure data) authors to make attractive MacOSX-native Cocoa interfaces for their patches. Absolutely no code needs to be written: just draw your interface in Interface Builder, compile the application, and then run it!

This second release is fully functional with regards to bridging from Cocoa controls to Pd messages. It can be used to build stable applications, and further functionality for connecting with Pd is planned in the future.

To start:

Expand the “Resources” folder in the left pane of the main Project Builder window, and then double click on the MainMenu.nib file, which will open up Interface Builder.

You should now see various windows, including a Palette with different Cocoa controls, and a window (labeled “Window”) with a “Connect to Pd” button.

Drag a Cocoa control from the Palette to the Application window. You can use a Button, Slider, PopUpButton, ComboBox, or TextField, but for now, we will use a slider with an oval handle (a continuous slider). Click on the third icon from the left in the Palette window for the “Cocoa-Other” Palette, and drag an oval handle slider to the Paradiddle application’s window.

Next, open the “Info” window in Interface Builder (Tools -> Show Info, or Command-Shift-I).

Use the pop-up button in the Info window to select “Help”. Select the control and label it using the “Tool Tip” field. A label of “foo_bar” will send messages to a receiver called “foo_bar” in your patch.

Now you must connect the controller to Paradiddle framework. Make sure the controller is selected, and control-drag from the controller to the cube icon labeled “PDController” in the MainMenu.nib window. When you release the mouse over the PDController, the Info window changes to show “Connections”.

The “Outlet” pane should have “Target” selected with two choices. Click on “SendToPd:” and then click the “Connect” button at the bottom of the Info window.

Save, Quit, and return to Project Builder.

Click on the “Build” Button in Project Builder (the hammer in the upper-left corner of the window).

After a few seconds, you should have a new application (ignore the warnings). Run it with the menu item Debug -> Run Executable (Command-Option-R).

Test your new application by typing “pdreceive 3000” in Terminal.app. (If the Pd executable directory is not in your path, you may have to type the command with the whole path, like “/usr/local/pd/bin/pdreceive 3000”.) Return to your application and click on “Connect to Pd”. Your terminal should indicate a connection. Start moving the slider back and forth. You should get a bunch of messages. Disconnect and then Quit.

Congratulations on building your first Paradiddle application without typing any code!


Copyright 2002, Adam T. Lindsay