Skip to content

Pure Data Keyword Reference

A reference for objects and commands used in Pd patches.

Basic Operations

OperationShortcut
Place an objectCmd (Ctrl) + 1
Place a messageCmd (Ctrl) + 2
Place a number boxCmd (Ctrl) + 3
Place a symbol boxCmd (Ctrl) + 4
Place a commentCmd (Ctrl) + 5
Toggle edit/run modeCmd (Ctrl) + E
Zoom inCmd (Ctrl) + Shift + ;
Temporary run modeHold Cmd (Ctrl)
Help browserCmd (Ctrl) + B
Place a bangShift + Cmd (Ctrl) + B
Place a toggleShift + Cmd (Ctrl) + T
Place a horizontal sliderShift + Cmd (Ctrl) + J
Place an arrayCmd + Shift + A
Delete an objectSelect → Backspace
Object helpRight-click → Help

Sound Generation

ObjectDescriptionUsage
osc~Sine wave oscillator[osc~ frequency]
phasor~Sawtooth wave[phasor~ frequency]
noise~White noise[noise~]
else/tri~Triangle wave (ELSE library)[else/tri~ frequency]
else/square~Square wave (ELSE library)[else/square~ frequency]

Audio I/O

ObjectDescriptionUsage
output~Audio outputSet volume with level value message
else/out~Audio output (with DSP on/off switch)ELSE library
dac~Digital-to-analog converter (audio output)[dac~ channel_numbers]
adc~Analog-to-digital converter (audio input)[adc~]

Volume & Envelopes

ObjectDescriptionUsage
*~Signal multiplication (used for volume control)signal x signal or number
line~Automatic value change (signal)[target_value time(ms)] message
vline~Continuous value change[value1 time1, value2 time2 start_time, ...]
delayOutput a bang after a delay[delay time(ms)]
else/asr~ASR envelopeELSE library
else/adsr~ADSR envelopeELSE library
else/envgen~Custom envelope generator[else/envgen~ -curve]

Arithmetic

ObjectDescriptionUsage
+, -, *, /Basic arithmetic (values)[+ number]
exprExpression evaluation[expr $f1 * 2 + $f2]
mtofMIDI note → frequency (Hz)Middle C = 60

Data Routing

ObjectDescriptionUsage
s (send)Send a value[s destination_name]
r (receive)Receive a value[r destination_name]
selRoute by matching values[sel value1 value2 ...]
routeRoute by first element[route address1 address2]
changeOutput only when the value changes[change]
t (trigger)Send values right-to-left[t f b] (f: float, b: bang, a: symbol)

Filters

ObjectDescriptionUsage
lop~Low-pass filter[lop~ cutoff_frequency]
hip~High-pass filter[hip~ cutoff_frequency]
bp~Band-pass filterCenter: cutoff, Right inlet: Q value

Filter Notes

  • Filters other than lop~ cannot accept vline~ output directly on their right inlet
  • Pay attention to the difference between value (thin) and signal (thick) lines

Delay

ObjectDescriptionUsage
delwrite~Write to a delay buffer[delwrite~ $0-delay buffer_size(ms)]
delread~Read from a delay buffer[delread~ $0-delay delay_time(ms)]
cyclone/delay~Delay (cyclone library)cyclone library

About $0

$0 is a unique ID number assigned to each Pd patch. Using it in buffer names like $0-delay prevents name collisions when duplicating patches.

Signal-Value Conversion

ObjectDescriptionUsage
sig~Value → signal conversion[sig~]
snapshot~Signal → value conversionOutputs the signal value when it receives a bang
metroPeriodic bang output[metro period(ms)]
else/s2f~Signal → value (automatic)Continuous output without needing bangs
else/f2s~Value → signalELSE library
else/numbox~Display signal valuesDisplay GUI

DSP Must Be On

Signal-related objects will not work unless DSP is turned on. Enable it via the checkbox in the top-right of the console, or raise the volume on output~.

Audio File Processing

ObjectDescriptionUsage
else/play.file~Audio file playback[else/play.file~ filename loop(0/1) autoplay(0/1)]
else/stretch.shift~Pitch shift / time stretchPitch: 0=original, 1200=1 octave; Tempo: 100=original
else/xselect~Crossfade selection[else/xselect~ num_channels fade_time(ms)]
else/xfade~CrossfadeELSE library
else/rec.file~Record to file[else/rec.file~ filename]
soundfilerLoad WAV data into an arrayread filename array_name
tabplay~Play audio from an array[tabplay~ array_name]

Automated Playback

ObjectDescriptionUsage
text defineDefine text data[text define -k filename]
text sequenceSequential text outputauto: automatic, bang: one step, line 0: go to start
else/drum.seqRhythm machine GUI[else/drum.seq rows columns]
else/tempoBPM tempo output[else/tempo BPM -mul multiplier]
randomRandom integer output[random max_value]

micro:bit Integration (OSC)

ObjectDescriptionUsage
else/osc.receiveReceive OSC data[else/osc.receive port_number]
else/osc.routeRoute by OSC address[else/osc.route /address1 /address2]
cyclone/scaleValue mapping[scale input_min input_max output_min output_max]
clipValue clipping[clip lower_limit upper_limit]
else/smooth~Smoothing (signal)ELSE library

GUI

ObjectDescriptionOperation
bangTrigger outputClick to send
toggle0/1 switchClick to toggle
Number boxNumeric display/inputDrag to change value
Horizontal sliderContinuous value inputRight-click → Properties to set upper/lower limits

Miscellaneous

ObjectDescriptionUsage
printPrint to consoleFor debugging
comportSerial communication[comport device_number baud_rate]
pd subpatch_nameSubpatchCreate a subpatch within a patch
clone patch_nameClone a patchGenerate multiple copies of the same patch

Useful Facts

Weber-Fechner Law

Human subjective perception of intensity is proportional to the logarithm of the physical stimulus. To make volume changes feel natural, raise the volume value to the 4th power.

Structure of Musical Tones

Instrument-like sounds consist of a fundamental frequency (the lowest tone) combined with harmonics at integer multiples. By combining multiple osc~ objects, you can create a variety of timbres (additive synthesis).