Login :       Password :       Ricorda login e password su questo computer

jpboggis

VirtualDJ support teamer and creator of various MIDI VDJscript mappers/definitions for VirtualDJ.



VDJscript examples

Sun 21 Jun 09 @ 2:13 pm


This document is now part of VirtualDJ Wiki - For the latest version, please see:

http://www.virtualdj.com/wiki/VDJScript%20Examples.html


Here are some VDJscript examples for questions I regularly get asked by users:


Use a combination of buttons to trigger two different actions (I.e: SHIFT button):

VDJscript for the button that will act as the modifier, i.e: SHIFT:

set 'shift' 1 while_pressed


Button to perform two different actions depending on the state of SHIFT button, e.g: FX:

var 'shift' ? effect 'backspin' active : effect 'Flanger' active


This causes the button to trigger flanger on its own, and backspin if SHIFT+button is pressed.


Toggle a specific effect on/off with a button:

effect 'Flanger' active


(Replace Flanger with any other effect name of your choice.)


Toggle a specific video effect on/off with a button:

video_fx_select 'Strobe' & video_fx



Adjust FX parameter using the jogwheel:

Change the jogwheel mapping to the following:

effect active ? effect slider 1 : jog_wheel


(Use touchwheel instead of jog_wheel for a touch sensitive jogwheel.)


Assign different actions for the same button/knob on each side of a dual-deck controller:

The controller definitions for dual-deck controllers such as the Hercules DJ Console RMX, Denon DN-HC4500, etc. are setup so that each button only needs to be mapped once (E.g: PLAY is mapped once to play_pause instead of needing to map it twice (Once for each deck.)

This is done for convenience and to make the mapping considerably simpler, because in most cases, the button, knob, etc. will perform the same function on both sides.

However, you can make a mapping perform different functions for each side by using action_deck, e.g:

action_deck 1 ? sampler play_stop : effect active


This would make a button trigger a sample on the left side and effect on the right.

Of course, the action will be applied to appropriate deck based on which side it's on. You can also get around this by preceding the action with the following:

deck 1 to apply to left deck.
deck 2 to apply to right deck.
deck active to apply to the active deck (The one playing out live.)
deck default to apply to the default deck (The one being cued up/pre-listened to.)

E.g:

action_deck 1 ? deck active sampler play_stop : deck active effect active



Trigger a different function if the button is held down for a given amount of time:

By using holding, you can get a button to perform two different functions depending on whether it's 'clicked' or held down and then released. The amount of time in milliseconds can be optionally specified. E.g: A LOAD button on a controller could be mapped to the following:

holding 2000ms ? unload : load


This will cause the button to load the selected song from the browser if the button is clicked, and unload the song from the deck if the button is held down for 2 seconds and then released.

NOTE: You should be careful using holding with actions where timing is critical, such as hot_cue. This is because the function is triggered when the button is released rather than pressed, resulting in a small random delay depending on how fast you press and release the button. For load/unload, this is not important, but if you are trying to play a hot cue on the beat, this delay may result in your mix being slightly out of time.


Make buttons perform different functions depending on what mode is selected:

First map a button to cycle through the modes, e.g: For 4 different modes Normal, Effects, Video and Sampler:

cycle 'mode' 4 & var_equal 'mode' 1 ? show_text "Effects|Mode" : var_equal 'mode' 2 ? show_text "Video|Mode" : var_equal 'mode' 3 ? show_text "Sampler|Mode" : show_text "Normal|Mode"


The variable 'mode' now holds the mode number, which you can then use in the mapping for each button that will act differently depending on the mode, e.g: You could map a button as follows:

var_equal 'mode' 1 ? effect 'Flanger' active : var_equal 'mode' 2 ? video_fx_select 'Negative' & video_fx : var_equal 'mode' 3 ? sampler 1 play_stop : hot_cue 1


The button will act as follows:

Normal: Hot cue #1
Effects: Turns flanger on/off
Video: Turns the video effect 'Negative' on/off
Sampler: Plays sample #1


Fine pitch adjustment with a knob:

Assigning the following to an endless encoder knob on your controller (If it has one) will allow you to make very fine pitch adjustments.

param_greater 0 ? pitch +0.01% : pitch -0.01%


Alternatively, you can map two buttons to the following:

pitch -0.01%

pitch +0.01%



Pioneer-style CUE and PLAY:

To make the CUE and PLAY/PAUSE buttons behave how they do on Pioneer CD payers (I.e: Stuttering with CUE and then holding down PLAY simultaneously causes playback to continue once the buttons are released), change their mappings as follows:

CUE = set 'cuedown' while_pressed & var 'playdown' ? set 'playdown' 0 : cue_stop
PLAY = var 'cuedown' ? play & set 'playdown' 1 : play_pause

LED_CUE = cue_stop


Stutter button:

The following implements a stutter button. The first press sets the stutter point (Loop in.) Further presses stutter the music from that point. If the button is not used for a few seconds, it will reset automatically.

NOTE: When a loop is active, the button will perform reloop.

Map the button to the following:

var 'shift' ? loop_in & loop_out & loop_exit : loop_in ? reloop & loop_out : loop_in


Map the button LED (If it has one) separately to the following:

loop ? off : loop_in ? blink : off



'Chop' between both decks:

The following will pause the active playing deck and start the opposite deck playing:

deck active pause & deck default play & deck active select



Denon HC-DNH4500 A1/A2 buttons:

To make the A1/A2 buttons behave similar to how they do on Denon CD players, change their mappings as follows:

A1 = set 'A1' 1 while_pressed & var 'FLIP' ? delete_cue 98 : hot_cue 98 & loop_in & set 'ABTN' 1
A2 = set 'A2' 1 while_pressed & var 'FLIP' ? delete_cue 99 : hot_cue 99 & loop_in & set 'ABTN' 2

LED_A1_DIMMER = hot_cue 98
LED_A2_DIMMER = hot_cue 99

LED_A1 = loop ? var_equal 'ABTN' 1 ? on : off : off
LED_A2 = loop ? var_equal 'ABTN' 2 ? on : off : off

FLIP = set 'FLIP' 1 while_pressed & holding 1000ms ? delete_cue 98 & delete_cue 99 : var 'A1' ? nothing: var 'A2' ? nothing : wheel_mode "loop_move,loop_out,loop_in,jog"

NOTE: This uses cue points 98 and 99 - If you don't want these saved in your song, please ensure that you ensure that you clear them first (Hold FLIP for 1 second or press FLIP+A1 and/or FLIP+A2)


Site map
(C)opyright Atomix Productions 2010

Software
Hardware
Goodies
VirtualDJ Pro
VirtualDJ Basic
VirtualDJ Home
VirtualDJ LE
Comparazione
VirtualVinyl
Numark CUE
AtomixMP3
eJay DJMixStation
DJ-Box
What's new
Caratteristiche
Screenshots
Versione Dimostrativa
Manuali Utente
Plugins
Aggiornamento Software
Materiale Promozionale
SDK svilupatori
Timecode CD
Skins
Effetti Audio
Effetti Video
Samples audio
Linguaggi
Sfondi per Desktop
Mappers & Tools
Forums
Rete Utenti
Gruppi Musicali
Wiki e Manuali
Radio
Social Web
Creare un login
Atomix Productions
VIP DJs
Regolamento
Richieste
Controlla le tue richieste
Wiki e Manuali