Personal tools
You are here: Home documentation FAQ for Pd
Document Actions

FAQ for Pd

View entire FAQ in full Up to Table of Contents
Frequently Asked Questions regarding Pd (now with answers) If you have something to contribute to this page, log into puredata.info and you will have edit access.

Using Pd

Can I use Pd to run patches written in Max/MSP?

If you save the Max/MSP patch as a "Max patch file" in the pat/mxt text format, then Pd can open that file. Pd will not open a pat file in the binary format. The tricky part is that all of the objects have to have the same names and be compatible in order for the patch to work.

You can also save files at "Max patch files". On GNU/Linux and Windows, you can select the file type at the bottom of the Save panel. On Mac OS X, just change the .pd at the end of the file name to .pat, and Pd will save using the "Max patch file" text format.

Krzysztof Czaja's Cyclone project is aimed specifically at Max compatibility and includes a loader for binary and text Max patches. It includes a cyclone object which is meant to ease the conversion. To use it, load cyclone as a library with "-lib cyclone", then create an object "cyclone", click on it and use the File-Open-dialog to open a Max patch.

Max 5 introduced a new JSON-based file format with the extension .maxpat. Max 5 can still read the older Max 4 format .pat and .mxt formats that Pd can export, but MaxMSP 5 can no longer write .pat or .mxt format files that Pd can directly read. Cyclone also can not read the new .maxpat file format.

Fredrick Olofsson has written a SuperCollider patch that can convert a Max 5 .maxpat file into a Max 4-compatible .pat file. The .pat files resulting from the conversion can then be opened in Pd or Cyclone. Fredrick Olofsson's MaxPat converter

Can I use Pd to run Max/MSP externals?

Max/MSP externals run only on MacOS or Windows machines running Max/MSP. However, if you have the source code, it is notoriously easy to port a Max/MSP external into a Pd object.

Can I use Pd with plugins?

Yes. Pd works well with LADSPA, DSSI and VST plugins (not DirectX plugins, however). You'll need to download and install a separate [plugin~] object or the [dssi~] object for DSSI plugins. . Also, it is impossible to use Pd as a plugin itself, at this time, but there are number of people working on this, including using Pd as a browser plugin.

As of Pd 0.43, you can also customize the Pd's GUI using plugins. These are known as GUI plugins

How do I write my own Pd externals (or [objects])?

For once there is the a short how-to write externals by IOhannes m zmölnig.

There is also some documentation for writing new Pd objects in a paper by Theo Stojanov.

Also, the API for Max/MSP and Pd is almost identical, so if you find documentation on writing MSP externals, it may be of use.

Where can I find a list of all the native objects in pd?

There isn't a definitive list but you might also check /doc/5.reference/help-intro.pd (/doc/5.reference/0.INTRO.txt in older versions) in the documentation that comes with pd. Open it by right-clicking on the background of a patch and select "Help".

While you are there, get the directory listing of the /doc/5.reference/ folder and look for objects not already mentioned in help-intro.pd

Can I send data to Pd from other application using MIDI?

Can I send data to Pd from other application using MIDI? or is it only possible with OSC?

Yes, you can send MIDI from another application to Pd. The actual method for doing this varies from platform to platform. See the paragraph MIDI Routing on the page midiinput for details on different operating systems.

You are also not restricted to OSC in that you can use [netsend] and [netreceive] to move data between other applications and Pd, or multiple sessions of Pd on different nodes of a LAN.

Also, if you use the [netreceive] object, you can send messages to Pd through a network socket from any program.

What is the largest integer that Pd can represent?

Because Pd uses a 32-bit float as the only internal representation of numbers, it is limited to 6 digits of accuracy. 999,999 is the largest number that can be represented in Pd without scientific notation.

999,999 in binary is 1111 0100 0010 0011 1111

But Pd cannot represent this number exactly 1111 1111 1111 1111 1111 (1,048,575)

but it can represent this number exactly 0111 1111 1111 1111 1111 (524,287)

Therefore Pd can represent 19-bits of integer accurately.

I don't hear any sound!

I thought Pd as about making sounds. But I don't hear anything!

First make sure that the box marked compute audio is checked in the main PD window.

Then check to see that you have selected the right soundcard and drivers for your system, and that the soundcard is connected and operating.

  • On OS X, make sure the check-boxes next to your selected soundcard have been checked in "Audio Settings".
  • On Linux or OS X with Jack, make sure the Jack application is running.
  • On all platforms, check the audio control panel which comes with your Operating System and make sure the proper output is enabled there, and that its playback volume is turned up.

Also make sure you are using the correct sampling rate in PD to match that of your soundcard.

this FAQ was originally published under the GPL at Pd's FLOSSmanual

