# Package net.paulhertz.pixelaudio.curves

package net.paulhertz.pixelaudio.curves
Gesture, path, and Bézier curve modeling classes for PixelAudio.

This package supports timed gesture capture, point reduction, Bézier path construction, brush shapes, hit testing, curve drawing, and gesture-derived event paths for audio and visual applications.

Core gesture and brush classes

- `PACurveMaker` records timed gestures and derives reduced points, Bézier paths, brush shapes, polygons, and event points.
- `PAGesture` defines the basic interface for gesture point and timing data.
- `AudioBrush` combines a gesture curve with audio synthesis parameters.
- `GranularBrush` and `SamplerBrush` specialize AudioBrush for gesture playback with granular and sampler audio synthesis.

Path and curve geometry

- `PABezShape` stores and draws composite Bézier paths, including transforms and hit-test polygons.
- `PABezVertex` and `PALineVertex` represent curved and straight path segments.
- `PAVertex2DINF` defines shared behavior for 2D path vertices.
- `PACurveUtility` provides static geometry, reduction, and drawing utilities.

Gesture mapping, transforms, and parameter curves

- `GestureTransformState` stores geometric transform state for gesture and curve modeling.
- `PABoundsPolicy` applies boundary rules to gesture points and schedules.
- `PAControlCurve` and `PAKeyframeControlCurve` model control values over normalized time.

Experimental

- `PAGestureParametric`, `PAIndexParametric`, and `PAPathParametric` provide parametric sampling over gestures, indices, and paths.
- `PAGestureWriter` supports output or serialization of curves implemented by `BezShape`.

Curve-modeling adapted from the IgnoCodeLib Processing library for use with PixelAudio.

- Related Packages
  Package
  Description
  net.paulhertz.pixelaudio
  Core classes for PixelAudio, a Processing library that maps between sound and image data.
  net.paulhertz.pixelaudio.example
  Package `net.paulhertz.pixelaudio.example` provides example Processing sketches and demonstrations of PixelAudio library functionality.
  net.paulhertz.pixelaudio.granular
  Granular synthesis classes for PixelAudio.
  net.paulhertz.pixelaudio.io
  Package `net.paulhertz.pixelaudio.io` provides JSON-based persistence for PixelAudio data structures.
  net.paulhertz.pixelaudio.sampler
  Digital audio sampling synthesis classes for PixelAudio, built on the Minim library for Processing.
  net.paulhertz.pixelaudio.schedule
  Package `net.paulhertz.pixelaudio.schedule` provides sample-accurate event scheduling, gesture-based time management, and audio utility functions for the PixelAudio library.
- Class
  Description
  AudioBrush
  Abstract class for combining gesture data from PACurveMaker with audio synthesis parameters from GestureGranularConfig.Builder.
  GestureTransformState
  Stores optional affine-transform state for a gesture/curve.
  GranularBrush
  AudioBrush subclass for PAGranularInstrument.
  PABezShape
  Class to store a path composed of lines and Bezier curves, along with fill, stroke, weight and opacity values.
  PABezVertex
  Provides storage for a cubic Bezier curves's control points and anchor point.
  PABoundsPolicy
  Boundary policy for mapping gesture points into a rectangular domain.
  PABoundsPolicy.PABoundaryMode
  Provides descriptors for PABoundsPolicy: CLIP, WRAP, REFLECT, SKIP_TIME, KEEP_TIME.
  PAControlCurve
  Minimal interface for interpolated curves.
  PACurveMaker
  PACurveMaker is a utility and storage class for gestures and curve modeling, with point reduction and drawing to on-screen PApplets or off-screen PGraphics.
  PACurveMaker.PointsMutator
  Simple Processing-friendly callback interface.
  PACurveUtility
  A class to maintain static versions of point reduction and curve-modeling methods.
  PAGesture
  PAGesture provides a definitional interface for "gestures": 1) a list of points and 2) a list of time offsets where 3) both lists have the same cardinality and 4) time offsets are monotonically non-dereasing.
  PAGestureParametric
  Treats a gesture defined by (time, x, y) samples as a parametric curve.
  PAGestureParametric.Sample
  Data storage class for PAGestureParametric.
  PAGestureWriter
  Reduced set of Adobe Illustrator 3.0 (ancient but still useful) path operators for recording curves.
  PAIndexParametric
  PAIndexParametric Parametric view of an indexed offset list, typically into a float[] buffer (for example, an audio signal or lookup table).
  PAKeyframeControlCurve
  Models piecewise-linear scalar control curve defined by keyframes.
  PALineVertex
  Stores a line vertex consisting of a single point.
  PAPathParametric
  PAPathParametric Parametric view of a polyline path (e.g., polygonized Bezier).
  PAVertex2DINF
  Interface for line and curve vertices.
  SamplerBrush
  AudioBrush subclass for PASamplerInstrument.