Creating Glitch Art with Pure Data

Pure Data (commonly called Pd) is a free, open-source visual programming language created by Miller Puckette — the same person who designed Max/MSP. Where Processing uses text-based code to generate visuals, Pure Data uses a patch-based interface where you connect objects with virtual wires to build signal processing chains. This visual approach makes it especially intuitive for building real-time audio-visual glitch systems, live performance tools, and audio-reactive installations.
What Pure Data Is
Pure Data is:
- A visual programming language where you build programs by connecting boxes (objects) with patch cords rather than writing text code.
- Real-time by design — patches process audio and video continuously, making it ideal for live performance and interactive installations.
- Free and open-source — available on Windows, macOS, Linux, and even Raspberry Pi.
- Two main distributions: Pd-vanilla (the original, minimal version by Puckette) and Purr Data / Pd-extended (community version with many additional libraries pre-installed, including the GEM video library).
For glitch art, Pd’s strength is connecting audio processing to video manipulation in real time — sounds drive visuals and visuals drive sounds in feedback loops that generate organic, evolving glitch behavior.
GEM: Graphics Environment for Multimedia
Most visual work in Pure Data uses the GEM (Graphics Environment for Multimedia) library, which provides OpenGL-based rendering inside Pd patches.
Getting Started with GEM
A minimal GEM patch for displaying and manipulating video:
- Create a
[gemwin]object — this opens the render window. - Send it the messages
createand then1to start rendering. - Add a
[gemhead]object — this marks the start of a render chain. - Connect it to a
[pix_video]or[pix_film]object to load a live camera feed or video file. - Connect that to
[pix_texture]and then[rectangle]to map the video onto a shape.
From this basic chain, you can insert glitch processing objects between the pixel source and the texture output.
Key GEM Objects for Glitch
[pix_offset]: Shift pixel data by an offset value — creates displacement and tearing effects when modulated.[pix_roll]: Rolls the image horizontally or vertically, wrapping pixels around the edges. Modulate with audio signals for sync-error aesthetics.[pix_convolve]: Apply custom convolution kernels to the image. Feed it unusual or rapidly changing kernel values for unpredictable distortion.[pix_color]: Manipulate color channels directly. Swap, invert, or scale individual RGB values.[pix_mix]: Blend two video sources with controllable mix amount — cross between clean and corrupted feeds.[pix_data]: Access raw pixel data as numbers, enabling direct byte-level manipulation similar to hex editing.[pix_halftone]: Convert the image to a halftone dot pattern that creates a printed/degraded aesthetic.[pix_pixelate]: Reduce resolution by enlarging pixel blocks — macroblocking simulation.
Audio-Reactive Glitch Visuals
Pure Data’s greatest strength for glitch art is its native audio processing. You can build patches where audio analysis directly controls visual parameters.
Basic Audio-Reactive Setup
- Capture audio: Use
[adc~]for live microphone input, or[readsf~]to play an audio file. - Analyze the signal:
[env~]— extracts amplitude envelope (volume over time).[fiddle~]— tracks pitch and amplitude.[bonk~]— detects percussive onsets (drum hits, transients).[rfft~]— fast Fourier transform for spectral analysis.
- Map to visuals: Connect the analysis output to GEM object parameters. For example, route
[env~]output to[pix_offset]to make image displacement respond to volume.
Feedback Loop Technique
Feedback loops are essential to Pd glitch aesthetics:
- Render your GEM output to a
[pix_snap]object that captures the current frame as a texture. - Feed that captured frame back into the render chain as a secondary input.
- Offset, scale, or color-shift the feedback slightly each frame.
- The result is recursive, evolving visual patterns that compound distortions over time — similar to pointing a camera at its own monitor output.
Control the feedback intensity with a [pix_mix] object to balance between the live input and the recursive feedback.
Building a Live Performance Patch
Pure Data excels as a live performance tool. A typical glitch performance patch might include:
Input Layer
[pix_video]for live camera feed[pix_film]for pre-recorded video loops[adc~]for live audio input- MIDI controller objects (
[ctlin],[notein]) for hardware control
Processing Layer
- Chain of GEM pixel effects (
[pix_offset],[pix_convolve],[pix_color]) - Audio analysis objects driving effect parameters
[metro]objects triggering random parameter changes at controllable intervals[random]for introducing controlled chaos into parameter values
Output Layer
[gemwin]for projection output[pix_record]for recording the result[writesf~]for recording the audio output simultaneously
MIDI/OSC Control
Map physical controllers to your glitch parameters:
[ctlin]receives MIDI CC messages from knobs and faders.[oscreceive]accepts OSC messages from phone apps, other software, or network sources.- Scale incoming values with
[/ 127](for MIDI) and route them to effect parameters.
This lets you “play” your glitch visuals like an instrument during live sets.
Practical Tips
- Start with Purr Data or Pd-extended: These distributions include GEM and many audio analysis objects pre-installed, saving significant setup time.
- Build incrementally: Start with a simple video display, add one effect, test it, then add another. Pd patches can become complex quickly.
- Use subpatches for organization: Wrap related objects in subpatches (
[pd effect-name]) to keep your main patch readable. - Save and version your patches: Pd patches are text files — they work well with version control.
- Performance monitoring: GEM rendering can be demanding. Watch your frame rate (displayed in the GEM window title) and simplify effects if needed.
- Explore the community: The Pd mailing list and forums are active and welcoming. Many artists share their glitch patches openly.
Related Resources
- Processing — Text-based creative coding for visual glitch art
- Max MSP Glitch — Commercial visual programming for audio-visual glitch
- Databending — File-level data manipulation
- Glitch Software — Full software overview
- Free Glitch Tools — More free tools for glitch art