Quick Sign In:  

Forum: VirtualDJ Plugins

Topic: Device plugin, some basic questions

This topic is old and might contain outdated or incorrect information.

Hi guys,

I wanna make a small plugin that will allow specific buttons when pressed to trigger midi commands to other devices. For now I want to create it for the VCI-400 but for the future I could design it more generic to be used with any other midi device (think DMX as well). Basically it will work like this:

The VCI-400 has two a grids of 8 buttons and with each four additional buttons to use as page indicators. Meaning I can have 8 sets of 8 buttons available for assigning midi commands on (midi device, channel, note, velocity). This assignment wil be done in a separate interface storing the settings in its own database. The plugin will simply catch butten pushes, check if they are assigned and than send the midi command through to the connected device. (which of course also could be a virtual midi yoke device). Than you could even have the audio entering VDJ again on a deck to have even more control, add effects and go entirely insane with it :P

But but but... first things first :P

I'll figure out the midi part myself, but when I am now searching for are some points to start. I've got Virtual Studio 2008, installed the wizard and made a test project that I can also compile. So the basic ingredients are there..

Now for the questions:

- Debugging: Currently it creates a dll, what is the easiest debugging strategie? Is attaching it to the VDJ process enough or are there some other things I need to take into account?

- Device Identification: Can I build a super generic plugin that just responds to certain midi buttons (chan, button, down) or does the device need to be identified in a specific way?

I see this function ...

virtual HRESULT VDJ_API GetDeviceType(int *type)=0


... that is to be implemented. And I see several device defines, ranging 1 to 13. Can I pick any number, like 14? Do I need to reserve a number for the VCI-400?

- Detect button press and identifying the button

Can I just fill in this function ...

virtual HRESULT VDJ_API OnButton(int chan,int button,int down) {return 0;}


.. Or do I need to predefine the buttons?

- Getting the state of a specifc LED/Button (on, off, blink)

To determine the page I will look at the led state of the button. I'll have this controlled by the regular mapper. What is the option to get the status of a led OR should I be monitoring the button presses? How than do I detect HOLD pressing? Since my grid will be enabled on HOLD of the button. The LED will than blink.

Well those are basically my challenges besides sending out the Midi note and making a nice configuration interface.

Who can help me on my way?

Thanks!
 

Posted Thu 23 Feb 12 @ 10:55 am
Some progress, well not that much..

- Got my environment setup (VS 2008 SP1) and installed the plugin SDK f0r 2008
- Made a new VDJ device plugin projects

First problem..
- Building did produce output files, changed output path to my documents, plugin is now build in VirtualDJ\Plugins\ControlDevice
- Debugging couldn't find VirtualDJ, changed executable name

Second problem..
- Set a breakpoint on first line of
HRESULT VDJ_API DllGetClassObject(const GUID &rclsid,const GUID &riid,void** ppObject)

- Breakpoint never hit.. dll is not loading
- Moved the dll around, eventually to VirtualDJ\Plugins\Other, breakpoint hits, dll loading

Third problem
- Plugin tries to load twice but exits/unloads each time on the first line of
HRESULT VDJ_API DllGetClassObject(const GUID &rclsid,const GUID &riid,void** ppObject)

- Updated vdjPlugin.h with the code found in http://www.virtualdj.com/forums/66979/VirtualDJ_Plugins/Plugins_SDK_for_VirtualDJ_and_Numark_CUE_(PC___MAC).html
- Changed several variables and noticed some stuff for the device plugin to be entirely gone..

Is this whole thing even still supported???

 

Posted Fri 24 Feb 12 @ 11:38 am
Nevermind...

I'll use an audio plugin, that one I got working in a few minutes.

I'll trigger the midi notes on a value update of the slider, I wouldn't even need to activate it. Thats super generic to start with and I can use the mapper to define where and when.
 

Posted Fri 24 Feb 12 @ 11:54 am


(Old topics and forums are automatically closed)