Pure Data

From Things and Stuff Wiki
Jump to navigation Jump to search


to resort

General

  • Pure Data (aka Pd) is an open source visual programming language. Pd enables musicians, visual artists, performers, researchers, and developers to create software graphically, without writing lines of code. Pd is used to process and generate sound, video, 2D/3D graphics, and interface sensors, input devices, and MIDI. Pd can easily work over local and remote networks to integrate wearable technology, motor systems, lighting rigs, and other equipment. Pd is suitable for learning basic multimedia processing and visual programming methods as well as for realizing complex systems for large-scale projects.


Builds / implementations

pd

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 not only means that they are easy to use, but also acts as a standard platform so that patches can be used across many computers easily. Pd-extended includes most of the libraries from the pure-data source code repository. It is generally the most complete assembly of all available libraries, extensions, and documentation.

pd-l2Ork

Linux Laptop Orchestra's pd-l2ork offers a slew of usability improvements and a large collection of 3rd party externals. This is likely the last major release before transitioning from tkpath onto node-webkit renderer. Please note pd-l2ork continues to be developed on a regular basis with over dozen minor releases since the last major release posted on puredata.info. Once again, tons of new updates, most notably expanded K12 module including Raspberry PI GPIO with comprehensive PWM and I2S support, bunch of small improvements and bug fixes (e.g. comments with endlines or iemgui labels with spaces), documentation improvements, and comprehensive Wiimote support using a custom libcwiid fork (included in the source, also available as a separately downloadable tarball) offering interleaved motion plus and expansion data retrieval, as well as recently added support for the new version of MotionPlus Inside wiimotes. Pd-L2Ork is a monolithic release that includes most of the pd-extended libraries in one convenient package with a growing number of externals having their own standardized help files. In this latest version, pd-l2ork can be installed alongside other pd variants and there are no lingering conflicts between various packages.

> > - Pd-l2Ork does not seem to recognize nor execute any of my > *-plugin.tcl files (pd-extended automatically does it for any file > ending with -plugin.tcl). Is this feature not yet supported? If so, is > there any plan to implement it? It would be a huge pity to live > without it, since there are great tcl plugins available for pure data, > such as auto-completition, full screen by pressing F11 and one called > category_menu-plugin.tcl (this last one is my absolutely favourite).

> We haven't implemented plugins as we prefer to implement things into > the core of pd-l2ork and also because we are looking to migrate gui to > qt soon which will obsolete a large number of tk-specific workarounds. > Pd-l2ork already supports more flexible implementations of some of the > plugins, like hide menu which in pd-l2ork can be done per canvas > rather than only globally for the entire pd instance. I am not > familiar what plugins you listed do beyond what you mentioned above, > so if you think these should be a part of pd-l2ork, we can certainly > look into it.

[1]

libpd

  • libpd is Pure Data. It is not a fork of Pure Data, not a different flavor of Pure Data. It is simply a way of using Pd in a new way that can be more convenient and allows compatibility with mobile app development, game development, embedding into sophisticated 3D visualization tools, and lots of other applications. As such, it adds to Pd, without taking away anything from Pd Vanilla’s DSP core.

ZenGarden

  • https://github.com/mhroth/ZenGarden - a runtime for the Pure Data (Pd) audio programming language. It is implemented as an extensible audio library allowing full control over signal processing, message passing, and graph manipulation. ZenGarden does not have a GUI, but easily allows one to be built on top of it.

PdDroidParty

  • PdDroidParty - Run your Pure Data patches on Android with native GUIs emulated.

WebPD

  • https://github.com/sebpiq/WebPd - a 100% JavaScript Pure Data runtime using Web Audio API to play audio in the browser. It aims at allowing a subset of Pure Data programming language to run in the browser without plugins and with best possible performance. WebPd should be supported by all browsers supporting Web Audio API.

purr-data

  • purr-data - Pure Data Visual Programming Environment ported to an HTML5 GUI

