Connexion rapide:  

Forum: VirtualDJ 8.1 Technical Support

Sujet More LED definition woes

Ce topic est ancien et peut contenir des informations obselètes ou incorrectes.

oursoulHome userMember since 2009
Still trying to map my APC40 mk2 to VDJ8, now got problems with the track knob led rings!

In Mode 0 (Generic Midi), when you turn an encoder the light moves to indicate the current value.

I am using Mode 1 (Ableton Live Mode), and the encoder lights stay at 0 despite being turned.

The manual gives the MIDI info as follows:

Track Knob X LED Ring Type = Midi control ID's 0x38 - 0x3F (there are 4 "types" - 0-Off, 1-Single, 2-Volume Style, 3-Pan Style, 4-127-Single)

These change the behaviour of the LEDs - i think i need '1-Single', as these are going to be EQs so the light just goes left to right depending on the current value.

Track knob X = MIDI control ID's : 0x30 - 0x37
These control the actual position of the LED:


A. SINGLE

MIN MAX LED STATES
0 3 100000000000000
4 8 110000000000000
9 12 010000000000000
13 17 011000000000000
18 21 001000000000000
22 25 001100000000000
26 30 000100000000000
31 34 000110000000000
35 38 000010000000000
39 43 000011000000000
44 47 000001000000000
48 52 000001100000000
53 56 000000100000000
57 60 000000110000000
61 65 000000010000000
66 69 000000011000000
70 73 000000001000000
74 78 000000001100000
79 82 000000000100000
83 87 000000000110000
88 91 000000000010000
92 95 000000000011000
96 100 000000000001000
101 104 000000000001100
105 108 000000000000100
109 113 000000000000110
114 117 000000000000010
118 122 000000000000011
123 127 000000000000001

I have tried several methods using examples from around the forum, and have read all the info in VDJPedia but nothing seems to work :(

The track controls work fine and are set up like this:

<slider cc="0x30" name="TRACK KNOB 1" channel="0" />
<slider cc="0x31" name="TRACK KNOB 2" channel="0" />
<slider cc="0x32" name="TRACK KNOB 3" channel="0" />
etc

Trying to send value 0x01 to APC to set the type:

<led note="0x38" value="0x01" name="LED_TRACK_KNOB_1_TYPE" channel="0" />
...etc

...then set the range 00-7F on the actual LED value:

<led cc="0x30" zero="0x40" min="0x00" max="0x7F" name="LED_TRACK_KNOB_1" channel="0" />

I've tried interchanging <led cc and <led note on both sides (because i'm a noob and only half understand what i'm doing ;) but nothing seems to work.

If i send Sysex to the controller i can get the lights to work:

B03801 (Sets the type to 'single')

B03040 (sets the LED to middle position 0x40)

there's probably a really easy way of doing this i.e. initialising the controls using a sysex string at startup, but my novice attempts have yielded disappointing results.

Any help, as always, would be much appreciated.
Thanks
 

Posté Tue 19 Jul 16 @ 12:02 am
djdadPRO InfinityDevelopment ManagerMember since 2005
First of all.. since all of your recent posts are related to the APC40 unit, why dont you keep all those related questions into one place ? By the time you will finish the mapping files, we wil lhave about a dozen posts about APC40MKII definition :)

Anyways, to your questions..

1. Type of Leds. (modes).
One way is to select one of the available modes in your definition and send a sysex on startup, so you need ..
<init sendsysex="B03801"/>
Another way (suggested) is to define the CC for the mode as a "slider" which can take values
e.g.
<led cc="0x18" min="0" max="3" name="LED_TYPE_DEVICE_CONTROL_1" />
and then you can probably map it like .. constant 0 , constant 0.5 etc (from 0.0 to 1.0)
or
define each mode with a single value
<led cc="0x18" value="0x01" name="LED_TYPE1_DEVICE_CONTROL_1" />
<led cc="0x18" value="0x02" name="LED_TYPE2_DEVICE_CONTROL_1" />
<led cc="0x18" value="0x03" name="LED_TYPE3_DEVICE_CONTROL_1" />
and then in mapping assign each one of the types as true or false, depending on which mode youneed to use.
Having the ability to change the LED Type from the mapping will be also helpful to other users who may use your files and want a different behavior for the LEDs. Also you may want the same knob to behave differently if e.g a button is mapped as SHIFt (to toggle a variable), and have var 'myvar' ? do this : do that. In this case you may also need to change the type of the LED to something else e.g. to show the Full type style, so you can have var 'myvar' ? true : false (or constant x : constant y)..so its really a good practice to go that way.