Why does everything sound so 'weird'?

There are clicks, glitches or crackles everywhere, even in the test tone!

More than likely you have chosen a latency that is too fast for your computer and soundcard to handle.

Return to the "Audio Settings" menu and increase the "delay" time there.

It is also possible that other processes running on your computer, or even a badly configured or slow graphics card, can affect the performance of PD. Consider running PD with the -rt flag enabled (Linux only!).

This can be done from the command line, or by adding -rt to the "startup flags" under the "Startup" menu.

On Linux or OS X with Jack, it is possible to set the latency of the Jack application to a greater amount and reduce glitches (called "xruns" in Jack) there as well.

this FAQ was originally published under the GPL at Pd's FLOSSmanual

Why does everything sound so 'distorted'?

I get a constant sound (no clicks or glitches), but it sounds distorted.

It is possible that you are playing the sound too loud for your soundcard.

Using the controls of your soundcard to reduce the playback volume.

Also make sure you are using the correct sampling rate in Pd to match that of your soundcard.

this FAQ was originally published under the GPL at Pd's FLOSSmanual

How do I get audio input?

I can playback audio just fine, but there seems to be no sound coming INTO Pd.

Perhaps you did not enable sound input.

On OS X, make sure the check-boxes next to your selected soundcard have been checked in "Audio Settings".

Also, some cards with an uneven number of in and out channels can have problems in Pd. Try setting the number of channels the same for the input and output.

On all platforms, check the audio control panel which comes with your Operating System and make sure the proper input is enabled there, and that its recording volume is turned up.

this FAQ was originally published under the GPL at Pd's FLOSSmanual

How do I make MIDI work?

I want to receive MIDI data from my keyboard ... How do I do that?

Making Basic Connections

By default, Pure Data has 1 MIDI input and 1 MIDI output.

To connect to one of these ports, first plug in the MIDI device (or start your MIDI software). Next, start Pure Data and choose the device in the MIDI Settings dialog: Preferences->MIDI Settings...

You can test that MIDI I/O is working with the Test Audio and MIDI patch: Media->Test Audio and MIDI. Input and output channels are 1-16.

Note: You will have to restart PD in order to connect to new devices that were plugged in after it was last started.

Using Multiple Devices

If you want to connect multiple MIDI devices/streams to PD, you can enable the "use multiple devices" option in the MIDI Settings dialog which enables 4 inputs and 2 outputs.

With multiple input and output ports, the extra channels are accessed beyond the usual MIDI 1-16 channel numbering:

  • Port 1: 1-16
  • Port 2: 17-32
  • Port 3: 33-48
  • Port 4: 49-64

MIDI Routing

Another more useful option is to use Operating System specific MIDI mixing/routing software. This allows you to route external MIDI streams into PD as opposed to selecting them manually through the MIDI Settings dialog and most routing software also allows you to save connection settings.

Mac OS X

Use the Audio-MIDI Setup.app in /Applications/Utilities to create virtual ports for Pure Data to use through the IAC Driver. Open the MIDI window and double click on the IAC Driver. Click on the little "+" icon below the Ports list and add two ports: "Pure Data In" and "Pure Data Out". Next, open PD and select "IAC Driver Pure Data In" for the input port and "IAC Driver Pure Data Out" for the output port.

Now that Pure Data has 2 virtual ports, you can route MIDI data from devices and other software into and out of Pure Data. To make connections, try the following software: MidiPatchBay or, if you're already using Jack OSX, Patchage.

Linux

As Pure Data uses ALSA MIDI, by default, it creates 2 virtual ports: 1 input and 1 output. You can then use tools which allow you to make connections between ALSA MIDI streams: aconnect, aconnectgui, and qjackctl (if you are using Jack). aconnect is a simple commandline program that comes with ALSA, aconnectgui provides a simple gui around aconnect, and qjackctl includes a nice visual routing system for ALSA MIDI.

Windows

The Windows MIDI implementation does not include virtual midi ports and you will need an "loopback" application that allows you to create them in order to route MIDI data between software. Currently, the options are MIDI-OX , LoopBe1 , Maple Virtual Midi Cable and loopMIDI.

Why can't I create an object?

I get the message "... couldn't create" when I type an object's name and there's a dashed line around my object!

The reason for this error is that you have asked Pd to create an object which does not exist.

There can be several reasons for this error, and the most common one is spelling. Object names in PD must be spelled correctly, and they are case sensitive.

[Osc~] or [OSC~] will not create in place of [osc~], for example, nor will [osc] without the tilde.

Sometimes users accidentally combine the creation argument and the object name, such as [+1] instead of [+ 1].

