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:
co-authored by
Claude Opus 5.5
parent
435305e42a
commit
64e21e0bcc
@@ -20,6 +20,7 @@ struct SlotEditor: View {
|
||||
|
||||
@StateObject private var model: DeviceModel
|
||||
@ObservedObject private var watch = MixSongWatch.shared
|
||||
@ObservedObject private var recorder = SampleRecorder.shared
|
||||
@State private var pad = 0
|
||||
/// What the file picker is for; kept after it closes, because SwiftUI resets
|
||||
/// the presentation binding before calling the completion handler.
|
||||
@@ -27,6 +28,7 @@ struct SlotEditor: View {
|
||||
@State private var pickerShown = false
|
||||
@State private var deviceCallback: ((URL) -> Void)?
|
||||
@State private var importError: String?
|
||||
@State private var showMidiLearn = false
|
||||
|
||||
enum ImportKind: Identifiable {
|
||||
case preset, padSample, soundFont, device // device: a bespoke view's own load (deviceFilePicker)
|
||||
@@ -71,6 +73,11 @@ struct SlotEditor: View {
|
||||
}
|
||||
.alert("Import failed", isPresented: Binding(get: { importError != nil }, set: { if !$0 { importError = nil } }),
|
||||
actions: { Button("OK") { importError = nil } }, message: { Text(importError ?? "") })
|
||||
.background(Color.clear.alert("Recording", isPresented: Binding(get: { recorder.error != nil }, set: { if !$0 { recorder.error = nil } }),
|
||||
actions: { Button("OK") { recorder.error = nil } }, message: { Text(recorder.error ?? "") }))
|
||||
.onDisappear { if recorder.isRecording { _ = recorder.stop() } }
|
||||
.onChange(of: watch.revision) { _ in model.refresh() } // MIDI CCs move parameters too
|
||||
.sheet(isPresented: $showMidiLearn) { MidiLearnSheet(slot: slot, type: type) }
|
||||
}
|
||||
|
||||
@ViewBuilder private var pinnedPart: some View {
|
||||
@@ -87,6 +94,9 @@ struct SlotEditor: View {
|
||||
HStack {
|
||||
Text(session.name(ofSlot: slot)).font(Theme.mono(15)).foregroundColor(Theme.accent).lineLimit(1)
|
||||
Spacer()
|
||||
Text("⇄ MIDI").font(Theme.mono(13)).foregroundColor(Theme.accent)
|
||||
.contentShape(Rectangle()).onTapGesture { showMidiLearn = true }
|
||||
.padding(.trailing, 14)
|
||||
Text("CLOSE ✕").font(Theme.mono(13)).foregroundColor(Theme.dim)
|
||||
.contentShape(Rectangle()).onTapGesture(perform: onClose)
|
||||
}
|
||||
@@ -104,6 +114,9 @@ struct SlotEditor: View {
|
||||
importing = .device
|
||||
pickerShown = true
|
||||
}
|
||||
.environment(\.deviceRecorder, DeviceRecordControl(isRecording: recorder.isRecording) {
|
||||
if recorder.isRecording { recorder.stopIntoGrain(slot: slot) } else { recorder.start() }
|
||||
})
|
||||
.frame(minHeight: 0, maxHeight: .infinity, alignment: .top).clipped()
|
||||
if type == "LFO" { LfoTargetPicker(lfo: slot) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user