iOS 0.5.0: hand-built editors (Tape Delay, Tape Engine, Mix Tightener, Granular scope, Wavetable tables, Grain Cloud source)
Effect visualisation through the C++ effect, engine and AU; custom wavetables and grain sources load and persist with the song; the app's slot editor hosts the file picker for bespoke views. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
3b035d6a7d
commit
435305e42a
@@ -0,0 +1,18 @@
|
||||
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import Foundation
|
||||
|
||||
/// The live effect scope of a song slot (the Granular Glitch's), straight from the
|
||||
/// engine's channel chains: nil until the slot sits on a mixer channel's FX.
|
||||
extension SlotDataSource {
|
||||
func effectScope(capacity: Int) -> (samples: [Float], playhead: Float)? {
|
||||
guard capacity > 0 else { return nil }
|
||||
var buf = [Float](repeating: 0, count: capacity)
|
||||
let n = buf.withUnsafeMutableBufferPointer { p in
|
||||
session.copyEffectScope(ofSlot: slot, into: p.baseAddress!, capacity: p.count)
|
||||
}
|
||||
guard n >= 0 else { return nil }
|
||||
return (Array(buf.prefix(n)), session.effectPlayhead(ofSlot: slot))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user