pd-nw

Guides





float:







  • YouTube: Pure Data - cheetomoskeeto35 - 35 tutorials on the dataflow language, Pure Data, for creating interactive works with sound and music. Also, using existing frameworks such as reacTIVision and CCV in order to explore data expressively.


Objects

Hotkeys

Ctrl-e
  # toggle edit and active mode
Ctrl-/
  # audio computation on

Ctrl-.
  # audio computation off

Ctrl-1
  # put object (rectangle)

Ctrl-2
  # put message (flag shaped border)

Ctrl-3
  # put number (nicked top right)

Ctrl-4
  # put symbol

Ctrl-5
  # put comment

Ctrl-Shift-b
  # put bng (momentary)

Ctrl-Shift-t
  # put toggle
Ctrl-Shift-u
  # put vu

Graphical

vu
   # vu meter
knob
  # graphical knob. properties; set output-range, send-symbol to name of 'send' to affect, receive-symbol for send to be affected by
hradio
  # graphical horizontal radio button list

Control

bng
  # sends a bang (momentary)

bang
  # sends a bang whatever the input

loadbang
  # sends a bang on patch load
metro 500
  # bangs every 500ms (0.5s)

Messages

;
pd dsp on
  # message, set pd global audio computation on

;
pd dsp off
  # message, opp.


set $1
  # takes in a number, sends
trigger bang bang
  # trigger things in left to right order, bypassing the default patch creation order

t a a
  # trigger two anythings
sel 0 1 2
  # bangs an outlet depending on number inlet receives
bondo 3
  # gives three inlets and outlets. all outlets bang on any inlet bang.

change
  # only passed messages when they change, doesn't repeat

spigot
  # passes messages from left inlet to outlet, as long as right inlet receives non-zero

moses 50
  # if input is less than 50 fire left outlet, equal to or above fire right outlet. right inlet takes new midpoint.
pack f f f f
  # create a list of four float numbers

unpack f f f f
  # splits lists into item outlets

print
  # prints to console "print: " plus what is sent to it

print list
  # prints to console "list: " plus what is sent to it

route firstinitialstring secondinitialstring thirdinitialstring
  # routes messages starting with keywords to respective outlets
zl MODE VALUE
  # list extra on lists. modes; group, iter, join, len, reg, rev, rotate, sect, nth, slice, ecils or union.




notein
  # midi input - note number, velocity, channel number

noteout
  # midi output, inputs note number and velocity (amplitude)

noteout 2
  # midi channel 2 output

ctlout 74 1
  # send control message on midi channel 1. first inlet; note number between 1-127, second inlet; control code number, third inlet; channel

makenote
  # make a midi note on/off pair. inlet: pitch number (velocity, duration), velocity, duration, 

mtof
  # midi note to frequency
poly
  # takes a stream of pitch/velocity pairs and outputs triplets containing voice number, pitch and velocity

pack
  # takes a series of inputs and then outputs a concatenated list

route
  # route a message according to the selector of first element


osc~
  # sinewave, input: frequency

phasor~
  # sawtooth

noise~
  # noise
dbtorms
  # input db, output linear rms (0-1)

+~
-~
*~
/~
max~
min~
  # binary operations for signals
line~
  # ramp generator, inlet message: amplitude and time (ms)
sig~
  # converts control info into a signal

env~
  # envelope follower, input signal, output db rms


dac~
  # audio output

dac~ 2
  # audio output with two channels


send thing
s stuff
  # create a data send bus called thing
 
receive thing
r stuff
  # create a receive bus called thing

send~ channel
  # create an audio bus called channel
;
stuff bang
  # send a bang to stuff bus


~lop 5
  # low pass filter, value is frequency


udpreceive 9000
  # receive network data on port 9000


  • http://www.zenpho.co.uk/escher.shtml Escher.pd] -Mauritz Escher like Chord progressions in puredata. This is part of a series of PureData patches that generate music all by themselves, using mathematical rules that apply quite nicely to music theory.

