Author Topic: Howdy! Im a noob :)  (Read 30831 times)

matthewjumpsoffbuildings

  • Guest
Re: Howdy! Im a noob :)
« Reply #15 on: July 16, 2006, 08:20:47 am »
i jst read that text file - it is very very detailed. Is there any chance you could make a walktrhough like this for using VST SDK plus codeblocks?

mdelfede

  • Guest
Re: Howdy! Im a noob :)
« Reply #16 on: July 16, 2006, 02:13:11 pm »
.....
I noticed that there are 2 DLLs:
1) wxmsw26u_gcc_custom.dll
2) wxmsw26_gcc_custom.dll
The wiki says I need the first one (which has not been modified), while the second one has been modified (really I didn't notice it before!).
What's the difference between the 2 DLLs?

The firs one with 'u' should be the unicode version, used if you build C::B in unicode mode (default) the second one the ansi version, used if you build C::B in ansi mode... You must change something in project to do it, I've never done.

BTW, if the first one don't get modified compiling wxWidgets, you're doing that in Ansi mode.
Read the wiki for the compilation in unicode mode.

Ciao

Max

Offline iw2nhl

  • Multiple posting newcomer
  • *
  • Posts: 116
  • BASIC, C, C++, Qt, bash
Re: Howdy! Im a noob :)
« Reply #17 on: July 17, 2006, 03:33:03 pm »
Umm I dont have a "common" folder :( I am using VST SDK v 2.4 not 2.3 like you.

so what should i do? and how/where do i enter all that stuff into C++ once ive changed it to point to the right place?
Code
VST_SDK_PATH = C:\vstsdk2.3
VST_SDK_COMMON = $${VST_SDK_PATH}\source\common
SOURCES += \
$${VST_SDK_COMMON}\AudioEffect.cpp \
$${VST_SDK_COMMON}\audioeffectx.cpp \
$${VST_SDK_COMMON}\aeffguieditor.cpp \
$${VST_SDK_COMMON}\vstgui.cpp \
$${VST_SDK_COMMON}\vstcontrols.cpp
RC_FILE += resource\ADelayEditGUI.rc
DEF_FILE += ADelayEditGUI.def
LIBS += -luuid -lole32 -lgdi32 -lcomdlg32 -lvfw32

thanks :)

1) VST 2.4 has changed completely the directory structure and I never used it, so I cannot help you with it.
If I'll find some time, I'll try to adapt the how-to to the new version.
Try to find the same files in 2.4 or use 2.3.

2) That code is NOT for C++, but are informations for the IDE (codeblocks).
eg. (this is the main thing to be done to make it compile):
LIBS += -luuid -lole32 -lgdi32 -lcomdlg32 -lvfw32
means that you have to add libraries to the linker (menu Project -> Build Options -> Linker):
click on the "Add" button for each library (uuid, ole32, gdi32, comdlg32, vfw32)

Offline iw2nhl

  • Multiple posting newcomer
  • *
  • Posts: 116
  • BASIC, C, C++, Qt, bash
Re: Howdy! Im a noob :)
« Reply #18 on: July 17, 2006, 03:38:38 pm »
BTW, if the first one don't get modified compiling wxWidgets, you're doing that in Ansi mode.
Read the wiki for the compilation in unicode mode.
You are right! I made a little mistake: I copied the wrong line to compile wxWidgets
(I used the one with UNICODE=0 instead of that with UNICODE=1)

Thank you very much!

Grazie e ciao!

matthewjumpsoffbuildings

  • Guest
Re: Howdy! Im a noob :)
« Reply #19 on: July 18, 2006, 10:41:39 am »
1) VST 2.4 has changed completely the directory structure and I never used it, so I cannot help you with it.
If I'll find some time, I'll try to adapt the how-to to the new version.
Try to find the same files in 2.4 or use 2.3.

OK thanks....a walkthru using Code:blocks + VST SDK 2.4 would be much appreciated :)

Offline iw2nhl

  • Multiple posting newcomer
  • *
  • Posts: 116
  • BASIC, C, C++, Qt, bash
Re: Howdy! Im a noob :)
« Reply #20 on: July 19, 2006, 01:50:18 am »
Hi,
I just finished to make a VST project with C::B and VST 2.4.
It compiles and the DLL has the right exported functions (this was much trouble).
I have only 1 VST host installed in my system: it sees the plugin, read name/channels/... informations correctly, but does not give me the possibility to use it and I don't know why. (May be incompatibilities with 2.4 version???)
If you give me an email, I can send you the project and the DLL, so you can try it and say me if it works for you.

matthewjumpsoffbuildings

  • Guest
