Quick Sign In:  

Forum: VirtualDJ Plugins

Topic: Need help in developing plugin - Page: 1

This part of topic is old and might contain outdated or incorrect information

Hey I'm trying to develop plugin for virtual dj.

I've looking a lot for example code but found almost nothing good.
I just need full code example of one plugin to understand what to do and how.
I've already develop plugin for winamp but it's seems different in vdj.
I'll appreciate any help.

many thanks, Gal
 

Posted Sat 28 Mar 15 @ 9:36 am
locoDogPRO InfinityModeratorMember since 2013
Have a deep dig round the V7 effects there's some that include sauce,
I have the sauce for the recent Andj (V8 volume effect) but I'm not sure if it can be shared.
 

Posted Sat 28 Mar 15 @ 3:07 pm
locoDogPRO InfinityModeratorMember since 2013
I can't help it, I like writing sauce instead of source, Tasty copy+pasta sauce.
 

Posted Mon 30 Mar 15 @ 5:15 am
hey,
I'm trying just to popup meassgabox when the plugin loaded.

class cSaadaPlugin8: public IVdjPlugin8
{
public:
HRESULT __stdcall OnLoad();
HRESULT __stdcall OnGetPluginInfo(TVdjPluginInfo *infos);
// Custom user-interface
// Fill the HWND or xml/bitmap info in the passed pluginInterface structure, to define your own plugin window
HRESULT VDJ_API OnGetUserInterface(TVdjPluginInterface8 *pluginInterface);
ULONG __stdcall Release();

VDJ_HINSTANCE hInstance;

private:
TVdjPluginInterface8 x;
};

static void *pObjectje;
//////////////////////////////////////////////////////////////////////////
// Initialization
///////////////////////////////////////////////////////////////////////



class cSaadaPlugin: public IVdjPlugin8
{
};


HRESULT VDJ_API DllGetClassObject(const GUID &rclsid,const GUID &riid,void** ppObject)
{

if (memcmp(&rclsid,&CLSID_VdjPlugin8,sizeof(GUID))==0 && memcmp(&riid,&IID_IVdjPluginBasic8,sizeof(GUID))==0)
{
*ppObject = new cSaadaPlugin8();
}
else if (memcmp(&rclsid,&CLSID_VdjPlugin6,sizeof(GUID))==0 && memcmp(&riid,&IID_IVdjPluginBasic,sizeof(GUID))==0)
{
*ppObject = new cSaadaPlugin();
}
else
{
return CLASS_E_CLASSNOTAVAILABLE;
}

return NO_ERROR;
}

HRESULT __stdcall cSaadaPlugin8::OnLoad()
{
pObjectje=this;
MessageBoxA(x.hWnd, "Saada", "configevent", MB_OK);
return S_OK;

}


HRESULT VDJ_API cSaadaPlugin8::OnGetUserInterface(TVdjPluginInterface8 *pluginInterface)
{
return S_OK;
}


HRESULT __stdcall cSaadaPlugin8::OnGetPluginInfo(TVdjPluginInfo *infos)
{
MessageBoxA(x.hWnd, "Saada", "configevent", MB_OK);
infos->Author=(char*)"Saada";
infos->PluginName=(char*)"NextSong";
infos->Description=(char*)"Change to world";
infos->Flag=0x00;
return S_OK;
}

ULONG VDJ_API cSaadaPlugin8::Release()
{
// Close Server
delete this;
return S_OK;

}
 

Posted Thu 02 Apr 15 @ 11:00 am
 

Posted Fri 03 Apr 15 @ 2:37 am
many tnx!
some how onstart function never called.

// VdjPlugin.cpp : Defines the exported functions for the DLL application.
//

#include "vdjPlugin8.h"
#include "vdjPlugin.h"
#include "vdjVideo8.h"
#include "VdjOwnPlugin.h"

#include <iostream>



HRESULT VDJ_API DllGetClassObject(const GUID &rclsid,const GUID &riid,void** ppObject)
{

if (memcmp(&rclsid,&CLSID_VdjPlugin8,sizeof(GUID))==0 && memcmp(&riid,&IID_IVdjPluginBasic8,sizeof(GUID))==0)
{
*ppObject = new cSaadaPluginVideo8();
}
else if (memcmp(&rclsid,&CLSID_VdjPlugin6,sizeof(GUID))==0 && memcmp(&riid,&IID_IVdjPluginBasic,sizeof(GUID))==0)
{
*ppObject = new cSaadaPluginVideo();
}
else
{
return CLASS_E_CLASSNOTAVAILABLE;
}

return NO_ERROR;
}


cSaadaPluginVideo8::cSaadaPluginVideo8()
{

// Debug console window so printf works
FILE* pCout;
AllocConsole();
freopen_s(&pCout, "CONOUT$", "w", stdout);
printf("NextUpPlugin\n");

}


cSaadaPluginVideo8::~cSaadaPluginVideo8()
{

}


HRESULT VDJ_API cSaadaPluginVideo8::OnLoad()
{
return NO_ERROR;
}

HRESULT __stdcall cSaadaPluginVideo8::OnGetPluginInfo(TVdjPluginInfo8 *infos)
{
MessageBoxA(x.hWnd, "bbaa", "configevent", MB_OK);
printf("GetPluginInfo()\n");
infos->Author=(char*)"aa";
infos->PluginName=(char*)"NextSong";
infos->Description=(char*)"Change to world";
infos->Version= (char*) "v1.0";
infos->Flags=0x00;
infos->Bitmap = NULL;
printf("GetPluginInfo123()\n");
return NO_ERROR;
}


