Skip to content

True Peak Computation#103

Merged
joelmacx merged 3 commits intomainfrom
true-peak
Feb 17, 2026
Merged

True Peak Computation#103
joelmacx merged 3 commits intomainfrom
true-peak

Conversation

@joelmacx
Copy link
Copy Markdown
Collaborator

@joelmacx joelmacx commented Feb 13, 2026

Description

The plugins often hit resource and performance walls when hosted in DAWs due to the number of channels they have to process. The two processors that consume the majority of plugin processing time are the rendering processor and the loudness measurement processor. Of the loudness measurements, the true peak computation occupies nearly all the computation time. This PR replaces the existing implementation (interpolate -> LPF) with a polyphase filter implementation.

This will improve plugin performance in hosts, resulting in less errors from the hosts and greater plugin stability.

Changes

  1. Add a TruePeak type for calculating the true peak of a buffer.
  2. Update MeasureEBU128 to use this new type.

Validation and Acceptance Criteria

  • Existing unit test coverage remains passing.
  • Tested playback in DAW and confirmed realistic values were being calculated.

Wall Clock Measurements

These measurements were taken while computing loudness on 30s worth of samples.

Old measurement computation time
Layout | Time (ms)
2.0.0 85
3.1.2 241
7.1.4 492
9.1.6 661

New measurement computation time
Layout | Time (ms)
2.0.0 9
3.1.2 26
7.1.4 53
9.1.6 74

@joelmacx joelmacx self-assigned this Feb 13, 2026
@joelmacx joelmacx added the enhancement New feature or request label Feb 13, 2026
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These debug logs were adding a lot of unhelpful noise so I'm just removing them (which I believe is permissible under this license?)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is fine

Copy link
Copy Markdown
Collaborator

@BrandenAvalonCx BrandenAvalonCx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised the performance is so bad here, but as long as the tests are passing the values should be fine. I don't see any issues here.

@joelmacx joelmacx merged commit 264f315 into main Feb 17, 2026
3 checks passed
@joelmacx joelmacx deleted the true-peak branch February 17, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants