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
@@ -63,9 +63,11 @@ final class TrackerState: ObservableObject {
|
||||
|
||||
// MARK: edits (Android: punchNote / noteOffFocused / deleteAndAdvance / …)
|
||||
|
||||
func punchNote(_ app: AppModel, _ midi: Int) {
|
||||
let cell = SizzleCell(note: Int32(min(max(midi, 0), 127)), velocity: Int32(min(max(app.kbdVelocity, 0), 127)),
|
||||
channel: Int32(app.kbdChannel))
|
||||
/// Velocity and channel default to the on-screen keyboard's; MIDI punch-in
|
||||
/// passes the incoming note's own, so the cell plays back as it was played.
|
||||
func punchNote(_ app: AppModel, _ midi: Int, velocity: Int? = nil, channel: Int? = nil) {
|
||||
let cell = SizzleCell(note: Int32(min(max(midi, 0), 127)), velocity: Int32(min(max(velocity ?? app.kbdVelocity, 0), 127)),
|
||||
channel: Int32(channel ?? app.kbdChannel))
|
||||
session.setCell(cell, inPattern: session.activePattern, track: app.cursorTrack, line: app.cursorLine)
|
||||
moveCursorWrap(app, skipStep)
|
||||
}
|
||||
@@ -254,6 +256,14 @@ final class TrackerHeldNotes: ObservableObject {
|
||||
SizzleSession.shared.noteOff(midi, midiChannel: channels[midi] ?? app.kbdChannel)
|
||||
}
|
||||
|
||||
/// Light or unlight a key without sounding it (hardware keys, MIDI in: the
|
||||
/// input layer plays those itself).
|
||||
func mark(_ midi: Int, on: Bool) {
|
||||
if on { counts[midi, default: 0] += 1; return }
|
||||
let n = (counts[midi] ?? 0) - 1
|
||||
if n <= 0 { counts[midi] = nil } else { counts[midi] = n }
|
||||
}
|
||||
|
||||
/// Release everything (the keyboard went away mid-press).
|
||||
func releaseAll() {
|
||||
for (midi, ch) in channels where (counts[midi] ?? 0) > 0 { SizzleSession.shared.noteOff(midi, midiChannel: ch) }
|
||||
|
||||
Reference in New Issue
Block a user