October 8, 20223 yr I know how to send Midi Messages to my X-Touch Mini to control the LEDs according to Panel State like this: (L:I_FCU_EFIS1_LS, number) 1 == if{ 1 (>MIDI:4:NoteOn:1:9) } els{ 0 (>MIDI:4:NoteOn:1:9) } Unfortunately this doesn't take the activated Layer of the X-Touch Mini into account. Therefore, for instance, LEDs that are activated by Scripts on Layer A will still stay illuminated when I switch to Layer B of the X-Touch Mini. Is it somehow possible to know from Axis and Ohs which Layer of the X-Touch Mini is currently activated (maybe because the LED of the corresponding Layer Button is lit), so that I could add another condition to my LED Scripts?
October 8, 20223 yr Commercial Member 1 hour ago, theflyguy said: I know how to send Midi Messages to my X-Touch Mini to control the LEDs according to Panel State like this: (L:I_FCU_EFIS1_LS, number) 1 == if{ 1 (>MIDI:4:NoteOn:1:9) } els{ 0 (>MIDI:4:NoteOn:1:9) } Unfortunately this doesn't take the activated Layer of the X-Touch Mini into account. Therefore, for instance, LEDs that are activated by Scripts on Layer A will still stay illuminated when I switch to Layer B of the X-Touch Mini. Is it somehow possible to know from Axis and Ohs which Layer of the X-Touch Mini is currently activated (maybe because the LED of the corresponding Layer Button is lit), so that I could add another condition to my LED Scripts? No, you cannot query information from the XT (as far as I know). You would have to keep track of the layer yourself, by processing the layer buttons. So for example when button A is pressed you set 0 (>L:XtLayer) and when B is pressed you set 1 (>L:XtLayer) Then you can add (L:XtLayer) to your LED update scripts. Same thing when you set the layers via script, just make sure that your LVar is handled as well. To make sure that it doesn't get out of sync, add an automated one shot script that forces the XT to layer A. On a side note, make sure that invented "local" LVars like the one above, that never leave AAO, should always be used without the "unit". (L:whatever): LVar is local to AAO and is never transmitted to the sim. (L:whateverothervar, Number): Simulator LVar that will by synchronized all the time. The interface to the simulator should not be bothered with things that it doesn't absolutely have to know about. So LVars that are only used for internal calculations or states should be kept local. Edited October 8, 20223 yr by Lorby_SI LORBY-SI
October 8, 20223 yr Author Thanks for your kind and quick Answer. I guess XT must be in MC Mode for this to work? Otherwise the Layer Buttons aren't assignable in the AAO's Button Asignment Dialogue. Also: How would I know that these Variables exist? Were can I findn them? I'm not complaining, just curious because these are no Sim Vars that show up in the List in "Watch Simulator Variables" (of course as these aren't Sim Vars).
October 8, 20223 yr Commercial Member 15 minutes ago, theflyguy said: Thanks for your kind and quick Answer. I guess XT must be in MC Mode for this to work? Otherwise the Layer Buttons aren't assignable in the AAO's Button Asignment Dialogue. Not sure about the MC mode. Possibly. Otherwise, switch the layers with scripts from inside AAO itself? You can also switch between normal and MC mode with a MIDI message: 0·(>MIDI:yourmidioutid:CC:1:127) - normal mode 1·(>MIDI:yourmidioutid:CC:1:127) - MC mode I know that some template authors are using that to force MC mode with an automated one-shot script, and set the device back to normal with a one-shot script as well. 15 minutes ago, theflyguy said: Also: How would I know that these Variables exist? Were can I findn them? I'm not complaining, just curious because these are no Sim Vars that show up in the List in "Watch Simulator Variables" (of course as these aren't Sim Vars). They don't "exist" at all. I invented that variable just now. When you use an LVar for the first time in an RPN script, with whatever name you choose, that is when it starts to live. You can use any number of LVars with all possible names you can think of for your own purposes. But note my remark above about the difference between local and simulator LVars in AAO. (This has another implication: there will be many instances where there is an "official" LVar in the sim that an aircraft developer invented for a specific purpose - but you won't see it in "Read LVars from sim" or the observer until it has actually been used in the sim!) Edited October 8, 20223 yr by Lorby_SI LORBY-SI
October 8, 20223 yr Author 33 minutes ago, Lorby_SI said: Otherwise, switch the layers with scripts from inside AAO itself? But how would I trigger such scripts as long as the Layer Buttons aren't recognized by AAO? 34 minutes ago, Lorby_SI said: When you use an LVar for the first time, with whatever name you choose, that is when it starts to live. Understood. I think the Problem is that the MIDI: Scripts in AAO only handle LEDs 0 to 15. It doesn’t Matter if I’m on Layer A or B 1·(>MIDI:4:NoteOn:1:0) always switches the 1st Button from the Left in the upper Row, and 1·(>MIDI:4:NoteOn:1:19) does nothing on both Layers. I would like to avoid XP Mode, but I'll give it a try.
October 8, 20223 yr Commercial Member 16 minutes ago, theflyguy said: I think the Problem is that the MIDI: Scripts in AAO only handle LEDs 0 to 15. Not really. AAO handles whatever number of LEDs there are. AAO is completely hardware agnostic when it comes to MIDI. Take a look at the first page of the Behringer X-Touch Editor app. The controls that you can access from the outside via MIDI are listed in the box on the right "RX MIDI CONTROL", The LEDs always have the same "address" ("NOTE 0 - NOTE 15"), regardless of what layer the device has been switched to. If Behriger would design their device differently, then you could use the LEDs differently too. Edited October 8, 20223 yr by Lorby_SI LORBY-SI
October 8, 20223 yr Author You're right of course. The Notes on the Buttons are different for both Layers, the "Notes" for the LEDs aren't. OK, I have a Script to Switch the LAyers. Now I "just" need to find a Way to react to the Layer Buttons, so that I can run my Scripts and set my Own "Current Layer" Variable.
October 8, 20223 yr Commercial Member 36 minutes ago, theflyguy said: the Layer Buttons aren't recognized by AAO? Or to be more precise: "when the layer buttons don't send a MIDI message when the XT is not in MC mode". If they did, AAO would pick them up. But they do in MC mode apparently, and that seems to be the preferred solution. I know, because I helped a template developer with the Standard/MC mode switch. That was when the automated scripts where expanded so you can run them either when the plane is loaded or when shutting down - that way you can activate MC mode when the plane loads and set the device back into normal mode when you finish flying. Edited October 8, 20223 yr by Lorby_SI LORBY-SI
October 8, 20223 yr Author 26 minutes ago, Lorby_SI said: Or to be more precise: "when the layer buttons don't send a MIDI message when the XT is not in MC mode". If they did, AAO would pick them up Well, they do. But they aren't sending Notes, but PrgChng Calls with Values 0 and 1 as Parameters accepted. OK, it's MC Mode then. As said before: I wanted to avoid that, because when MSFS quits abnormally the XT gets stuck in MC Mode, and a lot of Users, that may use my Template, will be in Trouble then, because they don't even know that there is such Thing like a MC Mode, and how to get ouf it.
October 8, 20223 yr Commercial Member 1 hour ago, theflyguy said: Well, they do. But they aren't sending Notes, but PrgChng Calls with Values 0 and 1 as Parameters accepted. I can't see anything coming in from those buttons. How do I check this, what are you using to track them? I am looking at the "MidiView" app from "Haute Technique" right now, and there is no input whatsoever coming from the layer A/B buttons in XT Standard mode. What am I missing? I know that at least one of the well known XT template authors is using MC mode. Maybe he added a "panic" button or script that resets the XT. Edited October 8, 20223 yr by Lorby_SI LORBY-SI
October 9, 20223 yr Author 14 hours ago, Lorby_SI said: I can't see anything coming in from those buttons. How do I check this, what are you using to track them? I know it from the X-Touch Mini Manual, and it's also shown on the Startpage of the X-Touch Editor. I've already written Scripts to Change the Layers programatically. It works. Here you can find the Manual with the Midi Map: https://manuals.plus/behringer/x-touch-mini-ultra-compact-universal-usb-controller-manual#midi_map EDIT: You're right. I've tried the XT in one of my DAWs (Digital Audio Workstations), and in normal Mode no Midi-Events are sent by the XT when the Layer Buttons are pressed. So it's only an internal Program Change Midi Event, that may be triggered remotely, but it doesn't get sent by the Device via Midi-Out. Edited October 9, 20223 yr by theflyguy
October 9, 20223 yr Author I found a Solution to my Problem: Instead of using Midi Channel 1 and LED "Notes" 0 - 15 I can also use Midi Channel 11 and LED "Notes" 8 - 47. If I have the ECAM Buttons in the FENIX Airbus on Layer B, instead of writing... (L:I_ECAM_ENGINE,·Number)·1·== if{·1·(>MIDI:4:NoteOn:1:0)·}·els{·0·(>MIDI:4:NoteOn:1:0)·} ... I better write: (L:I_ECAM_ENGINE,·Number)·1·== if{·1·(>MIDI:4:NoteOn:11:8)·}·els{·0·(>MIDI:4:NoteOn:11:8)·} It's the same physical LED in both Cases, but in the first case it will be lit on both Layers, where the second Script only lights the LED up when the XT is on Layer B, and switches the LED off when switching to Layer A.
Archived
This topic is now archived and is closed to further replies.