Maths

i
  # integer, holds a number, drops decimal numbers, 

/ 
  # divides first inlet by second inlet

- 3
  # subtract 3 from first inlet

/ 10
  # divide data by 10

% 8
  # modulo 8, cycles rising count to 0 after 8 increments (0-7)

sqrt
  # get the square root of a number

pow 2
  # exponential function
expr sqrt(pow($f1, 2) + pow($f2, 2))
  # maths expressions made easier

expr $1f + $f2
$1f * $f2
$1f / $f2
pow($1f, 2) + pow($f2, 2)
  # multiple line expr, different lines have different outlets

expr if ($f1 > $f2, $f3, 0);
  # if expression
counter 1 4
  # bang to count from one to four and again. output is count.
cup
  # count up
drunk 10
  # count list randomly between 0-10, second inlet changes limits, third inlet sets jump size
random 100
  # on bang outputs random number between 0-100 

seed 17
  # as a message to random; provides a seed for generation
random F 1
  # generate a random float number between 0-1

tripleRand 10
  # generate a list of three random numbers between 0-10

tripleRand 10 5 20
  # generate a list of three random numbers between 0-10, 0-5, and 0-20

Tables and arrays

table pitches
  # an array called pitches, visible when clicked on

tabwrite pitchesarray
  # table array first inlet; value to be set, second inlet; index

tabwrite~ audioarracy
  # load audio generator/sample into array

;
pitches resize 6
  # message; resize a table scale

;
pitches bounds 0 1 5 1
  # message; alter table bounds, arguments: left most, top most, right most, bottom most

xticks / yticks 0 .5 2
xlabel / ylabel -0.5 0 1 2 3 4 5
tabread
  # inlet; index, outlet; value

tabread4~
  # advanced sample management
expr arrayname[$f1]
  # inlet; index; output; value


Samples

http://www.pd-tutorial.com/english/ch03s04.html

openpanel
  # opens file selector dialog when banged, outlet goes to "open $1" message
readsf~ 2
  # read a sample file with two channels (stereo)

open inputfile.wav
  # message; open a file for readsf~

start
  # message to readsf~: start playback of file

stop
  # message to readsf~: stop playback of file
soundfiler
  # outputs sample file size

Canvas

Data structures

"Pd is designed to offer an extremely unstructured environment for describing data structures and their graphical appearance. The underlying idea is to allow the user to display any kind of data he or she wants to, associating it in any way with the display. To accomplish this Pd introduces a graphical data structure, somewhat like a data structure out of the C programming language, but with a facility for attaching shapes and colors to the data, so that the user can visualize and/or edit it. The data itself can be edited from scratch or can be imported from files, generated algorithmically, or derived from analyses of incoming sounds or other data streams."

  • PDcontainer - C++ STL (Standard Template Library) Containers in PD

Serialization


