I tried to compile plugin sample source code shown in this page:
http://www.virtualdj.com/wiki/Developers.html
Plugin SDK v8 - VirtualDJ 8 What's new?
VirtualDJ8_SDK_20190409.zip (header files for all types of plug-ins)
vdjPlugin8.h (basic common base-class for all plugins)
vdjDsp8.h (base classes for all Dsp plugins)
vdjVideo8.h (base classes for all Video plugins) (How To)
Examples of source code:
Basic plugin (with default interface)
http://www.virtualdj.com/wiki/Plugins_SDKv8_Example.html
MyPlugin8.dll was made by Visual Studio 2019, and I copied it to
C:\Users\twaga\Documents\VirtualDJ\Plugins64\VideoEffect.
But VirtualDJ2021 says it's incompatible.
I'd like to get sample source code compatible (and able to be compiled by Visual Studio 2019) with virtualDJ2021.
http://www.virtualdj.com/wiki/Developers.html
Plugin SDK v8 - VirtualDJ 8 What's new?
VirtualDJ8_SDK_20190409.zip (header files for all types of plug-ins)
vdjPlugin8.h (basic common base-class for all plugins)
vdjDsp8.h (base classes for all Dsp plugins)
vdjVideo8.h (base classes for all Video plugins) (How To)
Examples of source code:
Basic plugin (with default interface)
http://www.virtualdj.com/wiki/Plugins_SDKv8_Example.html
MyPlugin8.dll was made by Visual Studio 2019, and I copied it to
C:\Users\twaga\Documents\VirtualDJ\Plugins64\VideoEffect.
But VirtualDJ2021 says it's incompatible.
I'd like to get sample source code compatible (and able to be compiled by Visual Studio 2019) with virtualDJ2021.
Posté Tue 07 Jul 20 @ 11:49 pm
did you build it as x64?
Posté Wed 08 Jul 20 @ 1:43 am
Note: VirtualDJ8_SDK_20190409.zip (header files for all types of plug-ins) contains not uptodate files
better use individualy downloaded ones
vdjPlugin8.h (basic common base-class for all plugins)
vdjDsp8.h (base classes for all Dsp plugins)
vdjVideo8.h (base classes for all Video plugins) (How To)
Just under the zip file in Developers.html page
better use individualy downloaded ones
vdjPlugin8.h (basic common base-class for all plugins)
vdjDsp8.h (base classes for all Dsp plugins)
vdjVideo8.h (base classes for all Video plugins) (How To)
Just under the zip file in Developers.html page
Posté Wed 08 Jul 20 @ 3:44 am
I built it as x86 by mistake.
It became compatible through x64 setting.
But nothing occured when MyPlugin8 turned on in VirtualDJ.
Unless I make addition to this sample code, does this plugin do nothing?
It became compatible through x64 setting.
But nothing occured when MyPlugin8 turned on in VirtualDJ.
Unless I make addition to this sample code, does this plugin do nothing?
Posté Wed 08 Jul 20 @ 1:42 pm
yes, does nothing as it is
Posté Wed 08 Jul 20 @ 3:26 pm
in addition... there is no on/off feature with basic plugin
only the button toggles in skin
to use on/off it needs to be audio/video/translation or implement its own functionality
only the button toggles in skin
to use on/off it needs to be audio/video/translation or implement its own functionality
Posté Wed 08 Jul 20 @ 4:04 pm
I see.
How about Audio plugin (DSP) - Example 1 / Audio plugin (DSP) - Example 2?
What do they do?
How about Audio plugin (DSP) - Example 1 / Audio plugin (DSP) - Example 2?
What do they do?
Posté Thu 09 Jul 20 @ 11:42 pm
these are examples they do nothing usefull (but are switchable)
as said in Audio plugin (DSP) - Example 1
// For the purpose of this example, we mute the left channel and keep (copy) the right channel
it mutes left channel
as said in Audio plugin (DSP) - Example 2
// if you want to work on short samples (16 bit) instead of float samples (32 bit):
it convert buffer of float samples (32 bit) to short samples (16 bit) and optionnaly back
but do not do anything with the resulting buffer
as said in Audio plugin (DSP) - Example 1
// For the purpose of this example, we mute the left channel and keep (copy) the right channel
it mutes left channel
as said in Audio plugin (DSP) - Example 2
// if you want to work on short samples (16 bit) instead of float samples (32 bit):
it convert buffer of float samples (32 bit) to short samples (16 bit) and optionnaly back
but do not do anything with the resulting buffer
Posté Fri 10 Jul 20 @ 1:37 am
I can't find WetDry parameter knob.
Is VirtualDJ supposed to display WetDry knob on the zone marked by star in this attached file?
Is VirtualDJ supposed to display WetDry knob on the zone marked by star in this attached file?
Posté Sat 11 Jul 20 @ 7:43 am
Did you add a WetDry parameter to your plugin?
Posté Sat 11 Jul 20 @ 8:21 am
I forgot to say that I compiled this sample source code.
Audio plugin (DSP) - Example 1
// For the purpose of this example, we mute the left channel and keep (copy) the right channel
it mutes left channel
http://www.virtualdj.com/wiki/Plugins_SDKv8_Example2.html
MyPlugin8.cpp has WetDry as float variable.
Is not WetDry knob displayed on VDJ screen automatically?
for(i=0;i<nb;i++)
{
SampleIn_Left = buffer[2*i];
SampleIn_Right = buffer[2*i+1];
// ADD YOUR AUDIO TREATMENT CODE HERE.
// For the purpose of this example, we mute the left channel and keep (copy) the right channel
float WetDry = 0.0f; // we want to force the sample to 0 (no volume)
SampleOut_Left = WetDry * SampleIn_Left ;
SampleOut_Right = SampleIn_Right;
buffer[2*i] = SampleOut_Left;
buffer[2*i+1] = SampleOut_Right;
}
Audio plugin (DSP) - Example 1
// For the purpose of this example, we mute the left channel and keep (copy) the right channel
it mutes left channel
http://www.virtualdj.com/wiki/Plugins_SDKv8_Example2.html
MyPlugin8.cpp has WetDry as float variable.
Is not WetDry knob displayed on VDJ screen automatically?
for(i=0;i<nb;i++)
{
SampleIn_Left = buffer[2*i];
SampleIn_Right = buffer[2*i+1];
// ADD YOUR AUDIO TREATMENT CODE HERE.
// For the purpose of this example, we mute the left channel and keep (copy) the right channel
float WetDry = 0.0f; // we want to force the sample to 0 (no volume)
SampleOut_Left = WetDry * SampleIn_Left ;
SampleOut_Right = SampleIn_Right;
buffer[2*i] = SampleOut_Left;
buffer[2*i+1] = SampleOut_Right;
}
Posté Sat 11 Jul 20 @ 8:54 am
look at this, OnLoad() declares your params, OnParameter() is called when the param is adjusted
#include "stdafx.h"
#include "vdjDsp8.h"
#include <stdio.h>
#include <sstream>
enum
{
LocoDog4_Param_Slider_Vol
}
;
class CLocoDog4 : public IVdjPluginDsp8
{
public:
HRESULT VDJ_API OnLoad();
HRESULT VDJ_API OnGetPluginInfo(TVdjPluginInfo8 *infos);
ULONG VDJ_API Release();
HRESULT VDJ_API OnStart();
HRESULT VDJ_API OnStop();
HRESULT VDJ_API OnParameter(int id);
HRESULT VDJ_API OnGetParameterString(int id, char *outParam, int outParamSize);
HRESULT VDJ_API OnProcessSamples(float *buffer, int nb);
private:
float parSliderVol;
};
HRESULT VDJ_API DllGetClassObject(const GUID &rclsid, const GUID &riid, void** ppObject)
{
if (memcmp(&rclsid, &CLSID_VdjPlugin8, sizeof(GUID)) == 0 && memcmp(&riid, &IID_IVdjPluginDsp8, sizeof(GUID)) == 0)
*ppObject = new CLocoDog4();
else
return CLASS_E_CLASSNOTAVAILABLE;
return NO_ERROR;
}
HRESULT VDJ_API CLocoDog4::OnLoad()
{
DeclareParameterSlider(&parSliderVol, LocoDog4_Param_Slider_Vol, "Volume", "VOL", 1.0f);
return S_OK;
}
HRESULT VDJ_API CLocoDog4::OnGetPluginInfo(TVdjPluginInfo8 *infos)
{
infos->Author = "Locodog";
infos->PluginName = "Vol";
infos->Description = "Simple volume control";
infos->Version = "1.0";
return S_OK;
}
ULONG VDJ_API CLocoDog4::Release()
{
//Do any cleanup from OnLoad() here
delete this;
return 0;
}
HRESULT VDJ_API CLocoDog4::OnProcessSamples(float *buffer, int nb)
{
float SampleOut_Left, SampleOut_Right;
float SampleIn_Left, SampleIn_Right;
int i;
for (i = 0; i < nb; i++)
{
SampleIn_Left = buffer[2 * i];
SampleIn_Right = buffer[2 * i + 1];
SampleOut_Left = parSliderVol * SampleIn_Left;
SampleOut_Right = parSliderVol * SampleIn_Right;
buffer[2 * i] = SampleOut_Left;
buffer[2 * i + 1] = SampleOut_Right;
}
return S_OK;
}
HRESULT VDJ_API CLocoDog4::OnParameter(int id)
{
switch (id)
{
case LocoDog4_Param_Slider_Vol:
parSliderVol;
break;
}
return S_OK;
}
HRESULT VDJ_API CLocoDog4::OnGetParameterString(int id, char *outParam, int outParamSize)
{
return E_NOTIMPL;
}
HRESULT VDJ_API CLocoDog4::OnStart()
{
return S_OK;
}
HRESULT VDJ_API CLocoDog4::OnStop()
{
return S_OK;
}
Posté Sat 11 Jul 20 @ 9:49 am
twaga wrote :
Is not WetDry knob displayed on VDJ screen automatically?
Is not WetDry knob displayed on VDJ screen automatically?
I'm not a coder, but I imagine that the graphics work in a similar way to skins. You need to tell VDJ what you want, and where you want it.
Where must the knob be positioned? How big? What colour? What style (rotary, slider, horizontal, vertical)?
Posté Sat 11 Jul 20 @ 11:18 am
groovindj wrote :
I imagine that the graphics work in a similar way to skins. You need to tell VDJ what you want, and where you want it.
depends 3 ways it can work,
1 basic you just declare them in the order you want and vdj draws them in that order.
2 skinned you actually make a skin for the fx, it's like any other skin
3 the vst way of doing things using HWND,
Posté Sat 11 Jul 20 @ 1:16 pm
some colors and other things can be specified globaly in "browser" parameters definition to match scheme of the skin
for commands passing from script, a String parameter can be used to send text to the plugin. This string can be used to send back infos to script if needed
VDJ handle display of parameters in basic interface, tooltip saying the ID/Index
for fully skined plugin interface, it's closed to a standard skin (some differences apply to all - always on top - and to extremely complex ones... detected with my plugin used to test skins/skins part/addons)
VST way is good for Audio plugins (badly not for video transitions or visualisations)
for commands passing from script, a String parameter can be used to send text to the plugin. This string can be used to send back infos to script if needed
VDJ handle display of parameters in basic interface, tooltip saying the ID/Index
for fully skined plugin interface, it's closed to a standard skin (some differences apply to all - always on top - and to extremely complex ones... detected with my plugin used to test skins/skins part/addons)
VST way is good for Audio plugins (badly not for video transitions or visualisations)
Posté Sat 11 Jul 20 @ 7:06 pm
https://youtu.be/Nq3nXEVbYFI
I'm suprised to see the slider vanishing when I select DSP1(Audio plugin (DSP) - Example 1).
I'm suprised to see the slider vanishing when I select DSP1(Audio plugin (DSP) - Example 1).
Posté Sun 12 Jul 20 @ 4:09 pm
Did you add a slider in your plugin? (In your OnLoad, you should have a DeclareParameterSlider if you want to add a slider)
Posté Sun 12 Jul 20 @ 4:23 pm
Possible "actually known" parameters types and when they are called
Every declared element have its own index starting at 1 in the type
MAIN types of Parameters:
Button : called twice, one time at down one time at up and everytime effect_button is used in a script
Slider: called as long as value change and everytime effect_slider is used in a script
String : called every time effect_string is used in a script
Command : called all the time
Custom : don't know
FOLLOWING ones register as type Button with specific handling and called everytime effect_button is used in a script
Switch : called once per click (on/off)
Radio : called everytime its status change (selected/released)
ColorFX : called everytime effect_colorfx is used ( effect_colorslider)
Position : called once per click (show/hide)
FOLLOWING ones register as type Sliders
Beats : called every beat and when effect_beats is used in a script
BeatsRelative : called every beat
Every declared element have its own index starting at 1 in the type
MAIN types of Parameters:
Button : called twice, one time at down one time at up and everytime effect_button is used in a script
Slider: called as long as value change and everytime effect_slider is used in a script
String : called every time effect_string is used in a script
Command : called all the time
Custom : don't know
FOLLOWING ones register as type Button with specific handling and called everytime effect_button is used in a script
Switch : called once per click (on/off)
Radio : called everytime its status change (selected/released)
ColorFX : called everytime effect_colorfx is used ( effect_colorslider)
Position : called once per click (show/hide)
FOLLOWING ones register as type Sliders
Beats : called every beat and when effect_beats is used in a script
BeatsRelative : called every beat
Posté Sun 12 Jul 20 @ 6:44 pm
Custom : is data for your plugin that the user doesn't need to see as data, example to look at would be beatgrid fx [patterns are saved as custom param as 0x in the .ini]
Posté Sun 12 Jul 20 @ 7:00 pm
Thanks, was not aware of that ^^
By the way you point something important : All these parameters will be save in the .ini file and restore between sessions
By the way you point something important : All these parameters will be save in the .ini file and restore between sessions
Posté Sun 12 Jul 20 @ 7:05 pm