Hi all,
I'm working on a new mapper for the Pioneer DDJ-SX2. The controller has the ability to set a specifc color on all of the available drumpads. Fixed colors can be set and triggered with the "get_constant 'xxx,yyy,zzz'" code. But when xxx, yyy, or zzz needs to be variable I can't make it do what I want it to do; for example changing a pad-color when a knob is turned. Does anyone has a script example for doing such a thing?
Another solution would be creating a custom 'device'-file for the DDJ-SX2 and separating the color channels. But when I try doing that, the native controller setup seems to overrule my custom setup/device-file... Am I doing something wrong or is the native midi setup the only way to control the controller?
Thanks in advance!
Greetings,
Dennis
I'm working on a new mapper for the Pioneer DDJ-SX2. The controller has the ability to set a specifc color on all of the available drumpads. Fixed colors can be set and triggered with the "get_constant 'xxx,yyy,zzz'" code. But when xxx, yyy, or zzz needs to be variable I can't make it do what I want it to do; for example changing a pad-color when a knob is turned. Does anyone has a script example for doing such a thing?
Another solution would be creating a custom 'device'-file for the DDJ-SX2 and separating the color channels. But when I try doing that, the native controller setup seems to overrule my custom setup/device-file... Am I doing something wrong or is the native midi setup the only way to control the controller?
Thanks in advance!
Greetings,
Dennis
geposted Wed 25 Mar 15 @ 7:20 pm
Can the leds query the dial?
get_(whatever the dial is) & param_bigger/equal X ? get_constant X : get_constant Y
I believe there's a special command to ignore the native def file, but I can't remember it.
get_(whatever the dial is) & param_bigger/equal X ? get_constant X : get_constant Y
I believe there's a special command to ignore the native def file, but I can't remember it.
geposted Wed 25 Mar 15 @ 7:44 pm
In order your custom definition to bypass the native one, you need to rename it as .. force-whatevername.xml
geposted Wed 25 Mar 15 @ 8:43 pm
Also I don't know what you're trying to do but the best way to illuminate the pads it would be to query the actions you want directly:
LED_PAD1: slip_mode ? constant '255,0,100' : reverse ? constant '50,100,150' : var_equal 'mycustomvariable' 1 ? constant '0,0,100' : var_equal 'mycustomvariable' 2 ? constant '0,0,200' : var_equal 'myothercustomvariable' 1 ? constant '0,100,0' : hot_cue 1 ? constant '150,150,150' : constant '40,40,40'
LED_PAD1: slip_mode ? constant '255,0,100' : reverse ? constant '50,100,150' : var_equal 'mycustomvariable' 1 ? constant '0,0,100' : var_equal 'mycustomvariable' 2 ? constant '0,0,200' : var_equal 'myothercustomvariable' 1 ? constant '0,100,0' : hot_cue 1 ? constant '150,150,150' : constant '40,40,40'
geposted Thu 26 Mar 15 @ 1:53 am
Thanks locodog and PhantomDeejay, but quering with binary logic isn't enough for my needs... *ok sorry, that sounds a little weird*. The thing that I want to do is creating a little animation for the 2x4 pads, with a small range of colors. Like some kind of wave changing the colors time to time or by variables like bpm/volume/etc... This could be done with "IF/ELSE"-statements, but these statements would be quite long and complex. Getting a variable and sending it to the color-cc would be fast and easy. Animation is just for fun/education and impressing the guests at gigs ;P
Also thanks to you djdad! I tried this and it works like a charm. So i started working on the pad-colors; downloaded the midi layout from the Pioneer website. Weird thing is, it doesn't mention any cc for the pad colors: http://pioneerdj.com/support/files/img/DDJ-SX2_List_of_MIDI_Message_E.pdf ... So now I'm of to write a .NET application for looking up these addresses. Not giving up!
Enjoy your weekend!
Also thanks to you djdad! I tried this and it works like a charm. So i started working on the pad-colors; downloaded the midi layout from the Pioneer website. Weird thing is, it doesn't mention any cc for the pad colors: http://pioneerdj.com/support/files/img/DDJ-SX2_List_of_MIDI_Message_E.pdf ... So now I'm of to write a .NET application for looking up these addresses. Not giving up!
Enjoy your weekend!
geposted Fri 27 Mar 15 @ 6:53 pm
Leds have the same notes as the Pads, but they offer velocity
The DDJ-SX2 offers 64 colors so the Leds can be defined as ..
<led note="0x00" min="0x00" max="0x40" name="LED_HOTCUE_PAD1" channel="7" deck="1" /> (Thats the LED of the 1st Pad in HOTCUES mode for deck 1. I believe the other note values are in the doc),
Meaning that you can control the colors by sending ..
97 00 xx
where xx is from x00 (Black) to x40 (White) in hex
You can assign the Led as e.g. get_volume and see what colors you get each time you move the Volume slider.
The DDJ-SX2 offers 64 colors so the Leds can be defined as ..
<led note="0x00" min="0x00" max="0x40" name="LED_HOTCUE_PAD1" channel="7" deck="1" /> (Thats the LED of the 1st Pad in HOTCUES mode for deck 1. I believe the other note values are in the doc),
Meaning that you can control the colors by sending ..
97 00 xx
where xx is from x00 (Black) to x40 (White) in hex
You can assign the Led as e.g. get_volume and see what colors you get each time you move the Volume slider.
geposted Fri 27 Mar 15 @ 8:59 pm
Hi djdad, thanks again!
The following seems to work:
<map value="LEVEL" action="set testvar" />
<map value="LED_HOTCUE_PAD1" action="get_var testvar" />
The color of LED_HOTCUE_PAD1 changes perfectly... But when I want to add a constant to 'testvar' with the function 'param_add', it doesn't seem to work (with any value of 'testvar'):
<map value="LEVEL" action="set testvar" />
<map value="LED_HOTCUE_PAD1" action="get_var testvar" />
<map value="LED_HOTCUE_PAD2" action="param_add testvar & 0.3" />
Parameters like 'volume' (<map value="LED_HOTCUE_PAD2" action="param_add volume & 0.3" />) didn't work either. Is the syntax ok or am I doing something wrong?
Also I would like to trigger events without manual controller-triggers. Can I add triggers like 100ms one-shots? For example to add/multiply a value every 100ms without manual commands?
Greetings,
Dennis.
The following seems to work:
<map value="LEVEL" action="set testvar" />
<map value="LED_HOTCUE_PAD1" action="get_var testvar" />
The color of LED_HOTCUE_PAD1 changes perfectly... But when I want to add a constant to 'testvar' with the function 'param_add', it doesn't seem to work (with any value of 'testvar'):
<map value="LEVEL" action="set testvar" />
<map value="LED_HOTCUE_PAD1" action="get_var testvar" />
<map value="LED_HOTCUE_PAD2" action="param_add testvar & 0.3" />
Parameters like 'volume' (<map value="LED_HOTCUE_PAD2" action="param_add volume & 0.3" />) didn't work either. Is the syntax ok or am I doing something wrong?
Also I would like to trigger events without manual controller-triggers. Can I add triggers like 100ms one-shots? For example to add/multiply a value every 100ms without manual commands?
Greetings,
Dennis.
geposted Fri 27 Mar 15 @ 10:57 pm
Leds (Midi Out) dont execute/perform actions. So the param_add wont work in the LED.
You need another way to add a value. E.g. use a repeat_start on ONINIT or on a button.
Something like .. repeat_start 'myrepeat' 1000ms & cycle 'testvar' 64
You need another way to add a value. E.g. use a repeat_start on ONINIT or on a button.
Something like .. repeat_start 'myrepeat' 1000ms & cycle 'testvar' 64
geposted Fri 27 Mar 15 @ 11:46 pm
You can use param_add on calling events. But they can only modify the called value for the calling LED.
For instance if you have an LED that can read percentages (e.g. for light intensity) you can make something like get_beat & param_multiply 1.5
But you can not permanently change any values.
For instance if you have an LED that can read percentages (e.g. for light intensity) you can make something like get_beat & param_multiply 1.5
But you can not permanently change any values.
geposted Sat 28 Mar 15 @ 7:28 pm
<map value="LED_HOTCUE_PAD2" action="get_var 'testvar' & param_add 0.3" />
geposted Mon 30 Mar 15 @ 10:47 am