Commit Graph
14 Commits
Author SHA1 Message Date
Earl Co dcabbda07d M7: optimize settled mixer DSP and isolate throughput gate 2026-10-11 02:17:02 +02:00
Brandon Thomas 334bccde88 Revert "Merge pull request #674 from vbasky/fix/542-limiter-lookahead"
This reverts commit 62a0eea519, reversing
changes made to 23ac344798.
2026-10-10 15:23:52 -04:00
Brandon Thomas 8d737a4af2 Merge pull request #733 from vangel76/fix-721-aac-surround-order
#721: 5.1 AAC imports decode in WAV/SMPTE channel order
2026-10-10 14:57:00 -04:00
vangel76andClaude Opus 5.5 d0617c849b #721: 5.1 AAC imports decode in WAV/SMPTE channel order
Problem: our AAC decoder outputs channels in AAC element order (C, L, R,
Ls, Rs, LFE for channel configuration 6) and PacketDecoder passed that
through unchanged, while the mixer, panner, loudness and export all use
WAV/SMPTE order (L, R, C, LFE, Ls, Rs). A 5.1 AAC import therefore put
centre in L, L in R, R in C, the surrounds one slot early and LFE in Rs.
The export path already reorders for the encoder; the decode path did not.

Fix: PacketDecoder reorders AAC output for channel configurations 3-6
into WAV/SMPTE order, like the AC-3 decoder and Opus mapping family 1
already do. The Opus reorder now shares the same bounds-checked helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 20:20:59 +02:00
Vikram Bhaskaran 6d1c4fdb84 Pass Hard Limiter look-ahead into the DSP limiter.
The project Look-Ahead Time parameter was stored but never applied, so 0 ms and 30 ms mixed the same clip. The limiter now sizes its look-ahead from that parameter and pre-rolls for the chosen window.
2026-10-11 02:28:52 +11:00
Peet GuercioandClaude Opus 5.5 a4ff06f4ad Audio: play a sequence on a device at another rate without phase jumps
Problem: with the device at another rate than the sequence (44.1 kHz
device, 48 kHz sequence), each buffer truncated its source start (phase
lost every block: a buzz), took the nearest sample (aliasing), and asked
the mixer for overlapping spans, so the mixer's graph cache missed every
buffer and rebuilt effect state.

Solution: audio-dsp StreamResampler interpolates each output sample from
its absolute position (exact rational), bit-identical however the stream
is cut, and pulls the source as one contiguous stream. start_audio uses
it when rates differ and restarts it when the rate or layout changes.

Context: tests cover block-size invariance at four rate pairs, a 1 kHz
tone within 3e-3, contiguous pulls, seeks and hostile input. Same lines
as #131; whichever lands second needs a small rebase.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 00:35:29 -07:00
Brandon ThomasandClaude Opus 5.5 46b286edaf Codecs: never crash — ac3, audio-dsp, opus, mpeg2v, prores, dnx
- ac3: LFE channel taken without `expect`.
- audio-dsp: the channel matrix match is exhaustive (no `unreachable!`); an unknown internal
  parameter reads as 0 (debug-asserted) instead of `panic!`.
- opus: dual-stereo bands and SILK frames take the optional buffer / range decoder with `if let`.
- mpeg2v: 64-bit peek through `get()` + `first_chunk`; the literal VLC table parser no longer
  panics (debug-asserted).
- prores, dnx: IDCT rows through `as_chunks`; ProRes block store and alpha slices without
  unwrap/expect; DNx header timecode through `get()`.
- dnx: `Encoder::new` returns `Result` instead of panicking on a raster the profile can't code
  (e.g. 0x0), with a regression test; missing CID table is an error.
- Each crate denies unwrap/expect/panic/unimplemented/todo/unreachable outside tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 11:43:19 -04:00
Brandon ThomasandClaude Opus 5.5 1fa560c1c7 M7.8: audio parity — 5.1 multichannel, voice-over record, Remix, Clip Mixer automation
5.1 / multichannel:
- audio-dsp::channels: layouts (L R C LFE Ls Rs), ITU-R BS.775 up/downmix, 5.1 Mixdown Types,
  equal-power 5.1 panner (puck, Center %, LFE).
