Designing Sound in SuperCollider/Equivalents for Pure Data Objects

From Wikibooks, open books for an open world
Jump to navigation Jump to search

The following list is based on the Pure Data (PD) Object Reference Glossary by Christopher Ariza, which is available at the following URL:

The coefficients of the SuperCollider examples are adapted to the behavior of the pure data objects.

[metro][edit | edit source]

Sends a series of bangs at a constant rate in miliseconds.

// example: [metro 2012]
// 2012 ms = 2.012 s 
// BPM: 60 / 2.012 = 29.821073558648
// BPS: BPM / 60 = 0.49701789264413 -> ~ 0.497 Hz; // equals to;

[bp~][edit | edit source]

Band pass filter. Arguments initialize center frequency and Q.

// [bp~] and differ in their behaviour. 
// This example is just an approximation to [bp~]., centerFrequency, Q.reciprocal)

[cos~][edit | edit source]

The cos~ object outputs the cosine of two pi times its signal input. So -1, 0, 1 and 2 give 1 out, 0.5 gives -1, and so on.

(signal * 2pi).cos

alternatively, use the more common phase modulation and a lookup table: 0.5pi + (2pi * signal))

[delwrite~][edit | edit source]

Delay a signal. Provide a signal as input to add to a delay line. One or more [delread~] or [vd~] objects can read from the delay line created with the [delwrite~] object.

1st argument: name of delay line 2nd argument: length of delay line in msec (= max. delay time)

// at first: a buffer for the UGens to use
buffer = Buffer.alloc(s, s.sampleRate * seconds, 1); // or LocalBuf(s.sampleRate * seconds, 1) ... whatever suits best, signal)

[hip~][edit | edit source]

One-pole high pass filter.

(signal -, exp(-2pi * (freq *

[lop~][edit | edit source]

One-pole low pass filter., exp(-2pi * (freq *

[max~][edit | edit source]

Return the larger of two signals.


[min~][edit | edit source]

Return the smaller of two signals.


[noise~][edit | edit source]

Uniformly distributed white noise; the output is between -1 and 1.

[phasor~][edit | edit source]

Sawtooth oscillator. Ramps from 0 to 1; can be considered a Sawtooth waveform between 0 and 1., 1, 0.5, 0.5)

[pink~][edit | edit source]

Pink noise generator.

[pow~][edit | edit source]

Exponentiate a signal.


[vd~][edit | edit source]

Delay a signal. One or more independent [vd~] objects can read a delay line from one named [delwrite~] object. The delay line must be named as a construction argument. A signal input will set the delay time in milliseconds.

// works in conjunction with DelTapWr and an allocated buffer, outputOfDelTapWr, delTime)

[vline~][edit | edit source]

The vline~ object, like line~, generates linear ramps whose levels and timing are determined by messages you send it. The messages consist of a target value, a time interval (zero if not supplied), and an initial delay (also zero if not supplied.) Ramps may start and stop between audio samples, in which case the output is interpolated accordingly.

// Equivalent in SuperCollider for the following message sent to [vline~]: [1 1000 500, 0 1000 2500][0, 0, 1, 1, 0], [0.5, 1, 1, 1]))

// the pure data message means: 
// go to 1 in 1000ms but wait 500ms from the starting point, 
// then go to 0 in 1000ms but wait 2500 ms from the starting point:[0, 0, 1, 1, 0], [0.5, 1, 1, 1]).plot

[wrap~][edit | edit source]

Remainder modulo 1. The [wrap~] object gives the difference between the input and the largest integer not exceeding it (for positive numbers this is the fractional part).

or use the operator "wrap"

signal.wrap(0, 1)