Skip to content

Export to MP3 - #58

Merged
chrislaupama merged 1 commit into
mainfrom
mp3-export
Nov 14, 2026
Merged

chrislaupama merged 1 commit into
mainfrom
mp3-export

Conversation

@chrislaupama

@chrislaupama chrislaupama commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

What

Closes #28. The Export dialog's WAV / MP3 segments now work for Mixdown and Stems.

  • With MP3 picked, the second segments pick the bitrate (192k / 320k, 320 kbps by default) in place of the bit depth. The 44.1 / 48 kHz and Full project / Loop region choices work as for WAV.
  • The Name field ends in .mp3, the Mixdown card reads "MP3 320 kbps", Stems reads "N MP3 files", and the size estimate follows the bitrate.
  • A Project export (Ableton Live set) still renders WAV.
  • Encoder: LAME, through mp3lame-encoder 0.3.0 / mp3lame-sys 0.2.0, which compile libmp3lame from source (no system library needed on macOS, Windows or Linux). The output is CBR joint stereo at LAME quality 2. LAME's Info tag goes in the first frame, so decoders trim the encoder delay and padding and the file has exactly the rendered length.
  • Licence: LAME is LGPL. Device's full source is public under the AGPL, so anyone can rebuild it against a modified LAME. This is noted in engine/third_party_licenses.md and in the README.
  • New review state review-export-mp3.

Tests:

  • mp3::tests encodes one second of a sine at both bitrates and reads it back through the engine's MP3 decoder. It checks the exact frame count, a peak within 0.05 of the source, and a size close to the estimate.
  • dialogs::tests::a_mixdown_exports_as_mp3_with_the_picked_rate_and_length runs a real Mixdown export to MP3 at 44.1 kHz and checks the file's rate and length, and that the name ending follows the format.

Screenshots

Before (main): MP3 only showed a "not implemented" status.

before

After, WAV picked (unchanged):

after WAV

After, MP3 picked:

after MP3

Benchmarks

The WAV export path is unchanged. Encoding time for 60 s of 48 kHz stereo (release build, Linux, Xeon @ 2.1 GHz, one run):

Format Time
WAV 24-bit 41 ms
MP3 192 kbps 807 ms
MP3 320 kbps 726 ms

That is about 75x real time, on top of the render itself.

Docs

  • README.md is still accurate (Export feature line, status table, third-party licences)
  • PROGRESS.md and docs/ updated where this change affects them

Generated by Claude Code

The Export dialog's Format segments now pick WAV or MP3 for Mixdown and
Stems. With MP3 the second segments pick 192 or 320 kbps in place of the
bit depth; rate and range work as for WAV, the Name field ends in .mp3
and the size estimate follows the bitrate. Live set exports stay WAV.

Encoding goes through LAME (mp3lame-encoder, built from source,
LGPL), CBR joint stereo at quality 2, with the Info tag so decoders
trim the encoder delay and padding.

Closes #28
@chrislaupama
chrislaupama marked this pull request as ready for review November 14, 2026 05:53
@chrislaupama
chrislaupama merged commit 4ad94ca into main Nov 14, 2026
16 checks passed
@chrislaupama
chrislaupama deleted the mp3-export branch November 14, 2026 05:53
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.

Export to MP3

1 participant