Package net.paulhertz.pixelaudio.io
package net.paulhertz.pixelaudio.io
Package
net.paulhertz.pixelaudio.io provides JSON-based persistence for PixelAudio data structures.
Overview
This package implements serialization and deserialization of core PixelAudio objects to JSON format, enabling saving and loading of gestures, granular synthesis configurations, and complete audio brush sessions. The format is designed for the Bagatelle example sketch and supports the AudioBrush session paradigm.
PACurveMakerIOprovides JSON read/write support for PACurveMaker gesture data with optional metadata (id, name, description, notes, style, and linked config path).GestureGranularConfigIOprovides JSON read/write support for GestureGranularConfig.Builder with full parameter serialization including timing, hopping, warping, grain, and ADSR parameters.AudioBrushSessionIOimplements a session manifest writer/reader for brush sets using generic adapter/factory patterns, enabling flexible brush collection management with support for multiple instrument types and linked gesture/config files.AudioBrushSessionLoaderreads AudioBrush session data from JSON files, with automatic file type detection (gesture, config, or session) and support for loading single files or complete sessions with linked resources.AudioBrushLibraryLoaderreads AudioBrush library JSON format and loads directories of gesture/config files into a collection of brush objects with error tracking.AudioBrushFileNamergenerates JSON filenames for AudioBrush "session" format with gesture and audio synth settings, supporting normalized base names and linked file references.
JSON Format Conventions
Each JSON file includes a header with format identifier, version, and type. Files follow these naming patterns:
gesture_001_gesture.json- gesture data (PACurveMaker)gesture_001_config.json- configuration data (GestureGranularConfig.Builder)rehearsalSet_session.json- session manifest with brush collection
-
ClassDescriptionGenerate JSON filenames for AudioBrush "session" format, with gesture and audio synth settings.Read AudioBrush library JSON format.Session manifest writer/reader for brush sets.Read AudioBrush session data form JSON files.JSON read/write support for GestureGranularConfig.Builder.JSON read/write support for PACurveMaker.