Simple linux VST with source code

Official support for: energy-xt.com
RELATED
PRODUCTS

Post

OK - step 1 - a compiled VST plug-in in Windows.
:party:
Now hopefully, the plugin.cpp is going to be static or fairly static and all I have to do is work with a supplimentary header file to implement all my logic. This is the plan yes?
Yes, this makes is much easier as you only have to change the synth.h file to roll your own VST, and it can be easely ported to other plugins API's as well.

Here's the plan so far:

synth3 - polyphonic synth with filter and envelopes
midi effect example
audio effect example
synth4 - synth with gui

cheers
jorgen
Half developer half human
XT Software
http://www.energy-xt.com

Post

jorgen wrote: Yes, this makes is much easier as you only have to change the synth.h file to roll your own VST, and it can be easely ported to other plugins API's as well.
For example, you could download SynthEdit's SDK create a wrapper module.cpp for example and then implement your work as module.h for example?

Or - you could create you effect.h and the use WusikStation's SDK, create a wrapper called effect.cpp and then include your effect.h?

The problem for me really is the wrapping. Even in a simple language like Python I get confused with wrapping C libraries etc..

I'm just happy that for the first time I remember I've actually managed to compile a VST example!!

Regards
Caleb
Happiness is the hidden behind the obvious.

Post

:tu: :party:

Post

I've compiled the first two synth examples on my SUSE 10 with vstsdk2.3 and they working fine (typical energypro sound). I wish I could write c++ to make some own plugs. So beside this, I can make some suggestions for to take a view interesting existing projects.

There is a native Linux Synth named ZynAddSubFX. This is a very complex multitimbral synth and one of the best for Linux.

So not so long ago, Nasca Octavian Paul and some other began to make a native Windows version, there is also a vst version available, but Paul didn't released it for the current zynadd because of a lack of stability. The maintainer of the vst version also stop the developement.

I've checked the older vst version in eXT2/Windows yesterday and was pretty suprised, how good this works.

So i had the idea - ZynAddSubFX has a GUI, there is an code example for to make it as vst dll, so why not re-port this to linux as linux vst.. or implenting a vst interface in the linux sourcecode of zynadd.

zynaddsubfx vst version for windows incl sourcecode

sourcecode and how to compile of the current version
[del]AudioLinux sucks.[/del]

Post

Caleb wrote:Woohoo! I worked it out. Yay!
Or at least, I now have a working .dll file in XT1 and XT2.
How did you get it working? For me, it compiles clean after fixing the .def and the dllexport inside plugin.cpp but somehow the resulting dll is not recognized as VST in eXT.

Post

what compiler?

cheers
jorgen
Half developer half human
XT Software
http://www.energy-xt.com

Post

I'm using MinGW gcc using the Code::Blocks IDE. When using the MSVC++ 2005 compiler I always get an error message that the return type of main should be int not AEffect*, but I don't like this compiler anyway.

Post

OK, got it working now by updating to gcc 3.4.2 by using the following code:

Code: Select all

#ifdef __GNUC__
extern "C" __declspec(dllexport) AEffect* main_plugin (audioMasterCallback audioMaster) asm ("main");
#define main main_plugin
Example 1 works perfectly but example 2 introduces terrible distortion and an invalid pointer operation exception when unloading the plugin followed by an access violation when closing energyXT. Trying to track down the error now, but perhaps someone else knows a solution?

Post

found the problem:
changed

Code: Select all

*p1 = (float) (*p1++ + pv->low * vol);
*p2 = (float) (*p2++ + pv->low * vol);
to

Code: Select all

*p1 = (float) (*p1 + pv->low * vol);
*p2 = (float) (*p2 + pv->low * vol);
*p1++;
*p2++;
Seems to be a compiler problem. All examples work now using this, so I can begin porting my plugins to linux :)

Post

da.bass wrote:All examples work now using this, so I can begin porting my plugins to linux :)
Cool, anything ready for this weekend? :D

cheers
jorgen
Half developer half human
XT Software
http://www.energy-xt.com

Post Reply

Return to “energyXT”