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

FAQ for Pd

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.
Sections
  1. General
  2. Installing
  3. Using Pd
  4. Using Objects
  5. Problems and Fixes
  6. Tips and Tricks
  7. Pd on the net
  8. Development
  9. Meta-FAQ

General

What is Pd?

Pd stands for Pure Data.

Pd is a real-time software system for live musical and multimedia performances. It is in active development by Miller Puckette, and perhaps others. The system is unfinished, but quite usable for sophisticated projects. It has been ported to GNU/Linux, MacOS X, IRIX, BSD, and many flavors of Windows.

What is puredata.info?

Pure Data Dot Info is a highly content-managed source of information for the Pd user community.

It is running on Plone It is run by a number of volunteers and hosted at IEM in Graz, Austria.

It was previously known as pure-data dot org, but that domain was grabbed from us by nasty people.

What do I need to run Pd?

Pd will compile and run on any machine capable of running GNU/Linux, MacOS X, IRIX, BSD or Windows. If you want to do simple MIDI processing, any old 486 will probably be sufficient. If you want to do real time audio synthesis or other fancy multimedia, you will need a big fast computer. The bigger and faster, the better.

To do MIDI and audio you will need appropriate MIDI and audio hardware, as well as the appropriate driver software for your operating system to utilize that hardware. Some Pd extensions may need or be enhanced by other special hardware. For example, the GEM library needs a good GL library and the 3D hardware to make it worthwhile. Since Pd is primarily for real-time performance, you will probably also be interested in using special input devices. Joysticks, 3D mice, and MIDI controllers of all kinds can make your Pd experience much more rewarding.

Be forewarned that Pd is still in development. To use Pd at this stage you will need some patience and a sense of adventure.

How do I get better quality audio out of my computer?

Be sure the Pd audio processing thread is treated specially by the Operating System. On GNU/Linux, do this by running pd with the -rt command line option.

If you are using Linux and the OSS driver, you might try adjusting the size and number of audio fragments Pd uses to talk to the driver. Do this with the -frags and -fragsize command line arguments.

If you are using Linux, you might also have a look at the Linux Audio Quality HOWTO.

But then, all the above does not help you to make the sounds "better". You will probably have to buy expansive hardware to get high-quality audio

Can I run Pd on GNU/Linux?

Yes. Pd works very well on any reasonably modern version of Linux. OSS and ALSA drivers are fully supported. For best results, patch your kernel for low latency operation.

More Info: http://wiki.linuxmusicians.com/doku.php?id=system_configuration

Where can i get get answers to all my questions?

If you use Pure Data you should definitely subscribe to the Pd mailing lists . If you post a question on the list, it will most likely be answered or at least discussed.

Otherwise the answer is 42.

How much does Pd cost?

Pd is free software. The specific license under which the Pd source code is released is similar to the BSD license. What this means is Pd is available free of charge. You are also free to modify and share the source code so long as you do not deny others these same freedoms.

Happily, you will find most (if not all) of the software associated with Pd is similarly liberated, mostly being released under the GNU GPL

That being said, developers need to eat, so anything that you contribute towards free software will make it better, and make things happen faster.

How can I lower latency?

and what is this 'latency' everybody keeps talking about?

Latency is a measure of how long it takes for a system to react. In Pd, we are primarily concerned with the time it takes for audio, MIDI, or other input to cause audio output. This is "audio latency".

For reference, the audio latency between your speakers and your ears is approximately 1 ms per foot. (for people outside the UK and US, this is approximately 30cm per ms)

So how can you lower it?

  • Under Windows, use the ASIO driver. You're out of luck otherwise.
  • Under Linux, with a recent version of the stable kernel (2.4.x), special low latency patches, some hard drive tuning, and ALSA drivers, average audio latencies is 1.5 ms. If you really load your system, a maximum audio latency of 3 ms can be reached. Pathological bad cases have been known to cause 8 ms latencies this seems like the upper bound. More information on low latency under Linux can be found at Benno's site on the subject.

TODO (tell the people that Pd has 3 blocks buffer, which gives you 4.5ms at least on 44.1kHz)

How do i compile a Pd-patch to run as a stand-alone application?

This is currently not possible to compile a patch into a binary program. Pd patch files are always plain text and need the Pd program to run.

However, the main reason why Max/MSP and similar allow you to create a standalone application is to distribute a patch without having to pay license fees to the distributor. Since Pure Data is Free Software, you can just distribute your patch along with the needed Pd binary.

On Mac OS X, Pd-extended 0.41.4 makes it easy to make such a distribution. You can make a standalone .app using the "Make app from" menu options in the File menu.

What are Pd's command line options?

Use pd -help to find out.

As of Pd version 0.46-1:

 audio configuration flags:
  -r <n>           -- specify sample rate
  -audioindev ...  -- audio in devices; e.g., "1,3" for first and third
  -audiooutdev ... -- audio out devices (same)
  -audiodev ...    -- specify input and output together
  -audioaddindev   -- add an audio input device by name
  -audioaddoutdev  -- add an audio output device by name
  -audioadddev     -- add an audio input and output device by name
  -inchannels ...  -- audio input channels (by device, like "2" or "16,8")
  -outchannels ... -- number of audio out channels (same)
  -channels ...    -- specify both input and output channels
  -audiobuf <n>    -- specify size of audio buffer in msec
  -blocksize <n>   -- specify audio I/O block size in sample frames
  -sleepgrain <n>  -- specify number of milliseconds to sleep when idle
  -nodac           -- suppress audio output
  -noadc           -- suppress audio input
  -noaudio         -- suppress audio input and output (-nosound is synonym) 
  -callback        -- use callbacks if possible
  -nocallback      -- use polling-mode (true by default)
  -listdev         -- list audio and MIDI devices
  -oss             -- use OSS audio API
  -alsa            -- use ALSA audio API
  -alsaadd <name>  -- add an ALSA device name to list
  -jack            -- use JACK audio API
  -pa              -- use Portaudio API

 MIDI configuration flags:
  -midiindev ...   -- midi in device list; e.g., "1,3" for first and third
  -midioutdev ...  -- midi out device list, same format
  -mididev ...     -- specify -midioutdev and -midiindev together
  -midiaddindev    -- add a MIDI input device by name
  -midiaddoutdev   -- add a MIDI output device by name
  -midiadddev      -- add a MIDI input and output device by name
  -nomidiin        -- suppress MIDI input
  -nomidiout       -- suppress MIDI output
  -nomidi          -- suppress MIDI input and output
  -ossmidi         -- use OSS midi API
  -alsamidi        -- use ALSA midi API

 other flags:
  -path <path>     -- add to file search path
  -nostdpath       -- don't search standard ("extra") directory
  -stdpath         -- search standard directory (true by default)
  -helppath <path> -- add to help file search path
  -open <file>     -- open file(s) on startup
  -lib <file>      -- load object library(s)
  -font-size <n>     -- specify default font size in points
  -font-face <name>  -- specify default font
  -font-weight <name>-- specify default font weight (normal or bold)
  -verbose         -- extra printout on startup and when searching for files
  -noverbose       -- no extra printout
  -version         -- don't run Pd; just print out which version it is 
  -d <n>           -- specify debug level
  -loadbang        -- do not suppress all loadbangs (true by default)
  -noloadbang      -- suppress all loadbangs
  -stderr          -- send printout to standard error instead of GUI
  -nostderr        -- send printout to GUI instead of standard error (true by default)
  -gui             -- start GUI (true by default)
  -nogui           -- suppress starting the GUI
  -guiport <n>     -- connect to pre-existing GUI over port <n>
  -guicmd "cmd..." -- start alternatve GUI program (e.g., remote via ssh)
  -send "msg..."   -- send a message at startup, after patches are loaded
  -prefs           -- load preferences on startup (true by default)
  -noprefs         -- suppress loading preferences on startup
  -rt or -realtime -- use real-time priority
  -nrt             -- don't use real-time priority
  -sleep           -- sleep when idle, don't spin (true by default)
  -nosleep         -- spin, don't sleep (may lower latency on multi-CPUs)
  -schedlib <file> -- plug in external scheduler
  -extraflags <s>  -- string argument to send schedlib
  -batch           -- run off-line as a batch process
  -nobatch         -- run interactively (true by default)
  -autopatch       -- enable auto-connecting new from selected objects (true by default)
  -noautopatch     -- defeat auto-patching new from selected objects
  -compatibility <f> -- set back-compatibility to version <f>

