Connexion rapide:  

Forum: VirtualDJ Plugins

Sujet VDJ action recognition and read data from inactive deck

Ce topic est ancien et peut contenir des informations obselètes ou incorrectes.

k090PRO InfinityMember since 2006
I write universal plugin where I need response for any action of VDJ, e.g. when button (on screen) is pressed or slider is moved. In Device API I can read status using timer or OnButton function. But it not works when I'm using only VDJ software or MIDI mapped device. So question is - how to recognize any button/slider action from MIDI device or only software?

The next problem is that API enables read data only from active deck. But how to read a data from inactive deck, e.g. title of song which is prepared by DJ on inactive deck? Is it possible?
 

Posté Sun 08 Feb 09 @ 3:22 pm
SBDJPRO Infinity Member since 2006
Quote :
I write universal plugin where I need response for any action of VDJ, e.g. when button (on screen) is pressed or slider is moved. In Device API I can read status using timer or OnButton function. But it not works when I'm using only VDJ software or MIDI mapped device. So question is - how to recognize any button/slider action from MIDI device or only software?


I'm not sure I'm entirely understanding what you're asking here. You can't read input from a MIDI device directly in the plugin, without opening a handle to that MIDI device directly yourself. You also can't really react to all actions, you can only poll for status or use the actions provided in the class of plugin you are coding.

Quote :
The next problem is that API enables read data only from active deck. But how to read a data from inactive deck, e.g. title of song which is prepared by DJ on inactive deck? Is it possible?


Pass the deck number to the GetInfo call as part of the call name.
 

Posté Sun 08 Feb 09 @ 5:17 pm
k090PRO InfinityMember since 2006
SBDJ, if I understand you - I call e.g. GetInfo("Status 2", Deck2status) to read of deck's 2 status?

My first question was if there are any method to react for screen button pressed. E.g. if I press play button on the screen I call action. In vdjDevice there are onButton and onSlider, but not work without device. So only one method is to pull status using timer?
Sorry, but I'm not advanced developer.
 

Posté Sun 08 Feb 09 @ 5:43 pm
k090PRO InfinityMember since 2006
So maybe I clear what I need. I need to read what DJ is currently playing asap after he change the song. My idea was to change both decks' OnAir status (if is 2) after crossfader position changes (each action).
 

Posté Sun 08 Feb 09 @ 5:49 pm
SBDJPRO Infinity Member since 2006
Events aren't provided by the SDK; you will need to poll at regular intervals for such information :)
 

Posté Sun 08 Feb 09 @ 8:07 pm
k090PRO InfinityMember since 2006
Thanks for help. And the last quesion - do you know how to make a loop for reading status on Mac? There is NSTimer, which I used e.g. for iPhone, but I don't know how to use it in plugin devleopment on OS X. Any help:
 

Posté Mon 09 Feb 09 @ 12:35 pm


(Les anciens sujets et forums sont automatiquement fermés)