0% found this document useful (0 votes)
16 views9 pages

Puredata

Pure Data is a visual programming environment where audio and data signals can be processed by connecting different object blocks. It has two modes, edit mode for building patches and performance mode for running them. Common object types include maths objects for calculations, counters for sequencing, and random objects for randomness.

Uploaded by

曲安琪
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views9 pages

Puredata

Pure Data is a visual programming environment where audio and data signals can be processed by connecting different object blocks. It has two modes, edit mode for building patches and performance mode for running them. Common object types include maths objects for calculations, counters for sequencing, and random objects for randomness.

Uploaded by

曲安琪
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Pure Data – Useful info Session

1
Pure Data is a data flow programming environment. This means that instead of using written lines
of code it looks a bit like a flow chart. PD works in a similar way to a modular synth; by
connecting different processing modules (called objects) together, you can create and control
different audio and data signals.

Edit Mode/Performance Mode


- Pure Data has two modes; edit mode and performance mode.
- You can switch modes in the edit menu or with a keyboard shortcut.
- Edit mode – add, move or edit objects and boxes.
- Performance mode – control boxes, press buttons, trigger messages/bangs.
- Holding down the cmd (mac) or ctrl (win) key switches to perf mode while the key is held
down.

DSP (Digital Signal Processing)


- To turn on sound in your program, tick the DSP box at top of the log window or in the
media menu.

Block Types
- There are several different types of processing block/box in PD, each with a different job.
- Different types of boxes have different shapes to distinguish them.
- To add a box, use the put menu. Each type of box has a useful keyboard shortcut.

Object
- Used for processing sound and data.
- There are many different objects that perform a range of processes.
- When you create an object, you can write in it to change what it does.
- Some objects can be further customised with arguments (other numbers after the initial
object name). - Rectangular shape.

Message Box
- Used to send numbers/messages to other objects.
- Sends its message when receiving a signal or when manually pressed. -
Rectangle with the end cut out like flag.

Number Box
- Used to display or edit numbers.
- Value can be changed by clicking and dragging the number in performance mode. -
Rectangle with the corner cut off.

(If the block says symbol then you have the wrong one.)

Symbol
- Used to display text.
- We won’t be using this one. Just including it for completeness.

Bang
- Used to send a signal (bang) that can trigger other objects.
- Sends a bang when receiving a signal or when manually pressed. - Square
with a circle inside.

Toggle
- Used to turn objects on or off.
- Sends out a number value of 0 or 1. - Square.

Practice Task
Using edit mode
, create each type of
object.

Signal Types
- Blocks can communicate with each other using a variety of different signals.
- The connection points at the top of a block are inlets and the connection points at the
bottom are outlets. Only outlets can connect to inlets.

Bang
- A short signal used to trigger other objects.

Number (Float) - A
raw number.

Audio
- Raw audio signal.
- Objects that process audio are denoted by a ~ (tilde) - Audio
connections look thicker.

Signal Order (with example)


- Objects always process inlets and outlets from right to left so it is important to make sure
signals arrive at an object in the correct order (rightmost inlet first).
- To do this we use a trigger object.
Trigger Used to control the order in which a signal is sent to different
objects. It will send the signal to the rightmost object first.
Here is an example of the order…

The letters after the t indicate the type of signal that will be
sent. a can send any signal. b can send a bang. The number of
extra letters equals the number of outlets.

- The example below shows the maths question 600 / 100 = 6


- In order to send the numbers to the divide object in the correct, order we use a
trigger.
- The value 100 is sent first because it needs to be sent to the rightmost inlet.

Maths Objects
- Maths objects are used to perform calculations and transform numbers.

Add Adds the value of the left inlet to the value of the left inlet.

Subtract Subtracts the value of the right inlet from the value of the left
inlet.
Multiply Multiplies the value of the left inlet with the value of the right
inlet.
Divide Divides the value of the left inlet with the value of the right
inlet.
Practice Task
Create Pure Data patches to solve the following maths problems:
- 765 24
- 0.4 x 0.56
- 65 –/ 8.5
- 34 +9
5
Basic Counter
- One of the most useful things to know how to build is a counter.
- To build a counter we need to be able to store numbers. We do this using a float object.

