Apparently making a plugin is much harder than I thought.
I'm using Visual Studio 2012 Pro on a Windows 8 machine with Virtual DJ 7. I have installed VC++ 2010 and 2008 Redistributables (both x86 and x84) on my system per the sticky ( http://www.virtualdj.com/forums/148135/VirtualDJ_Plugins/_FAQ__List_of_the_main_topics______Read_this_before_posting_____.html ). I created a new VS project with the vdjMapper.h and vdjPlugin.h files downloaded from ( http://www.virtualdj.com/wiki/Developers.html ).
After several long hours I got the following plugin to at least show up in VDJ after putting it in Documents\VirtualDJ\Plugins. However I'm not sure what to do next. My goal is to custom map a BCR2000 (the one with a bunch of knobs) to VDJ with midi out. This worked beautifully in another DJ program but I'm going back to VDJ.
Where do I select the device? Why do none of my breakpoints on the Do and Query methods go off when move knobs and buttons on the controller? Am I even in the right section? What about this vdjDevice.h file that I've seen others use but can't find?
Most importantly, where is the documentation for this?
Thanks
The basic plugin:
I'm using Visual Studio 2012 Pro on a Windows 8 machine with Virtual DJ 7. I have installed VC++ 2010 and 2008 Redistributables (both x86 and x84) on my system per the sticky ( http://www.virtualdj.com/forums/148135/VirtualDJ_Plugins/_FAQ__List_of_the_main_topics______Read_this_before_posting_____.html ). I created a new VS project with the vdjMapper.h and vdjPlugin.h files downloaded from ( http://www.virtualdj.com/wiki/Developers.html ).
After several long hours I got the following plugin to at least show up in VDJ after putting it in Documents\VirtualDJ\Plugins. However I'm not sure what to do next. My goal is to custom map a BCR2000 (the one with a bunch of knobs) to VDJ with midi out. This worked beautifully in another DJ program but I'm going back to VDJ.
Where do I select the device? Why do none of my breakpoints on the Do and Query methods go off when move knobs and buttons on the controller? Am I even in the right section? What about this vdjDevice.h file that I've seen others use but can't find?
Most importantly, where is the documentation for this?
Thanks
The basic plugin:
#define _CRT_SECURE_NO_DEPRECATE
#include "vdjMapper.h"
class BCR2000Mapper : public IVdjPluginMapper {
public:
HRESULT __stdcall OnLoad();
HRESULT __stdcall OnGetPluginInfo(TVdjPluginInfo *infos) ;
HRESULT __stdcall Do(char *device,char *key,TVdjActionParam *param,DWORD flag);
HRESULT __stdcall Query(char *device,char *key,char *altkey,TVdjActionParam *param,DWORD flag);
private:
};
//---------------------------------------------------------------------------
// Initialisation
//---------------------------------------------------------------------------
HRESULT __stdcall DllGetClassObject(const GUID &rclsid,const GUID &riid,void** ppObject)
{
*ppObject=new BCR2000Mapper();
return NO_ERROR;
}
HRESULT __stdcall BCR2000Mapper::OnLoad()
{
return S_OK;
}
HRESULT __stdcall BCR2000Mapper::OnGetPluginInfo(TVdjPluginInfo *infos)
{
infos->PluginName="BCR2000 Custom Mapper";
infos->Author="TheLQ";
infos->Description="Overly complex mapper";
// Replace the files "BITMAP.BMP" and "SELECTED.BMP" in your directory with your own.
//infos->Bitmap=LoadBitmap(hInstance,MAKEINTRESOURCE(100));
infos->Flag=0;
return S_OK;
}
HRESULT __stdcall BCR2000Mapper::Do(char *device,char *key,TVdjActionParam *param,DWORD flag) {
return S_OK;
}
HRESULT __stdcall BCR2000Mapper::Query(char *device,char *key,char *altkey,TVdjActionParam *param,DWORD flag) {
return S_OK;
}
Mensajes Sun 01 Sep 13 @ 6:49 pm
Silly question this, why are you trying to use the SDK mapper class rather than the built in mapper functions? It won't work with your N4 LE version (or Home Free) and it really isn't necessary.
You can send MIDI out by using the inbuilt mapping functions. No need to use code.
You can send MIDI out by using the inbuilt mapping functions. No need to use code.
Mensajes Sun 01 Sep 13 @ 9:39 pm
SBDJ wrote :
Silly question this, why are you trying to use the SDK mapper class rather than the built in mapper functions? It won't work with your N4 LE version (or Home Free) and it really isn't necessary.
You can send MIDI out by using the inbuilt mapping functions. No need to use code.
You can send MIDI out by using the inbuilt mapping functions. No need to use code.
This is not for the N4, as I said explicitly in the OP this is for a BCR2000. A plugin is necessary since I cannot get MIDI out to work correctly with normal device files, to the point where I can move a knob in VDJ and have it update the LEDs on the BCR2000. This is necessary for loading new tracks and having it reset certain knobs or switching effects which have different values for the sliders.
Mensajes Sun 01 Sep 13 @ 10:01 pm
So what version and build are you testing it on?
Mensajes Mon 02 Sep 13 @ 6:16 am
SBDJ wrote :
So what version and build are you testing it on?
As I said, VDJ 7. I'm still wondering about the questions I asked originally: How can I receive and send MIDI from this plugin? Do I have the correct header file?
Mensajes Mon 02 Sep 13 @ 11:24 am
You have the correct header.
There have been some issues with this class and I havent tested it recently, hence my asking what build you are using.
It also doesnt work at all in LE (and home free iirc)...
There have been some issues with this class and I havent tested it recently, hence my asking what build you are using.
It also doesnt work at all in LE (and home free iirc)...
Mensajes Mon 02 Sep 13 @ 4:54 pm