Hey guys, i'd like to get into programming VirtualDJ plugins because i have a few ideas i'd like to explore.
I'm a web developer and have a lot of experience with JavaScript, PHP and NodeJS, but i've never touched C++ before.
I checked out all the files here: https://www.virtualdj.com/wiki/Developers.html
Unfortunately i don't really know where to start or what to do with the files. I'm trying to use Visual Studio 2019 Community.
I also couldn't find any repository on GitHub that could teach me how to get started.
Can someone tell me the steps required to compile a first .dll file with the sample code from that page?
This is what my project currently looks like (i tried building Main.cpp after opening the MyPlugin8.vcproj file) and i don't really have any clue of what i'm doing ^^'
I never really worked with compiled languages or Visual Studio before, only script languages and VS Code, so please bear with me.
I'm a web developer and have a lot of experience with JavaScript, PHP and NodeJS, but i've never touched C++ before.
I checked out all the files here: https://www.virtualdj.com/wiki/Developers.html
Unfortunately i don't really know where to start or what to do with the files. I'm trying to use Visual Studio 2019 Community.
I also couldn't find any repository on GitHub that could teach me how to get started.
Can someone tell me the steps required to compile a first .dll file with the sample code from that page?
This is what my project currently looks like (i tried building Main.cpp after opening the MyPlugin8.vcproj file) and i don't really have any clue of what i'm doing ^^'
I never really worked with compiled languages or Visual Studio before, only script languages and VS Code, so please bear with me.
Posted Sun 05 Jul 20 @ 11:04 am
It looks ok
Your error just means VS can't find "stdio.h" header file (called in MyPlugin8.h header file) in the Windows SDK and one warning lets me guess you don't have the Windows SDK installed
Your error just means VS can't find "stdio.h" header file (called in MyPlugin8.h header file) in the Windows SDK and one warning lets me guess you don't have the Windows SDK installed
Posted Mon 06 Jul 20 @ 1:30 am
djcel wrote :
It looks ok
Your error just means VS can't find "stdio.h" header file (called in MyPlugin8.h header file) in the Windows SDK and one warning lets me guess you don't have the Windows SDK installed
Your error just means VS can't find "stdio.h" header file (called in MyPlugin8.h header file) in the Windows SDK and one warning lets me guess you don't have the Windows SDK installed
Thanks, i'll try installing the SDK.
Posted Mon 06 Jul 20 @ 8:38 pm
Alright i got it compiled, i found a debug_MyPlugin8.dll and put it inside various folders, but i could never get it to do anything... I also don't really know from the code what the plugin i supposed to do. At first i thought it provides a new VDJScript command like isMasterFx or something, but i'm not sure. When i put it inside the AudioFX folder, VDJ says that it's not compatible when i try to open the effect, but i also don't think it's supposed to be an audio effect.
Can someone give me another hint please? ^^'
Where is it supposed to show up? Am i doing this correctly?
Can someone give me another hint please? ^^'
Where is it supposed to show up? Am i doing this correctly?
Posted Mon 06 Jul 20 @ 9:07 pm
It looks like you compiled basic plugin example.
The plugin is just supposed to register as such and expose empty gui with only info box showing name and author
(note the basic plugins are only for permanent autoexec genereric, they can't start/stop)
Compiled OK does not wanna say it is working, but only syntax is OK
If it's not compatible there are some possibilities:
1) Wrong archive : 32 bit folder for 64 bit compiled dll, 64bit folder and 32bit compiled dll (take really care about this)
2) MyPlugin8 class does not create correctly and pointer is NULL (maybe some init function does not return S_OK)
3) Plugin needs some extra dll which are not loadable/not present/wrong ones
The plugin is just supposed to register as such and expose empty gui with only info box showing name and author
(note the basic plugins are only for permanent autoexec genereric, they can't start/stop)
Compiled OK does not wanna say it is working, but only syntax is OK
If it's not compatible there are some possibilities:
1) Wrong archive : 32 bit folder for 64 bit compiled dll, 64bit folder and 32bit compiled dll (take really care about this)
2) MyPlugin8 class does not create correctly and pointer is NULL (maybe some init function does not return S_OK)
3) Plugin needs some extra dll which are not loadable/not present/wrong ones
Posted Mon 06 Jul 20 @ 9:56 pm
Nicotux wrote :
It looks like you compiled basic plugin example.
The plugin is just supposed to register as such and expose empty gui with only info box showing name and author
(note the basic plugins are only for permanent autoexec genereric, they can't start/stop)
Compiled OK does not wanna say it is working, but only syntax is OK
If it's not compatible there are some possibilities:
1) Wrong archive : 32 bit folder for 64 bit compiled dll, 64bit folder and 32bit compiled dll (take really care about this)
2) MyPlugin8 class does not create correctly and pointer is NULL (maybe some init function does not return S_OK)
3) Plugin needs some extra dll which are not loadable/not present/wrong ones
The plugin is just supposed to register as such and expose empty gui with only info box showing name and author
(note the basic plugins are only for permanent autoexec genereric, they can't start/stop)
Compiled OK does not wanna say it is working, but only syntax is OK
If it's not compatible there are some possibilities:
1) Wrong archive : 32 bit folder for 64 bit compiled dll, 64bit folder and 32bit compiled dll (take really care about this)
2) MyPlugin8 class does not create correctly and pointer is NULL (maybe some init function does not return S_OK)
3) Plugin needs some extra dll which are not loadable/not present/wrong ones
First of all thank you for the response. Here is some more information:
- the GUI doesn't show up. I don't even know where i'm supposed to look for it. I conclude that either it's not working or i'm not putting it in the correct folder (i tried Documents\VirtualDJ\Plugins64\AutoStart)
- i haven't changed a single line of the sample code from the basic plugin, so there shouldn't be an issue with any function return value. All HRESULT type functions are returning S_OK
- i don't know what architecture i'm compiling for, i didn't run into a choice or file name that indicated an architecture. How can i check this? VirtualDJ was installed in \Program Files\ so it should be x64
- about the extra dll as i said i didn't change the code, so unless the basic plugin needs something extra, that shouldn't be the issue
Posted Tue 07 Jul 20 @ 9:28 am
the GUI doesn't show up because the plugin don't register
when in "Documents\VirtualDJ\Plugins64\AutoStart" plugin are shown in autostart subfolder ONLY with need of pro version (you appear as "le" user)
VirtualDJ installed in "\Program Files\" so yes it should be x64
you can see this in setting page (bottom left)
With Virtual studio usualy buttons for configuration and platform appear on standard toolbar you can select configuration (debug/release/... and platform (win32/x86/x64/AMD/...) from them or from generate menu configuration manager
due to a bug bug you sometimes needs to select from configuration manager
in all cases at compile time output windows shows lines with this info
for the extra dll.... when not right architecture needed dll is not present/loadable but yes this is not the issue
when in "Documents\VirtualDJ\Plugins64\AutoStart" plugin are shown in autostart subfolder ONLY with need of pro version (you appear as "le" user)
VirtualDJ installed in "\Program Files\" so yes it should be x64
you can see this in setting page (bottom left)
With Virtual studio usualy buttons for configuration and platform appear on standard toolbar you can select configuration (debug/release/... and platform (win32/x86/x64/AMD/...) from them or from generate menu configuration manager
due to a bug bug you sometimes needs to select from configuration manager
in all cases at compile time output windows shows lines with this info
for the extra dll.... when not right architecture needed dll is not present/loadable but yes this is not the issue
Posted Tue 07 Jul 20 @ 10:40 am
I have a second account that i have a pro subscription on that i still need to merge with this one (was my mistake) so that shouldn't be the issue. When i get back home i'll check your post again and see what i get and will report back.
Posted Tue 07 Jul 20 @ 12:05 pm
Alright so i think i got it working by building for x64 and putting the plugin inside the \SoundEffect\ plugin subfolder, which gets me a simple effect that doesn't do anything but has a simple interface.
Maybe i got the wrong impression of the VDJ SDK - is it possible to make a more generic type of plugin?
What i'd like to try out is making a plugin that broadcasts the currently played song information via WebSockets (for example) on the network, maybe also the current MIDI clock. Is that possible? Because that type of plugin wouldn't fit in any category i can see.
Maybe i got the wrong impression of the VDJ SDK - is it possible to make a more generic type of plugin?
What i'd like to try out is making a plugin that broadcasts the currently played song information via WebSockets (for example) on the network, maybe also the current MIDI clock. Is that possible? Because that type of plugin wouldn't fit in any category i can see.
Posted Tue 07 Jul 20 @ 4:20 pm
In fact...category (SDK header file used) is only here to select the set of functionalities the plugin needs
if it does not need any ... basic plugin
if it needs to be switchable on/off use any other (audio / video) and do nothing in callback
ASO
feel free to select final category at uload time (soundeffect videoeffect visualisation transition multitransition other) note i also have some plugins that do not fit existing categories (unreleased websocket ArtNetDmx and skinplugin) as far as it needs a track i put it in audio (but it's my way)
There is no reason not to be able to send what you want using websockets and/or Midi clock, it will fit in category "other" if you want to
up to you to implement everything you want and use any dll you need
By default GUI will be created by VDJ (simple buttons sliders strings switches commands...)
You can create some dedicated skin as a gui for your plugin using skin SDK and specifying Type = VDJINTERFACE_SKIN and loading a png/jpg/bmp in ImageBuffer
if it does not need any ... basic plugin
if it needs to be switchable on/off use any other (audio / video) and do nothing in callback
ASO
feel free to select final category at uload time (soundeffect videoeffect visualisation transition multitransition other) note i also have some plugins that do not fit existing categories (unreleased websocket ArtNetDmx and skinplugin) as far as it needs a track i put it in audio (but it's my way)
There is no reason not to be able to send what you want using websockets and/or Midi clock, it will fit in category "other" if you want to
up to you to implement everything you want and use any dll you need
By default GUI will be created by VDJ (simple buttons sliders strings switches commands...)
You can create some dedicated skin as a gui for your plugin using skin SDK and specifying Type = VDJINTERFACE_SKIN and loading a png/jpg/bmp in ImageBuffer
Posted Tue 07 Jul 20 @ 6:19 pm
Unlimited, what workload do you have choosen at the beginning?
Posted Tue 07 Jul 20 @ 7:29 pm
VDJ Monty wrote :
Unlimited, what workload do you have choosen at the beginning?
Desktop development with C++
and i added Windows SDK (the latest version) afterwards
Posted Tue 07 Jul 20 @ 8:04 pm
Danke dir...
Posted Tue 07 Jul 20 @ 8:43 pm