2. Leds.
Once the type is defined, all you need is to define the LEDs as <bar>
somthing like..
<bar cc="0x10" min="0x00" max="0x7F" channel="0" name="LED_DEVICE_CONTROL_1" />
and in mapping, just the action would be enough..
e.g. : eq_high

PS. if the message starts with B e.g. B0 30 xx then its CC . If the message is starting with 9, e.g. 90 30 xx then its note.
The digit after the B or 9 is the channel... so B0 30 xx means cc="0x30" channel="0", 93 15 xx means note="0x15" channel="3"
 

Posté Tue 19 Jul 16 @ 3:33 am
oursoulHome userMember since 2009
Mate, once again your reply is pure gold to a novice, thanks :) B=CC, 9=note - I owe you a pint for that simple nugget of info alone ;)

If you're a moderator and are able to get all these posts together under one heading please do - the only reason they're all over the place is once i've had one question answered i think 'right, that's it, i can finish it off now', then spend the next 2 days tearing my hair out to sort out the next thing before crawling back here for help! Thanks for your patience :)

With any luck this will all prove valuable to anyone else trying to define this superb controller, as info on this device for anything other than for use with Ableton is pretty sparse.

I will try this lot out later on. I did try your first method myself <init sendsysex="B03801>, but as i've already got one of these commands at the start to get the thing in Ableton Live mode 1 and it didn't really seem to work i thought they might be conflicting in some way.

Good idea to set it up so the mode can be changed from within mapping, that way someone can easily make a pan or volume control without mucking about with the definition file.

Anyway, will try it out later and let you know how I got on. Your suggestion about <bar> reminds me, I'd like to have a go at configuring the 5 pads above each track fader (of which there will only be 2) to be VU meters fed from the output of each channel, and have had a bit of a look at the instructions but they only seem to cover situations where it's a VU led bar on a mixer, or where the leds are in order. If one were to use the pads on the APC they are non-concurrent, i.e. the line of leds running vertically above track 4's fader are 0x03, 0x0B, 0x13, 0x1B and 0x23. We can leave that for another time though, i just wondered if it sounds possible? It would look really cool :)
 

Posté Tue 19 Jul 16 @ 9:33 am
djdadPRO InfinityDevelopment ManagerMember since 2005
You can have as many <init lines as you want.
Apparently the init sysex to set Leds to a specific mode, needs to come AFTER the one that sets the unit to Ableton Live mode, or else this may not work ;)
 

Posté Tue 19 Jul 16 @ 4:16 pm
oursoulHome userMember since 2009
I've tried all 3 methods separately, unfortunately still no joy with the leds round the knobs :(

Actually, something is happening, just not like you'd want it to! Now the leds round track knob 1 stay at '1', and if i reduce the actual knob to 0 (as it's connected to the low eq, it starts in the middle position) the light goes out, but there's a position just above 0 where half the leds light up i.e. from 1-64, though you have to be very precise to get it to do that - go above this 1-ish position and the light goes back to '1'!

method 1:

all knobs set up like this in definition:

<led cc="0x38" value="0x01" name="LED_TRACK_KNOB_1_SINGLE_TYPE" />
<led cc="0x38" value="0x02" name="LED_TRACK_KNOB_1_VOL_TYPE" />
<led cc="0x38" value="0x03" name="LED_TRACK_KNOB_1_PAN_TYPE" />

and like this for the actual LEDs:

<bar cc="0x38" min="0x00" max="0x7F" channel="0" name="LED_TRACK_KNOB_1" />

I also tried adding in zero="0x40" to try to get the light to start at the mid position, but that didn't work.

then in mapper, it's set like this:

<map value="LED_TRACK_KNOB_1_PAN_TYPE" action="false" />
<map value="LED_TRACK_KNOB_1_SINGLE_TYPE" action="true" />
<map value="LED_TRACK_KNOB_1_VOL_TYPE" action="false" />

<map value="LED_TRACK_KNOB_1" action="deck 1 eq_low" />

then the actual control is mapped like this and works fine (i.e. i can raise or lower the eq using the knob)

<map value="TRACK KNOB 1" action="deck 1 eq_low" />

