Quick Sign In:  

Forum: VirtualDJ Plugins

Topic: Plugins creation - What's available? [Please write only tips here] - Page: 1

This part of topic is old and might contain outdated or incorrect information

claxPRO InfinityMember since 2004
Hi;
I have a few questions about plugin creation.
Here's a first one: Is the next function available:

-----------------------------------
int level;
...
GetParam(0,"CurrentLevel",&level);
-----------------------------------

I tried and level is 0 after this unstruction.
What does 0 mean in this function ?

Thanks in advance.
Clax
 

Posted Wed 06 Oct 04 @ 12:44 pm
The '0' is the plugin's deck (have a look in the VdjDsp2.h file).You will also see the list of available parameters in that file ("currentlevel" is not available -- this is why it returns 0):

- Bpm (float)
- Pitch (int)
- FilePath (char*)
- FileName (char*)
- FileSize (int)
- Author (char*)
- Title (char*)
- SongLength (int)
- Volume (int)
- Comment (char*)
- PlayPos (int)
- VdjFolder (char*)
- EffectFolder (char*)
- VdjVersion (int)
- CurrentDesk (int)
- CurrentSlot (int)
- CrossfaderVolume (int)
- Crossfader (int)

macourteau
 

Posted Wed 06 Oct 04 @ 8:57 pm
claxPRO InfinityMember since 2004
Thanks macourteau. It's a shame not to obtain the current level. It would be useful (especially for my new project "Fade").

Could the dev staff check on it ?

Thanks in advance.
 

Posted Thu 07 Oct 04 @ 5:06 am
djcelPRO InfinityModeratorMember since 2004
Kaleo:
On atomixfr you declare a max of 3 sliders in VdjDSP.h whereas on virtualdj.com there is a max of 5 sliders in the same file.

For Everyone:

To put information together:

CurrentDesk returns on which deck the plugin is loaded (deck 1 or deck 2) It's used only for sending commands.

CurrentSlot returns on which slot on the current deck (1, 2 or 3) the plugin is placed. This (again) is used only for sending commands.


And now my questions:
* What is CrossfaderVolume (int) ??
Because I suppose Crossfader (int) is the main crossfader
* I have difficulties to understand SendCommand():
the way to write the action (the same as for skins) with: "" or without ? (for example "pause" , level ?? )
 

Posted Tue 12 Oct 04 @ 6:26 pm
kaleoPRO InfinityMember since 2003
Right, the article I wrote on AtomixFR was for VirtualDJ V 1.X plugins

Since virtualDJ v2.X, many change occured in the possibilities offered to plugin developers.

I do not have the time to update my article now (and I don't think I will have more time before january 2005).
So you can use the article to understand how plugins works, but you will find more information about plugin V2 in the file header file VdjDsp2.h

:)
 

Posted Wed 13 Oct 04 @ 8:20 am
djcel:

char cmd[32];
wsprintf(cmd, "level %i", level);
SendCommand(Deck, -1, cmd);


This will do the job... "-1" is the location in the song, enter -1 for the command to be executed immediately...
So i advise you to add at the beginning of the file:
#define NOW -1

macourteau
 

Posted Wed 13 Oct 04 @ 11:26 am
djcelPRO InfinityModeratorMember since 2004
Finally I think that the parameter "CrossfaderVolume (int)" is linked to the action "crossfader_behavior" (Cut/Smooth/Full). Indeed the crossfader plays in reality with level of the decks
 

Posted Tue 09 Nov 04 @ 1:01 pm
djcelPRO InfinityModeratorMember since 2004
To avoid the problem with getparam + crossfader with deck=1 only keep deck=2 (the right deck).

////////////////////////////////////////////////////

#define RIGHT_DECK 2
int XF;
.....
GetParam(RIGHT_DECK,"Crossfader",&XF);

///////////////////////////////////////////////////
 

Posted Fri 19 Nov 04 @ 5:05 pm
djcelPRO InfinityModeratorMember since 2004
Integer (int) corresponding to the decks:

0 : Plugin_Deck
1 : Deck_1 (left deck)
2 : Deck_2 (right deck)

So i advise you to add that at the beginning of the file:
#define PLUGIN_DECK 0
#define LEFT_DECK 1
#define RIGHT_DECK 2


If you want to send actions to the opposite deck of Plugin Deck do that:
/////////
int OTHER_DECK;
[...]
if(Deck==LEFT_DECK) OTHER_DECK=RIGHT_DECK;
if(Deck==RIGHT_DECK) OTHER_DECK=LEFT_DECK;

////////
 

Posted Sun 21 Nov 04 @ 11:51 pm
djcelPRO InfinityModeratorMember since 2004
The parameter "SongLength" of the function "GetParam" returns the total number of samples in the song. Consequently to get the time in seconds of the song,do :

///////////////////
#define SAMPLE_RATE 44100 // SampleRate of VirtualDJ : 44.1KHz (44100 samples/second)
#define PLUGIN_DECK 0