For more informations, check :

-guiport, -guicmd : http://lists.puredata.info/pipermail/pd-list/2007-08/052604.html

-d : http://lists.puredata.info/pipermail/pd-list/2014-10/108158.html

-verbose : increase log level by one, add as many as you need to reach the your log level, then switch log level in the UI to "4 all" to see them all and more by searching yourself :-)

What are the various Pd distros?

Pd-vanilla

this is sources that Miller maintains. It includes a basic set of objects

Pd-extended

This is Pd-core with some minor patches and "externals", docs, etc. from CVS

desire-data

a fork with major changes, esp. to the gui

Windows doesn't use a .pdrc, what do I use on Windows?

For a Windows, .bat file is generally used in the place of a .pdrc. You use the same command line options as the .pdrc file, except you start the file with pd.exe and all of the options needs to be on that same line. Therefore the file will only be one line, though its often a very long line.

Example:

  "c:\pd\bin\pd.exe" -font 10 -path "c:\pd\doc\vasp" -lib cyclone -lib iem_t3_lib -lib iem_mp3 -lib mjLib -lib OSC -lib percolate -lib vasp -lib xeq -lib xsample -lib zexy -lib iemlib1 -lib iemlib2 -listdev %1 %2 %3 %4 %5 %6 %7 %8 %9

How can I store startup options so that they are loaded every time I start Pd?

You will find that there are several startup options that you will need every time you start pd. You can store these options via the pdsettings system, so that they are automatically used on startup (note: this has been introduced with pd 0.38)

note: as of pd-extended 0.43 saving library paths is not supported, the recommended way to include libraries is to use the import object(OBSOLETE)

The pdsettings can be configured via pd's menus.

Unfortunately these settings are spread over several different menus:

  • To change the audio-settings (settings for your audio- and MIDI-hardware) go to Media->Audio Settings... (resp. Media->MIDI Settings...) and change the values to something appropriate (if at all). (To save these changes for future sessions read on.)
  • To change the search-paths for pd, go to File->Path... and add additional search-paths one per line (or delete unwanted ones); here you can also specify, whether you want pd to be started in "verbose" mode. When you hit the Save all settings button, your modification will be stored to your system.
  • To change the libraries/externals that are loaded on startup, go to File->Startup... and add additional libraries/externals one per line (or delete unwanted ones); here you can also enforce that pd must not be started in realtime mode (there are some scenarios where using realtime-mode is not an entirely good idea); additionally you can specify custom startup-flags.

When you hit the Save all settings button, your modification will be stored to your system. The pdsettings are stored in a platform-dependent way as key/value-pairs.

platforms

Windows/WIN32

On Windows the preferences are stored in the registry. For Pd-vanilla, they are in HKEY_LOCAL_MACHINE -> SOFTWARE -> Pd. For Pd-extended, they are in: HKEY_LOCAL_MACHINE -> SOFTWARE -> Pd-extended

Mac OS X

On Mac OS X the settings are stored via the native defaults system which stores things in plist files. (i.e. ~/Library/Preferences/org.puredata.pd.plist). You can edit them with the command line util defaults, like defaults read org.puredata.pd. For Pd-vanilla, they are stored in org.puredata.pd. For Pd-extended, they are stored in org.puredata.pdextended.

GNU/Linux, Debian, Ubuntu, Fedora, UNIX, ...

On other UNIX-like systems (like GNU/Linux), a hidden file in the home directory is used. For Pd-vanilla, the file is called ~/.pdsettings. For Pd-extended, the file is called ~/.pdextended

What is the difference between Pd, Max/MSP, and jMax?

Pd is ultimately a redesign of an earlier system that is still in commercial development: Max/MSP. In fact, the real time audio synthesis portions of MAX/MSP incubated in the Pd project. jMax then is a version of Max released as open source by IRCAM a while ago. It seems to be unmaintained, at least not a lot of people still use jMax. Pd and Max projects were masterminded by Miller Puckette and others at IRCAM in France.

If you know Max and want to get started with Pd, there is a Tutorial Pd for Max Users

What is the .pdrc file and how do I use it?

(deprecated, see: How can I store startup options so that they are loaded every time I start Pd )

With older versions of pd (pd<=0.37), the .pdrc file was the standard way of specifying startup options for Pd.

The new (platform-dependent) systems for storing startup-options is pdsettings.

In the .pdrc, you put all of the command line options that you want Pd to start with in the file. The format is one option per line, for as many lines as you need. Example:

 -r 48000
 -nomidi
 -lib iem_mp3
 -lib iem_t3_lib
 -lib zexy
 -path /Users/hans/cvs/pure-data/externals/hcs/rawhid/
 -helppath /Users/hans/cvs/pure-data/externals/hcs/rawhid/

The .pdrc goes in your home directory, also known as ~. So a standard UNIX way of writing it would be ~/.pdrc.

For me on MacOS X, that would be equivalent to /Users/hans/.pdrc, on GNU/Linux it would be /home/hans/.pdrc.

