Package net.paulhertz.pixelaudio.example
package net.paulhertz.pixelaudio.example
Example Processing sketches and demonstrations of PixelAudio library functionality. The sketches
are available as .java files in the PixelAudio library
net.paulhertz.pixelaudio.example package and as Processing
sketches in the library release. Both formats share data in the /PixelAudio/examples/examples_data
directory. If PixelAudio is new to you, I recommend starting with the Basic PixelAudio Features,
followed by the Intermediate to Advanced: Tutorial Series. After that, feel free
to check out the other examples and the Performance and Production Examples.
Basic PixelAudio Features
LookupTablesdemonstrates the creation and visualization of lookup tables for spatial indexing and mapping.Starteris a minimal example that demonstrates initializing PixelAudio with a PixelMapGen, mapping colors to the signal path, and displaying the result.MultiGenDemodemonstrates switching between multiple PixelMapGen implementations (Hilbert, Moore, DiagonalZigzag) to explore different spatial patterns.MultiGenLookupTablesgenerates and displays lookup tables for different curve generators, useful for understanding spatial mapping.SimpleWaveSynthdemonstrates setting up a WaveSynth as an animated visual display with gamma adjustment and multiple curve generators (Hilbert, Moore, DiagonalZigzag).SimpleAnimationdemonstrates basic animation of a spectral display mapped to a geometric pattern.
Intermediate to Advanced: Tutorial Series
TutorialOne_01_FileIOcovers file I/O operations including loading and saving audio and image files with PixelAudio.TutorialOne_02_Animationdemonstrates pixel-shifting animation within a standard framework for pixel and audio indexing. Introduces the Sampler audio synthesis instrument.TutorialOne_03_Drawingenables interactive gesture drawing and real-time synthesis, with curve modeling and display control. Introduces the Granular synthesis instrument.TutorialOne_04_Networkdemonstrates network communication capabilities using UDP for remote control and data exchange with external applications.TutorialOne_05_GesturePlaygroundprovides an interactive playground for gesture-driven sampler and granular synthesis with full parameter control through a GUI.TutorialOne_06_WindowBufferdemonstrates window buffer management for streaming audio processing and sample-accurate control.
Audio and Image I/O
LoadImageToAudioloads an image file and converts it to audio using a PixelAudioMapper, demonstrating image-to-signal conversion with playback: an early but still useful example.LoadAudioToImageloads an audio file and converts it to a visual representation using a PixelAudioMapper: an early but still useful example.
Introduction to WaveSynth Series
BigWaveSynthdemonstrates basic features of a color organ that uses additive sine wave synthesis.BigWaveSynthAudioextends BigWaveSynth with audio output capabilities, enabling real-time sonification of visual patterns.JSONWaveSynthdemonstrates JSON-based serialization and loading of waveform parameters for configuration management.
Performance and Production Examples
Bagatelleis a comprehensive interactive audio-visual performance tool supporting brush management, session saving/loading, gesture recording, and real-time granular synthesis with extensive preset library support and a graphical user interface.WaveSynthEditorprovides a GUI for editing WaveSynth color organ parameters. It can construct complex spectral and visual compositions that can be output to video. WaveSynth parameters can be saved to or retrieved from a JSON file.WaveSynthSequencerdemonstrates sequencing with the WaveSynth color organ, with frequency, rhythmic timing, and image generation.ArgosyMixeris a specialized mixing and synthesis tool for rhythmic pattern making in images and audio. It also provides a GUI with 18 different MultiGen instances to try out, a menu of patterns, animation controls, and image, audio, and video export.
Utility and Demonstration Examples
TransformPImageshows image transformation and manipulation techniques compatible with PixelAudio processing.TutorialOne_06_WB_Retrofitdemonstrates retrofitting existing code to use the WindowBuffer pattern for improved audio handling. Available only in Eclipse version.PANetworkClientINFprovides a network interface for remote communication with PixelAudio processes.
Companion Files
Some examples include Max/MSP support files for network integration:
UDP_Handler.maxpat- Max/MSP patch for UDP message handlingsimpleAudioIO.maxpat- Max/MSP patch for basic audio I/O
Development Notes
Most examples extend Processing's PApplet and follow the standard setup/draw pattern. Many support interactive keyboard control for real-time parameter manipulation. The tutorial series (TutorialOne_*) provides progressive lessons in increasing complexity.
-
ClassDescriptionArgosyMixer demonstrates how the Argosy class can create and animate patterns and save them to video.Experimental real time performance application, with an editing GUI, presets, and JSON-format files for persistent brushstroke and audio configuration data.Presets are applied to each new brush at the moment drawing is completed by releasing the mouse button and calling makeBrush(), the bottleneck method for all brush creation.Simple container for a brush hit-test result.Gesture and audio configuration data returned by a PerformancePreset.Presets are applied to each new brush at the moment drawing is completed by releasing the mouse button and calling makeBrush(), the bottleneck method for all brush creation.Modes available for drawing and editing curves and configuration.Barebones interface for "something that happens at a certain point", for use with AudioScheduler.Supports looping of brush animation and associated audio events.available performance states, used to determine performance preset and cuesBigWaveSynth shows how to load a WaveSynth into the pixel array of a MultiGen.Loads the color output of WaveSynth into a MultiGen and plays the WaveSynth's audio signal with a PASamplerInstrument.Demo of how to set and save WaveSynth parameters from JSON files.LoadAudioToImage shows how you can open audio files and transcode their image data to an image.LoadImageToAudio shows how to load an image and turn it into an audio file that can be played by clicking on the image.Demo of a PixelAudio core concept: how to map a 1D audio signal onto a 2D bitmap, using lookup tables (LUTs) to create a one-to-one correspondence between audio samples and RGB pixels.How to combine multiple PixelMapGens into a MultiGen with a single signal path.Extends the LookupTables example to show how LUTs function in a MultiGen.Interface for applications extending PApplets that use NetworkDelegate to send and receive UDP messages.Starter example with animation added.SimpleWaveSynth demonstrates the basics of setting up a WaveSynth as an animated visual display.Basics of setting up a PixelAudio sketch.TransformPImage demonstrates some of the commands available in the BitmapTransform class.Opens audio or image files and loads either file type to both the image display and the audio buffer.Pixel-shift animation, plus panning and pitch controls for the Sampler synth.Introduces drawing, curve modeling and brushstroke creation, with interactive triggering of audio events using the Sampler and Granular synthesis engines.A light-weight version of the
AudioBrushclass for combining gestures and audio synthesis.Defines the curve drawing model for a brush using PACurveMaker.A class to store a hit-test result, recording an AudioBrushLite instance and its index in brush list.Select audio synthesis modelSelect audio gesture sequence timing model.Select PACurveMaker gesture points model.Adds networking with UDP to the previous Drawing tutorial.A light-weight version of the AudioBrush class for combining gestures and audio synthesis.Defines the curve drawing model for a brush using PACurveMaker.A class to store a hit-test result, recording an AudioBrushLite instance and its index in brush list.Select audio synthesis modelSelect audio gesture sequence timing model.Select PACurveMaker gesture points model.Uses a GUI to provide a tour of curve drawing with an interface to the two audio synthesis engines available in PixelAudio: the Sampler synth and the Granular synth.Simple container for a brush hit-test result.Future Development: Barebones interface for "something that happens at a certain point", and then in AudioScheduler the time-when-something-happens gets connected to the-room-where-it-happens and the entire cast of Hamilton steps in.Eclipse-only example of how to retrofit WaveBuffer feature to Drawing tutorial.Changes the audio source model of TutorialOne_03_Drawing to support large files with windowed buffering.A light-weight version of theAudioBrushclass for combining gestures and audio synthesis.Defines the curve drawing model for a brush using PACurveMaker.A class to store a hit-test result, recording an AudioBrushLite instance and its index in brush list.Select audio synthesis modelSelect audio gesture sequence timing model.Select PACurveMaker gesture points model.Additive audio synthesis engine produces colorful animated patterns and electronic synth sounds.Example sketch shows how to create an audio synth sequencer with the WaveSynth.