int song_length;
float time;

GetParam(PLUGIN_DECK,"SongLength,&song_length);
time = (float) song_length/(float)SAMPLE_RATE;

//////////////////
Don't forget conversions: int to float, float to int !!

The parameter "CrossfaderVolume" of the function "GetParam" returns the position in the slider corresponding to the maximum level allowed for the deck according to the possition and the type of the crossfader.
For example {smooth+crossfader=2048}=>{CrossfaderVolume=3072 for the left deck and the same for the right deck}
 

Posted Sun 05 Dec 04 @ 1:45 am
djcelPRO InfinityModeratorMember since 2004
For the autopause with auto_cue, create a shortcut to do: "browser_switch(3);browser_open();goto_cue(auto);".
(translation: go to the playlist window, load the first song of the playlist, go to automatic cue).
 

Posted Wed 22 Dec 04 @ 8:30 am
djcelPRO InfinityModeratorMember since 2004
Just for info:

SDK=Software Development Kit

Effect SDK explains the way to create plugins, it gives functions and parameters to "talk" with Virtual DJ by using a .dll file.

 

Posted Mon 10 Jan 05 @ 11:34 pm
wigcityPRO InfinityMember since 2004
For the autopause with auto_cue, create a shortcut to do: "browser_switch(3);browser_open();goto_cue(auto);".
(translation: go to the playlist window, load the first song of the playlist, go to automatic cue).

Hi,

This looks like a very useful function but I can't get it to work in 2.05 or 2.06 - the parameter 'auto' isn't available in the keyboard shortcut function definition as far as I can see (is this the default ie. '0' ?).
Any help in creating a function to pick up the next song on the playlist without using the mouse or Automix would be appreciated,

Thanks
 

Posted Fri 14 Jan 05 @ 4:12 pm
djcelPRO InfinityModeratorMember since 2004
Sorry I forgot to adapt the code. Indeed it lacks something ;-)
I added that in my plugin "simple mix" to load a song from the playlist but it's not perfect. Already told in the "features" forum.
Well, create shortcut with the same key in this order
//////////
browser_switch(3); /*select playlist section */
browser_updown(0); /* As the previous function doesn't select the first item*/ /* go down*/
browser_updown(-1); /*go up*/
browser_open(0); /* load the selected song*/
//////////
To load the song from the playlist but it doesn't work during the first use if you modify the playlist. Then add for autopause:
/////////
goto_cue(0); /* I think too it's 0 for auto , always go to the first cue */
////////
 

Posted Fri 14 Jan 05 @ 6:01 pm
wigcityPRO InfinityMember since 2004
Thanks, that works great - I assume the problem with changing the playlist is something to do with the way the playlist is 'remembered' - I can live with that.... The cue bit isn't necessary for my shortcut - I tend to DJ with a series of shortcuts - I love this feature of VDJ. I'm always looking for tips, someone should extend the user manual with some of this information and not just leave it to the programmers. Thanks again for your help!
 

Posted Fri 14 Jan 05 @ 7:26 pm
djcelPRO InfinityModeratorMember since 2004
By modifying the playlist i wanted to say: if you don't select after the first song , browser_open() will load the current selected song. Only the first use because after that it comes back automatically at the first song.
To solve the problem, maybe use 10 times browser_down(-1) to try to come at first for little playlist but we don't know the number of songs inside the playlist (so 10 or 50 or ... ???) :-(

A French Professional Edition user is trying to update the User Guide. If i have time a day, i will add some tips.

Have a look to the skin development. A lot of functions are explained and programmers don't have their own user guide. I have all learned by asking, reading.
 

Posted Fri 14 Jan 05 @ 7:44 pm
claxPRO InfinityMember since 2004
Could it be possible in the future to get a param with the kind of pitch (+-8 / +-12 / +-34%).
I need it for my beatbreaker project.

Thanks in advance.
 

Posted Mon 14 Mar 05 @ 11:58 pm
djcelPRO InfinityModeratorMember since 2004
SongPhase is the shift of the CBG, from the first sample of the song.

Thus, you have a beat at every (SongPhase + N * SongBpm) sample
 

Posted Tue 29 Mar 05 @ 12:29 am
djcelPRO InfinityModeratorMember since 2004
Here is the formula to control the sliders of the plugin with the keyboard :-)

effect_slider((numslider-1)*65536+pos);

where numslider is the indice of the slider and pos the position on this slider. Calculate with the formula to get the value

Relative position with + or - only works with Virtual DJ v2.10 and more
 

Posted Sun 03 Apr 05 @ 6:00 pm
djcelPRO InfinityModeratorMember since 2004
In the customized interface of plugin, you have:

OnMouseDown(int x,int y,int button)

where (x,y) is the position of your mouse on the screen (window) and button=the button used to click on your mouse
[Button=0 is the left button and button=1 the right one]
 

Posted Fri 08 Apr 05 @ 8:23 pm
61%