Re: Howdy! Im a noob :)
« Reply #21 on: July 19, 2006, 06:11:30 am »
ok sent....ps why dont u try some various free hosts - like VSTHost, Reaper Beta, CMusic of a computer music CD, or even a demo of FL Studio or something?

matthewjumpsoffbuildings

  • Guest
Re: Howdy! Im a noob :)
« Reply #22 on: July 22, 2006, 12:53:30 am »
OK that VST works totally fine in FL Studio 6.08 (I believe thats cause it supports VST 2.4).

Thats awesome - I know now it can be done - i now just gotta get it to compile on my pc :D

Offline iw2nhl

  • Multiple posting newcomer
  • *
  • Posts: 116
  • BASIC, C, C++, Qt, bash
Re: Howdy! Im a noob :)
« Reply #23 on: July 22, 2006, 01:01:48 am »
It should be very easy, only remeber to modify the variables in the CBP file (see the email) or put your VST SDK in the same dir as mine!
Remember to tell me if your DLL works as mine or not, this is important!

matthewjumpsoffbuildings

  • Guest
Re: Howdy! Im a noob :)
« Reply #24 on: July 22, 2006, 03:41:20 pm »
OK it compiled ok with only some "malformed pragma" warnings, whatever that means....i ran it in FL Studio and it seems to work - it has no gui, no controls/knobs - but it definately does the delay effect....

matthewjumpsoffbuildings

  • Guest
Re: Howdy! Im a noob :)
« Reply #25 on: July 23, 2006, 03:01:22 pm »
is there supposed to be a gui? i noticed vstgui files included in the project.

one question - i notice that you actually have added a bunch of files from the VST SDK directly into your project....is there a way i can set it up so that i dont see all those files in the project tree cause i dont want to open/edit them - i see the projects compile options is set up to point to the right folders, so why doesnt it compile unless the vst source files are literally added to the project?

Offline iw2nhl

  • Multiple posting newcomer
  • *
  • Posts: 116
  • BASIC, C, C++, Qt, bash
Re: Howdy! Im a noob :)
« Reply #26 on: July 23, 2006, 03:20:55 pm »
GUI
Definetly yes, it should have a GUI. I choose that sample because it seemed an almost complete plug-in.
You cannot see the GUI with neither my DLL nor your?

SDK source files
That files must be added because you can only specify directories for "include" files, generally header ".h" files.
This is to compile, but to have an executable, you need the object files to make the linker work.
To have object files, you must compile the SDK files.
This can be done only including the source files in the project (so they are compiled).
At least this is what I know.

I don't like this, but it is needed, as far as I know.
Anyway VisualStudio projects (bundled in the SDK) include SDK source files in the project too, so I think they are really needed.

If someone knows how to avoid including SDK source files in each project, please let us know!

matthewjumpsoffbuildings

  • Guest
Re: Howdy! Im a noob :)
« Reply #27 on: July 23, 2006, 03:23:29 pm »
ok thanks for the explanation youve been so helpful man :) - and your dll has a gui, but when i compile it myself it didnt - ill try again tho....

Offline iw2nhl

  • Multiple posting newcomer
  • *
  • Posts: 116
  • BASIC, C, C++, Qt, bash
Re: Howdy! Im a noob :)
« Reply #28 on: July 23, 2006, 03:48:38 pm »
Perfect, this is exactly what I wanted to know, then 2.4 version has the same bug as the 2.3 version.
Here is how to make GUI work for you too:
- go to VST SDK and open this file (you can do this also from you project, the file is included):
public.sdk\source\vst2.x\vstplugmain.cpp
- add
Code
extern "C" 
at the beginning of the lines 46, 48, 59
- done!

Here are the lines:
original
Code
VST_EXPORT AEffect* main_macho (audioMasterCallback audioMaster) { return VSTPluginMain (audioMaster); }
VST_EXPORT AEffect* MAIN (audioMasterCallback audioMaster) { return VSTPluginMain (audioMaster); }
BOOL WINAPI DllMain (HINSTANCE hInst, DWORD dwReason, LPVOID lpvReserved)
modified
Code
extern "C" VST_EXPORT AEffect* main_macho (audioMasterCallback audioMaster) { return VSTPluginMain (audioMaster); }
extern "C" VST_EXPORT AEffect* MAIN (audioMasterCallback audioMaster) { return VSTPluginMain (audioMaster); }
extern "C" BOOL WINAPI DllMain (HINSTANCE hInst, DWORD dwReason, LPVOID lpvReserved)

This change need to be done only once: you make it to the SDK source files!

matthewjumpsoffbuildings

  • Guest
Re: Howdy! Im a noob :)
« Reply #29 on: July 23, 2006, 03:58:55 pm »
thankyou - i will try this as soon as i can :D