Setting up a nice development environment for vst

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

I want to start developing vst's, and I just got vc++ express up and running, and compiled the examples from the sdk. Now I would like to set everything up for quick compiling and testing.

It would be nice to be able to compile, and then load a vst, with one button. I managed to move the dll to my vstplugins folder with post build events, but is there any way to have a host running and make it reload a plugin automatically in a quick way.

Whats the easiest way to create a new project? Right now it seems like the quickest way is to start from the again example, rename a couple of things in again.cpp and again.h and then create a new project in vc++, and set a lot of options in that project. Is it possible to create some sort of template where the name of the project and the plugin can be changed easily.

More generally Im curious about how the more experienced developers here set up their environments. Do you care about stuff like being able to compile and test things quickly?

Post

heptapod wrote:It would be nice to be able to compile, and then load a vst, with one button. I managed to move the dll to my vstplugins folder with post build events.
you can set vst plugin folder in Linker->General->Output File options... to smth like that: "C:\Program Files\vst/MyPlug.dll" or do it in *.vcproj file.
heptapod wrote:but is there any way to have a host running and make it reload a plugin automatically in a quick way.
i think the answer is no (unless someone's developed a special host-vstdll-tester for that particular purpose). but one of the fastest out there i guess would be Juce Plug-In Host http://www.kvraudio.com/get/3298.html. i had no problem with debugging vst in it either. F5(Run)->2secs->and we already in juce debugging our dll.
heptapod wrote:Whats the easiest way to create a new project? Right now it seems like the quickest way is to start from the again example, rename a couple of things in again.cpp and again.h and then create a new project in vc++, and set a lot of options in that project. Is it possible to create some sort of template where the name of the project and the plugin can be changed easily.
i'd recommend to you surround example as way to start (at least it got some gui).
Demalkean

Post

I either use toby bears minihost, which can be set to reload the last plug in at startup, or just drop a copy of Savihost into the project folder. Either way works well, just bang F5 and there you go.

Also, I usually give things a go in others host from time to time. Savi will, for example trap NaNs in the signal, which many hosts don't and combined with a bad driver it can cause a bluescreen. But if you only test with one host, stuff can slip by you.


And wrt the project creation-- I have a stripped down template project that I just copy. The vst class is renamed to just vst_plug and I leave it like that. I only change the various name variables in the class, and set the name of the dll in the preferences.

Aside from those two files (vst_plug.h/cpp) I have one file with an empty GUI, and one class for preset and parameter storage. Having your preset management standardized saves you from having to rewrite a lot of methods. I.e, the set/get and rename methods, as well as the chunk methods are always the same here.

Post

The VST SDK includes a minihost.exe which loads a plugin via command line parameter. This is what I use to get something up and running with one button. For "real world" testing I also have a post build event that copies the dll to my REAPER installation and I keep REAPER running while developing. Each time I compile the dll it gets copied over to REAPER and I can load it right away. I'm not sure about Express, but the full Visual Studio can also attach to REAPER and debug plugins live in the DAW.

Post

bvesco wrote:The VST SDK includes a minihost.exe which loads a plugin via command line parameter. This is what I use to get something up and running with one button. For "real world" testing I also have a post build event that copies the dll to my REAPER installation and I keep REAPER running while developing. Each time I compile the dll it gets copied over to REAPER and I can load it right away. I'm not sure about Express, but the full Visual Studio can also attach to REAPER and debug plugins live in the DAW.
Express can attach as well.
Swing is the difference between a drum machine and a sex machine.

Post

I've just been putting VSThost in the executable command line for the debugger. When you hit F5 to launch, VSThhost lights off and then you can manually load the VST from there. You get a bunch of odd stuff in the debugger output doing it this way, but it works fine.

The next time you do it, VSThost loads the VST automagically and saves the extra step. (That assumes you have VSThost set up to load the previous configuration, I don't remember if that's the default or not. I typically set up a spectrum analyzer and/or oscilloscope plugin attached to the VST output and from that point on, every debug session for that VST is a one-click start.)

Post

Putting VSTHost into the execute command line in the form

Code: Select all

[wherever]\vsthost.exe /noload /nosave PlugInName.dll
makes it easier, as it automatically loads the DLL (and nothing else).
PlugInName.dll, in case you're wondering, is the target name of your PlugIn (and [wherever] is VSTHost's installation path 8-)). Either use a fully qualified path for the DLL or assure that the Debug directory is the current directory.
"Until you spread your wings, you'll have no idea how far you can walk." Image

Post

Hi there,

I suggest to also have a look at some of my tools. For example I have developed an extreme VST-Plugin Test Framework based on DUnit. It is available here:

http://www.savioursofsoul.de/Christian/ ... =111#VUnit

It can be run from within a debugger with your VST plugin as first parameter. It performs several checks mainly targeting effect plugins. Also it contains some perverse test. Your plugin must not pass these tests, but it can help improving plugin compatiblity with new hosts.

Furthermore you might want to use my VST Plugin Analyser which is designed to measure various facts of effect plugins. You can either just plot the frequency response or THD or ever more complex stuff like the dynamic characteristic. and such...

Have a look at this page:

http://www.savioursofsoul.de/Christian/?page_id=106

On the same page you can find an ABX test for VST plugins. This can be used to perform listening tests. These listening tests can make sure you can tweak the VST plugin you are developing to the highest performance without audible artifacts. This takes some time though...

Last but not least you can use my VST-Winamp-Bridge to listen to your effects on various MP3 files on your HD.

I'm also planing to release a very basic MP3-Player-VST-Host some day to perform this testing with the least overhead...

Christian

Post

arakula wrote:Either use a fully qualified path for the DLL or assure that the Debug directory is the current directory.
Hmmm...can the standard macros (like 'OutPath' and 'ProjectPath') be used in that command line?

Post

Thanks for the replies.

Got it working with VstHost. Vc++ complains saying that VstHost was built without debug information, but it works anyway.

bvesco, mistertoast: Do you use a special version of Reaper for that? For me vc++ complains saying reaper.exe is built without debug info then just exits Reaper.

Christian: Wow, lots of useful tools there.

Post

I use REAPER "off the shelf" directly from the website. I'm on a Win XP (32 bit) system. It shouldn't care if REAPER is built with debug symbols because you're not breakpointing anything in REAPER. The breakpoints should all be in your plugin code which you should build with debug info. When you set breakpoints it will look like they're invalid until you load the plugin. Then it will come to life. Though this is all info based on the behavior of the full VC++ 2005 and not an Express edition.

Post

All that is true (breakpoint discussion) in Express as well (I'm using 2005 Express, but may upgrade to 2008 Express if anyone can give me a good reason to).

I use Buzz as host because it loads fast. I have a project all set to go.
Swing is the difference between a drum machine and a sex machine.

Post

bvesco wrote:The breakpoints should all be in your plugin code which you should build with debug info.
Do you do something more to build with debug info, except setting configuration: (active)debug in property pages?

Post

heptapod wrote:Do you do something more to build with debug info, except setting configuration: (active)debug in property pages?
yep,

Config Properties -> Linker -> Debugging -> Generate Debug Info = YES
Config Properties -> C/C++ -> Optimization -> EVERYTHING TURNED OFF
*Config Properties -> Preprocessor -> Preprocessor Definitions -> ...;_DEBUG;..

but that should be by default.
Demalkean

Post

I set mine up so long ago that I can't remember what settings I used. That's one reason I'm nervous to upgrade. :-/
Swing is the difference between a drum machine and a sex machine.

Post Reply

Return to “DSP and Plugin Development”