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 sp_TopicIcon
No permission to create posts
March 31, 2016
4:57 am
Forum Posts: 41
Member Since:
November 19, 2015
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.

March 31, 2016
6:26 pm
W Pirkle
Forum Posts: 143
Member Since:
January 28, 2017
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: 36

Currently Online:
5 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Peter: 41

Derek: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 476

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 30

Topics: 482

Posts: 1876

Newest Members:

sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 143

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