Entra:     


Forum: General Discussion

Topic: midi LED - 100% volume

Questo argomento è obsoleto e potrebbe contenere informazioni obsolete o errate.

I'd like a button's LED to be on when the volume is 100% (and off when less than 100%). Is this possible?
 

Inviato Wed 02 Mar 16 @ 10:42 pm
On the led mapping type this:
param_equal get_volume 100% ? on : off

PS: For this simple query you don't even have to use the on : off part
So you can also type
param_equal get_volume 100%
 

Great that it's possible. I've read over the docs and it looks like I need to create my own xml file for LED mapping?
 

Providing that the LED is already mapped (most are), you can simply alter the script for it in settings/controllers.

What device are you using?
 

A Traktor X1. I'm using VDJ7 and there isn't a controller option in config > settings. The only thing available is the Simple Midi Wrapper?
 

For VirtualDj 7 you will have to create a device definition in order to get leds working.
Simple MIDI wrapper does not provide MIDI output (PC to controller communication)
VirtualDj 8 supports both X1 (in MIDI mode using default MIDI template on NI controller editor app) and X1MK2 (in HID mode)
 

I thought so. Would you mind showing me how to do that? I've gone over the documents and past threads, but it's confused me.
 

 

Already found that kradcliffe. I'll give it another shot.
 

I've tried different variations of this but have not got it to work. Can anyone see where it's going wrong?

I've copied Traktor X1 Mk1 mapping.xml to: My Documents\VirtualDJ\Mappers

And Traktor X1 Mk1 definition.xml to: My Documents\VirtualDJ\Devices


Traktor X1 Mk1 mapping.xml:

<?xml version="1.0" encoding="UTF-8"?>
<mapper device="SIMPLE_MIDI" author="Me" description="Traktor X1 Mk1" version="741" date="03/03/2016" priority="-10">
<map value="1-CC6" action="deck 1 eq_low" />
<map value="1-CC4" action="deck 1 eq_mid" />
<map value="1-CC0" action="deck 1 gain_relative" />
<map value="1-36" action="deck 1 level 100%" />
<map value="1-40" action="deck 1 level 0%" />
<map value="1-CC2" action="deck 1 eq_high" />
<map value="1-28" action="deck 1 sync" />
</mapper>


Traktor X1 Mk1 definition.xml:

<?xml version="1.0" encoding="UTF-8"?>
<device name="Traktor X1 Mk1" author="Me" type="MIDI" decks="4">

<button note="C1" name="param_equal get_volume 100%" channel="2" deck="1" />
<led note="C1" name="LED_param_equal get_volume 100%" default="param_equal get_volume 100%" channel="2" deck="1" />

</device>
 

You got it all wrong! :)

DEFINITION
<?xml version="1.0" encoding="UTF-8"?>
<device name="X1MK1" description="Traktor Kontrol X1 MK1" author="Me" type="MIDI" decks="4">
<button note="0xC1" name="BUTTON_NAME" channel="2" deck="1" />
<led note="0xC1" name="LED_BUTTON_NAME default="BUTTON_NAME" channel="2" deck="1" />
</device>

MAPPER
<?xml version="1.0" encoding="UTF-8"?>
<mapper device="X1MK1" author="Me" description="Traktor Kontrol X1 MK1" version="741" date="03/03/2016" priority="-10">
<map value="BUTTON_NAME" action="play_pause" />
</mapper>
 

Cheers Phantom but I still cannot work out how this all ties together. The current action of the button is "deck 1 level 100%". I want the LED of that button to be on when the level > 0%, and off when the level = 0%, regardless of if the button has been pressed.

Note: I changed it from 100% to 0% as in my original post. It's an LED to tell me if that deck's volume's on or not.
 

If your led is defined properly then the code you need to put on your mapper is:
param_bigger 0 get_vu_meter
 

Eeerm... You use VirtualDj 7...

The correct syntax for VirtualDj 7 is
get vu_meter & param_greater 0 ? on : off
 

The button action works. As far as I know the led is defined properly?

Ok I've tried adding "get vu_meter & param_greater 0 ? on : off" to the mapper code. It doesn't work under "action", and it doesn't work on its own after map value. Where does it go?

DEFINITION
<?xml version="1.0" encoding="UTF-8"?>
<device name="X1MK1" description="X1 Test" author="Me" type="MIDI" decks="4">
<button note="0xC1" name="1-36" channel="2" deck="1" />
<led note="0xC1" name="LED_1-36" default="1-36" channel="2" deck="1" />
</device>

MAPPER
<?xml version="1.0" encoding="UTF-8"?>
<mapper device="X1MK1" author="Me" description="X1 Test" version="741" date="10/04/2016" priority="-10">
<map value="1-36" action="deck 1 level 100%" />
</mapper>

The button is set to "Note", the mode is "Gate", and LED On: For Midi Out
 

DJkanman wrote :

MAPPER
<?xml version="1.0" encoding="UTF-8"?>
<mapper device="X1MK1" author="Me" description="X1 Test" version="741" date="10/04/2016" priority="-10">
<map value="1-36" action="deck 1 level 100%" />
<map value="LED_1-36" action="get vu_meter & param_greater 0 ? on : off" />
</mapper>

The button is set to "Note", the mode is "Gate", and LED On: For Midi Out


 

Cheers for your help Phantom. Unfortunately it still isn't working. Maybe the led's not defined or something. I'm going to have to play around with it some more.

Out of interest, instead of using vu_meter could I put this:

<map value="LED_1-36" action="deck 1 level 0% ? off : on" />
 

This is an English only forum, thank you.
 



(Vecchi argomenti e forum sono automaticamente chiusi)