# Package net.paulhertz.pixelaudio

package net.paulhertz.pixelaudio
Package `net.paulhertz.pixelaudio` blends sounds and images by mapping between arrays of audio samples and arrays of pixel values. 1D Audio arrays are mapped onto 2D image arrays using space-filling curves and patterns. PixelAudio provides a template to design your own mappings, and methods to translate values between audio and pixel data. Examples provide hooks for animation, audio/image synthesis, and hooks for UDP communication with Cycling74's Max application and other audio and video programming environments.

In many respects, PixelAudio behaves like an audio visualization widget, with one important difference: images can become sound as easily as sound becomes images. It can be treated as a basic image synthesis application, using audio signals to generate images, or as a somewhat noisy audio synthesis application, generating sound from images.

- `PixelAudio` provides the Processing library interface for the PixelAudio library.
- `PixelMapGen` is an abstract class for handling coordinates and LUT generation for PixelAudioMapper.
- `DiagonalZigzagGen` is a PixelMapGen child class for generating diagonal zigzag paths over an image.
- `HilbertGen` is a PixelMapGen child class for generating Hilbert curves over an image.
- `MooreGen` is a PixelMapGen child class for generating Moore curves over an image.
- `BoustropheGen` is a PixelMapGen child class for generating boustrophedon paths over an image.
- `BuildFromPathGen` is a PixelMapGen child class for generating from path coordinates stored in a JSON or similar data file.
- `MultiGen` is a PixelMapGen child class for generating a single path over multiple PixelMapGens arranged in a grid.
- `PixelAudioMapper` maps between 1D "signal" arrays of audio samples formatted as floating point values in the range [-1, 1] and 2D "image" arrays formatted as RGBA integer pixel data. It is initialized with a PixelMapGen.
- `AffineTransformType` is an enum for labeling basic affine transforms for reflection and 90-degree rotation.
- `BitmapTransform` provides static methods for rotating and reflecting 2D integer arrays using index remapping
- `WaveSynth` implements a combination of color organ and additive audio wave generation for animation and audio synthesis.
- `WaveData` provides storage and utility methods for WaveSynth "operators", which are audio signal generators.
- `WaveSynthBuilder` provides utilities for generating WaveSynth "instruments" and working with WaveSynth data.
- `Argosy` provides tools for shifting pixel patterns along the signal path of an image.
- `Lindenmayer` implements a basic L-system for generating patterns for Argosy objects.
- `ScaledSimplex` provides a wrapper for generating simple noise using Open Simplex.
- `OpenSimplex2` is an open source implementation of simplex noise.
- `RandomContinousGen` is a PixelMapGen child class and a work-in-progress. It will provide random paths over an image.
- `AudioColorTranscoder` is an experimental class for extending PixelAudioMapper.ChannelNames functionality.

- Related Packages
  Package
  Description
  net.paulhertz.pixelaudio.curves
  Package `net.paulhertz.pixelaudio.curves` implements light weight classes for Bezier curve modeling.
  net.paulhertz.pixelaudio.voices
  Package `net.paulhertz.pixelaudio.voices` provides a hierarchy of Java classes for implementing digital audio sampling synthesis with support from the Minim library for Processing.
- Class
  Description
  AffineTransformType
  Standard orientation ("NADA") for PixelMapGen puts the start point at (0,0).
  Argosy
  AudioColorTranscoder
  Experimental helper class for PixelAudioMapper and other classes or methods that transcode audio and color values.
  BitmapTransform
  Provides static methods for rotating and reflecting 2D integer arrays using index remapping.
  BoustropheGen
  BoustropheGen generates a signal path that starts at (0,0) and reads left-to-right to (width-1, 0).
  BuildFromPathGen
  A PixelMapGen that loads data from an external pixelMap, such as might be saved in a JSON file.
  DiagonalZigzagGen
  HilbertGen
  Generates coordinates and LUTs for a Hilbert curve over a square bitmap starting at (0,0) and ending at (width-1, 0).
  Lindenmayer
  Implements a simple Lindenmeyer system (L-system), a so-called DOL-system: deterministic and context-free.
  MooreGen
  Generates a Moore curve over a square bitmap starting at (width/2 - 1, 0) and ending at (width/2, 0).
  MultiGen
  A PixelMapGen child class that combines multiple PixelMapGen instances with a single signal path.
  OpenSimplex2
  K.jpg's OpenSimplex 2, faster variant from https://github.com/KdotJPG/OpenSimplex2
  PixelAudio
  PixelAudioMapper
  As of pre-release version 0.9.2-beta, PixelAudioMapper is substantially complete, though there are a number of features that have not been tested or demonstrated with code examples.
  PixelAudioMapper.ChannelNames
  List of available color channels, "L" for lightness, since "B" for brightness is taken.
  PixelAudioMapper.ChannelNames.ChannelExtractor
  PixelMapGen
  Abstract class for handling coordinates and LUT generation for PixelAudioMapper.
  RandomContinousGen
  Deprecated.
  ScaledSimplex
  A wrapper for OpenSimplex2, adapted from Christian Maher's code at https://cmaher.github.io/posts/working-with-simplex-noise/
  WaveData
  Data storage for WaveSynth operator data.
  WaveData.WaveState
  WaveSynth
  Implements a combination of color organ and additive audio synth.
  WaveSynthBuilder
  Utilities for generating WaveSynth "instruments" and working with WaveSynth data.