Float Stores numbers. If a number is received in the left inlet the


float will store and output the number. If a number is
received in the right inlet it will store but not output the
number.
If the float receives a bang it will output the stored number
(see below).

- Below is an example of a simple counter where the value increases by + 1 each time the
bang is pressed.
- When the float receives a bang, it outputs the number it has stored. This number goes
through a [+ 1] maths object and then back into the float where the new value is stored.

Automating the counter (Metro)


- To automate a counter, we need a metronome to automatically trigger it.

Metro Outputs a series of bangs with a constant pulse. The speed


is dictated by the number (milliseconds between each
bang). Can be turned on and off with a 0 or 1 sent to the
left inlet.

- The example below shows how a metro can be connected to a counter.


- The counter will now count up automatically at the same speed as the metro.
Practice Task
Create a basic counter thatis automatically triggered
metro object.by a
Experiment with different
speeds and try changing[+ to a differentobject or number.
1]

Triggering events with select


- At the moment, our counter will keep increasing infinitely. - We can use a select object
to reset out counter.

Select Used to detect a specific number value. Outputs a bang if


the specified number is detected.

You can use one select object to detect multiple numbers.


Simply add more numbers for it to detect. An outlet will be
automatically created for each num.

- In the example below, the counter will count up to 10 before resetting back to 0.
- When select detects a 10 it sends a bang out which activates the 0 message. This message
changes the value of the float.
- A trigger is used to make sure that the 0 message will arrive at the float last. This ensures
that it is the number that will be stored.

Practice Task
Create the following types of : counter
- A counter thatcounts up from 70 before resetting0.
- A counter thatcounts downto from 10
before
to to resetting to
. 10
- (Extra) A counter that
continuously
0 counts upfrom 0 to 10 and back . down
to 0
Creating a simple sequencer

MIDI to Converts MIDI numbers to frequency (Hz).


Frequency
Oscillator Creates a raw sine wave at the specified pitch (frequency Hz).

DAC Digital to analogue converter.


Any audio sent to a dac~ will be play back through your
speakers.

Example
- The counter counts from 0 to 7 (8 beats).
- The select object detects each number in the sequence outputs a bang for each one. The
number 7 is used to reset the counter.
- These bangs are then used to trigger messages containing MIDI numbers.
- The MIDI numbers are then converted to the correct frequency (Hz) before being played
back by an oscillator.

Practice Task
Create asequencer as shown above.
Create your own melody message
by boxes
to thedifferent steps in the sequence.
adding

Session 2
Randomness
- To automate a counter, we need a metronome to automatically trigger it.

Random Outputs a random number between 0 and the given argument


– 1.
So [random 10] will output a number between 1-9.

- We can use maths objects to further customise our random numbers.

- True randomness is impossible to create electronically. We can alter the random algorithm
using a seed message. This is useful when you have multiple identical random objects.
- This message requires a number after the word ‘seed’.

- Random can be combined with select to pick a random value from a set of options (similar
to a [ ].choose in sonic pi).
- This example shows a random object selecting and playing from three pitches.

Session 3
Oscillators
Sine Wave Generates a sine wave. Pitch is dictated by an argument or
inlet value
Saw Wave Generates a saw wave. Pitch is dictated by an argument or
inlet value
Noise Generates white noise.

Filters & Distortion


Low Pass Filter that lets low frequencies pass.
Filter
High Pass Filter that lets high frequencies pass.
Filter
Band Pass Filter that lets a limited range or frequencies pass.
Filter
Clip Distorts a signal by limiting its volume.
Distortion

Volume Control
Audio Audio signal version of a maths object. Used to
Amplifier increase the amplitude (volume) of a signal.

- Below are two examples showing how to control the volume of a sound using the [*~]
object.
- The example on the left is simpler while the example on the right is more complex but
sounds better (no popping noises).

Delay
- Creating a delay requires two objects. One to record the delay and one to play it.
- Each separate delay needs a different name.

Create Records the audio into the delay.


Delay
Play Delay Plays the audio with a delay (ms) of the specified
length.

- Below is an example of the signal from an oscillator being recorded and delayed.

You might also like