Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Invalid dll
No permission to create posts
November 5, 2017
6:46 pm
Avatar
David
Member
Members
Forum Posts: 10
Member Since:
September 5, 2017
sp_UserOfflineSmall Offline

Hi Will

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?

 

Thanks

David

November 6, 2017
9:41 am
Avatar
W Pirkle
Admin
Forum Posts: 140
Member Since:
January 28, 2017
sp_UserOnlineSmall Online

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. 

- Will

November 6, 2017
10:24 am
Avatar
Tom
Admin
Forum Posts: 65
Member Since:
April 3, 2014
sp_UserOfflineSmall Offline

Hi,

the last Cubase SX version was 3.1 which received it's latest update in 2005. VST 2.4 was published in 2006 so it could be that Cubase SX does not load the plugins because of the "unknown" API version.

November 8, 2017
3:13 pm
Avatar
David
Member
Members
Forum Posts: 10
Member Since:
September 5, 2017
sp_UserOfflineSmall Offline

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?

November 9, 2017
8:27 am
Avatar
W Pirkle
Admin
Forum Posts: 140
Member Since:
January 28, 2017
sp_UserOnlineSmall Online

You will need to debug your plugin within Reaper itself. There are three tutorials on doing this here:

http://www.willpirkle.com/supp.....ials/#DBG1

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. 

- Will

November 10, 2017
1:55 am
Avatar
David
Member
Members
Forum Posts: 10
Member Since:
September 5, 2017
sp_UserOfflineSmall Offline

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?

 

Thanks

November 10, 2017
9:14 am
Avatar
W Pirkle
Admin
Forum Posts: 140
Member Since:
January 28, 2017
sp_UserOnlineSmall Online

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. 

- Will

November 11, 2017
8:34 am
Avatar
Tom
Admin
Forum Posts: 65
Member Since:
April 3, 2014
sp_UserOfflineSmall Offline

Hi David, hi Will,

@Will: if you are too busy I would be happy to jump in here and have a look at the code.

 

Best Regards

Tom

November 13, 2017
5:18 pm
Avatar
David
Member
Members
Forum Posts: 10
Member Since:
September 5, 2017
sp_UserOfflineSmall Offline

I am now cleaning my code and adding documentation to make it easy as possible to review. I will be happy to take notes from anyone who can assist with making it stable. Just adding a few more comments and explanations. 

November 14, 2017
12:17 pm
Avatar
W Pirkle
Admin
Forum Posts: 140
Member Since:
January 28, 2017
sp_UserOnlineSmall Online

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. 

- Will

November 16, 2017
4:35 pm
Avatar
David
Member
Members
Forum Posts: 10
Member Since:
September 5, 2017
sp_UserOfflineSmall Offline

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.

November 16, 2017
4:50 pm
Avatar
W Pirkle
Admin
Forum Posts: 140
Member Since:
January 28, 2017
sp_UserOnlineSmall Online

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).

- Will

November 16, 2017
5:05 pm
Avatar
David
Member
Members
Forum Posts: 10
Member Since:
September 5, 2017
sp_UserOfflineSmall Offline

Awesome! it works.

One last question: what about the side chain window from RaFX? How can I access it in reaper? 

November 16, 2017
5:26 pm
Avatar
W Pirkle
Admin
Forum Posts: 140
Member Since:
January 28, 2017
sp_UserOnlineSmall Online

See the first addendum here on designing sidechain-able plugins:

http://www.willpirkle.com/rack.....documents/

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.

 Will

Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online: W Pirkle
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Derek: 41

Peter: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 478

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 29

Topics: 479

Posts: 1870

Newest Members:

certvalue111, sobhana s, sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 140

Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 140