Removes the MP3/AAC codec gap and leading silence at the start of newly imported audio, right on the timeline, without editing the file.
MP3 gap, automatic
MP3 and AAC encoders put a short delay in front of the music: 1105 samples (25 ms at 44.1 kHz) for LAME MP3, 1024 for AAC. Bitwig decodes with ffmpeg, which skips it only when the file says how long the delay is. When it doesn't, or when the file is a WAV/AIFF made from an MP3 (common for downloaded loops), the loop starts late and drifts against the grid.
With the mod on, this is fixed when audio comes into the project, with nothing to click:
- What changes. The new audio event keeps its position and length; its content start moves past the gap, so the music starts exactly at the event start. Stretched and RAW events are both handled. The change is part of the import's own undo step.
- When. Only for audio newly imported or dragged in from the browser or Finder. Recording, copy and paste, duplicating and opening a project are not affected. Events that already exist in a project, including projects you open, are never changed.
- Only provable gaps.
- MP3 without the LAME info tag: 1105 samples. AAC and M4A without gapless info: 1024 samples; Apple-encoded AAC: 2112. Files with gapless info get nothing, since Bitwig already skips the gap.
- WAV/AIFF: the start of the file is checked for the traces an MP3 decode leaves. Only a clear match is trimmed; original WAV/AIFF files are left alone.
- Other formats such as FLAC and OGG are left alone.
- Never twice. The shift is applied only at creation and only while the event still starts at the file's first sample.
- Drags and big drops. When the check finishes after you drop a dragged file (long MP3s), the dropped event still gets the shift, added to the drop's undo step while that is still the latest one, else as its own undo step "Remove Codec Gap". In big multi-file drops it is applied before Bitwig places the events, inside the drop's undo step.
Every import writes one log line, import: <file>: ..., with what was found and what was done or why it was left alone.
Settings
Settings > Mods > fatyzzz Trim:
- Remove MP3 gap automatically (new audio only), on by default.
- Longest gap in WAV/AIFF files, 80 ms.
- Trim leading silence on import, on by default: after the gap, the content start also moves past leading silence under -72 dBFS, keeping 2 ms before the first sound. Left alone when the sound comes within 5 ms or not within 500 ms.
- Align to kick grid (songs, new audio only), off by default: puts the kicks exactly on the event's beat grid when there is a clear one, to the sample. The grid is the event's own tempo, counted from the content start; RAW events are left alone. Kicks are taken at the start of their attack. Late kicks: the content start moves later. Early kicks: it moves earlier into trimmed audio, or to the next grid line only if what that cuts is quiet. Stems dropped together, or from a stems or construction-kit folder, get one shift for the whole group and their leading silence is never trimmed. Files with no clear grid (pads, ambient, rubato) are left alone with a log line. When fatyzzz Tempo gives a file with tempo changes its first section's tempo after the import, the event is aligned again at that tempo, in the same undo step. Off by default because it also moves originals that are a few ms late on purpose.
- Show silence trim actions, see below.
There is no menu item and no Inspector row for the gap.
Silence trim, optional
Turn on Show silence trim actions to get Trim Silence at Start and Trim Silence at End at the top level of the audio event right-click menu, in the arranger and launcher, timeline and detail editor. Also in the Commander and assignable to shortcuts.
- They move only the event's edge to the first or last sound, like dragging the edge: the audio stays where it is on the timeline, so nothing goes off the grid.
- Events that start at the same position, such as stems, are trimmed together to the earliest first sound among them, so they stay aligned. Trim each event separately changes that.
- An edge with a fade is left alone; silence shorter than Leave silence shorter than (10 ms) is left alone; silent and reversed events are skipped. One undo step per action.
- Detection: Threshold -60 dB below the event's peak, Margin 2 ms, robust to DC offset and low noise.
Limits
- MP3s from other encoders without the LAME tag are assumed to have LAME's delay.
- WAV/AIFF gaps are detected only for PCM WAV/AIFF files.
Requires
fatyzzz-transients, action-menu-composition-framework, notifications-framework, preferences-composition-framework. The frameworks ship with Patchbay; fatyzzz-transients is installed automatically by Patchbay Launcher. Its decoder reads the samples.
Self-test: fatyzzz-trim/test/run.sh (offline, no Bitwig, needs JDK 25).
Build from source: tools/build.sh fatyzzz-trim (see the top-level README).