Quick Sign In:  

Forum: VirtualDJ Plugins

Topic: SendCommand() : question

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

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?
 

Posted Fri 20 May 11 @ 2:03 am
SBDJPRO Infinity Member since 2006
First of all, which SDK version are you using?
 

Posted Fri 20 May 11 @ 10:16 am
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
 

Posted Sat 21 May 11 @ 3:32 pm
I've just dowloaded the files, but only VdjPlugin.h is a new one.
VdjDsp.h is always the same as in 2006
 

Posted Sat 21 May 11 @ 3:52 pm
With the SDK updating, SendCommand() works, but GetInfo() doesn't work anymore :-(

Am I the only one with this kind of issue?
 

Posted Tue 24 May 11 @ 6:52 am
djcelPRO InfinityModeratorMember since 2004
 

Posted Tue 24 May 11 @ 7:23 am
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?
 

Posted Mon 13 Jun 11 @ 4:26 pm
SBDJPRO Infinity Member since 2006
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.
 

Posted Mon 13 Jun 11 @ 6:06 pm
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.
 

Posted Thu 16 Jun 11 @ 2:26 pm
SBDJPRO Infinity Member since 2006
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'"
 

Posted Fri 17 Jun 11 @ 1:00 pm
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?
 

Posted Sat 18 Jun 11 @ 12:23 pm
SBDJPRO Infinity Member since 2006
GetInfo uses the v6 VDJScript commands, in the mapper window type get and you'll see :)
 

Posted Sat 18 Jun 11 @ 1:36 pm


(Old topics and forums are automatically closed)