After months of writing code this is my first time of actually using my plugin in a host (cubase).
From your video tutorial it seems simple - just drag the dll file to cubase's plugin folder (or am I missing something?..).
My problem is that while cubase can see the file in the folder, it is not available for choice, meaning that I can't actually load it to any track. I am using an old version of cubase (sx) but I don't think it matters.
Other plugins load up fine in my cubase project. Any ideas what might be wrong?
Yes, you can use your RackAFX dll as a VST2 dll by just copying it into the VST2 folder of your DAW. I just did this recently using a RAFX DLL from the latest version of RackAFX with no problems. I use Reaper to test VSTs because it will test both VST2 and VST3 versions.
Is your VST host 32 or 64 bit?
The RackAFX plugins are 32-bit and will only show up as VST plugins in 32-bit hosts. You can compile them as 64-bit plugins in Visual Studio for use in 64-bit DAWs.
I've never tested with Cubase sx. The VST2 plugin is v2.4 that is generated as the RackAFX plugin.
Ok, So I downloaded the 32-bit version of reaper and created a 32-bit version of my dll. In reaper's preferences the default folder is C:\Program Files (x86)\Common Files\VST3 so I copied there my dll and renamed the extension to vst3 (I had to create that library first). Reaper recognizes the plugin but when I try to load it reaper crashes (tried that a few times).
I think I followed the instructions exactly as the tutorial here, am I still missing something?
You will need to debug your plugin within Reaper itself. There are three tutorials on doing this here:
If you still have issues after debugging, you can send me a link to your DLL (do not email it) via the contact page. My time is really limited right now so I'm not sure how quickly I can look at it.
I tried following the instructions in the tutorial but I got stuck when it was time to open the VSTProcessor.cpp file since I couldn't find it in my solution (should I be using MAKE VST in order to generate it?).
The thing is that I had A L-O-T of crashes due to heap corruption issues while developing the plugin. I think I solved all of them since the plugin is not crashing anymore when open in Rackafx but it could be that I left something behind that causes it to crash in Reaper so if you could review my code anytime that would be great.
Do you need just the DLL file or the entire project folder from RaFX?
Yes, toxic constructors are usually the cause of a plugin that crashes at load time. And if it crashes RackAFX then it will crash anything else.
I will need the DLL as well as the project folder (zipped), but also need the version of RackAFX you used (it should be the current release version). Please only send a dropbox or google drive link as the DLL/project will be too large to email.
1. actually debug your code - you don't need Make VST for this. Follow the instructions to setup VS to use your VST3 DAW as the executable. Copy (don't move) your DLL into the VST3 folder. Run the DAW, then start the debugger. Place breakpoints in the constructor, prepareForPlay( ) and processAudioFrame( ). Load your plugin. The constructor breakpoint will be hit so you know you're "in" (note that for RAFX DLL as VST DLL, the constructor will be called twice - that is normal).
2. when you load a VST3 into most DAWs, the sequence is: constructor -> prepareForPlay( ) -> processAudioFrame( ), where processAudioFrame() will be sent a stream of 0's until the user actually starts audio flowing. This is different from RackAFX and Apple Logic 9/X where processAudioFrame() will only be called after the user streams audio. Also, Reaper will call your prepareForPlay( ) function dozens of times during the load operation (don't know why).
3. if you just refuse to debug your code and want to do it the hard way, then create a blank (pass through) project in RackAFX. Use File -> Import UI Controls form Project to import your controls from your existing project. Now you will have an identical plugin setup (GUI-wise) that just passes audio. Load this plugin into the DAW - does it crash? I doubt that it will. Next, begin migrating your existing code into the new project a bit at a time, until it crashes when it loads - then you will know what code is causing the problem.
Actively debugging your code is by far and away the fastest way to find your fault. Trying to second-guess the problem, make an edit, then try again is only going to be frustrating.
I generally do not debug other people's C++ code or RackAFX projects unless there is a clear indication that there may be a fault in RackAFX. So, do not send me code unless you really think that it points to a bug in RackAFX. For example, if your pass-thru RackAFX project crashes the DAW then that would be an indication of such.
Thanks, I was able to debug in reaper and solved the problem. The fact the processAudioFrame() is called before I hit play was the root of the crash.
Now my plugin shows in reaper but how do I make it load the advance gui window? It seems that the UI button is not active with my plugin unlike the other build-ins.
Glad you solved it! And, the streaming of 0's constantly has another nasty side effect. If you have an IIR filter running, and you stop playback, but Reaper keeps streaming 0's into your plugin, then eventually your feedback summations will result in a value that is smaller than the smallest possible value that can be represented and you get a denormalized number (#DEN is what you see in the debugger). See the doBiQuad() function for the underflow check:
// underflow check
if(yn > 0.0 && yn < FLT_MIN_PLUS) yn = 0;
if(yn < 0.0 && yn > FLT_MIN_MINUS) yn = 0;
As for your custom GUI, you need to make sure the box is checked that says "Use RackAFX Custom GUI" under the "GUI for VST2/VST3...." on the Edit Project dialog (you can also set this when you create the project).
See the first addendum here on designing sidechain-able plugins:
The document has the old sidechain dialog from the original RackAFX GUI but it is the same idea with the new GUI. The 6.8 version of RackAFX allows you to use the line-in as the sidechain rather than a wav file, but it doesn't matter in the end - the plugin does not know the difference and audio data is the same.
Using sidechains in Reaper can be tricky, so make sure you can setup and use other sidechain-able plugins first.
Most Users Ever Online: 152
Currently Browsing this Page:
Guest Posters: 1
Newest Members:oneday, Phelan Kane, audiocoder, agel, Makai, Abyz, Nonlinear, IgorVish, Arjuna, TomMilne
Moderators: W Pirkle: 470
Administrators: Tom: 74, JD Young: 80, Will Pirkle: 0, W Pirkle: 470