[Clam-devel] Re: VST plugins with qt interface!

David García Garzón dgarcia at iua.upf.edu
Tue Mar 3 08:43:25 PST 2009

Just the part on how to crosscompile the old CLAM VST example:


Qt part soon.


On Monday 02 March 2009 13:02:22 David García Garzón wrote:
> I am on an spike on what we need to make vst plugins first class clam
> citizens. I fully solved croscompiling vst's from linux and I event started
> using qt interfaces as vst gui. In that last point, there still is a lot of
> work to do, but the basic question on whether you can use qt to edit a vst
> plugin is now out of any doubt.
> To make the spike simpler, and in order not to collide with other CLAM
> developers, i just let apart all the CLAM wrapping part, just addressing
> vst crosscompiling and Qt with the sdk examples.
> Cross compilation was pretty easy. This time I found lot more documentation
> on mingw and even scons[1]. Just by adding the crossmingw scons tool we are
> already using for the apps and i got some Linux compiled plugins running on
> Wine [2].
> [1] http://learnvst.wordpress.com/
> [2] http://clam-project.org/wiki/Image:Vst-crosscompiling.png
> Adding a regular user intercaces is just a matter of compiling both the
> vstgui and editor sources[3] that comes in the sdk.
> http://clam-project.org/wiki/Image:Vst-vstgui.png
> VSTGUI is just a full toolkit implementing the 'editor interface' and a
> toolkit with some provided widgets and, i guess, a way of automating the
> binding of controls to processing.
> So what we need for qt is to implement the AEffEditor interface using the
> qt toolkit instead. The problem is that you are provided a system window
> handle, if you create a widget with no parent it will be a top level and
> the window for the plugin is an empty one[4].
> [4] http://clam-project.org/wiki/Image:Vst-qttoplevel.png
> How do you create a widget on an existing window handle? Months ago trolls
> redirected me to a commercial solution, and i was digging in windows qt
> source code for a hack when i found the answer just at the public and
> multiplatform QWidget api. QWidget::create works like a charm. The
> following simple class is a native window wrapper you can use as a regular
> QWidget.
> class QVstWindow : public QWidget
> {
> public:
> 	QVstWindow(WId handle) {create(handle);}
> 	QVstWindow::~QVstWindow() {}
> };
> Still there are some issues: focus handling, reopening, drag&drop... But
> the basic mouse clicking and resizing works[5]
> [5] http://clam-project.org/wiki/Image:Vst-qt.png
> Once i got that, loading a designer ui file[6] was very easy.
> [6] http://clam-project.org/wiki/Image:Vst-designer.png
> As I said there are still many caveats to solve. A matter of playing with
> it and refining things.
> TODO's:
> - Communicate controls up and down
> - Handle focus and other events properly
> - Build a network wrapper which reensembles more the one for LADSPA
> - Embed network and interface files (DONE)
> - Wiki documentation on how to do one
> - One button plugin generator ;-)
> I attatch the files for the examples. Interesting bits are in
> QADelayEditor.*

More information about the clam-devel mailing list