Skip to content

Feat/sequential stage separation#7

Merged
huberp merged 5 commits intomainfrom
feat/sequential-stage-separation
Apr 4, 2026
Merged

Feat/sequential stage separation#7
huberp merged 5 commits intomainfrom
feat/sequential-stage-separation

Conversation

@huberp
Copy link
Copy Markdown
Owner

@huberp huberp commented Apr 4, 2026

This pull request introduces significant enhancements to the DSP visualization infrastructure for the compressor plugin, focusing on improved buffer management and more detailed separation of processing stages. The main changes include the addition of new utility classes for bucketed buffer management and lock-free FIFO transfer of RMS data, as well as a refactor of the CompressorDisplay to support more granular control and visualization of upward and downward compression stages.

Major enhancements and refactoring:

1. DSP Visualization Infrastructure:

  • Added BucketSet utility class for partitioning sample buffers into dirty/clean buckets, supporting efficient partial updates for both RMS and cancellation computations. (lib/audio/BucketSet.h)
  • Introduced RmsPacketFifo and RmsPacket classes for lock-free, single-writer/single-reader FIFO transfer of per-sample RMS detector values between audio and UI threads. (lib/audio/RmsPacketFifo.h)

2. CompressorDisplay Refactor and API Expansion:

  • Refactored CompressorDisplay to separately handle upward and downward detector and gain reduction curves, enabling independent visualization and control for each stage. (src/CompressorDisplay.h) [1] [2] [3] [4] [5]
  • Updated buffer and FIFO management in CompressorDisplay to use new ring buffers and RMS packet FIFOs for both up and down stages, improving accuracy and UI responsiveness. (src/CompressorDisplay.h) [1] [2]

3. Project and Build System Updates:

  • Added new source files (BucketSet.h, RmsPacketFifo.h, PluginConstants.h) to the build system for both the library and the plugin target. (lib/CMakeLists.txt, src/CMakeLists.txt) [1] [2]

4. Documentation Cleanup:

  • Removed detailed DSP architecture documentation for the OttCompressor from .github/copilot-instructions.md to reduce duplication and potential for outdated information.

These changes lay the groundwork for more sophisticated and performant visual feedback in the compressor plugin, and will make future feature additions and debugging easier by providing clearer separation of processing stages and more efficient data transfer between threads.

Peter Huber added 5 commits April 3, 2026 20:02
- OttCompressor: two independent VolumeDetectors (detectorDown, detectorUp);
  upward stage operates on the post-downward-compressed signal (true sequential chain)
- CompressorStage: rewrite ballistics to smooth the detected level (not gain),
  fixing Downward Release having no audible effect
- PluginProcessor: separate FIFOs, buffers and BeatSyncBuffers for down GR and up GR
- CompressorDisplay: separate downGrRing/upGrRing; paint functions read each ring
  independently — removes the old sign-split hack on a combined gain value
- PluginEditor: pass upGRSyncBuffer and upGainReductionFifo to display
- CompressorStage: invert attack/release coeff selection for Upward direction
  so Attack controls boost-engage speed and Release controls boost-disengage speed
- CompressorStage: init gainEnv to 0 dB (not -200) for Upward stage so plugin
  does not burst-boost on startup before smoothed level crosses threshold
- OttCompressor: detectorUp now measures original input level, not intermediate;
  prevents upward boost firing on signals that were originally above threshold
  but were attenuated below it by the downward stage
… and UI integration

- Introduced PluginConstants.h to centralize magic numbers and constants for beat divisions and detector settings.
- Updated CompressorDisplay to utilize constants from PluginConstants.h for time options and added RMS display channels.
- Modified CompressorStage to include a noise floor constant for upward compression, preventing noise amplification.
- Enhanced OttCompressor to track RMS values for both upward and downward detection stages.
- Replaced raw buffer handling with RmsPacketFifo for RMS and down-detector levels, allowing for batched processing.
- Updated VolumeDetector to return both linear and dB values, improving the interface for RMS processing.
- Adjusted PluginEditor to dynamically populate beat division options from constants, enhancing maintainability.
- Improved parameter layout and visibility handling in the editor for RMS detection controls.
@huberp huberp merged commit d512376 into main Apr 4, 2026
2 checks passed
@huberp huberp deleted the feat/sequential-stage-separation branch April 4, 2026 21:00
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.

1 participant