- Mixer graph buses are 2 or 6 channels wide; 5.1 tracks/submixes/Mix; strips feeding a 5.1 bus
  use the 5.1 panner (lanes pan51.x/y/center/lfe stored in MixerStrip::lanes, no schema change);
  5.1 strips fold into stereo buses with BS.775; per-channel meters; clip effects on 6 channels.
- file.newSequence {mix, trackType}, sequence.settings {mix}; playback honours the 5.1 Mixdown
  Type preference on stereo devices and plays 6 channels on 5.1 devices.
- Export Audio Channels 5.1: WAV WAVE_FORMAT_EXTENSIBLE (mask 0x3F), QuickTime PCM with a chan
  atom, AAC channel configuration 6 (reordered to C L R Ls Rs LFE).
- Track Mixer: 5.1 panner puck with Center/LFE, N-channel meters, Show/Hide Tracks, Meter
  Input(s) Only; transport record button runs voice-over.

Voice-over: engine AudioInput trait + SyntheticInput, cpal input in the app, audio.voiceover.*
commands (punch-in, pre/post-roll, countdown cues, WAV next to project / scratch disk, one undo
step), track header mic button and Voice-Over Record Settings dialog.

Remix: beat tracking + chroma/cepstra self-similarity planner in audio-dsp, hidden `remix` clip
effect holding the plan, render::remix playback with equal-power crossfades, clip.remix.*
commands, Remix tool and Remix Properties dialog.

Clip Mixer automation: per-track Latch/Touch/Write (clipMixer.setMode/touch/release) heard live
and written as thinned clip Volume/Panner keyframes at the end of the pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 21:40:35 -04:00
Brandon ThomasandClaude Opus 5.5 9ef525441a M7.7: audio-dsp: Premiere audio effect set (EQs, scientific/FFT filters, dynamics, multiband, modulation, delays, convolution/surround reverb, click remover, special/stereo)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 11:04:47 -04:00
Brandon ThomasandClaude Opus 5.5 908ce3e8d8 M12.1: audio synchronisation (GCC-PHAT-β coarse search on decimated audio, full-rate refinement): sample-accurate offsets between recordings with different gains, microphones and noise
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 11:08:38 -04:00
Brandon ThomasandClaude Opus 5.5 cd30edbed7 M7.4: Essential Sound DSP — DeEsser, DeReverb, Enhance Speech chain, Stereo Width, ducking analysis
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 02:35:14 -04:00
Brandon ThomasandClaude Opus 5.5 8eb8f5ff68 T4: BS.1770 loudness oracle test against ffmpeg ebur128
Seven generated signals (sine, pink noise at 48/96 kHz, speech-like at
48/44.1 kHz, gated stereo with silence and sub-gate passages, fs/4
inter-sample peak) written as float WAV and measured by LoudnessMeter
and ffmpeg ebur128 (metadata, 3 decimals per 100 ms). Tolerances: M/S
+-0.1 LU every 100 ms, I +-0.1 LU, LRA +-0.5 LU, true peak +-0.2 dB.
Measured: M/S <= 0.0005, I <= 0.007, LRA <= 0.04 LU, TP <= 0.045 dB.
On the fs/4 tone ffmpeg's true peak is +0.6 dB above the analytic
value, so that case is checked against the analytic peak (ours -0.053).
testkit gains a float WAV writer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 00:32:25 -04:00
Brandon ThomasandClaude Opus 5.5 23b76f3d8e M7.3: audio effects
Parametric (8-band) and simple 3-band EQ, compressor, expander/gate,
true-peak look-ahead limiter, delay (ms/tempo), FDN reverb, amplify,
channel volume, balance/pan, invert, swap, fill L/R, DeHum, STFT
DeNoise, phase-vocoder pitch shifter; AudioEffect trait + registry with
parameter specs. Tests cover responses, dynamics curves, ceiling,
stability, denormals, block-size independence and reset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:08:36 -04:00
Brandon ThomasandClaude Opus 5.5 627c230871 M7.1: BS.1770 loudness meter
New crate filmcraft-audio-dsp (L1, dependency-free): K-weighting for any
sample rate via bilinear transform, momentary/short-term/integrated
(gated) loudness, LRA (Tech 3342), sample and true peak (polyphase 4x),
normalisation helper, RBJ biquads, radix-2 FFT, parameter smoothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 10:58:11 -04:00