Skip to content

fix: bound mix exports to project content instead of the 128-bar default #1813

Description

@beejsbj

Description

A short project exports as the entire 128-bar default timeline, leaving several minutes of silence after its content. At 84 BPM in 4/4, a four-bar piece lasting about 11.4 seconds produced a WAV of about 365.7 seconds.

Tested commit: 2bebdd2cbaaef1092a06ff613c7868c9f3bd4b6c.

Steps to Reproduce

  1. Create a web project at 84 BPM in 4/4.
  2. Add one audible clip spanning four bars (about 11.4 seconds) and no later content.
  3. Export the mix as WAV from the Export Audio dialog.
  4. Inspect the decoded WAV duration.

Expected Behavior

The default mix export should end at the content boundary, optionally including a small render tail. If the product supports an explicit timeline/end marker or selected range, that explicit bound should take precedence.

Actual Behavior

The exported WAV is about 365.7 seconds, with silence after the four-bar material, because export receives the project's 128-bar duration rather than an export range derived from content.

Environment

  • Browser: Google Chrome 147.0.7727.101 (headless Playwright)
  • OS: Ubuntu 24.04.3 LTS
  • Node version: 24.13.0
  • Audio path: web / Tone.js

Screenshots / Logs

The default is DEFAULT_MEASURES = 128; project creation turns it directly into totalDuration (source), and the export dialog passes that value unmodified to exportMix (source).

Acceptance Criteria

  • A four-bar 84 BPM project with no later content exports to approximately its content duration plus the documented render tail, not 128 bars.
  • Explicit export range/end-marker behavior, if present, remains honored.
  • Exports include release/reverb tail according to a documented bound.
  • A regression test decodes or otherwise asserts the selected export duration.
  • Fix passes all quality gates.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions