Testing and troubleshooting VST

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Hey, all.

I have my first plugin coded up in Xcode, and I can get it to compile and load up into Reaper alright. My problem is that one of my parameters is not affecting my sound how I want it to, and I'm trying to figure out how I can get a display of what the values of certain variables in my code are in real time. Are there any testing platforms or tools specifically for VSTs that have this kind of functionality?

And, in general, what are some of the best tools and methods you all use in seeking out the causes of bugs that are hard to find in the typical black box perspective of a DAW?

Post

What you want to do it to debug your plugin with a debugger. Getting there should consist mainly of the following steps:
  • Find out how to build a debug version of your plugin / code.
  • Once you can do this set some breakpoints in the code at the places where you want to inspect the values of the variables.
  • Next find out how to start REAPER from inside XCode in debug mode. If you'll do this more often it makes sense to create a project in REAPER with your plugin already loaded and to start up REAPER with that project from XCode.
  • Once execution reaches the code where you have set the breakpoints it should stop automatically and you can use the debugger to inspect the variables and step through the code one statement / function at a time. Please be aware that in some cases the breakpoints might already be triggered when the plugin is loaded by the DAW. In that case continue execution of the code until you've reached the point where you really want to inspect the variables.
This works for me on Windows with Qt Creator, WDL-OL and REAPER and should hopefully work with your setup as well.

If you don't know yet what a debugger and breakpoints are use the provided links to read up on it until what I have written makes sense. ;) Good luck!
Passed 303 posts. Next stop: 808.

Post

I would also advice to prototype your algorithm firstly in something that allows quick iteration cycles or have easy debugging abilities :) If you know your algorithm is as it should be, then yes a debugger will be your best friend. Personally, I've set up my projects so they load a lightweight host directly from commandline so you can debug and attach automatically. The JUCE plugin host works really great for this - it can of course be used for anything not made with JUCE.

Post

Oh, awesome, this is super helpful. Is that command line host you're talking about MrsWatson?

Post

nickdbot wrote:Oh, awesome, this is super helpful. Is that command line host you're talking about MrsWatson?
No JUCE is open source, and one of the tools living in the repository is a simple modular plugin host where you can connect some I/O and chain some effects. Importantly, it supports projects so you can make a configuration, which it will accept on the commandline :)

So when I launch from my IDE, it actually just runs

Code: Select all

$ ../util/phost.exe -projectname.filtergraph
Code is here: https://github.com/WeAreROLI/JUCE/tree/ ... gin%20host

Post Reply

Return to “DSP and Plugin Development”