# Package net.paulhertz.pixelaudio.voices

package 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.

- `PlaybackInfo` maintains information about audio playback events, which it generates in response to play() and playSample() methods.
- `ADSRUtils` provides utilities for working with envelopes in ADSRParams format.
- `ADSRParams` provides a wrapper for parameters in Minim's ADSR class. Use it to create envelopes.
- `SimpleADSR` provides an executable ADSR envelope for PASamplerVoice.
- `TimedLocation` handles event scheduling.
- `PAPlayable` is the root interface for things that can play or render audio.
- `PASampler` provides an interface for fundamental sampler methods, including play() and setBuffer().
- `PASamplerPlayable` extends PAPlayable for sample-based playback (with parameters like pitch, gain, and envelopes).
- `PASamplerVoice` handles individual note playback (one per simultaneous note). It's a custom Minim UGen which you don't need to instantiate directly.
- `PASharedBufferSampler` mediates between PASamplerInstrument and PASamplerVoice. Instantiation is controlled through PASamplerInstrument.
- `PASamplerInstrument` manages a set of voices for polyphony and envelopes. Instantiate this in your code for basic audio sampler synthesis.
- `PASamplerInstrumentPool` manages a collection of PASamplerInstruments, supporting reuse and multi-sample configurations. Think of it as a section of instruments.
- `PASamplerInstrumentPoolMulti` manages a collection of PASamplerInstrumentPools: Think of it as the orchestra.

- Related Packages
  Package
  Description
  net.paulhertz.pixelaudio
  Package `net.paulhertz.pixelaudio` blends sounds and images by mapping between arrays of audio samples and arrays of pixel values.
  net.paulhertz.pixelaudio.curves
  Package `net.paulhertz.pixelaudio.curves` implements light weight classes for Bezier curve modeling.
- Class
  Description
  ADSRParams
  Value object for Minim ADSR parameters.
  ADSRUtils
  Utility functions for ADSRParams.
  PAPlayable
  Generic interface for anything that can be "played." Provides a minimal playback API plus backward-compatible overloads for sampler instruments and other PAPlayable classes.
  PASampler
  Backend engine contract for sampler implementations.
  PASamplerInstrument
  PASamplerInstrument Represents a playable instrument that uses a PASampler instantiated as a PASharedBufferSampler to trigger audio playback from a shared buffer that is (currently) a Minim MultiChannelBuffer.
  PASamplerInstrumentPool
  PASamplerInstrumentPool Manages a group of PASamplerInstruments sharing the same source buffer and audio output.
  PASamplerInstrumentPoolMulti
  PASamplerInstrumentPoolMulti Manages multiple PASamplerInstrumentPool instances, each keyed by name.
  PASamplerPlayable
  Specialized playable interface for sample-based instruments.
  PASamplerVoice
  PASamplerVoice — a single playback "voice" reading from a shared mono buffer.
  PASharedBufferSampler
  UGen-based sampler that plays multiple PASamplerVoice instances from a single shared mono buffer (channel 0 of a MultiChannelBuffer) which is an array of floating point samples over (-1.0..1.0).
  PlaybackInfo
  Holds information about a triggered playback event.
  SimpleADSR
  SimpleADSR — software envelope generator with optional exponential curves.
  SimpleADSR.Stage
  TimedLocation
  Used to schedule or track events that take place at specific coordinate locations.