Package net.paulhertz.pixelaudio.io
package net.paulhertz.pixelaudio.io
JSON-based persistence for PixelAudio data structures supported by file i/o classes.
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. These JSON i/o classes are in early development and may change in future releases.
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.Generated file names and relative link paths for an AudioBrush save set.Read AudioBrush library JSON format.Data loaded for one brush JSON file.Result of loading an AudioBrush library folder.Session manifest writer/reader for brush sets.Adapter that exposes brush data needed for writing a session.Factory that rebuilds brush objects while reading a session.Per-brush manifest record linking gesture and configuration files.Loaded session data with rebuilt brush objects and source records.Session-level metadata stored in an AudioBrush manifest.Read AudioBrush session data from JSON files.Data loaded for a single brush.Supported AudioBrush JSON file categories.Result of loading a gesture, configuration, or session file.JSON read/write support for GestureGranularConfig.Builder.Instrument family associated with a brush configuration.Optional metadata written with a brush configuration JSON file.Result of reading a brush configuration JSON file.JSON read/write support for PACurveMaker.Optional metadata written with a gesture JSON file.Result of reading a gesture JSON file.