Package net.paulhertz.pixelaudio.sampler


package net.paulhertz.pixelaudio.sampler
Digital audio sampling synthesis classes for PixelAudio, built on the Minim library for Processing.

The package provides shared-buffer sample playback, polyphonic sampler instruments, ADSR envelope support, pitch and playback utilities, and event objects used by gesture-driven sampler workflows.

Sampler instruments and playback

Interfaces and playback support

  • PAPlayable is the root interface for playable or renderable audio objects.
  • PASampler defines fundamental sampler methods, including play and buffer access.
  • PASamplerPlayable extends PAPlayable for sample-based playback with gain, pitch, pan, and envelope parameters.
  • PlaybackInfo stores information about sampler playback events.
  • PitchPolicy defines pitch behavior for sample playback.
  • SamplerBrushEvent stores gesture-derived sampler event data such as location, timing, sample position, gain, pitch, pan, and envelope.

Envelope utilities

  • ADSRParams wraps parameters for ADSR envelopes.
  • ADSRUtils provides utility methods for ADSRParams.
  • SimpleADSR provides an executable ADSR envelope for sampler voices.
  • Class
    Description
    Value object for Minim ADSR parameters.
    Utility functions for ADSRParams.
    Generic interface for anything that can be "played." Provides a minimal playback API plus backward-compatible overloads for sampler instruments and other PAPlayable classes.
    Backend engine contract for sampler implementations.
    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 Manages a group of PASamplerInstruments sharing the same source buffer and audio output.
    PASamplerInstrumentPoolMulti Manages multiple PASamplerInstrumentPool instances, each keyed by name.
    Specialized playable interface for sample-based instruments.
    PASamplerVoice — a single playback "voice" reading from a shared mono buffer.
    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).
     
    PitchPolicy determines how PASamplerInstrument / PASamplerVoice should interpret their pitch parameter in combination with a given PASource.
    Holds information about a triggered playback event.
    Stores values used for SamplerBrush event staging, used in tutorial examples such as TutorialOne_03_Drawing.
    SimpleADSR — software envelope generator with optional exponential curves.