Skip to content

feat: Apply effects chain in WAV/stem export via OfflineAudioContext #1101

@ChuxiJ

Description

@ChuxiJ

Problem

WAV export (exportMix.ts) renders the mix without applying any track effects. Users who spend time crafting their sound with reverb, compression, EQ etc. get a completely dry export that sounds nothing like what they heard during playback.

Proposed Solution

  1. Rebuild the full signal chain (source → effects → sends → master) in an OfflineAudioContext
  2. Extract effect chain factory from TrackNode to share between live and offline contexts
  3. Apply master chain (EQ, compressor, limiter) in offline render
  4. Support both full mix export and per-stem export with effects

Technical Notes

  • Reference: TASK_QUEUE.md item S1-04
  • Depends on: Effects connected to live audio path (sibling issue)
  • Key files: src/services/exportMix.ts, src/engine/TrackNode.ts

Acceptance Criteria

  • WAV export includes all track effects
  • WAV export includes master chain processing
  • Stem export renders each track with its effects
  • Exported audio matches playback output (within floating-point tolerance)
  • Export progress indicator works correctly
  • Unit test: compare exported buffer has different RMS than dry source
  • No memory leaks from OfflineAudioContext disposal

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions