Ingresar:     


Forum: VirtualDJ Plugins

Tópico: SendCommand() : question

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

I would like to launch the first sampler of VDJ from a plugin.
I use the following function : SendCommand("sampler 1 play_stop", 0)

But it doesn't work.
Any idea?
 

Mensajes Fri 20 May 11 @ 2:03 am
First of all, which SDK version are you using?
 

Hi,
Thank you for your ansswer

I used to use this one :

//////////////////////////////////////////////////////////////////////////
//
// VirtualDJ / VirtualVinyl
// Plugin SDK
// (c)Atomix Productions 2006
//

in which the function is (in VdjPlugin.h)
// callback functions to communicate with VirtualDJ
HRESULT (__stdcall *SendCommand)(char *command,int deck); // send a command to VirtualDJ
HRESULT (__stdcall *GetInfo)(char *query,void *result); // get infos from VirtualDJ

GetInfo works perfectly


I notice that OnStop doesn't work either. Here the detail in th SDK (VdjDsp.h)

class IVdjPluginDsp : public IVdjPlugin
{
public:
// called when the plugin is started or stopped
virtual HRESULT __stdcall OnStart(int pos,int deck) {return 0;}
virtual HRESULT __stdcall OnStop() {return 0;}

But maybe, I have to update the SDK files !

Deun-Deun
 

I've just dowloaded the files, but only VdjPlugin.h is a new one.
VdjDsp.h is always the same as in 2006
 

With the SDK updating, SendCommand() works, but GetInfo() doesn't work anymore :-(

Am I the only one with this kind of issue?
 

 

I try this inside OnProcessSamples :

int RealPos=1; //Put 1 just to check the test about hr works
TVdjQueryResult qRes;
HRESULT hr;

hr=GetInfo("get PlayPos",&qRes);
if(hr==S_OK)
{
RealPos=qRes.vint
}


RealPos is equal to 0

What's wrong?
 

You want 'get position' not 'get playpos' I reckon.

It may well also be a float not an int but I'm not in a position to check right now.
 

No, I want PlayPos
Furthermore I need 2 others parameters : pitch and key

"Get Pitch" doesn't work. I have'nt tried Get Key yet.
 

There is no "playpos" or "get playpos".

"get pitch" works fine and returns a value in % in vfloat.

There is no "get key" either.

You can "get key_modifier" but you could use one of these:

"get text '%key'"
"get text '%Pkey'"
"get text '%camelot'"
"get text '%Pcamelot'"
 

thanks for your answers. I'll try this.

Where do you find this information. Because it seems there is a lot of changes in SDK 6 compare to the previous one?
 

GetInfo uses the v6 VDJScript commands, in the mapper window type get and you'll see :)
 



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