iOS 0.6.0: milestone 5 (recording, MIDI, input bindings, themes, bundles, backups)

- Master recording (MasterSink ring + writer thread) and the sample recorder
- CoreMIDI in/out: sound module, clock send/follow, virtual "Sizzle" ports;
  platform-free parser/module/clock in core (midi_test)
- Hardware keyboard and gamepads via GameController; rebindable keyboard,
  gamepad and MIDI CC actions; per-parameter MIDI learn
- Colour themes (.szt), project bundles (.szgz), backup & restore;
  ZIP in core with zlib (zip_test against jar and unzip)
- Persistent app settings; audio pauses in the background unless sound module

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Reactorcoremeltdown
2026-11-16 14:26:01 +01:00
co-authored by Claude Opus 5.5
parent 435305e42a
commit 64e21e0bcc
54 changed files with 3303 additions and 97 deletions
+33
View File
@@ -113,6 +113,39 @@ AUv3s is the per-plugin process round trip, which the in-app host avoids.
values with `,` or `=` break a [TOOLBOX] line. `Params` caps keys at 23 bytes,
values at 31 and slots at 96 keys, so a long sample path would be cut short.
- 2026-11-16, 0.6.0 (milestone 5): recording, MIDI, input bindings, themes,
bundles, backups, settings. Decisions:
- Master recording: `SizzleSession+Record` implements the engine's `MasterSink`
(MasterRecorder.kt: SPSC float ring, a writer thread, header patched at the
end). Takes go to Documents/Recordings (no folder picker on iOS; Documents is
visible in Files). Sample recording uses AVAudioRecorder; the audio session
is play-and-record only while recording, and the engine restarts itself on
the configuration change that causes.
- MIDI: `core/include/sizzle/Midi.hpp` holds the platform-free parts
(MidiByteParser, MidiSoundModule, the clock follower; `midi_test`).
`SizzleMidi` is the CoreMIDI side. Notes from the MIDI threads go through a
second note queue to the audio thread (pushes serialised by the module's
lock), never through the main thread. The send thread reads the engine's
`isPlaying` / `pollMidiOut` and the tempo without the song lock. Source keys
are manufacturer|model|name (CoreMIDI's unique id is used only within a run).
- Input: InputAction / InputRouter / InputBindings / InputController port
Android's input package; HardwareInput uses GameController's GCKeyboard and
GCController, so no responder-chain plumbing is needed (keys are ignored
while a text field has focus). Keyboard codes are HID usages, so binding
maps don't carry over from Android (they never could: Android key codes).
- Themes: `Theme` reads a `Palette`; the app rebuilds its view tree when the
theme changes. The plugins always draw the default theme.
- ZIP: `core/src/io/Zip` (zlib): reads through the central directory (so
java.util.zip's data descriptors are fine), writes sizes in local headers
(so ZipInputStream reads ours); `zip-test` checks both against `jar` and
`unzip`. Bundles keep the Android layout and store samples under their
original ids. Backups hold songs/themes/presets/samples, autosave.szg and
settings.txt (AppSettings' key=value text); restore unpacks aside first,
then swaps the folders in and applies everything at once (no restart).
- Not done: App Group file access for the plugins; per-device output choice
(iOS routes audio; Setup shows the route and the system picker); MIDI 2.0 /
MIDIEventList.
Notes for the engine port (from the voice ports):
- Kotlin seeds every new FrasilVoice and GrainCloud from global counters, and every
SynthVoice builds a FrasilVoice. The C++ engine owns one `frasil::FrasilSeeds`,