Package net.paulhertz.pixelaudio.granular
package net.paulhertz.pixelaudio.granular
Granular synthesis classes for PixelAudio.
The modern granular synthesis engine follows the chain
PAGranularInstrumentDirector -> PAGranularInstrument ->
PAGranularSampler -> PAGranularVoice, with PASource
implementations providing sample data and grain behavior.
Example code makes exclusive use of PABurstGranularSource
as the most versatile PASource.
Modern granular synthesis engine
PAGranularInstrumentDirectorcoordinates gesture playback, scheduling, event parameters, and granular source creation.PAGranularInstrumentprovides the high-level instrument API for pan, gain, envelopes, looping, and scheduled starts.PAGranularSamplermanages granular voices, voice pooling, and sample-accurate scheduling.PAGranularVoicerenders individual granular voices with envelope, pan, gain, and optional looping.
Sources and audio data
PAFloatSourcedefines the minimal audio source abstraction used by granular voices.PASourceextends PAFloatSource with pitch-policy and buffer-access support.PABurstGranularSourceprovides windowed granular synthesis with normalization and powers the granular synthesis engine.
Gesture configuration and event data
GestureGranularConfigstores editable gesture, timing, and synthesis settings, with builder support.GestureGranularParamsprovides immutable granular playback parameters used by the engine.GestureEventParamsstores schedule-aligned sample indices and optional per-event pan, gain, and pitch data.
Utilities
WindowCachecaches generated window curves for granular playback.OverlapUtilcomputes block/span overlaps for sample-accurate audio processing.
-
ClassDescriptionImmutable, schedule-aligned per-event parameters for gesture playback where each event accepts a buffer sample index and optional pan, gain, and pitch modifiers.Class for storing core parameters for both granular and sample synthesis engine events, used extensively in PixelAudio examples.Immutable core parameters for gesture-driven granular playback.UI preset hint for timing.OverlapUtil Small helper for computing overlap between a span [spanStart, spanEnd) and a block [blockStart, blockStart+blockSize).Core class in the PAGranularInstrumentDirector granular synthesis processing chain, provides windowed granular synthesis with normalization.
Calling chain: PAGranularInstrumentDirector -> PAGranularInstrument -> PAGranularSampler -> PAGranularVoice,
with PABurstGranularSource handling the complexities of the granular synthesis sample by sample.PAFloatSource Minimal, library-agnostic "audio source" abstraction for PixelAudio voices.PAGranularInstrument High-level granular instrument wrapper.The top-level entry point for Granular Synthesis in the PixelAudio library, PAGranularInstrumentDirector acts as a facade toPAGranularInstrument, calling PAGranularInstrument.play(...) with aPABurstGranularSourceinstance as a PASource and all necessary gesture and timing data.PAGranularSampler UGen-based multi-voice granular sampler.PAGranularVoice A single granular "voice" driven by a PASource.PASource A PAFloatSource with an additional pitch policy hint.WindowCache Simple cache for windowFunction.generateCurve(length) results.