Skip to content

Shaper tool with unified audio graph and custom SVF filter

jedmund requested to merge jedmund/almaty-v3 into main

Created by: jedmund

Summary

  • Unified SynthPlayground audio graph replacing two mutually exclusive paths with a single chain: oscillators -> SVF filter (bypassable) -> envelope (bypassable) -> output
  • Custom TPT state-variable filter (Zavalishin topology) providing LP/HP/BP/Notch with consistent resonance across all types, implemented as a pure Swift AUAudioUnit
  • New ShaperContainer component with three-stage signal flow (OSC -> FILTER -> AMP), animated chevron strip, hold-to-play trigger, and stage-specific controls
  • XY pad for cutoff/resonance, filter type segmented control with rendered curve icons, ADSR graph with 4 draggable control points
  • Stages toggle filter/envelope bypass so audio only passes through the chain as far as the selected tab
  • State persists across tab switches (internal stage management, no view recreation)
  • Grid reordered: Keyboard, Oscillator, Shaper as first three entries
  • ADSR graph redesigned with proportional segment widths, zIndex on active drag, proper classic ADSR shape

Test plan

  • Tap Shaper in grid, verify card opens in FILTER mode with XY pad and spectrum
  • Switch filter types (LP/HP/BP/Notch): each should sound dramatically different with sawtooth source
  • Sweep XY pad: X changes cutoff, Y changes resonance (audible on all filter types)
  • Tap OSC in signal flow strip: waveform selector and frequency slider appear, state persists when switching back
  • Tap AMP: ADSR graph with 4 draggable points, hold-to-play triggers envelope
  • Set long attack (~1s) on AMP, hold play: sound fades in slowly
  • Animated chevrons flow left-to-right when playing, only through active stages
  • Open Oscillator tool: verify waveform/harmonic modes still work (no regression)
  • Open old exercise views (Filter Playground, Envelope Editor): verify they still function

Generated with Claude Code

Merge request reports

Loading