method 2:

Setting up cc's as sliders with only 4 different values to control the type:

<led cc="0x38" min="0" max="3" name="LED_TYPE_TRACK_CONTROL_1" />

then setting this in mapping to constant 0.0, 0.5 or 1.0, again didn't have any effect.

method 3:

sending <init sendsysex messages to (a) set the type and (b) get the light to the mid position. This works in that it gets the lights centred, but doesn't update when the knob is turned, just stays in the centre. I presume the 'type' is working as only the centre LED is lit - if it were set to Volume type all the LEDs from 1-64 would be lit.

(a)

<init sendsysex="B03801" />
<init sendsysex="B03901" />
<init sendsysex="B03A01" />
<init sendsysex="B03B01" />
<init sendsysex="B03C01" />
<init sendsysex="B03D01" />
<init sendsysex="B03E01" />
<init sendsysex="B03F01" />

(b)

<init sendsysex="B03040" />
<init sendsysex="B03140" />
<init sendsysex="B03240" />
<init sendsysex="B03340" />
<init sendsysex="B03440" />
<init sendsysex="B03540" />
<init sendsysex="B03640" />
<init sendsysex="B03740" />

What am i doing wrong this time!?!?

Thanks for your patience :)
 

Posté Wed 20 Jul 16 @ 9:42 am
oursoulHome userMember since 2009
 

Posté Wed 20 Jul 16 @ 3:14 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
Sorry my bad, <led cc="" with min/max wont work, so try ..
<bar cc="0x38" min="0" max="3" name="LED_TYPE_TRACK_CONTROL_1" />
and then try to assign it as ..
constant 0.0 , constant 1.0, constant 0.25 etc.

on, true , 1 and yes are the same thing
off, false, 0 and no are the same thing too
 

Posté Wed 20 Jul 16 @ 4:26 pm
oursoulHome userMember since 2009
Just tried AKAI's suggestion, didn't work.

If i'm changing to:

<bar cc="0x38" min="0" max="3" name="LED_TYPE_TRACK_CONTROL_1" />

...to change the 'type', what would be the correct syntax for controlling the actual LEDs around the knob? these are also mapped to <bar cc="0x38" etc:

<bar cc="0x38" min="0x00" max="0x7F" channel="0" name="LED_TRACK_KNOB_1" />

and how exactly do i map these led knobs (the actual LEDs, not the type knobs) in the mapper? Changing to <bar cc for the track type knobs gave the same result as before - first LED lit at startup, no change when turning clockwise, turning anticlockwise eventually turns the first LED off, then a slight clockwise turn results in the first half of the circle of leds lighting up.

I feel like i've tried all these and combinations thereof and nothing seems to work :(

I'm turning the device off and on in between attempts so each time it's starting from fresh, all the .xml files are saved and closed before starting VDJ, and have no sysex going out apart from the first one setting it to Ableton Live mode.

I might have to resort to tippexing lines on the knobs - that would work!
 

Posté Wed 20 Jul 16 @ 9:13 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
the Type and the Led itself should be on a different cc.
0x38 seems to be the Type and Leds start from 0x30 i think.
<bar cc="0x38" min="0" max="3" name="LED_TYPE_TRACK_CONTROL_1" />
<bar cc="0x30" min="0x00" max="0x7F" channel="0" name="LED_TRACK_KNOB_1" />

LED_TYPE_TRACK_CONTROL_1 : provide a constant value , e.g. constant 0.3 (probably will set type 1)
LED_TRACK_KNOB_1 : provide a "fader" action, e.g. volume , eq_high etc

Also from what i can see from the document, the unit should offer different channels depending probably by the "bank" or "Device" that is selected.. so maybe leave the channel="x" out of the definition, until you figure out how it works.

PS. I had tried mapping the unit via Teamviewer in the past, and indeed came up to an issue regarding those LEDs. There may be a firmware issue/bug there, which AKAI may not even know. or some hidden corners in the firmware too.

good luck is all i can say here.
 

Posté Thu 21 Jul 16 @ 8:09 am
oursoulHome userMember since 2009
Ok i'll try again, maybe start from scratch in case there's something i've accidentally left in there that's clashing with it.

Just had a quick look at the definition file and i've currently got the leds set to 0x38 - 0x3F, but that's probably due to experimenting and trying variations.

