Skip to content

Add Porta424 marketing site with live Web Audio + Web MIDI demo#41

Merged
johnnyclem merged 1 commit into
mainfrom
claude/porta-424-market-demo-knqq7k
Jul 1, 2026
Merged

Add Porta424 marketing site with live Web Audio + Web MIDI demo#41
johnnyclem merged 1 commit into
mainfrom
claude/porta-424-market-demo-knqq7k

Conversation

@johnnyclem

Copy link
Copy Markdown
Owner

Overview

Adds a single-page marketing site for PortaDSPKit / Porta424 under web/, built around an interactive, in-browser recreation of the 4-track cassette portastudio. The tape-character DSP runs live via the Web Audio API (an AudioWorklet), and the synth + tape knobs are playable over the Web MIDI API.

No framework, no build step, zero dependencies — plain HTML/CSS/ES modules, mirroring the product's own "zero dependencies" ethos and statically hostable on GitHub Pages.

Hero
Interactive deck

The live demo

A skeuomorphic deck (palette ported from App/Sources/Theme/RetroTheme.swift) wired to a real Web Audio graph:

  • Tape character in an AudioWorklet (web/js/tape-worklet.js) — faithful ports of the C++ DSPCore modules native nodes can't express:
    • wow_flutter.h → modulated fractional delay line with independent wow/flutter sine LFOs + slow random phase drift
    • saturation.htanh soft clipper with makeup gain
    • hiss.h → gently low-passed additive noise
    • dropouts.h → smoothed random amplitude dips
  • Native nodes for head bump (peaking biquad ~80 Hz, Q 1.4) and bandwidth roll-off (lowpass 1–20 kHz), matching the native Swift/C++ split.
  • 6-channel mixer — per channel trim, 3-band EQ, pan, fader, record-arm and source select, each its own node chain into a shared mix bus, with per-channel + master VU meters (AnalyserNode RMS).
  • Sources: built-in polyphonic subtractive synth played by Web MIDI + on-screen/computer keyboard; microphone (getUserMedia); and audio file upload (drag-drop or picker).
  • Web MIDI maps note on/off to the synth and CC controllers (mod wheel, filter, etc.) to the tape knobs, with device hot-plug handling.
  • 5 factory presets ported verbatim from PortaDSPFactoryPresets.swift, converted back to UI/audio params with the same math as DSPState.swift.
  • Animated reels, LED tape counter, transport (play/stop/record), and a tape-bypass A/B toggle.

Marketing sections

Hero with CTAs → live demo → feature grid (13 DSP modules) → signal-flow architecture diagram → SPM install snippet → footer.

Robustness

  • Graceful degradation: falls back to a WaveShaper + noise buffer when AudioWorklet is unavailable (badge reports it); keyboards still work without Web MIDI; honors prefers-reduced-motion.
  • Accessible role="slider" knob/fader controls (pointer drag, wheel, arrow/Home/End keys, double-click-to-default).
  • Respects the autoplay policy — audio starts only after the user clicks POWER.

Verification

Validated headlessly with Playwright (Chromium): the page boots, the real AudioWorklet DSP loads, all controls build (37 knobs, 6 strips/faders, 5 presets, 17 keys), applying a preset moves the knobs, and pressing a synth key drives the master VU meter — audio flows end-to-end through the tape chain with zero console errors. Run locally with cd web && python3 -m http.server 8000.

Deployment

.github/workflows/pages.yml publishes web/ to GitHub Pages on push to main. Enable under Settings → Pages → Source: GitHub Actions.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CJTwEPDS71A9cFJFnpjB63


Generated by Claude Code

Single-page static site (web/) marketing PortaDSPKit / Porta424, built
around an interactive in-browser recreation of the 4-track cassette
portastudio.

- Tape character DSP runs live in an AudioWorklet (tape-worklet.js),
  porting the C++ wow/flutter, saturation, hiss and dropout modules.
- Head bump + bandwidth use native BiquadFilterNodes; 6-channel mixer
  strips (trim, 3-band EQ, pan, fader, arm) feed a shared mix bus.
- Sources: built-in polyphonic synth driven by Web MIDI + on-screen and
  computer keyboards, microphone (getUserMedia), and drag-drop audio file.
- 5 factory presets ported verbatim from PortaDSPFactoryPresets.swift,
  mapped to UI/audio params with the DSPState.swift math.
- Skeuomorphic retro UI (palette from RetroTheme.swift): animated reels,
  LED tape counter, VU meters, accessible knob/fader controls.
- Graceful degradation when AudioWorklet/Web MIDI are unavailable.
- GitHub Pages deploy workflow publishing web/ on push to main.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CJTwEPDS71A9cFJFnpjB63
@johnnyclem
johnnyclem merged commit 11568e3 into main Jul 1, 2026
0 of 2 checks passed
@johnnyclem
johnnyclem deleted the claude/porta-424-market-demo-knqq7k branch July 1, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants