Package net.paulhertz.pixelaudio.granular
package net.paulhertz.pixelaudio.granular
Granular synthesis classes for PixelAudio.
PixelAudio's granular synthesis engine follows the chain
PAGranularInstrumentDirector -> PAGranularInstrument ->
PAGranularSampler -> PAGranularVoice -> PASource. Example code makes
exclusive use of PABurstGranularSource as the primary granular PASource.
Granular synthesis processing chain
PAGranularInstrumentDirectorreceives a mono source buffer, gesture schedule, runtime synthesis parameters, and per-event parameters. It prepares event timing, resolves defaults, creates onePABurstGranularSourceper gesture event, and schedules each source at an absolute sample time.PAGranularInstrumentapplies instrument-level gain, pan, and envelope defaults, then forwards immediate or scheduled playback requests to the sampler.PAGranularSamplerowns the voice pool and sample-accurate scheduler. It starts voices immediately or when scheduled sample times arrive.PAGranularVoiceapplies the macro envelope, voice gain, pan, and lifecycle state while asking itsPASourceto render audio blocks.PABurstGranularSourcerenders the actual burst grains sample by sample, including source-buffer lookup, pitch-ratio playback, windowing, and overlap-add normalization.
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.A builder for creating instances of GestureEventParams.End-user configuration for gesture-driven granular and sampler playback.Mutable builder for
GestureGranularConfig.Selects whether event timing follows the gesture or a fixed sample hop.Selects which points from a gesture path are used to create a playback schedule.Describes the primary timing transform selected in a user interface or preset.Selects the curve used to warp event timing along the gesture.Immutable runtime parameters for gesture-driven granular playback.Builder for immutableGestureGranularParamsinstances.Selects whether event timing follows the transformed gesture schedule or fixed sample hops.Describes the primary timing transform selected by a configuration or user interface.Shape used to remap normalized gesture time.Utility methods for converting absolute sample spans to block-local overlap ranges.Block-local overlap range returned byOverlapUtil.computeBlockSlice(long, int, long, long).Windowed granular source that renders one scheduled burst of grains.Minimal, library-agnostic audio source abstraction for PixelAudio voices.High-level granular instrument wrapper forPASourceplayback.Top-level director for gesture-driven granular synthesis in PixelAudio.UGen-based multi-voice sampler for granularPASourceplayback.Single voice for rendering one granularPASource.PixelAudio audio source interface used by the granular playback engine.Thread-safe cache for generated Minim window curves.