I had another thought, does it matter that i've got these knobs defined as <slider in the actual controls? It seemed to be the setting with the smoothest response which is why i went with it - <encoder seems to be very coarse in it's adjustments. Also I thought that was more logical as all the knobs on it are endless encoders, but I want a definite start and end point 0x00 - 0x7F. It might be having an adverse effect anyway...

To be honest it's taking up too much of my time now and the frustration is getting to me, so if I don't get it sorted tonight I'll stick stickers to the knobs and be done with it for now!



 

Posté Thu 21 Jul 16 @ 9:50 am
djdadPRO InfinityDevelopment ManagerMember since 2005
About slider vs encoder.. it all depends on what kind of data/values you are getting.
If you get decreasing values from 7F to 00 when turning the knob to the left and increasing values from 00 to 7F when turning right, then apparently its a slider.
 

Posté Thu 21 Jul 16 @ 10:36 am
oursoulHome userMember since 2009
Wow, i'd all but given up but just had a quick fiddle and got it working!

All I did was add the init sysex values to set the knob type:

<init sendsysex="B03801"/>
<init sendsysex="B03901"/>
<init sendsysex="B03A01"/>
<init sendsysex="B03B01"/>
<init sendsysex="B03C01"/>
<init sendsysex="B03D01"/>
<init sendsysex="B03E01"/>
<init sendsysex="B03F01"/>
<init sendsysex="B01801"/>
<init sendsysex="B01901"/>
<init sendsysex="B01A01"/>
<init sendsysex="B01B01"/>
<init sendsysex="B01C01"/>
<init sendsysex="B01D01"/>
<init sendsysex="B01E01"/>
<init sendsysex="B01F01"/>

then assigned the knob LEDs:

<bar cc="0x30" min="0x00" max="0x7F" name="1_LED_TRACK_KNOB_1" />
<bar cc="0x31" min="0x00" max="0x7F" name="1_LED_TRACK_KNOB_2" />
<bar cc="0x32" min="0x00" max="0x7F" name="1_LED_TRACK_KNOB_3" />
<bar cc="0x33" min="0x00" max="0x7F" name="1_LED_TRACK_KNOB_4" />
<bar cc="0x34" min="0x00" max="0x7F" name="1_LED_TRACK_KNOB_5" />
<bar cc="0x35" min="0x00" max="0x7F" name="1_LED_TRACK_KNOB_6" />
<bar cc="0x36" min="0x00" max="0x7F" name="1_LED_TRACK_KNOB_7" />
<bar cc="0x37" min="0x00" max="0x7F" name="1_LED_TRACK_KNOB_8" />

<bar cc="0x10" min="0x00" max="0x7F" name="1_LED_DEVICE_KNOB_1" />
<bar cc="0x11" min="0x00" max="0x7F" name="1_LED_DEVICE_KNOB_2" />
<bar cc="0x12" min="0x00" max="0x7F" name="1_LED_DEVICE_KNOB_3" />
<bar cc="0x13" min="0x00" max="0x7F" name="1_LED_DEVICE_KNOB_4" />
<bar cc="0x14" min="0x00" max="0x7F" name="1_LED_DEVICE_KNOB_5" />
<bar cc="0x15" min="0x00" max="0x7F" name="1_LED_DEVICE_KNOB_6" />
<bar cc="0x16" min="0x00" max="0x7F" name="1_LED_DEVICE_KNOB_7" />
<bar cc="0x17" min="0x00" max="0x7F" name="1_LED_DEVICE_KNOB_8" />

Then in mapping assigned the leds to the same as whatever the knob is assigned to do:

<map value="1_LED_TRACK_KNOB_1" action="deck 1 eq_low" />
<map value="1_LED_TRACK_KNOB_2" action="deck 1 eq_mid" />
<map value="1_LED_TRACK_KNOB_3" action="deck 1 eq_high" />
<map value="1_LED_TRACK_KNOB_4" action="deck 1 filter" />
<map value="1_LED_TRACK_KNOB_5" action="deck 2 eq_low" />
<map value="1_LED_TRACK_KNOB_6" action="deck 2 eq_med" />
<map value="1_LED_TRACK_KNOB_7" action="deck 2 eq_high" />
<map value="1_LED_TRACK_KNOB_8" action="deck 2 filter" />

Obviously, if you wanted to use a different knob type (volume or pan), you'd change the initial sysex values to reflect the type:

