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
@@ -14,7 +14,8 @@ protocol SampleLengthSource: AnyObject {
/// The Grain Cloud's source strip (Android's GrainCloudEditor.kt): load a WAV (or
/// SF2/XI) as the cloud's own source, and see the source with its START..END region
/// lit. The settings themselves are the card pages below it. (RECORD isn't ported.)
/// lit. The settings themselves are the card pages below it. RECORD (the app only)
/// makes a microphone take the source.
@MainActor
enum GrainCloudBespoke {
static func header(_ model: DeviceModel) -> AnyView? { AnyView(GrainSourceStrip(model: model)) }
@@ -39,6 +40,7 @@ struct GrainSourceStrip: View {
@ObservedObject var model: DeviceModel
@State private var pickerShown = false
@Environment(\.deviceFilePicker) private var hostPicker
@Environment(\.deviceRecorder) private var recorder
@State private var importError: String?
/// Bumped while a built-in source is still being rendered, to look again.
@State private var retry = 0
@@ -63,6 +65,15 @@ struct GrainSourceStrip: View {
.overlay(Rectangle().stroke(Theme.accent.opacity(0.6), lineWidth: 1))
.contentShape(Rectangle())
.onTapGesture { if let pick = hostPicker { pick { url in load(url) } } else { pickerShown = true } }
if let rec = recorder {
Text(rec.isRecording ? "■ STOP REC" : "● RECORD").font(Theme.mono(12))
.foregroundColor(rec.isRecording ? Theme.background : Theme.accent)
.padding(.horizontal, 10).padding(.vertical, 6)
.background(rec.isRecording ? Theme.accent : Theme.surface)
.overlay(Rectangle().stroke(Theme.accent.opacity(0.6), lineWidth: 1))
.contentShape(Rectangle())
.onTapGesture(perform: rec.toggle)
}
Spacer(minLength: 0)
}
Text(caption).font(Theme.mono(10)).foregroundColor(Theme.dim)