HRESULT VDJ_API cSaadaPluginVideo8::OnStart()
{
printf("OnStart()\n");
return NO_ERROR;
}


HRESULT VDJ_API cSaadaPluginVideo8::OnStop()
{
printf("OnStop()\n");
//Create Server
return NO_ERROR;
}

HRESULT VDJ_API cSaadaPluginVideo8::OnDraw()
{
printf("OnDraw\n");
DrawDeck();
return NO_ERROR;
}


ULONG VDJ_API cSaadaPluginVideo8::Release()
{
// Close Server
printf("Release\n");
delete this;
return NO_ERROR;

}
 

Posted Tue 07 Apr 15 @ 12:26 pm
Is that possible to control the playlist by plugin?
I need to get the songs and their time and play one of them..
there is any way to do this from plugin?
 

Posted Tue 07 Apr 15 @ 1:06 pm
SBDJPRO Infinity Member since 2006
You'll have to be clearer as to what it is you actually want to do.

What playlist?
What time?
 

Posted Wed 08 Apr 15 @ 7:54 pm
SBDJPRO Infinity Member since 2006
Quote :
some how onstart function never called.


No, it won't be - you've told VDJ to instantiate your new plugin instance when the IID is IID_IVdjPluginBasic8. If you're writing a video effect (your class declaration is missing so I can't see what class you have derived from) then you need to check for the IID for video effects - IID_IVdjPluginVideoFx8.
 

Posted Wed 08 Apr 15 @ 7:58 pm
the class declaration, I used video plugin because the general plugin didn't works at start.. and I didn't found a way to active the plugin manually.
What I'm trying to do is the send all the songs at the playlist (automix) and the length of each song to a server, and the sever could play each one.
At the api there is nothing like this, there is any other option?

many tnX



#include "vdjPlugin8.h"
#include "vdjPlugin.h"
#include "vdjVideo8.h"

class cSaadaPluginVideo8 : public IVdjPluginVideoFx8
{
public:
cSaadaPluginVideo8();
~cSaadaPluginVideo8();

HRESULT VDJ_API OnLoad();
HRESULT VDJ_API OnGetPluginInfo(TVdjPluginInfo8 *infos);
HRESULT VDJ_API OnStart();
HRESULT VDJ_API OnStop();
HRESULT VDJ_API OnDraw();

ULONG VDJ_API Release();


private:
TVdjPluginInterface8 x;
static void *pObjectje;
};

class cSaadaPluginVideo : public IVdjPluginVideoFx8
{
HRESULT VDJ_API OnDraw();
};
 

Posted Fri 10 Apr 15 @ 9:34 am
SBDJPRO Infinity Member since 2006
In your DllGetClassObject you aren't checking for the IID of a video plugin, you are checking for a basic plugin instead.

Only pro versions can use plugins declared against the base class btw.
 

Posted Fri 10 Apr 15 @ 8:55 pm
djcelPRO InfinityModeratorMember since 2004
 

Posted Sat 11 Apr 15 @ 7:57 am
Really? only pro version can run a base plugin.. good to know thank you.
Is there any way to get the songs name from the automix playlist?
 

Posted Wed 15 Apr 15 @ 4:26 pm
djcelPRO InfinityModeratorMember since 2004
 

Posted Thu 16 Apr 15 @ 5:58 pm
djcelPRO InfinityModeratorMember since 2004
 

Posted Wed 22 Apr 15 @ 4:57 pm
locoDogPRO InfinityModeratorMember since 2013
Plugins with skins, oh my. Time to convert some caffeine and swearing into code.
 

Posted Wed 22 Apr 15 @ 6:27 pm
locoDogPRO InfinityModeratorMember since 2013
Much appreciated, as may examples as possible are welcome.

*Edit also could you please UL the png for example 4, to save a bit of effort?
 

Posted Thu 23 Apr 15 @ 8:17 am
locoDogPRO InfinityModeratorMember since 2013


Example has a couple of problems to compile
MyPlugin8.cpp & MyPlugin8.h both need,

#include "Stdafx.h"

Also line 17, MyPlugin8.cpp, deleting the 0 then it will compile.

'IVdjPlugin8::DeclareParameterButton' : function does not take 5 arguments
 

Posted Thu 23 Apr 15 @ 12:07 pm
locoDogPRO InfinityModeratorMember since 2013
Request a example of the basic plugin doing something, setting a variable from a dial, querying something, baby steps. I'm sure it's all there in the original example, just that there's a lot to take in.
 

Posted Thu 23 Apr 15 @ 3:19 pm
djcelPRO InfinityModeratorMember since 2004
locodog wrote :


Example has a couple of problems to compile
MyPlugin8.cpp & MyPlugin8.h both need,

#include "Stdafx.h"

Also line 17, MyPlugin8.cpp, deleting the 0 then it will compile.

'IVdjPlugin8::DeclareParameterButton' : function does not take 5 arguments

code updated for vdjPlugin8.h => (float) parameterSize

I had another SDK8 more customized ;-)

code updated for MyPlugin8.cpp to remove 0
 

Posted Thu 23 Apr 15 @ 4:38 pm
54%