"Single" type:
<init sendsysex="B03801"/>
<init sendsysex="B03901"/>
etc

Volume style:
<init sendsysex="B03802"/>
<init sendsysex="B03902"/>
etc

or
Pan Style:
<init sendsysex="B03803"/>
<init sendsysex="B03903"/>
etc.

I don't know why the other methods weren't working for me (i.e. setting the knob type from within mapping).

Anyway hope this helps someone with their definition of this controller...

Thanks so much for all the help and advice :) I expect i'll be popping up in a different section asking what the hell var $myvar actually means sometime soon ;)


 

Posté Fri 22 Jul 16 @ 9:45 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
Do the other types work ?
I mean if you set B03801 to a different value eg. B03802 does the LED work as expected (with the different illumination type) ?
 

Posté Sat 23 Jul 16 @ 1:08 pm
oursoulHome userMember since 2009
Yes, just tested it and everything works as expected for each style :)
 

Posté Sat 23 Jul 16 @ 10:59 pm
oursoulHome userMember since 2009
Can anyone tell me what the correct script syntax would be to get an led to light up depending on which deck is currently active?

I have 2 buttons, Device Left and Device Right which I have assigned to select either deck A or deck B (although if A is already selected and I press Device Left it jumps to Deck B, so each button toggles between the 2 rather than being specific to a deck - again probably due to bad syntax!).

I've tried multiple permutations to get these to light up when the deck is selected but nothing seems to work:

(LED_DEVICE_LEFT) deck 1 active_deck ? constant 0.1 : off
(LED_DEVICE_LEFT) deck 1 masterdeck ? constant 0.1 : off
(LED_DEVICE_LEFT) select left deck
etc etc.

(text in brackets is just to signify what i'm assigning the command to)

the leds are set up as

<led note="0x38" min="0x00" max="0x7f" name="LED_DEVICE_LEFT" channel="0" />

(0x38 might not be the actual note, i'm doing this from memory - you get the idea though...)

even though these particular LEDs only have 2 or 3 different states (off, on and blinking) - I haven't had much luck with other methods as previously described in other posts!

The LEDs light up fine using constant 0.1, it's just getting them to do it when the deck is active that's not working for me.

Any help much appreciated :)
 

Posté Thu 28 Jul 16 @ 9:00 am
djdadPRO InfinityDevelopment ManagerMember since 2005
deck left select
deck right select
are the actions you should use for buttons and similar for the Leds...
deck left select ? constant X : constant 0 (if 0 is the off)
deck right select ? constant X : constant 0 (if 0 is the off)
 

Posté Thu 28 Jul 16 @ 2:28 pm
oursoulHome userMember since 2009
Thanks mate (again), I'll give it a go later on.

How do you know all this stuff? Is there a tutorial you can point me to to work this stuff out? I feel a bit bad having to ask all the time!

I've read the vdj script document and looked at examples, but it all seems to assume some prior scripting knowledge to understand it - some of the more complex commands are completely befuddling, like where there are questions within questions - maybe my brain's just not wired that way...
 

Posté Thu 28 Jul 16 @ 3:42 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
All info about VirtualDJ Script is available here... http://www.virtualdj.com/wiki/VDJ8script.html

From Wiki

The full command syntax is:
[deck [deck]] verb [param1] [param2] .. [paramN] [while_pressed]

( [...] means : optional )


The verb you need to use is the select which selects a deck, so in this case you need to specify which deck to select, so you use the [deck [deck]] optional parameter.

Further about the deck define...
If no deck is provided, VDJ will apply the action to the selected deck, so just the verb select wont do anything since it already applies to the selected.
An alternative solution would be to define the deck in the definition.
<button note/cc="" name="BUTTON" deck="left" /> (for the Select Left Deck button)
<button note/cc="(apparently different note or different channel)" name="BUTTON" deck="right" /> (for the Select Right Deck button)

and have in the mapping
<map value="BUTTON" action="select" />
when VDJ executes the action (when any of those keys is pressed), it will use the deck you defined in the definition) and will apply that to all the assigned actions.

This is a good practice if the unit has obviously 2 identical buttons on 2 sides, but in your case, i think it would be better not to define that in the defintiion and let users use whatever deck combination they want from the mapping itself.
 

Posté Thu 28 Jul 16 @ 3:59 pm


(Les anciens sujets et forums sont automatiquement fermés)