Usually any file that starts with a "." like .pdrc will be hidden by default.

What platforms does Pd run on?

Pd has been successfully run on MacOS X, many flavors of GNU/Linux, Windows 9x, Windows 2000/XP, SGI IRIX, and FreeBSD.

Any UNIX-like OS should be able to run Pd as long as Tcl/Tk runs on that platform.
Pd will probably never run on MacOS 9 or earlier.

When I run Pd, the 'Network is unreachable' ?

If you see the error message "connecting stream socket: Network is unreachable" when you start Pd, it means your machine cannot make a network connection to itself.

You must configure your loopback network device.

In many Linux distributions, you can do this by answering "yes" when the system configuration tools ask if the machine will be "network" (even if it won't).

Where can I download Pd and related software?

There are many places Pd and related software can be obtained. Check the downloads section of this web site for a somewhat comprehensive list.

Where can I get Pd documentation?

The best documentation can only be viewed by running Pd. Click on the "Browser..." menu item on the "Help" menu when you run Pd, and you will get an interface for navigating through the included documentation.

You can browse the Pd documentation online on this site by going to the Documentation section.

You can also see Miller Puckette's manual on his site.

And for a Wikipedia-style collection of information, check out the Pdpedia

How is Pd spelled?

I'm confused: I've seen people write "Pd", "PD", "pd", "Pure Data", "pure data", "PureData" and then some. Is there an official way to spell Pd?

Short answer:

"Pd" and "Pure Data".

Longer answer:

On the mailing list or on your personal pages, feel free to use whatever you like best. Most of the time people will understand what you mean. That is, don't use something like "pD", which is not common at all.

But if you are writing about Pd in some kind of offical document, e.g. in a conference paper for ICMC, you may want to use the name, Pd's inventor, Miller Puckette uses consistently in all his publications on the topic: "Pd" and "Pure Data"

These publications include the very first appearance of Pd in: Puckette, M. 1996. Pure Data: another integrated computer music environment., all the other papers on Miller's site as well as his book Theory and Techniques of Electronic Music

What about GEM?

Where can I get answers for GEM related questions?

GEM has a seaparate FAQ that can be accessed via http://gem.iem.at/documentation/faq

What is Pd-extended?

Pd-extended has two main goals: provide a standard collection of libraries and distribute core modifications to Pd itself. Providing a package that includes many libraries no only means that they are easy to use. More importantly, it means that you can make a patch that uses those libraries, and expect them to be installed on any computer with the same version of Pd-extended.

In terms of modifications to the core, Pd-extended aims to feel like a native app on GNOME GNU/Linux, Mac OS X, and Windows. It also includes a number of community-added features like experimental string support and a visual design meant to improve readability.

How is Pd-extended different from Pure Data by Miller Puckette (aka Pd-vanilla)?

The core of Pd-extended has been modified to fit in better with the major desktop environments (GNOME, Mac OS X, and Windows). The look and feel has also been changed with the aim of making things more readable.

Is Pd-extended compatible with Pd-vanilla (by Miller Puckette)?

The aim is to keep it completely compatible with Pd-vanilla. That said, it is possible that incompatibilities will be introduced during the development process, these should be reported as bugs. Pd-vanilla is not always compatible with Pd-extended, though, since Pd-extended has some extra features with Pd-vanilla does not have.

Is Pd-Extended dead? What are the alternatives?

Yes, long time beloved Pd Extended is dead! :(

Pd‐extended started as a fork of Pd Vanilla, including some extra features and many included external libraries. It still works and you can still download and use it, but it's outdated, abandoned and there's no support! Therefore, it's not a good idea to keep relying on it. Luckily, there are alternatives.

Pd‐l2ork => http://l2ork.music.vt.edu/main/make-your-own-l2ork/software/

‐ Pd-l2ork started as a Fork of Pd-Extended. It has all of what Extended used to have and more, but it’s only for Linux (Link to Pd-l2ork)


Purr Data => https://git.purrdata.net/jwilkes/purr-data-binaries/tree/master

‐ This is actually "Pd‐l2ork 2.0" and for all platforms (mac, windows, linux). It is being ported to a new interface based in web technology. Though a first release is already available, it still needs to port a few more GUI objects to the new web format. Link to Purr Data


Pd Vanilla with external libraries installed

‐ You can just use Pd vanilla - the main version of Pure Data - and install the external libraries. Vanilla is a little different than Pd‐ extended, but aside from cosmetic differences, you can do everything you could with Pd‐extended if you install the proper libraries.

The major difference between Pd Vanilla and Pd‐extended is that Pd‐Extended came with several libraries already installed, and it automatically loaded many of them. If you need a guide on how to install libraries in Pd Vanilla (with 'deken'), please check <https://puredata.info/docs/faq/deken>.

Note that the libraries that were available in Pd extended 0.43 are availkable in 'deken' as “v00-extended”

Installing

How do I install Pd on Debian, Ubuntu, Mint GNU/Linux?

Pd-vanilla and a number of libraries are included, so you can install using Synaptic, Ubuntu Software Center, and apt-get install. The official packages are called puredata, gem, pd-zexy, pd-aubio, pd-csound, etc. All of the libraries start with pd-

For Pd-extended releases, use the apt.puredata.info repository. To add it, run these command in your Terminal:

 sudo add-apt-repository "deb http://apt.puredata.info/releases `lsb_release -c | awk '{print $2}'` main"
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 9f0fe587374bbe81
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key D63D3D09C39F5EEB
 sudo apt-get update
 sudo apt-get install pd-extended

You can also now find the package pd-extended in Synaptic or Ubuntu Software Center.

Getting Individual Libraries

It is also possible to get individually packaged libraries that are included in the official repos, but built for older releases. These packages are in the eighthave/libdirs PPA on launchpad.net. Some of the packages go back as far as Ubuntu/karmic 09.10.

Getting the Pd-extended Beta Build

You can also use a repository for getting pre-release builds of Pd-extended using the Pd-extended PPA. To add it, run these command in your Terminal:

 sudo add-apt-repository ppa:eighthave/pd-extended
 sudo apt-get update
 sudo apt-get install pd-extended

You can also now find the package pd-extended in Synaptic or Ubuntu Software Center.

Adding apt.puredata.info manually

You can either add this line to the bottom of /etc/apt/sources.list Or you can add it in the GUI administration program Synaptic (in the Settings -> Repositories menu, then the Third-Party Software tab). Choose the line for your version of Debian or Ubuntu from the options below:

 # Debian/oldstable
 deb http://apt.puredata.info/releases oldstable main
 # Debian/stable
 deb http://apt.puredata.info/releases stable main
 # Debian/testing
 deb http://apt.puredata.info/releases testing main

 # Debian/sarge
 deb http://apt.puredata.info/releases sarge main
 # Debian/etch
 deb http://apt.puredata.info/releases etch main
 # Debian/lenny
 deb http://apt.puredata.info/releases lenny main
 # Debian/squeeze
 deb http://apt.puredata.info/releases squeeze main
 # Debian/wheezy
 deb http://apt.puredata.info/releases wheezy main

Or Ubuntu:

 # Ubuntu/dapper 06.04 LTS
 deb http://apt.puredata.info/releases dapper main
 # Ubuntu/edgy 06.10
 deb http://apt.puredata.info/releases edgy main
 # Ubuntu/feisty 07.04
 deb http://apt.puredata.info/releases feisty main
 # Ubuntu/gutsy 07.10
 deb http://apt.puredata.info/releases gutsy main
 # Ubuntu/hardy 08.04 LTS
 deb http://apt.puredata.info/releases hardy main
 # Ubuntu/intrepid 08.10
 deb http://apt.puredata.info/releases intrepid main
 # Ubuntu/jaunty 09.04
 deb http://apt.puredata.info/releases jaunty main
 # Ubuntu/karmic 09.10
 deb http://apt.puredata.info/releases karmic main
 # Ubuntu/lucid 10.04 LTS
 deb http://apt.puredata.info/releases lucid main
 # Ubuntu/maverick 10.10
 deb http://apt.puredata.info/releases maverick main
 # Ubuntu/natty 11.04
 deb http://apt.puredata.info/releases natty main
 # Ubuntu/oneiric 11.10
 deb http://apt.puredata.info/releases oneiric main
 # Ubuntu/precise 12.04 LTS
 deb http://apt.puredata.info/releases precise main
 # Ubuntu/quantal 12.10
 deb http://apt.puredata.info/releases quantal main
 # Ubuntu/raring 13.04
 deb http://apt.puredata.info/releases raring main

On Linux Mint:

 # Linux Mint/ada 1.0
 deb http://apt.puredata.info/releases ada main
 # Linux Mint/barbara 2.0
 deb http://apt.puredata.info/releases barbara main
 # Linux Mint/bea 2.1
 deb http://apt.puredata.info/releases bea main
 # Linux Mint/bianca 2.2
 deb http://apt.puredata.info/releases bianca main
 # Linux Mint/cassandra 3.0
 deb http://apt.puredata.info/releases cassandra main
 # Linux Mint/celena 3.1
 deb http://apt.puredata.info/releases celena main
 # Linux Mint/daryna 4.0
 deb http://apt.puredata.info/releases daryna main
 # Linux Mint/elyssa 5.0
 deb http://apt.puredata.info/releases elyssa main
 # Linux Mint/felicia 6.0
 deb http://apt.puredata.info/releases felicia main
 # Linux Mint/gloria 7.0
 deb http://apt.puredata.info/releases gloria main
 # Linux Mint/helena 8.0
 deb http://apt.puredata.info/releases helena main
 # Linux Mint/isadora 9.0
 deb http://apt.puredata.info/releases isadora main
 # Linux Mint/julia 10.0
 deb http://apt.puredata.info/releases julia main
 # Linux Mint/katya 11
 deb http://apt.puredata.info/releases katya main
 # Linux Mint/lisa 12
 deb http://apt.puredata.info/releases lisa main
 # Linux Mint/maya 13
 deb http://apt.puredata.info/releases maya main
 # Linux Mint/nadia 14
 deb http://apt.puredata.info/releases nadia main

How do I install Pd on MacOS X?

Download the installer from the downloads page . Make sure you choose the right version, Intel or PowerPC, otherwise it will not run. Once you download the .dmg file, double-click it. It will open a window with the Pd icon. Drag-n-drop the Pd-extended.app or Pd.app to /Applications.

If you want to use PDP on Mac OS X 10.4/Tiger or 10.3/Panther, you will need to install X11 (X11 comes installed with 10.5/Leopard). It comes on the install CD/DVD that your computer came with. For more detail, see How to install X11 in OS X

You can also download an old version of X11 from http://cjmart.in/2006/12/01/install-x11-on-tiger-without-the-tiger-install-dvd/ . After installing this, you will need to run Software Update... from the Apple menu in order to get the most recent version. If you don't run Software Update..., it will not work.

Or you can install the open source version of X11 for Mac OS X called XQuartz. You can find it here: XQuartz Releases

How do I install Pd on RedHat GNU/Linux?

CCRMA maintains its PlanetCCRMA RedHat-based distro, which includes Pd packages.

How do I install Pd on Windows?

Download the installer from the downloads page Run the installer and then you can run Pd from the Start Menu, Desktop Icon, or Quick Link. ASIO drivers are supported.

You may want to optimize your windows system for better performance

Where can I download Pd and related software?

There are many places Pd and related software can be obtained. Check the downloads section of this web site for a somewhat comprehensive list.

How do I install externals and help files with Pd-extended?

This now applied to all versions of Pd as of 0.43, so check here:

http://puredata.info/docs/faq/how-do-i-install-externals-and-help-files

How do I download the flext binaries that used to be included in Pd-extended?

As of release 0.41.4 of Pd-extended, the whole package is built from source every night. That means that some objects have been removed from the package because they were not being built from source (objects like [pool], [msd], [flashserver], etc.). The binaries released by the authors used to be included in Pd-extended up until version 0.40.3. As of Pd-extended 0.41.4, these are no longer included in the package itself, but you can download them from the authors or get the old versions from Pd-extended 0.40.3 here:

http://puredata.info/Members/hans/old-pd-extended-binaries_GNULinux-i386.zip

http://puredata.info/Members/hans/old-pd-extended-binaries_MacOSX.zip

http://puredata.info/Members/hans/old-pd-extended-binaries_Windows.zip

Then uncompress and copy just the files from the zip into the standard externals location: http://puredata.info/docs/faq/how-do-i-install-externals-and-help-files-with-pd-extended

How do I install externals and help files?

Please find a detailed tutorial on managing and installing Pd externals here.

This FAQ entry is a more objective and simple guideline that should be ok for most cases.

There are special folders for installing libraries, externals, object classes, abstractions, GUI plugins, and help files into. These folders are for things that are not included in the Pd binary. A more detailed discussion on using and installing libraries with Pd vanilla and its library manager Deken can be found here.

On all platforms, there is a user-specific system folder, an application-specific folder and a global system folder. The global system folder affects all Pure Data Applications for all users. You will require administrator priviliges to be able to install things into those folders. The User-specific system folder affects all Pure Data Applications for that user. The system folder allows you to upgrade Pd without messing up your other files. And since you can have different versions of Pd installed in your system, the Application-specific folder affects only that particular Pd Application. This can be not only an older and a newer version, but also both 32-bit and 64-bit versions available for Mac OS, and even Pd Extended!

At the time of writing (2017-07-29), most of these directories will not get automatically created. Once you have created these folders, Pd will start using them (this probably requires a restart of Pd).

GNU/Linux

Many externals can be installed through the package manager in Debian/Ubuntu/Mint. The Packages have a pd-... prefix.

Application-specific
typically /usr/lib/pd/extra if you installed Pd via a package manager (such as apt) or /usr/local/lib/pd/extra if you compiled Pd yourself.
User-specific
~/.local/lib/pd/extra (since Pd-0.47-1, preferred) or ~/pd-externals (deprecated/older Pd-versions; still usable)
Global
/usr/local/lib/pd-externals

Mac OS X

Application-specific
typically /Applications/Pd.app/Contents/Resources/extra (This is inside the Pd Application. First you need to find the Pd App (usually in /Applications), then right click and choose “Show Package Contents”).
User-specific
~/Library/Pd
Global
/Library/Pd

Windows

Application-specific
typically %ProgramFiles(x86)%\Pd\extra (for 64-bit systems) or %ProgramFiles%\Pd\extra (for 32-bit systems); this is inside the Pd Application, usually in C:\Program Files (x86) for 64-bits.
User-specific
%AppData%\Pd (since Pd-0.47)
  • %AppData%\Pd will be something like C:\Users\myusername\AppData\Roaming\pd
  • prior to Win7 (e.g. Vista, XP, Win2000) this was synonymous with %UserProfile%\Application Data\Pd (which was used before Pd-0.47)
Global
%CommonProgramFiles%\Pd
  • on an English system, this is usually C:\Program Files\Common Files\Pd
  • en español: \Archivos de programa\Archivos comunes\Pd
  • auf Deutsch: \Programme\Gemeinsame Dateien\Pd
  • this is mostly synonymous for %ProgramFiles%\Common Files\Pd (%ProgramFiles% is where your programs are installed)

Other versions of Pd

This was included in Pd-vanilla in version 0.43, and in Pd-extended in version 0.41.

Discussion

These choices of directories has been discussed quite a bit. If you are interested in reading about how they were chosen, then read the:

http://lists.puredata.info/pipermail/pd-list/2008-06/063086.html

http://lists.puredata.info/pipermail/pd-list/2008-07/063769.html

http://lists.puredata.info/pipermail/pd-dev/2009-04/013302.html

Discussion (Linux specific)

Here are some references to discussion about storing architecture-dependent binaries somewhere in $HOME.

http://lists.freedesktop.org/archives/xdg/2009-June/010716.html (nicknaming architecture/OS)

http://lists.freedesktop.org/archives/xdg/2008-November/010010.html (.local/share, .local/lib, $HOME/lib, or what?)

http://lists.freedesktop.org/archives/xdg/2007-November/009029.html (All binaries should go to either $prefix/bin or $prefix/lib{,64} - these are the only directories guaranteed to be mounted with exec rights and not shared across different architectures (as is sometimes done for /$prefix/share))

http://lists.freedesktop.org/archives/xdg/2007-November/009030.html (If the plugins are dlopened objects, my opinion is that they are right in a subdir of $prefix/lib{,64})

How do I install GUI plugins?

GUI Plugins are installed just like externals and help files, refer to the FAQ How do I install externals and help files for more information.

How to Download Externals from Pd Vanilla (a.k.a. 'deken')?

Pd Vanilla has its own external manager since version 0.47-0! This is a built in .tcl plug-in named ‘deken’ <https://github.com/pure-data/deken> that has been incorporated into the Pd Vanilla distribution to manage the download of external libraries and externals.

So if you have Pd 0.47-0 or greater, you can just open it, click on the “Help” menu and select "Find externals". Then the plugin opens and you can just type the library’s name you want and hit enter or click “search”. You can also look for an external name and the library that contains it might be shown. All available versions of the library will be shown to you, but the versions specific to your system are highlighted.

When you click on the version you want, Pd asks you if you want to download it to your User specific folder(see https://puredata.info/docs/faq/how-do-i-install-externals-and-help-files for details on where to find that folder in your system). You can select another download target if you want. As soon as the download is finished, the compressed file is automatically decompressed into a folder containing the library.

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

Using Objects

How do I get more accurate timing from metro?

If you run pd -noaudio, you will find that the timer error becomes much less, but of course then Pd will not generate audio. There is a discussion on lowering latency in the release notes for version 0.33 that may be helpful. Try reducing the block size, the sleep grain, or try running in stream mode.

How do I accumulate (or sum) audio outlets of several modules without so many connections?

Use [throw~] and [catch~].

See the help patches for those objects.

How do I make a local array?

Give your array a name which includes $0.

How do I make a local variable?

All variable names in Pd are global. There is only one name space for all patches.

The way to hack around this is to use $0 in variable names. For example, $0-foo.

$0 expands to a unique number for each abstraction - but not for each subpatch!

If you need to share a variable name between two abstractions, but no others, you could pass a "group identifier" into each of those abstractions and then use $n in variable names where n is the argument number of the group identifier. For example, "$1-foo". Variable names with $n in them work well with send and receive, but it is difficult (if not impossible) to get them into qlists.

This solution is discussed in the documentation.

How do I record and playback from hard disk?

Use [writesf~] and [readsf~].

For shorter samples you might also want to write to/from your table using [soundfiler]

What is the difference between the [list] and [pack] objects?

What is the difference between the [list] and [pack] objects? Which is the best to use if I want to generate a [X Y( message ?

  • [pack] creates a compound list from input atoms of a preset type (symbol float or pointer).
  • [list] creates (appends) a compound list from two input lists (these could be a floats or symbols because [list] will a convert these input elements to lists automatically).
  • [list] itself is not really an object but a wrapper for [list append], the list family is made up of ![list append], [list prepend], [list split], [list trim] and [list length]

So, for two input floats there is no matter which to use?

If you are using floats it is best practice to use [pack], as it has type recognition and will output errors if a foreign type tries to get calculated. And of course [pack] can handle more than two inputs..

What is the difference between the [pd] and [page] objects?

Actually, the differences are:

  1. When changing the name of a [page], its contents self-destruct.
  2. UNDO doesn't work in that case.
  3. changing back to the original name doesn't either...
  4. therefore, [page] sucks.
  5. notwithstanding the aforementioned issues, [page] would be better if only for its quite descriptive name. The name [pd], imho, doesn't do any help and is confusing with other uses of "pd" that are completely different (the global object pd; the program pd itself; ...).

Problems and Fixes

Gem is crashing X11 in GNU/Linux when using the fglrx graphics driver

If you're using the fglrx driver & X11 is crashing on opening GEM patches, you need to set the environmental variable of GEM_SINGLE_CONTEXT=1 by adding the following to your ~/.bashrc or /etc/profile:

export GEM_SINGLE_CONTEXT=1

if you are using a different shell (e.g. "tcsh") the procedure might be slightly different.

On GNU/Linux, the fonts are strange and/or too big or small

Watch out for old versions of Tcl/Tk (8.4 or older)

Tcl/Tk 8.4 and earlier tried to a lot of guessing about the fonts, and often got things wrong. Use Tcl/Tk 8.5 or newer with Pd and the fonts will work much better.

If you are running a Debian-based GNU/Linux (Debian, Ubuntu, Mint, Knoppix, etc), try making sure that your wish shell is 8.5 or newer:

sudo apt-get install tk8.5

sudo update-alternatives --config wish

Rebuild the Font Database

This is because Pd cannot find the correct font. First, you need to make sure that you have the right font-handling packages installed, ttf-dejavu and x-ttcidfont-conf. You can check those in Synaptic

If they were already installed, then try reinstalling them, using this command in the Terminal:

sudo apt-get install --reinstall x-ttcidfont-conf ttf-dejavu

Specify a Font

One can also try to use the -font-face startup option. You can search for fonts with the "fc-match" command like:

$ fc-match mono

The best known fonts for Pd on GNU/Linux are "Courier 10 Pitch", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Droid Sans Mono", and "Andale Mono".

$ pd -font-face "Andale Mono"

How do I report a bug?

All bugs should be reported to the pure-data bug tracker on SourceForge. When making a report, you should first search through the existing reports to make sure that it hasn't been reported already. If there is an existing report, please add your information to that report.

Here are the various ways to find the bug tracker:

Here is some of the information that should include in your report:

  • exact operating system and version (e.g. Debian/stable, Ubuntu Hardy, Windows XP SP2, Mac OS X 10.4.11)
  • exact version of Pd where the bug is occuring (e.g. Pd-vanilla 0.41-4, Pd-extended 0.40.3-extended-20080703)
  • other versions of Pd where the bug was tested
  • other operating systems where the bug was tested
  • if there was a crash, include the crash log

When I upgraded to Pd-extended 0.40.3, it stopped loading all of the libraries.

If you upgraded to Pd-extended 0.40.3, and you get a lot of messages like this in your Pd window: :

  cyclone: can't load library
  zexy: can't load library
  cxc: can't load library
  ext13: can't load library

Then, you need to update your preferences. The default preferences are now embedded in the app, so you can just delete your own preferences file and Pd-extended will use the embedded preferences. You can find out where the preference file is on your Operating System by checking the pdsettings FAQ entry

If you want to keep your preferences file, then you need to add libdir as the first library loaded.

How do I fix this error: "Library not loaded: /usr/X11R6/lib/libX11.6.dylib"?

Library not loaded: /usr/X11R6/lib/libX11.6.dylib

If you get this error in the Pd window when starting Gem, PDP, or Pd-extended, then that means that you are missing X11. (This happens almost exclusively on Mac OS X since GNU/Linux almost always includes it by default.)

To fix this, install X11: How do I install Pd on MacOS X?

Pd does not launch.

On OS X the icon in bouncing in the Dock but then stops and Pure Data is not starting.

If Pure Data is not launching on your computer, then check if your /private/etc/hosts file is configured correctly.
You may get the message ERROR: failed to allocate port, exiting! in the console.

The default under OS X looks like this:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost

255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

if localhost is missing in yours then Pd can't start. It will hang and quit on startup.

Read about the hosts file on wikipedia http://en.wikipedia.org/wiki/Hosts_%28file%29

How do I get an acceptable performance and latency on the MS Windows platform?

I've Installed Pure Data (or Pd-extended) on Windows and I have to set the buffer (delay) to more than 100ms to avoid audio drop outs (crackling). What can I do to achieve a proper latency in Pd on Microsoft Windows?

Make sure your Windows system is set up for Audio. Make sure the overall system performance is OK, install updated ASIO drivers for your soundcard or the "ASIO4All Drivers":http://www.asio4all.com/ when no ASIO is available from the manufacturer. There is also an "ASIO driver for WDM kernel-streaming compliant soundcards":http://www.asio2ks.de/

Read Native Instrument's "Windows 7 Tuning Tips for Audio Processing":http://www.native-instruments.com/knowledge/questions/847/Windows+7+Tuning+Tips+for+Audio+Processing

Also read RME's "Tuning Tips for Low Latency Operation":http://www.rme-audio.de/english/techinfo/lola.htm (slightly older, possibly outdated)

USB and persitency

If you have the problem that you can only plug in your external sound card to one specific USB port you might want to make the COM port assignment of the system permanent to this device. Here is How: goto control panel -> device manager -> com ports -> properties -> port settings -> advanced -> comport number there you can permanently set the comport number for that device.

Why doesn't audio work when I start Pd in -nogui mode?

When I start Pd from the commandline without the GUI in -nogui mode, it can't connect to the soundcard and no dsp seems to happen?

Currently, there is a bug in Pd where starting in -nogui mode causes patches to be run before it connects to a sound card. When running the graphical user interface (GUI), there is a delay as the GUI is being setup before patches are run and this is enough time for the sound to be connected. Basically, if you are turning on dsp with a loadbang like this:
[loadbang]
|
[; pd dsp 1(
Pd tries to start dsp, but in -nogui mode, it hasn't yet connected to the sound card and you'll get an error similar to this:
snd_pcm_open (input): Device or resource busy 
snd_pcm_open (output): Device or resource busy
If so, you can add a delay before starting the dsp:
[loadbang]
|
[delay 100]
|
[; pd dsp 1(
This should be enough time to mimic the delay taken when the GUI starts and the sound card can be setup before dsp is started.

Help! Pd crashes on startup on Mac OSX 10.7+

Is Pd crashing on startup and you're using Mac OSX 10.7 or greater (Lion, Mountain Lion, Mavericks, etc)? This might be happening since newer versions of OSX save the window state when apps are closed and reopen them for you. This can be bad for Pd if there is a clash over resources (sockets, etc) when trying to open patches too quickly or simultaneously.

Luckily, there is a way to manually tell the operating system to not save window states and that's by either setting a defaults option or by simply locking the folder where this information is kept. This way it always opens Pd with an empty state.

A Clean Slate

First, make sure to remove the existing state, otherwise it will keep opening with whatever windows it last saved. You can hold Option when quitting (aka Cmd+Opt+Q) Pd to bypass the OSX save state mechanism and delete any current states.

Another option is to use the Terminal:

rm -rf ~/Library/Saved\ Application\ State/org.puredata.*

If you had startup crashes, this should at least get Pd back but it dosen't disable state saving ...

Option1: Setting Defaults Option

The easiest method to disable the state saving mechanism for Pd is by setting a user defaults option which tells OS X *not* to save Pd's window state by default when quitting:

defaults write org.puredata NSQuitAlwaysKeepsWindows -bool false

Now restart Pd. Upon quitting, Pd will not remove any window states that are set. Also, if you *do* want to save the window states, hold the Option/Alt key while quitting via the File menu or the Cmd+Q key binding.

Option 2: Locking the State Folder

You can disable the state saving mechanism for Pd by locking the state folder for Pd-Extended using the Get Info dialog (CMD+I):

~/Library/Saved\ Application\ State/org.puredata.*

"~/" is your user home directory.

There may be more then one folder named "org.puredata..." as (at the time of writing), Pd-vanilla and Pd-extended use slightly different identifiers. Anyway, if you're clearing one, you'd probably want to clear both.

As before, you can also use the Terminal:

chflags -v uchange ~/Library/Saved\ Application\ State/org.puredata.*

The "uchange" flag locks the folder.

References

Tips and Tricks

How do I accumulate (or sum) audio outlets of several modules without so many connections?

Use [throw~] and [catch~].

See the help patches for those objects.

How do I run Pd from the command line?

Starting Pd on the command line works differently on each platform (GNU/Linux, Mac OS X, and Windows).

GNU/Linux
Usually you would use just pd on the command line. If Pd is installed in a non-standard location, like when building from source, you have to specify the full path to the binary. For example ~/trunk/pd/bin/pd. Alternatively you can first cd to Pd's bin directory, and then start ./pd. For example, cd ~/trunk/pd/bin/ && ./pd
Mac OS X
Since Pd on Mac OS X has a different start-up procedure than the other platforms, start the GUI process: /Applications/Pd-0.41-4.app/Contents/MacOS/Pd or /Applications/Pd-extended.app/Contents/MacOS/Pd-extended. To run the pd process first, you have to have the Tcl/Tk's Wish.app installed on your computer somewhere findable, like /Applications. Then run: /Applications/Pd.app/Contents/Resources/bin/pd.
Windows
If you are using the Windows cmd.exe shell, use Windows paths: C:\Program Files\pd\bin\pd.com. You could also run C:\Program Files\pd\bin\pd.com from Start -> Run... and it will launch its own cmd.exe.
Windows/Cygwin
When using a Cygwin shell, you need to use UNIX-style paths with Cygwin's special directories for Windows drive letters: /cygdrive/c/Program\ Files/pd/bin/pd.com
Windows/MinGW/MSYS
When using a MinGW MSYS shell, you need to use UNIX-style paths with MSYS's special directories for Windows drive letters: /c/Program\ Files/pd/bin/pd.com

How do I get an acceptable performance and latency on the MS Windows platform?

I've Installed Pure Data (or Pd-extended) on Windows and I have to set the buffer (delay) to more than 100ms to avoid audio drop outs (crackling). What can I do to achieve a proper latency in Pd on Microsoft Windows?

Make sure your Windows system is set up for Audio. Make sure the overall system performance is OK, install updated ASIO drivers for your soundcard or the "ASIO4All Drivers":http://www.asio4all.com/ when no ASIO is available from the manufacturer. There is also an "ASIO driver for WDM kernel-streaming compliant soundcards":http://www.asio2ks.de/

Read Native Instrument's "Windows 7 Tuning Tips for Audio Processing":http://www.native-instruments.com/knowledge/questions/847/Windows+7+Tuning+Tips+for+Audio+Processing

Also read RME's "Tuning Tips for Low Latency Operation":http://www.rme-audio.de/english/techinfo/lola.htm (slightly older, possibly outdated)

USB and persitency

If you have the problem that you can only plug in your external sound card to one specific USB port you might want to make the COM port assignment of the system permanent to this device. Here is How: goto control panel -> device manager -> com ports -> properties -> port settings -> advanced -> comport number there you can permanently set the comport number for that device.

How can I set permissions to read HID devices on GNU/Linux?

The Pd-extended [hid] object allows you to access Human Interface Devices such as mice, keyboards, and joysticks. However, in most Linux distributions, these devices are setup to where they cannot be read directly by Pd unless you run it as root.

Running a non-system process as root is considered a security risk, so an alternative is to change the permissions of the input devices so that pd can read them.

This guide has been tested on Ubuntu 9.10 Karmic. Please update and add an addendums for newer versions.

The fix is to write a udev rule opening permissions. Udev is a system daemon that creates the device tree in /dev as devices are added and removed based on a set of rules.

Following the Debian udev rules naming policy, create our rule for pd in /etc/udev/rules.d/85-pure-data.rules:

sudo mkdir -p /etc/udev/rules.d
sudo gedit /etc/udev/rules.d/85-pure-data.rules

Note: This is the Debian/Ubuntu location. Check your distribution for where it puts udev rules.

Now add the following rules to /etc/udev/rules.d/85-pure-data.rules:

#
#	pure data udev rules
#
#	Put me in "/etc/udev/rules.d", I am named based on the debian udev rules format
#
#	"add" actions are device insertions and device attributes are used to match the device
#
#	"remove" actions are matched using ENV variables since the SYSFS node for the device is gone
#	and thus the attributes have been deleted
#
#	rules built using:
#	- udevadm info -a -p $(udevadm info -q path -n /dev/*device*) : attributes
#	- sudo udevadm monitor --env /dev/*device* : events and env vars
#
#	Documentation is your friend: http://reactivated.net/writing_udev_rules.html
#
################################################################################################


#	input devices
#
SUBSYSTEM=="input", MODE="666"

Note: each udev rule must on a single line. Use only spaces, no tabs. Lines that start with `#` are comments.

This rule sets the permissions to 666 for input devices. Reboot your machine and the HID object should now be able to open them.

More Security

Setting input devices to 666 also opens the chance for someone to read your keyboard and mouse input. If you feel this is a security risk, try swapping MODE="666" with the following:

GROUP="input", MODE="660"
Then create an "input" group and add yourself to it:
sudo groupadd -f input
sudo gpasswd -a YOURUSERNAME input

This will add any input devices to the input group and only users you add to this this group can then read them. Reboot your machine for the rules to take effect.

Check

Check the permissions of the input devices:
$ ls -al /dev/input/
total 0
drwxr-xr-x  3 root root     220 2010-06-10 22:00 .
drwxr-xr-x 16 root root    3640 2010-06-10 22:00 ..
drwxr-xr-x  2 root root     100 2010-06-10 22:00 by-path
crw-rw----  1 root input 13, 64 2010-06-10 22:00 event0
crw-rw----  1 root input 13, 65 2010-06-10 22:00 event1
crw-rw----  1 root input 13, 66 2010-06-10 22:00 event2
crw-rw----  1 root input 13, 67 2010-06-10 22:00 event3
crw-rw----  1 root input 13, 68 2010-06-10 22:00 event4
crw-rw----  1 root input 13, 63 2010-06-10 22:00 mice
crw-rw----  1 root input 13, 32 2010-06-10 22:00 mouse0
crw-rw----  1 root input 13, 33 2010-06-10 22:00 mouse1

Here I used the more secure approach and you can see the event and mouse devices are marked rw for both users and groups.

Notes

If the rule dosen't seem to work, you can run a udev test to see if it's being read and if there are any errors. Run the test using an input device:

sudo udevadm test /dev/input/event0

Check out the udev tutorial on how to create more detailed rules. It's actually pretty easy once you get the hang of it. Mainly, use the following command to get a list of attributes to match to your target device wehn you plug it in or remove it, then use them to create a new rule:

udevadm info -a -p $(udevadm info -q path -n /dev/*your device*)

Links

How to add aliases for Pd scripting on Mac OSX

I wanted to be able to use some shell scripts using Pd I wrote in Linux on MacOSX, but the shell (Terminal) session does not know how to launch binaries from within Application Bundles.

On Linux, I can start pd by typing "pd" and hitting enter. On Mac OSX, I can start the Pd App by typing "open -a Pd-extended" ... but I'd rather be able access the pd binary within the bundle directly so one script can work in Linux and OSX.

The fix is pretty simple: Add an alias to the binaries within Pd-extended.app to your shell session.

Add the following to ~/.bash_profile:

# pd commandline
alias pd="/Applications/Pd-extended.app/Contents/Resources/bin/pd"
alias pdsend="/Applications/Pd-extended.app/Contents/Resources/bin/pdsend"
alias pdreceive="/Applications/Pd-extended.app/Contents/Resources/bin/pdreceive"

Restart the shell session and now the "pd", "pdsend", and "pdreceive" commands should launch their respective targets.

Notes

~/.bash_profile is in your home directory, so any changes are only applied to your user account.

How can I run Pd with realtime priority on GNU/Linux?

In Linux, Pd can be run as a real time process by the root user, resulting in far fewer audio drop outs (clicks). Essentially, the operating system gives the Pd process more time to work without being interrupted by other programs.

Running non-system programs as root, however, is considered a security risk and is obviously not an option if the user doesn't have administrator access. Luckily, there is a system config file that accepts options for priority settings.

From theUbuntu Studio wiki.

NOTE: If you have installed JACK, editing /etc/security/limits.conf may not be necessary as newer versions of JACK add the same settings to this file: /etc/security/limits.d/audio.conf. Run the following command to check if the file exists. If you see something printed, you don't need to follow the steps below.

cat /etc/security/limits.d/audio.conf

All you need to do is give your "audio" group permissions to access the rtprio, and memlock limits. To do this, you just need to run these commands, which will add some lines to the file /etc/security/limits.conf and add you to the audio user group.:

sudo su -c `echo @audio - rtprio 99 >> /etc/security/limits.conf`
sudo su -c `echo @audio - memlock unlimited >> /etc/security/limits.conf`
sudo adduser username audio
Of course, replace username with your actual user name. Note: There is no audio group by default on versions of Ubuntu Intrepid or greater. You can create an audio group and add yourself to it by running these commands:
sudo addgroup audio
sudo addgroup username audio

Restart. Running pd using the real time flag, -rt, should now work and you should see something like "Realtime Priority Enabled" on the pd console. Run it like this (or add -rt to the startup options):

pd -rt

Pd on the net

What is puredata.info?

Pure Data Dot Info is a highly content-managed source of information for the Pd user community.

It is running on Plone It is run by a number of volunteers and hosted at IEM in Graz, Austria.

It was previously known as pure-data dot org, but that domain was grabbed from us by nasty people.

Where can i get get answers to all my questions?

If you use Pure Data you should definitely subscribe to the Pd mailing lists . If you post a question on the list, it will most likely be answered or at least discussed.

Otherwise the answer is 42.

How do I un/subscribe from the mailing list?

Where can I download Pd and related software?

There are many places Pd and related software can be obtained. Check the downloads section of this web site for a somewhat comprehensive list.

Where can I get Pd documentation?

The best documentation can only be viewed by running Pd. Click on the "Browser..." menu item on the "Help" menu when you run Pd, and you will get an interface for navigating through the included documentation.

You can browse the Pd documentation online on this site by going to the Documentation section.

You can also see Miller Puckette's manual on his site.

And for a Wikipedia-style collection of information, check out the Pdpedia

What about GEM?

Where can I get answers for GEM related questions?

GEM has a seaparate FAQ that can be accessed via http://gem.iem.at/documentation/faq

Development

How do I access the pure-data source code repositories?

Pd-vanilla is developed using a GIT repository on Sourceforge.

For the Pd community in general, there is the pure-data Subversion (SVN) repository hosted on Sourceforge which includes most of the externals,... development in Pd-world.

There are a number of other related source code repositories, you can get more information on those here: GettingPdSource

How do I use pd -stderr on Windows?

How can I output all of the Pd windows messages to the terminal or to a file?

----

pd -stderr is a very handy debugging tool, it allows you to log all of the messages generated in a Pd session to the terminal or a file. This is very typical behavior in a UNIX program, but much less so on Windows. Nonetheless, it is possible to do this on Windows, but it takes a careful setup:

  1. load the cmd shell (Start -> Run -> cmd)
  2. in cmd, run: C:\Program Files\pd\bin\pd.com -stderr

Now all of messages that normally go to the Pd window will be redirected to the cmd.exe window.

Sources

*[PD-dev] the pd console and windoze stderr

Meta-FAQ

How do I edit a FAQ entry?

I've spotted an error in an answer. How do I edit and correct it?

First you need an account on this site. Then after logging in, just navigate to the FAQ you want to change, and press the "edit" tab. In the "Answer" textarea just change the text, but take note of the "Text Format" setting. Press "Save" to save.

How do I create a FAQ entry?

There is a question missing although many people asked about it. How do I add a FAQ?

First again you need an account here. Then log in, go to the FAQ's main page and press the "add faq" button in the upper right. Follow the instructions to add a question with answer. Please note: we use the "Structured Text" formatting for FAQs here.

What is a FAQ?

What's this all about?

FAQ stands for Frequently Asked Questions

It provides answers to questions everybody keeps having...

how can i delete a FAQ entry?

i've created a FAQ entry that i want to remove. How?

please contact the website administration...

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