Jump to content
Sign in to follow this  
daan_vb

LED on XTouch Mini

Recommended Posts

Good evening,

When trying to configure the LED's to illuminate on the XTouch Mini when a button is activated, can the script only contain a 1 or 0 for the on/off value? I have an Lvar that when active gives an on value of 3 and 0 when off. My script is as follows which unfortunately doesn't illuminate the button:

(L:CM1_audio_mic_adv1,·number)·0·==·if{·0·(>MIDI:4:NoteOn:1:2)·}·els{·3·(>MIDI:4:NoteOn:1:2)·}

Thanks

Edited by daan_vb

WAT1036.png

Share this post


Link to post
Share on other sites

Hi,

Try:

(L:CM1_audio_mic_adv1,·number)·3·==·if{·1·(>MIDI:4:NoteOn:1:2)}·els{·0·(>MIDI:4:NoteOn:1:2)}

You send a 1 or a 0 to the LED based on the LVAR value. So if the LVAR = 3 then a 1 is sent to the LED, any other value and a 0 is sent.

You can also control the LEDs on a per layer basis using channel 11 instead of 1:

LAYER A
Encoders 0 - 7
Button top: 8 - 15
Buttons bottom: 16 - 23

LAYER B
Encoder 
Buttons top: 32  - 39
Buttons bottom: 40 - 47

The encoders cannot be controlled on a per layer basis, they are just 0 - 7 no matter which layer is selected.

Regards,

Daz

Edited by Dazzlercee23

Share this post


Link to post
Share on other sites
7 hours ago, daan_vb said:

can the script only contain a 1 or 0 for the on/off value?

No. But the different values have different meanings for the hardware

0 = off
1 = on
2 = blinking

I can't look at the Behringer spec at the moment, but I think that those are it for the buttons. There are more options for the rotary encoder LEDs.

Not sure why you would send the "3" in your example - this IMHO points to a general misunderstanding of how those scripts actually work. Can you describe in your own words why you would send the "3" in your els{ branch?

This would be the correct script: "When the LVar is 0 then turn the LED off (send 0 to the Behringer device for this button). In all other cases (els{) turn the LED on (=send 1 to the button)"

(L:CM1_audio_mic_adv1,·number)·0·==·if{·0·(>MIDI:4:NoteOn:1:2)·}·els{·1·(>MIDI:4:NoteOn:1:2)·}

LORBY-SI

Share this post


Link to post
Share on other sites
13 hours ago, Dazzlercee23 said:

Hi,

Try:


(L:CM1_audio_mic_adv1,·number)·3·==·if{·1·(>MIDI:4:NoteOn:1:2)}·els{·0·(>MIDI:4:NoteOn:1:2)}

You send a 1 or a 0 to the LED based on the LVAR value. So if the LVAR = 3 then a 1 is sent to the LED, any other value and a 0 is sent.

You can also control the LEDs on a per layer basis using channel 11 instead of 1:

LAYER A
Encoders 0 - 7
Button top: 8 - 15
Buttons bottom: 16 - 23

LAYER B
Encoder 
Buttons top: 32  - 39
Buttons bottom: 40 - 47

The encoders cannot be controlled on a per layer basis, they are just 0 - 7 no matter which layer is selected.

Regards,

Daz

Thank you, that worked! I get now how these work!


WAT1036.png

Share this post


Link to post
Share on other sites
7 hours ago, Lorby_SI said:

No. But the different values have different meanings for the hardware

0 = off
1 = on
2 = blinking

I can't look at the Behringer spec at the moment, but I think that those are it for the buttons. There are more options for the rotary encoder LEDs.

Not sure why you would send the "3" in your example - this IMHO points to a general misunderstanding of how those scripts actually work. Can you describe in your own words why you would send the "3" in your els{ branch?

This would be the correct script: "When the LVar is 0 then turn the LED off (send 0 to the Behringer device for this button). In all other cases (els{) turn the LED on (=send 1 to the button)"


(L:CM1_audio_mic_adv1,·number)·0·==·if{·0·(>MIDI:4:NoteOn:1:2)·}·els{·1·(>MIDI:4:NoteOn:1:2)·}

Probably because I am a dumbass...😞

The script above from Daz worked. I was trying to write the script so when the Lvar is a 3 (as that is the "on" value), the light illuminates. i just wasn't sure in what part of the script that needed to be placed. I get it now. Thanks

Edited by daan_vb

WAT1036.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...