Jump to content
Sign in to follow this  
touchdown84

X-Touch Mini encoder value and style change?

Recommended Posts

Is it possible to set the value of an encoder (0-127) via RPN?

I know how to light up a single LED strip with the CC action, but as soon as I turn the encoder it goes back to the position and style it was in before.
Reading the answer in https://stackoverflow.com/questions/65390557/set-the-led-ring-value-of-the-behringer-x-touch-mini-encoders it seems like it's possible to set the value of an encoder (and therefore the LED position directly):

Quote

Sending back the same signal that was sent out when turning the knob (CC controller: 1, value: [0-127], channel: 10) to the same channel (10) works fine, i.e. sets the LED along with the internal value.

Any way to do this with a RPN script? Tried many combinations of ">MIDI" actions, but couldn't get any result there.

Also related to this, is it possible to change the LED style (FAN, PAN, SINGLE, etc) on the fly, or is that hard-coded via the X-Touch-Editor settings?


Windows 10 Pro - Ryzen 3 5900X - nVidia Titan X (Pascal) - 32GB DDR4-3600 === Microsoft Flight Simulator

Share this post


Link to post
Share on other sites

This was all in the old AAO thread on the official MSFS forum, that I saved with the sticky post in this thread.

But most importantly - this information is actually on the first page of the Behringer editor app, in the box to the lower right.

I will see if I can dig up the specifics of how to used that spec from the old thread.


LORBY-SI

Share this post


Link to post
Share on other sites
Quote

 

Example script:

(A:SPOILERS·ARMED,·Bool)·1·==·if{·28·(>MIDI:3:CC:1:9)·}·els{·27·(>MIDI:3:CC:1:9)·}

in this case when the spoilers are armed the first LED-Ring is blinking, if not all LED´s in the ring are on.
The rings are not controlled via Notes but via CC

==·if{·28·(>MIDI:3:CC:1:9)·}

velocity (>MIDI:<DeviceId>:<Action>:<channel>:<note>)

Velocity:
0 = all LEDsoff
1-13 = LEDs 1(left) – 13(right)on [only 1 LED at a time is on]
14-26 = LEDs 1(left) – 13(right)blinking [only 1 LED at a time is blinking]
27 = all LEDs on
28 = all LEDs blinking
29-127 = ignored

Device-ID, Action and Channel stay the same for all LED-Rings.
Note 9 - 16 are the different LED-Rings

 

 


LORBY-SI

Share this post


Link to post
Share on other sites

Yes, I found that information, but as I explained that does not change the value of the encoder, it is just a temporary illumination of that one single LED.
As soon as you turn the encoder it switches back to the position that corresponds to the value of the encoder.

EDIT: But thanks, that LED style with CC01-CC08 is working, not sure how I missed that.

Edited by touchdown84

Windows 10 Pro - Ryzen 3 5900X - nVidia Titan X (Pascal) - 32GB DDR4-3600 === Microsoft Flight Simulator

Share this post


Link to post
Share on other sites
20 minutes ago, touchdown84 said:

that does not change the value of the encoder,

Not sure I understand that one - my gut feeling says "of course not, how could it?" That is a hardware potentiometer or hall sensor, isn't it? You can try sending back the values on the output channel, some people did that successfully too.

20 minutes ago, touchdown84 said:

it is just a temporary illumination of that one single LED

I don't think that this was the case when I tried it back then. Maybe the LEDs were in a different mode.

But normally you would set the LEDs with an automated script anyway, which will update them continuously.

Edited by Lorby_SI

LORBY-SI

Share this post


Link to post
Share on other sites
1 minute ago, Lorby_SI said:

Not sure I understand that one - my gut feeling says "of course not, how could it?" That is a hardware potentiometer or hall sensor, isn't it?

At least on my device those are infinite rotary encoders. Though they still behave a bit like an axis as they also have a value in the [0-127] range (that's the raw value you read in AAO when assigning an encoder to an axis, the value just doesn't change anymore when you turn further than min/max value), and this value seems to be the basis for the LED position.


