[PR #935] [MERGED] New dynamic limiter for very wide dynamic ranges #1150

Closed
opened 2026-02-27 20:01:21 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/935
Author: @roderickvd
Created: 1/12/2022
Status: Merged
Merged: 1/14/2022
Merged by: @roderickvd

Base: devHead: new-dynamic-limiter


📝 Commits (4)

  • 78ea638 New dynamic limiter for very wide dynamic ranges
  • dc530c8 Small improvements
  • dce7944 Spare CPU when not in limiting state
  • 681fe9d Merge remote-tracking branch 'origin/dev' into new-dynamic-limiter

📊 Changes

4 files changed (+149 additions, -180 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 playback/src/config.rs (+13 -16)
📝 playback/src/player.rs (+91 -120)
📝 src/main.rs (+44 -44)

📄 Description

Well that was a fun exercise! This time I actually think I know what I'm doing.

The current dynamic limiter was an amateur attempt that worked within a limited range and first Rust code I ever wrote. This time I took a article from the Journal of the Audio Engineering Society [1] and wrote a fresh implementation of the most recommended variant (feed-forward in the log domain with a smooth, decoupled peak detector).

So far it seems to work beautifully, including the tracks with wide dynamic range in the linked issue. Would be nice if some of you could give this a spin on various genres and let me know how it goes.

I purposely changed the field names to signal developers downstream that some of these fields now hold values in a different unit. Before in 0.2.0 this caused distorted audio for some other applications and I'd like to prevent that this time.

Closes: #934

[1] Giannoulis, D., Massberg, M., & Reiss, J.D. (2012). Digital Dynamic Range Compressor Design—A Tutorial and Analysis. Journal of The Audio Engineering Society, 60, 399-408


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/librespot-org/librespot/pull/935 **Author:** [@roderickvd](https://github.com/roderickvd) **Created:** 1/12/2022 **Status:** ✅ Merged **Merged:** 1/14/2022 **Merged by:** [@roderickvd](https://github.com/roderickvd) **Base:** `dev` ← **Head:** `new-dynamic-limiter` --- ### 📝 Commits (4) - [`78ea638`](https://github.com/librespot-org/librespot/commit/78ea6389bd6b905f53065cf4dee034c6c93d48d8) New dynamic limiter for very wide dynamic ranges - [`dc530c8`](https://github.com/librespot-org/librespot/commit/dc530c8107566aaaa68a5ba8a41391d84b8cdf99) Small improvements - [`dce7944`](https://github.com/librespot-org/librespot/commit/dce79440d1d26195990f0f32229bc7fcd9a58651) Spare CPU when not in limiting state - [`681fe9d`](https://github.com/librespot-org/librespot/commit/681fe9d1dd94f7aec61fbcc43f937e6d3b22cf91) Merge remote-tracking branch 'origin/dev' into new-dynamic-limiter ### 📊 Changes **4 files changed** (+149 additions, -180 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `playback/src/config.rs` (+13 -16) 📝 `playback/src/player.rs` (+91 -120) 📝 `src/main.rs` (+44 -44) </details> ### 📄 Description Well that was a fun exercise! This time I actually think I know what I'm doing. The current dynamic limiter was an amateur attempt that worked within a limited range and first Rust code I ever wrote. This time I took a article from the Journal of the Audio Engineering Society [1] and wrote a fresh implementation of the most recommended variant (feed-forward in the log domain with a smooth, decoupled peak detector). So far it seems to work beautifully, including the tracks with wide dynamic range in the linked issue. Would be nice if some of you could give this a spin on various genres and let me know how it goes. I purposely changed the field names to signal developers downstream that some of these fields now hold values in a different unit. Before in `0.2.0` this caused distorted audio for some other applications and I'd like to prevent that this time. Closes: #934 [1] [Giannoulis, D., Massberg, M., & Reiss, J.D. (2012). Digital Dynamic Range Compressor Design—A Tutorial and Analysis. Journal of The Audio Engineering Society, 60, 399-408](https://github.com/librespot-org/librespot/files/7850566/GiannoulisMassbergReiss-dynamicrangecompression-JAES2012.pdf) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:01:21 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#1150
No description provided.