Please consider registering

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 Topic RSS sp_TopicIcon
March 31, 2016 - 4:57 am
Member Since: November 19, 2015
Forum Posts: 46
sp_UserOfflineSmall Offline

Hey Will,

I saw you comment about getMyDDLDirectory() in another post so I tried it out. Ran into problems using Make VST when the VST project name is not the same as the RAFX name. (e.g. "TextProjectRafx" then call my VST project "AwesomePlugin")

HMODULE hmodule = GetModuleHandle(m_PlugInName);

will return null because m_PlugInName is the rafx project name and not the VST project name.

I added a change in the VSTProcessor.cpp constructor to set the m_PlugInName to the VST name

// --- now set plugin buddy
m_pRAFXPlugIn = CRafxPluginFactory::getRafxPlugIn();
// --- set latency, sidechain
m_uLatencyInSamples = (uint32)(m_pRAFXPlugIn->m_fPlugInEx[LATENCY_IN_SAMPLES]);
m_bHasSidechain = m_pRAFXPlugIn->m_uPlugInEx[ENABLE_SIDECHAIN_VSTAU];
std::string name = stringOriginalFilename;
int32_t lastIndex = name.find_last_of(".");
m_pRAFXPlugIn->m_PlugInName = strdup(name.substr(0, lastIndex).c_str());

Just a heads up in case you wanted to make adjustments in the next version or see if you have a better solution.


edit:: Another thing I just noticed, you hard code an extension length of 5 in getMyDDLDirectory() for the .dll files

int nLenDLL = strlen(m_PlugInName) + 5; // .dll = 4
memcpy(pDLLRoot, &dir[0], nLenDir-nLenDLL);
pDLLRoot[nLenDir-nLenDLL] = '\0';

But wouldn't this cause a problem with .vst3 files? How about a check on the extension length like

std::string name = dir;
int nLenDLL = strlen(m_PlugInName) + (name.length() - name.find_last_of("."));
memcpy(pDLLRoot, &dir[0], nLenDir-nLenDLL);
pDLLRoot[nLenDir - nLenDLL] = '\0';

I don't have anything on my PC to test .vst3 right now but the changes work for .dlls and should be handle any length file extension.

W Pirkle
March 31, 2016 - 6:26 pm
Member Since: January 29, 2017
Forum Posts: 411
sp_UserOfflineSmall Offline

HI Derek

Yes, and thanks for these updates. I will roll them into [Make VST] for the next revision, and will credit you in the comments.

- Will

Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
5 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 48

Derek: 46

Frodson: 45

TheSmile: 43

Peter: 43

clau_ste: 39

JimmyM: 33

Gwen: 32

EZB: 24

lppier: 23

Member Stats:

Guest Posters: 1

Members: 604

Moderators: 1

Admins: 4

Forum Stats:

Groups: 12

Forums: 37

Topics: 631

Posts: 2485

Newest Members:

Tania, markburrell, Roland, Paris Stam, Caleb, Alan Miller, ben_farrelly, stevo3985, Conrad, Andrii

Moderators: W Pirkle: 411

Administrators: Tom: 74, JD Young: 80, Will Pirkle: 0, W Pirkle: 411