Windows 10 Pro - Ryzen 3 5900X - nVidia Titan X (Pascal) - 32GB DDR4-3600 === Microsoft Flight Simulator

Share this post


Link to post
Share on other sites

I figured it out (kinda, not completely sure about the logic behind the correct numbers...)

1) When "5 (>MIDI:3:CC:1:14)" would set the 5th LED of the 6th encoder on (the "fake" LED position)
2) Then "50 (>MIDI:3:CC:11:6)" (note that is channel 11) will set the value of the 6th encoder to 50. Persistent with matching LEDs in the selected style.

I found examples for 1) in the the forum threads or some AAO scripts on flightsim.to, but haven't encountered an example here or there for 2).
Also it seems that it is persistent per Layer, the example from 2) sets the 6th encoder on layer A, and with "80 (>MIDI:3:CC:11:16)" you set the 6th encoder value on layer B to 80. And the value/LED persists through switching the layer!

I think 1) is still usefull in some cases (blinking indicator etc.) though.

Edited by touchdown84

Windows 10 Pro - Ryzen 3 5900X - nVidia Titan X (Pascal) - 32GB DDR4-3600 === Microsoft Flight Simulator

Share this post


Link to post
Share on other sites

Wow, I was always hoping someone would discover that at some day.
touchdown 84, the modus can be set on the active layer by the cc command.
The following test script sumarizes all the combinations I found but without outputting your value it did not make sense before.
I have not found a modus where the LEDs can be completely turned off.

//velocity·(>MIDI:<DeviceId>:<Action>:<channel>:<note>)
//<Action>·can be one of the following: „NoteOn“, „NoteOff“, „CC“, „PrgChng


//Encoder 1 Modus single LED with no LEDs at value 0
// values larger than the maximum value or smaller than the minimum value will
// result in no LEDs
// Only the modus of the active layer will be changed
0 (>MIDI:3:CC:1:1)

//Output values
//0 (>MIDI:3:CC:11:1)
30 (>MIDI:3:CC:11:1)
//127 (>MIDI:3:CC:11:1)

//Encoder 2 Modus single LED with first LEDs at value 0
// values larger than the maximum value or smaller than the minimum value will
// result in the first  LEDs
1 (>MIDI:3:CC:1:2)

//Output values
//0 (>MIDI:3:CC:11:2)
60 (>MIDI:3:CC:11:2)
//127 (>MIDI:3:CC:11:2)

//Encoder 3 Modus FAN, LEDS increasing from 0 to 13 LEDs with value
// 0 is no LEDs and 127 is all LEDs
2 (>MIDI:3:CC:1:3)

//Output values
//0 (>MIDI:3:CC:11:3)
60 (>MIDI:3:CC:11:3)
//127 (>MIDI:3:CC:11:3)

//Encoder 4 Modus PAN, symmetric increase of LEDS left and right of LED 7
// 0 is LED 7, 127 all LEDs
3 (>MIDI:3:CC:1:4)

//Output values
//0 (>MIDI:3:CC:11:4)
//30 (>MIDI:3:CC:11:4)
127 (>MIDI:3:CC:11:4)

//Encoder 5 Modus TRIM,
// 0 is left half of LED ring, 127 is right half of LED ring
4 (>MIDI:3:CC:1:5)

//Output values
//0 (>MIDI:3:CC:11:5)
//90 (>MIDI:3:CC:11:5)
127 (>MIDI:3:CC:11:5)

//Other comnmands
//Goto Layer A
//0 (>MIDI:3:PrgChng:1)

//Goto Layer B
//1 (>MIDI:3:PrgChng:1)

 

// Fake LEDs: 0 off, 1-13 on, 14-26 blink, 27 all on, 28 all blinking
// Device id:3, Global channel 1, Encoder 1
// Encoder 1 all LEDs blinking
//28 (>MIDI:3:CC:1:09)


//LED Button 2 on layer A
1 (>MIDI:3:NoteOn:11:09)

 

 

 

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...