Help me get started with VSTGUI

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

Hi, I'm just getting started on VST development. The VST SDK comes with examples, trivial maybe but way helpful in getting started. The VSTGUI, unfortunately, does not, and I'm at a loss on how to get started.

I'd really appreciate any help I can get, either hand-holding or pointers to good tutorial sites.

About me: I'm a pro programmer but I work in C. (I write embedded communications & control code; cutrrently work for Cisco.) For past work I've studied Java, C++, and OO (including distributed objects ala CORBA), I've read and understood (much of) Design Patterns, and I've had detailed discussions with experts on the problems associated with multiple inheritance, etc. That is, I can talk the talk ... but I'm not foolish enough to think I can walk the walk. Experience is clearly important and I don't have any yet.

My end goal is to write a program to help people create multisample instruments (e.g., soundfonts) by designing a GUI that makes it a lot easier to collect a good set of samples and then automatically map them. I've already prototyped automapping code, which I used to build the jRhodes3 soundfont. My dream is that a good free tool like this might increase the quantity and quality of freeware multisample instruments. I'll be distributing the program freely.

Meanwhile, though, I just want to fool around with VSTGUI and get a feeling for how you put together GUIs with it. I'm using Visual C++ (well, fumbling with it is a better term) but I haven't done GUI work since the late 80's and trust me, things have changed since then.

For starters, though, I'd like to know how to simply put a VU meter on a plugin! Next I'd want to do a file browser and what used to be called a 'canvas' (graph space for line drawings & grid coloring).

I'd really appreciate any help I can get!

Thanks,
Jeff
Last edited by learjeff on Sat Jun 17, 2006 11:08 pm, edited 1 time in total.

Post

v2.4 of the sdk comes with 'surround delay', which implements sliders and text in VSTGUI. Once you get that going, mess around with the classes found in VstControls.cpp to walk the walk with bitmap based knobs, switches, drop-down menus, and some of that jazz.

It's fun stuff.
aciddose wrote:you empty headed animal food trough wiper, your mother was a hamster and your father smelt of elderberries!

Post

I do have SDK 2.4 but I didn't see that example since it's nested in with adelay (plus I wasn't starting VC from the right place -- still figuring out what "solution" and "project" files are all about.)

Thanks for the tip! I'll fiddle with those and then maybe need some help getting started with more generic graphics.

Sure would be nice if an example used the VU meter widget.

Thanks again

Post

OK, how do I build it? When I try, I get unresolved externals for vstgui, __imp__xxxxx.

What kind of file am I supposed to start with, in Visual C++?

I miss Makefile! ;)

Post

you have to set you project up to search in the proper directories. The sdk example project may be pointing to the wrong places. You should try to build the project that comes with the SDK, and when you start to set up your own project, copy all the project settings and try to get it to build again.
aciddose wrote:you empty headed animal food trough wiper, your mother was a hamster and your father smelt of elderberries!

Post

I am trying to build the example project that comes with the SDK. All the examples build fine but one (surrounddelay).

It evidently needs libpng, so I downloaded that, pointed MSVC to it, and tried again. Then I see it needs zlib, so I get that and try again.

Now it's trying to build 'png.c', which is a file I don't have on my computer anywhere! Now, I suppose I could download the source too, try to put it where MSVC is looking for it, but then I'd probably need to do it with zlib too. And all that seems pretty odd.

What's with these "intelligent" development environments, anyway? I miss 'make'! ;)

Post

Oh, I also have lots of link errors, unresolved symbols starting with __imp__, for example __imp__OleInitialize. Which sounds very MS-ish. Any idea wussupwiddat?

Thanks again!
Jeff

Post

you can get mingw, which is gcc, msys (basic shell and wrappers for syscalls) gdb and make ports for windows. you can get an almost complete syscall wrapper which allwos you to recompile and run linux code on windows called cygwin.

if you're using the vst sdk and vstgui.. you're stuck with msvc without a lot of trouble changing the code. there are tons of bugs and its all poor quality code.

i use mingw (gcc, make) to compile my projects, but it has taken quite a lot of work to get here. it is possible to configure things to work fine with mingw "out of the box" but it isnt for a beginner.

i had it in my head last year to try modifying vstgui to fix all it's problems, but instead i wrote my own gui libraries which are implemented differently and far more powerful.

vstgui is trash, and if you're not going to do it the "normal" way (msvc, windows, standard libraries, your strategy dictated by steinberg and microsoft) you shouldnt use it at all.

as for your error message.. obviously a missing library file. i have no idea why ole would be needed, it is entirely obsolite. are you linking in the ole libraries? maybe there is a define to disable the code requiring those functions.

