Package net.paulhertz.pixelaudio.schedule
package net.paulhertz.pixelaudio.schedule
Sample-accurate event scheduling, gesture-based time management, and audio utility functions.
Core Scheduling
The AudioScheduler is a generic event scheduler supporting both point events (one-shot at a sample time) and span events (active over an interval). It provides sample-accurate callback delivery with thread-safe enqueuing and block-based processing on the audio thread.
AudioSchedulerprovides a sample-accurate scheduler for one-shot point events and duration-based span events, with support for late event policies, block-wise processing, and thread-safe scheduling.
Gesture and Time Management
GestureScheduleis a data container for a PAGesture with immutable points, times in milliseconds, and optional start time, serving as the base structure for gesture-driven playback.GestureScheduleBuilderbuilds schedules for classes that implement PAGesture or use PAGesture implementers, supporting resampling, duration scaling, time warping, and hop mode conversion for flexible gesture playback control.TimedLocationis used to schedule or track events that take place at specific coordinate locations, with support for duration and staleness tracking.GesturePerformer(deprecated) is a placeholder interface for future gesture performance abstractions.
Audio Utilities
AudioUtility provides a comprehensive collection of audio processing functions including time/frequency conversions, gain/decibel conversions, signal level computation, normalization, resampling, and file I/O operations.
AudioUtilityprovides utility conversions for audio including:- Time conversions: milliseconds ↔ samples, seconds ↔ samples
- Gain conversions: dB ↔ linear amplitude
- Pitch/frequency: semitones ↔ frequency ratio, MIDI key number ↔ frequency
- Signal analysis: peak, RMS, and normalization (by peak, by RMS, or with ceiling)
- Resampling: mono and multi-channel buffer resampling with linear interpolation
- File I/O: save audio to 16-bit or 32-bit PCM WAV format (mono or stereo)
-
ClassDescriptionA sample-accurate scheduler for things that should occur at specific times in an audio stream.Policy for point events whose sampleTime is already in the past when processed.A one-shot event that occurs at an absolute sample index.Handler for point events delivered during block processing.A duration event active on [startSample, endSample) where endSample is exclusive.Handler for span events delivered during block processing.Utility conversions for audio.Strategies for adjusting signal level.Deprecated.Data container for a
PAGesturewith immutable points and times and an optional start time (in milliseconds).Build schedules for classes that implement PAGesture or use PAGesture implementers, for example to build, interpolate, and warp time and point lists.Used to schedule or track events that take place at specific coordinate locations.