Patches


  • mbass - a feature rich analogue modeled bass drum synthesizer, with exponential envelopes, distortion, a trigger synced LFO, and many other cool features.



  • https://github.com/gusano/extended-vanilla - Some pd-extended objects ported as pure-data vanilla abstractions. pd-extended users often tend to become lazy :mouse: and use some externals which only come with pd-extended although the same result can often be achieved with pure-data (vanilla). I find that trying to work with pure-data (vanilla) as much as possible is good for the following reasons: that's an amazing brain exercise (think puzzles); that's a great teaching base to show to beginners and intermediate users; 100% compatible with standard pure-data out-of-the-box


  • Metastudio 5 - Over the past 12 years I have been generating a set of abstractions for working with Pd-Extended. This has gradually exploded into a large library of objects for synthesis, audio processing, sequencing, live sampling and audio file manipulation.


  • polywavesynth - a ready-to-use, CPU-cycle-stingy, OSC-addressable polyphonic "wave" synthesizer for Pd. The tag "wave" is used for want of a better (short) descriptor for the somewhat unusual mix of synthesis technologies employed, which is table-driven subtractive synthesis with a dash of FM. polywavesynth is a front end/UI which directs control messages to multiple instances of polywavevoice~, which is the synthesizer engine for each voice. It is theoretically possible to use a polywavevoice~ on its own, but it would just be a mono synth with a somewhat cumbersome method of parameter addressing. Its real power comes from being invoked and managed by Frank Barknecht's polypoly object (see below), as is done by polywavesynth.
  • polygrainsynth - a ready-to-use, OSC-addressable polyphonic granular synthesizer for Pd. Its engine is a modified version of [a_grain], an abstraction by Jamie Bullock. polygrainsynth is the younger sibling of polywavesynth. Its implementation of polyphony, using Frank Barknecht's polypoly object, is identical to that of polywavesynth.
  • granita - Minimalist granular synthesis for tables (aka arrays) - files or live loop recording. Granita is Pd Vanilla compatible
  • Swirler - an interactive, spatialized soundscape that is generated purely from the noises in the room.
  • Beatmangle - using a single audio loop, produces persistently changing audio by randomly moving the play head and loop settings. This is a particularly effective technique for generating Squarepusher style beats.
  • Particlechamber is a 32-voice asynchronous granular synthesizer for real-time transformation of a soundfile. It is loosely based on the famous Travelizer instrument from Reaktor 3, however I think it’s much better because it is FREE!
  • http://grrrr.org/research/software/upp
    • https://github.com/grrrr/upp Universal Polyphonic Player (short UPP) is an infrastructure for all kinds of polyphonic events – be it note-like events, other generated sounds or short grains in granular synthesis. The strengths of the system are a modular, easily extendible design, almost unlimited polyphony, ease of control, DSP load scaling and sample-accurate timing.



  • mxdublin is a generic programmable event sequencer written for pure-data or Max/MSP. The generic term is used since it is can sequence both: atoms or midi data via atoms.


Tempo

Synth

Generative

Externals

to sort



  • https://puredata.info/downloads/libdir - a Pure Data loader which supports the libdir library format. The libdir library format aims to be a common library format for Pd which works with objects written in any language, including Pd. This library format was designed to be easy to create, install, and use. It should work when installed into the global path (i.e. pd/extra) or when copied locally into a project folder. It should work with objects written in any supported language (i.e. binaries, .pd, and the various loaders like pdlua and tclpd).

Pd is split into two processes: pd (the core) and pd-gui. A simple pd external just runs in the core. A simple Tcl externals still runs in the core, because tclpd creates a Tcl interpreter for that.

