Skip to content

feat: add pre/post fader toggle to aux sends #984

@ChuxiJ

Description

@ChuxiJ

Summary

Currently, all sends are implicitly post-fader — the send taps audio after the channel volume/pan. Professional DAWs support pre-fader sends (tap before volume) for use cases like headphone mixes, parallel compression, and cue sends.

Reference: openDAW implements AudioSendRouting { Pre, Post } enum on AuxSendBox, with AuxSendProcessor applying ramped gains at the appropriate tap point.

Current State

// src/types/project.ts
interface Send {
  returnTrackId: string;
  amount: number; // 0-1
}
  • Send always taps after volumeGain in TrackNode signal chain
  • No option to choose tap point
  • 2 hardcoded send slots (separate issue #TBD)

Proposed Changes

Data Model

interface Send {
  returnTrackId: string;
  amount: number; // 0-1
  preFader?: boolean; // default false (post-fader)
}

Audio Engine (TrackNode.ts)

  • Create two tap points in signal chain:
    • Pre-fader tap: after EQ, before volumeGain
    • Post-fader tap: after volumeGain, before analyserNode
  • Each send connects to the appropriate tap based on preFader flag
  • Send gain node applies amount with 5ms ramp (click-free)

UI (MixerPanel.tsx)

  • Add toggle button (PRE/POST) next to each send amount slider
  • PRE = orange indicator, POST = default (matches DAW conventions)

Acceptance Criteria

  • Send interface has preFader?: boolean field
  • Pre-fader sends tap audio before volume/pan in TrackNode
  • Post-fader sends tap audio after volume/pan (existing behavior, now explicit)
  • Toggling pre/post updates audio routing in real-time without clicks
  • UI shows PRE/POST toggle per send slot
  • Undo/redo works for pre/post toggle changes
  • Unit tests for pre/post signal path
  • E2E test: toggle pre-fader, verify send level independent of fader

Files to Modify

  • src/types/project.ts — Send interface
  • src/engine/TrackNode.ts — Add pre/post tap points
  • src/engine/AudioEngine.ts — Wire sends to correct tap
  • src/store/projectStore.tsupdateTrackSend action
  • src/components/mixer/MixerPanel.tsx — PRE/POST toggle UI

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