New Pd users also often get confused between Objects and Messages, which are very different types of elements which can be placed in the patch from the "Put" Menu.

You can use the "Find last error" function under the "Find" menu to track down which objects did not create.

this FAQ was originally published under the GPL at Pd's FLOSSmanual

Why can't objects be created?

I get the message "... couldn't create" when I open a patch and there's a dashed line around my object!

If you get this error when opening a patch which you're pretty sure works otherwise (i.e. you've downloaded it from the internet or you created it in a previous PD session), then it's likely that there is an External Object which was available when the patch was created, but is not available now.

You can use the "Find last error" function under the "Find" menu to track down which objects did not create.

Pd will preserve the location and connections of an object which fails to create, but it will not function.

While most of the Pd Externals are available in the Pd-extended distribution, some are not, or require additional configuration of the "Path" and "Startup" settings. If the External is not available in Pd-extended, you may need to install it yourself.

this FAQ was originally published under the GPL at Pd's FLOSSmanual

Why do I get an error when connecting two objects?

I get the message "error: signal outlet connect to nonsignal inlet (ignored)" when I open a patch.

This error tends to go with the previous error "I get the message '... couldn't create' when I open a patch...".

Often this error means that an object has failed to create, usually because it uses an External Object which is not available in the current installation or configuration of Pd.

Pd will preserve the location and connections of an object which fails to create, but it will not function. You can use the "Find last error" function under the "Find" menu to track down which objects caused errors.

Pd will treat uncreated objects as Message Objects, even if they were originally Audio Objects, so this error will follow the previous one.

If the External is not available in Pd-extended, you may need to install it yourself.

this FAQ was originally published under the GPL at Pd's FLOSSmanual

Why can't I connect two objects?

I get the message "error: can't connect signal outlet to control inlet" and I cannot connect two objects together!

The output of Audio Objects (those with a tilde ~ in their name) normally cannot be connected to Message Objects (those without a tilde ~ in their name).

So Pd will not allow these connections to be made. You might want to look at your patch and make sure that you are using the proper combination of objects.

this FAQ was originally published under the GPL at Pd's FLOSSmanual

What's a "DSP-loop"?

I get the message "error: DSP loop detected (some tilde objects not scheduled)" when I click "Audio ON", and the sound is not working!

In an analog electronic system, you can easily connect the output of a mixer back to one of the inputs, turn up the channel and get feedback. This is because everything in an analog system happens pretty much simultaneously.

Computers do not work like this, however, and therefore you cannot ask a Pd patch to compute results based on its own simultaneous output.

Pd works in what are called blocks (i.e. a group of samples, such as the default number of 64 samples), and all the samples in each block must be computed before they are output.

So a DSP loop occurs when a patch needs information which is calculated inside the same block in order to create output.

You can use the "Find last error" function under the "Find" menu to track down which objects are causing the DSP loop.

The easiest way around this problem is to create at least a one block delay between the objects which are connected together. The objects [send~] and [receive~] are useful for this, because they have a built-in delay of one block.

To change the number of samples computed in each block, you can use the [block~] object.

this FAQ was originally published under the GPL at Pd's FLOSSmanual

What's a "stack overflow"?

I get the message "error: stack overflow" when I connect two objects together!

A "stack overflow" happens when you have asked Pd to compute a recursive operation, and this operation causes Pd to run out of memory. Often this is the first step before crashing Pd!

A common example of a recursive operation which could cause this error is the classic counter, using [float] and [+ 1]. If the output of [float] is connected to the input of [+ 1], and the output of [+ 1] is connected to the right-most ("cold") inlet of [float], then a "bang" message sent to the left-most ("hot") [float] will output a number which increases by one every time that message is sent.

If, however, the output of [+ 1] is connected to the left-most ("hot") inlet of [float], then sending the message [bang( to the left inlet of [float] will have a different effect. It will ask [float] and [+ 1] to add numbers together as fast as the computer will let them do it.

Because Pd will not stop and ask you "are you sure you want to do this?", this operation will quickly use up all the memory resources which Pd has, and cause a stack overflow.

this FAQ was originally published under the GPL at Pd's FLOSSmanual

Why use Pd-extended when Pd Vanilla already exists?

It provides a standard platform for people who want to use any of the included libraries. If you are using those libraries, then you know they'll be in the same place on all platforms and all installs if you use Pd-extended. If you rely on the user installing the libraries manually, then there are no guarantees how the libraries will be setup and installed.

Note: Pd Extended is abandoned, see https://puredata.info/docs/faq/ispdextendeddead

by Frank Barknecht last modified 2009-05-18 09:44 PM

Powered by IEM Powered by Plone Section 508 WCAG Valid XHTML Valid CSS Usable in any browser