Instead, pd-gui has its own Tcl interpreter. In order to to GUI things (i.e. draw on the canvas, or react to mouse events), the core process needs to communicate with the pd-gui process (generally sending Tk commands, or calling procedures defined in the pd-gui interp. This is done with the sys_gui() function, if using the plain API.


TCL_LIBRARY="/usr/lib/pd-l2ork/tcl/library" TK_LIBRARY="/usr/lib/pd-l2ork/tk/library"

TCL_LIBRARY looks for the directory with init.tcl. On Arch, this is /usr/lib/tcl8.[5,6]



  • https://github.com/pure-data/deken Deken is a new Pd plug-in for package management. It makes finding and installing externals a breeze on any platform Pd runs on. Since maintenance of Pd-extended has been stuck for quite a while, netpd development will stop supporting it and instead make sure that the necessary externals are available through deken.



  • Cyclone is a library of PureData classes, bringing some level of compatibility between Max/MSP and Pd environments. Although being itself in the early stage of development, it is meant to eventually become part of a much larger project, aiming at unification and standardization of computer musician's tools.


  • https://github.com/enrike/ehu-abstractions - EHU is a set of abstractions for PureData real-time graphical programming environment. EHU aims to allow for rapid prototyping of interactive systems. Most abstractions in EHU encapsulate the GUI widgets to control them minimising the job of creation of widgets and connections. EHU covers playing video files, controlling video cameras, displaying pictures, playing samples, audio effects, DMX controls, and some general utilities. Note that it relies on several externals included in pd-extended.


  • readanysf~, a puredata external for reading multiple file formats.
  • https://github.com/kronihias/smpte- - Pure Data/Max (flext) external for generating or decoding ltc audio timecode. Allows to sync to a DAW or sync two Pd instances via audio connection - and therefore having the same latency as your audio stream. using libltc library by Robin Gareus. based on Max object by Mattijs Kneppers


  • Slice//Jockey for Pure Data. Imagine a DJ set, and instead of turntables or cd players or iPods, it has two recorders. Real-time-beat-slicing recorders. Sound from your microphone is analysed, and sliced into coherent fragments which are engaged in playback rightaway. Slice//Jockey is a crossover of music game and live performance tool. Slice//Jockey is one fruit of slicerec~ and sliceplay~, Pure Data externals designed for real-time beat slicing.


  • oscbank~ - for additive synthesis. This is a plugin (aka 'external') for Miller Pucketter's PureData ("pd"). It was written in order to synthesize sinusoidal models that consist of hundreds of partial sinewave components. The external takes three control-rate parameters for each partial: index(unique), frequency, and amplitude. It stores this information in a bank and synthesizes each partial by interpolating between frames.


  • pmpd is a collection of object for with pd. These objects provide real-time simulations, specially physical behaviors. pmpd can be used to create natural dynamic systems, like a bouncing ball, string movement, Brownian movement, chaos, fluid dynamics, sand, gravitation, and more. It can also be used to create displacements thus allowing a completely dynamic approach of pd computing.


  • http://grrrr.org/research/software/py/ py/pyext – This object library provides full integration of the Python scripting language into the Pure Data and Max real-time systems. The library contains two main external objects: py loads Python modules and allows to execute functions therein. pyext uses Python classes to represent full-featured message objects. Multithreading (‘detaching’) is supported for background operation.





  • Slice//Jockey is a crossover of music game and live performance tool. Imagine a DJ set, and instead of turntables or cd players or iPods, it has two recorders. Real-time-beat-slicing recorders. Sound from your microphone is analysed, and sliced into coherent fragments which are engaged in playback rightaway.
  • Recursion Looper is a PD(Pure Data) patch designed for live music performance. -8 loop tracks -Track effects: reverb, bitcrush, filter -Master effects: filter, 3 band EQ -customizable MIDI control of volume, pan, effects, record and play, etc.


  • moocow:pd - patches and externals for Miller Puckette's Pd, constructed, written, hacked, munged, frobbed, and/or tweaked by moocow.



Instruments


  • Egregore source - an adaptation of the software used by chdh for the performance egregore in 2011-2014. It is based on five different audiovisual instruments made of chaotic and physical modeling algorithms that you can directly control. They have been remotely controlled live by chdh the 27th may 2015. It is available as a software to download or as a usb stick.

DSP

  • Freeverb - a simple implementation of the standard Schroeder/Moorer reverb model. It uses 8 comb filters on both the left and right channels. Note that this version of Freeverb doesn't contain predelay, or any EQ. It is implemented as a Pd object, so it can easily be inserted into a Pd patch.
  • FFTease, a set of live spectral sound processors for Max/MSP and Pd. Caveat: these objects are CPU intensive. A few of these objects in a patch could push your computer to its limits. Be very careful with playback volume as some of the objects produce dramatically different (lower or higher) overall levels.





Detection

  • pd-aubio - contains various externals for PureData using the aubio library.

wscript needs to be edited to add this to the DEST_OS == linux (line 24);

ctx.env.CFLAGS += ['-I/usr/include/pd-l2ork']
aubioonset~

aubiopitch~

aubiotempo~

aubiotss~
aubiozcr~
  # zero cross rate


Machine learning

Media

  • GEM stands for Graphics Environment for Multimedia and is an external (plugin) for the computer-music software Pd.
  • Pure Data Packet (PDP) - an extension library for Pure Data, providing video and other media processing functionality. PDP's focus is on images and video, but there is support for matrix processing, 1D and 2D binary cellular automata and opengl rendering (like Gem). PDP runs on Linux and OSX. The OSX version depends on Fink.
  • PiDiP Is Definitely In Pieces
  • Framestein is software for processing images and video with Pure Data. Requirements: Windows, DirectX version 7 or later, Pure Data.

LV2

  • https://bitbucket.org/agraef/pd-lv2plugin - a Pd external which provides a simple LV2 host so that you can run LV2 plugins inside Pd. The overall operation is similar to the LADSPA plugin~ external, but it works with LV2, the new Linux plugin standard. It supports both audio and MIDI plugins. lv2plugin~ is based on lilv, the reference LV2 host library, so it should work with almost any LV2 plugin. lv2plugin~ is written in the author's Pure programming language, so you need to have the Pure interpreter installed, as well as the pd-pure plugin loader and the pure-lilv module. You can find all of these on the Pure website. You'll also need the lilv library itself and the LV2 headers

VST

  • https://github.com/pierreguillot/Camomile - Camomile is a dynamic plugin made with Juce that allows to load and control Pure Data patches inside a digital audio workstation. The plugin is available as VST, VST3 and Audio Unit for Windows, Linux and Mac.

Integration

  • https://github.com/Ant1r/ofxPof - a set of Pure Data (Pd) externals written with openFrameworks API, that bring OpenGL graphics and utilities to Pd, such as : basic 2D shapes drawing : rectangle, ellipse; image pre-loading, caching and drawing; mapped 3D sphere and plane; anti-aliased truetype text rendering; translating, rotating, scaling; color and alpha blending management; shared framebuffers

Network

  • netpd is a CRNMME (Collaborative Realtime Networked Music Making Environment) built in Pure Data. It allows many users to have a realtime jam sessions with each other, connected over the internet. Users might contribute their own netpd-ized patches a.k.a. instruments or use pre-existing ones. The set of instruments, as well as the state of each instrument is synchronized between clients in order to provide identical experience for every connected user.
  • SyncJams - a zero-configuration network-synchronised metronome and state-data dictionary for easy collaboration and jamming with electronic music software. It aims to be plug & play on LANs and WiFi networks and is embeddable in existing applications and music environments.
  • pd-mdnsbrowser - a stand-alone version of the OSC service browser in the pd-touchosc module. It employs mDNS/DNS-SD a.k.a. Zeroconf for the service discovery, and works with the prevalent Zeroconf implementations on Linux and Mac OS X, Avahi and Bonjour.

GUI Plugin




  • GrIPD is a cross-platform extension to Miller Puckette's Pure Data software that allows one to design custom graphical user interfaces for PD patches. GrIPD is not a replacement for the PD Tcl/Tk GUI, but instead is intended to allow one to create a front end to a PD patch. The concept is to create your PD patch normally and then your GUI using GrIPD. You can then lauch PD using the -nogui command line argument (although this is certainly not necessary) so only your custom front end will be displayed. GrIPD, itself, consists of two parts: the "gripd" PD object and an external GUI window/editor. The PD object was written in C and the external GUI was written in Python using the wxWindows. GrIPD is released under the GNU General Public License.


Programming

  • http://pdstatic.iem.at/externals-HOWTO/ - Pd is a graphical real-time computer-music system that follows the tradition of IRCAMs ISPW-max. Although plenty of functions are built into Pd, it is sometimes a pain or simply impossible to create a patch with a certain functionality out of the given primitives and combinations of these. Therefore, Pd can be extended with self made primitives (“objects”) that are written in complex programming-languages, like C/C++. This document aims to explain how to write such primitives in C, the popular language that was used to realize Pd.


Composition