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:
Reactorcoremeltdown
2026-11-16 10:01:14 +01:00
co-authored by Claude Opus 5.5
parent 3b035d6a7d
commit 435305e42a
34 changed files with 1514 additions and 38 deletions
+13
View File
@@ -19,6 +19,19 @@ public:
virtual void update(const Params &p, float tempoBpm) = 0;
virtual float process(float x) = 0;
// ---- visualisation (Kotlin's VizEffect), optional
// The audio thread publishes a small snapshot while it runs process(); the UI
// reads it at frame rate from another thread, without locks (relaxed atomics: a
// value one frame stale is harmless). Publishing must never change the audio.
/** True if this effect publishes a scope and playhead (a VizEffect). */
virtual bool hasScope() const { return false; }
/** Copy up to [capacity] of the latest scope samples, oldest to newest, into
* [out]; returns the count written, or -1 if the effect has no scope. */
virtual int copyScope(float *out, int capacity) const { (void)out; (void)capacity; return -1; }
/** The read/play head within the scope window, 0 (oldest) to 1 (newest), or -1. */
virtual float playhead() const { return -1.f; }
/** The effect for ToolboxType name [type] ("DELAY", "FILTER", …), or nullptr
* for types without an audio processor (the MIDI effects) or not ported yet. */
static std::unique_ptr<Effect> create(const char *type, int sampleRate);
+5 -1
View File
@@ -115,7 +115,11 @@ public:
// ---- mixer meters (any thread, display only)
float channelMeter(int ch) const;
bool channelClipped(int ch) const;
/** Effect visualisation isn't ported: always -1 (nothing to draw). */
/** Effect visualisation (AudioEngine.effectScope / effectPlayhead), any thread:
* toolbox [slotIndex]'s live scope (oldest → newest, up to [capacity] samples)
* and read head (0..1) from the first channel chain that runs it, or -1 when it
* isn't a scope effect placed on a mixer channel (nothing to draw). Lock-free;
* chains swapped out meanwhile are kept alive until the read is done. */
int effectScope(int slotIndex, float *out, int capacity) const;
float effectPlayhead(int slotIndex) const;