Post

if you're using the vst sdk and vstgui.. you're stuck with msvc without a lot of trouble changing the code. there are tons of bugs and its all poor quality code.
Before when I first used VSTGUI with VST 2.3 (I largely was a beginner back then), what it took to get it working fine with MinGW was a makefile based upon one generated by Dev-C++ (the only thing I have ever used it for), the changes required to get the "main" function exported (pretty easy to find using Google), and a few minor changes to fix syntax problems. It probably wouldn't take too much time or effort for others to do it the same way.

But I still wouldn't recommend using VSTGUI either, except as a way of experimenting with making a GUI for a VST plugin until you have something better.


Myself I ended up spending a lot of time trying to get FLTK to work properly with VSTs, and eventually began working on my own fork, FLPTK, (will soon be avaliable on sourceforge. not that I would currently recommend using it, as the planned changes are only halfway done) which unlike FLTK can safetly handle multiple VSTs using it at once within the same program.

Post

Jeff, which version of MSVC is that? If it's Visual C++ 97, 6, or 2005, you need to install the Microsoft Windows SDK.

Oh, and MSVC includes "nmake", if you really need make 8-)

... reminds me of one of my favourite Unix jokes:

>make love
make: don't know how to make love. stop.

Unfortunately, the modern GNU versions spoil it a bit with more elaborate texts...
"Until you spread your wings, you'll have no idea how far you can walk." Image

Post

learjeff wrote:Oh, I also have lots of link errors, unresolved symbols starting with __imp__, for example __imp__OleInitialize.
Sounds like you're not linking with the windows libs correctly (have you got an #include <windows.h> somewhere?). Your best plan would be to use the help with whichever version of VC you're using. If you put the name of the function it's saying is unresolved in your help's "Index" it'll give you a description of the function and the requirements for it (the header and the lib).

Starting with 2.4 was probably a bit harder than starting from 2.3 which doesn't require libpng or zlib, but I guess you're that far in now that you might as well push on through.

Going from a makefile based system to VC6 or VC2003, I'd say getting the linking right was one of the biggest changes. Rather than a simple linker list at the bottom of your makefile there are now several different things which might, or might not, cause VC to decide to link with a library - again the VC documentation on linking will help.

Good luck. Personally I find VSTGUI a useful library for my purposes.

Post

It's MSVC 2005, and I did download and install the PSDK, if that's what you're talking about, Hermann. And btw, I like this one:

% make love
make: Nothing to be done for 'love'.

Pretty depressing, no?

Thanks for the help, Pinky, I'll try that. But I agree with aciddose, why would I need OLE in a VST? Sheesh.

BTW, I do have cygwin (for other purposes), but I don't want to convert away from MSVC; I don't want all the headaches since I've never developed code for PC & would get lost pretty quickly.

But is there a better solution for GUI for VST? Free, that is?

Maybe I should back up to 2.3, since I haven't gotten over the png/libz hurdle yet. I have relatively little invested so far, now's the time to ditch and start over!

Thanks,
Jeff

Post

aha ... I didn't do all the steps for PSDK yet! Get back to you later.

Post

as for libpng... if USE_LIBPNG is not set to 1 it shouldn't complain about it, since the surrounddelay resources are .bmps. In fact I distinctly remember building all the sdk examples without touching libpng (I started programming on windows less than a month ago). At any rate, the way I got libpng working was to build both ZLib and LibPng as static libraries (their example projects were set to make .dlls) and add them as 'additional dependencies' to my vst project. I think I've seen people discussing adding the libpng sources to your vst project, but it is unnecessary. Just make sure to add the folders containing the libpng and zlib sources as search directories and to link to the .libs.

I also don't think it's necessary to ditch 2.4, but I have yet to find out if 2.4 plugs will work in many older hosts (more words on this please).

-Adam
aciddose wrote:you empty headed animal food trough wiper, your mother was a hamster and your father smelt of elderberries!

Post

asomers wrote:I also don't think it's necessary to ditch 2.4, but I have yet to find out if 2.4 plugs will work in many older hosts (more words on this please).
So far, my plugins have worked in every host I have tried them in, most of them for VST 2.3 (or older). (based on what aciddose has said however, they are pretty much guaranteed not to work in cubase) Unless a host screws with the AudioEffect or AudioEffectX stuff directly, which it shouldn't do, everything is identical to a 2.3 plugin to a 2.3 host, as long as the old process function is implemented and the old "main" function exported.

Post Reply

Return to “DSP and Plugin Development”