Package net.paulhertz.pixelaudio
PixelAudio blends sounds and images by mapping one-dimensional signal arrays, typically audio samples, onto two-dimensional image arrays using space-filling curves and related traversal patterns. The same mapping can be used in both directions: sound can be visualized as image data, and image data can be interpreted as sound.
The top-level package contains the mapping framework, built-in path generators, bitmap transform utilities, image/audio transcoding tools, and WaveSynth additive synthesis classes. Gesture, sampler, granular, scheduling, I/O, and example code are documented in their own subpackages.
You can read a scholarly introduction to PixelAudio, complete with a brief review of its historical context in intermedia art, here: PixelAudio: A Toolkit for Intermedia Composition}.
Library interface and mapping framework
PixelAudioprovides the Processing library interface.PixelAudioMappermaps between 1D signal arrays and 2D image pixel arrays.PixelMapGenis the abstract base class for signal-path generators.
Signal-path generators
HilbertGengenerates Hilbert curve paths.MooreGengenerates Moore curve paths.BoustropheGengenerates boustrophedon paths.DiagonalZigzagGengenerates diagonal zigzag paths.MultiGencombines multiple PixelMapGens into a single path.BuildFromPathGenbuilds paths from stored coordinate data.RandomContinousGenis an experimental random-path generator that never worked. Deprecated.
Image transforms, animation, and transcoding
AffineTransformTypelabels reflection and rotation transforms.BitmapTransformprovides bitmap rotation and reflection utilities.Argosyshifts pixel patterns along an image's signal path.Lindenmayerprovides simple L-system support for Argosy patterns.AudioColorTranscoderprovides experimental audio/color transcoding support.
WaveSynth and signal utilities
WaveSynthcombines additive audio synthesis with color-pattern generation.WaveDatastores WaveSynth operator data.WaveSynthBuilderprovides utilities for building WaveSynth instruments and data sets.WindowedBufferprovides a moving window over larger audio buffers.
Noise utilities
ScaledSimplexwraps OpenSimplex noise with scaling helpers.OpenSimplex2implements OpenSimplex noise.
-
ClassDescriptionThe AffineTransformType enum defines the types of affine transformations that can be applied to bitmaps in the PixelAudio library using only rotation and reflection.Experimental helper class for PixelAudioMapper and other classes or methods that transcode audio and color values.Provides static methods for rotating and reflecting 2D integer arrays using index remapping.BoustropheGen generates a signal path that starts at (0,0) and reads left-to-right to (width-1, 0).A PixelMapGen that loads data from an external
PixelMapGen.pixelMap, such as might be saved in a JSON file.Generates a PixelMapGen with a zigzag diagonal signal path.Generates coordinates and LUTs for a Hilbert curve over a square bitmap starting at (0,0) and ending at (width-1, 0).Implements a simple Lindenmeyer system (L-system), a so-called DOL-system: deterministic and context-free.Generates a Moore curve over a square bitmap starting at (width/2 - 1, 0) and ending at (width/2, 0).A PixelMapGen child class that combines multiple PixelMapGen instances with a single signal path.K.jpg's OpenSimplex 2, faster variant from https://github.com/KdotJPG/OpenSimplex2PixelAudio library for Processing.PixelAudioMapper is designed to handle one-to-one mappings between 1D "signal" arrays formatted as floating point values in the range [-1.0, 1.0] and 2D "image" arrays formatted as RGBA integer pixel data.List of available color channels, "L" for lightness, since "B" for brightness is taken.Abstract class for handling coordinates and LUT generation for PixelAudioMapper.Deprecated.A wrapper for OpenSimplex2, adapted from Christian Maher's code at https://cmaher.github.io/posts/working-with-simplex-noise/Provides data storage for WaveSynth operators and performs optimized updating of output.enumeration of wave states: muted, solo, etc.Implements a combination of color organ and additive audio synth.Utilities for generating WaveSynth "instruments" and working with WaveSynth data.A windowed buffer class to permit loading large audio sources into memory and stepping through them.