Announcing DSP Testbench

Hi all, I’ve just made one of my side projects public because I thought some of you might find it handy.

DSP Testbench is designed to help JUCE developers to analyse their DSP by providing a test harness for code inheriting from juce::dsp::ProcessorBase. The harness provides signal sources, routing, analysis and monitoring functions.

You can read about all the handy features in the README.md - but the basic idea is that you can route various signal sources through A/B versions of your DSP code to assess the impacts of tweaks and optimisations. One of the niftiest features is a snapshot function which lets you reliably analyse the same segment of audio each time. This is really handy for checking an impulse response for example - and yes, impulse and step signal sources are provided :sunglasses:

If you want to have a play, you can grab the repo from GitHub.

How to use

To make use of DSP Testbench, you need to include your own code, wrap it appropriately and build the project.

  • Navigate to the Source\Processing folder and take a look at ProcessorExamples.h/.cpp. This shows how to inherit from ProcessorHarness and shows examples of how to override the necessary pure virtual functions.
  • Create a local branch of the repository before proceeding
  • Copy (or create) your own code into the project folder
    • Make sure you add these files to the Projucer project also
    • Either extend ProcessorExamples.h/cpp or create your own wrapper class and include it in MainComponent.cpp
  • Instantiate your processor harness in the MainContentComponent constructor
    • If optimising code, then use two separate wrappers and instantiate them separately
  • Build, run and test!
23 Likes

Slick!

Matt

1 Like

FYI - I’ve just updated this for JUCE 6 and fixed a bug with the scopes if using secondary monitors.

6 Likes