Ingreso rápido:  

Forum: VirtualDJ Plugins

Tema: Hecules RMX Mapper

Este tópico es antiguo y puede contener información incorrecta para la nueva versión.

looshusHome userMember since 2008
Hi all, I've started writing my first plugin, to customise some buttons on the RMX. What I want to do is make the effect buttons have 'momentary' behaviour, and make the track search buttons skip 32 beats instead of 16. I've made a start but need some feedback off someone to check I'm going in the right direction.

Quote :

#define WIN32_LEAN_AND_MEAN
#define _CRT_SECURE_NO_DEPRECATE

#include <windows.h>
#include "vdjPlugin.h"
#include "vdjDevice.h"
#include "DJCMapper.h"


//---------------------------------------------------------------------------
// Class definition
//---------------------------------------------------------------------------
class LOOSHYBRO : public IVdjPluginDevice
{
public:
HRESULT __stdcall OnLoad();
HRESULT __stdcall OnGetPluginInfo(TVdjPluginInfo *infos) ;
HRESULT __stdcall OnButton(int chan,int button,int down);
HRESULT __stdcall OnSlider(int chan,int slider,int absvalue,int relvalue);
HRESULT __stdcall OnTimer();
HRESULT __stdcall GetDeviceType(int *type);


int skip_32;
//int effect_mom;

private:
};
//---------------------------------------------------------------------------
// Initialisation
//---------------------------------------------------------------------------
HRESULT __stdcall DllGetClassObject(const GUID &rclsid,const GUID &riid,void** ppObject)
{
// You don't need to change anything here
// Just leave it like that
if(memcmp(&rclsid,&CLSID_VdjPlugin,sizeof(GUID)) != 0) return CLASS_E_CLASSNOTAVAILABLE;
if(memcmp(&riid,&IID_IVdjPluginDevice,sizeof(GUID))!=0) return CLASS_E_CLASSNOTAVAILABLE;
*ppObject=new LOOSHYBRO();
return NO_ERROR;
}
//---------------------------------------------------------------------------



char _strparam[128];
inline char *strparam(char* s, int v) {wsprintf(_strparam,s,v);return _strparam;};


HRESULT __stdcall LOOSHYBRO::OnLoad()
{
DeclareParameter(&skip_32,VDJPARAM_SWITCH,1,"Skip 32 beats with track search buttons",1);
//DeclareParameter(&effect_mom,VDJPARAM_SWITCH,2,"Make effect buttons momentarily active",1);
return S_OK;
}

HRESULT __stdcall LOOSHYBRO::OnGetPluginInfo(TVdjPluginInfo *infos)
{
infos->PluginName="RMX Looshus Skip 32";
infos->Author="Luke Davies";
infos->Description="Looshus RMX extentions";
// 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 LOOSHYBRO::OnButton(int chan,int button,int down)
{
if (button=DJC_PREV_TRACK_A)
{
SendCommand(strparam("skip_beat",-32),0);
return S_OK;
}

return E_NOTIMPL;
}


HRESULT __stdcall LOOSHYBRO::OnSlider(int chan,int slider,int absvalue,int relvalue)
{
return E_NOTIMPL;
} 



HRESULT __stdcall LOOSHYBRO::OnTimer()
{
return E_NOTIMPL;
}

HRESULT __stdcall LOOSHYBRO::GetDeviceType(int *type)
{
* type=PLUGINDEVICE_DJCONSOLE;
return S_OK;
}


I've only tried the one button so far, is my
Quote :

if (button=DJC_PREV_TRACK_A)
{
SendCommand(strparam("skip_beat",-32),0);
return S_OK;
}

bit OK?

Where do I go from here? do I need to compile the dll, call it DJC.dll and put it in the control device folder?

Any help greatly appreciated, Loosh.
 

Mensajes Fri 04 Jul 08 @ 4:57 am
djcelPRO InfinityModeratorMember since 2004
You need the new "DJCMapper.h" file in order to write a mapper for the RMX

The dll has to be named : rmx.dll
 

Mensajes Sat 05 Jul 08 @ 6:54 am
looshusHome userMember since 2008
Thanks for getting back to me, where can I find the new DJCMapper header file? The one available on the developer page seems to be for the mk I and II controllers and not for the RMX.
 

Mensajes Sun 06 Jul 08 @ 6:51 am
djcelPRO InfinityModeratorMember since 2004
Currently, I'm the only one to have it and it's not yet online.
 

Mensajes Sun 06 Jul 08 @ 5:07 pm
looshusHome userMember since 2008
No chance I could get a sneak preview? ;->

What sorta timescale we lookin on????

Moramax must have it aswell?
 

Mensajes Sun 06 Jul 08 @ 5:36 pm


(Los tópicos y foros antiguos son automáticamente cerrados)