is it ok with you if i upload the script that i am using to rum my setup giving full credit to you of course.
Yes, of course that is OK, and I don’t want any credit. The general idea is that the community shall create these scripts and share them. Btw. you could create a template and share that. All the recipients would have to do is to confirm the knobs by actuating them when they import the template. In version 2.04 this will be even simpler, if AAO detects for example an X-Touch, it will apply the local MIDI-ID automatically.
Flightsim RPN scripts like these have been around in the MS sims for 20 years - used in everything from FS9 to P3D V5. There is a ton of resources online about syntax etc. The real trick here is finding the appropriate L- and H- Variables - but many of those have been published too.
credit you def deserve… I do realise that the flying world is a community that thrives on sharing but credit where credit is due and you have been a leading light with regards the hands on control in cockpits. using a relatively cheap piece of equipment that the behringer xtouch is. i think you are doing yourself a big disjustice in that if you pushed scripts out onto your website and even perhaps took to selling x touches as a combined product youd be on a winner. ive uploads ed the template and script onto flightsim .to for sharing its pending approval at present… its not totally finished ive still to add a few more commands to buttons …but i really think that for well under £100 the x touch coupled with axis and ohs and working scripts and 3d knobs and eventually (on part ) a
proper overlay for the behringer would be a bargain in the making.
ive uploads ed the template and script onto flightsim .to
Just to clarify: the exported template contains all necessary scripts too. You can provide a separate download for the scripts, but you don’t have to. The template is all that people need. And when they apply it to their aircraft, they have to MERGE it, so it integrates with the controls they already have and doesn’t overwrite them. AAO will ask them about that before it applies the template.
… I feel there is a need for a template editor at some point…
Theoretically - yes.
In practice - I don’t really know.
All testers have very diverse hardware. I was only able to confirm that the automatic change works for MIDI devices.
But in any case, even if it doesn’t pick up the device, when you import a template, AAO will open the “Change Axis/Button” dialogs for those that it doesn’t recognize and ask the user to actuate = confirm the button that he wants to use for this action.
tried this out on a flight tonight, and it didn’t seem to work correctly for me. It does nicely switch to ‘29.98 Std’ displayed on the PFD, and switches back to the previous altimeter setting, just like pressing the VC knob, but it doesn’t seem to actually change the altimeter value in the Sim for me.
Switching from something like 30.28 to Std has no effect on the altitude indicator, and the PFD on my FIP gauge also continues to display 30.28.
I wasn’t able to figure out if there’s something missing in the script, or if I’m doing something wrong…
Weird, it seemed to work OK for me. The script is issuing the proper simulator K: events and the WT glass cockpit reads the stardard simulator variables too. There is no reason why other clients shouldn’t pick that up. IIRC it showed the correct values on my Saitek Radio Panels. I will check again tonight.
Switching from something like 30.28 to Std has no effect on the altitude indicator, and the PFD on my FIP gauge also continues to display 30.28.
I wasn’t able to figure out if there’s something missing in the script, or if I’m doing something wrong
I’ve just tested this (with the new MSFS version at that) - seems to be working fine. (Joystick) button press cycles between the current QNH and standard, on all connected devices (Desktop FIP and Saitek Radio panel). Could something be interfering in your sim, some other device or assignment that wants to change the QNH at the same time?
hello again , its that pain in the bahookie (scots for backside) scotsman once again to seek your assistance and pick your brains. the code you gave for the mfd knobs worked great BUT following yesterdays microsoft /asobo update it not longer works , the rest of the scripts work but the mfd knobs have stopped working …have you any ideas? also since the update when you click on axis and ohs to read lvars you now get a collection failed message …so I guess the update has changed how the program is working …and a final question where do you get the names of the control for the mfd from …ie i assume you are searching the sdk ? to determine what possible event key codes are in use …is this the case.
when you click on axis and ohs to read lvars you now get a collection failed message
Did you remove the “lorby-content-hooks” from your Community folder by any chance? That happens quite often when people update MSFS and are being told to clean out all mods. You can move out everything except this one
and a final question where do you get the names of the control for the mfd from …ie i assume you are searching the sdk ? to determine what possible event key codes are in use …is this the case.
No. None of these variables are documented anywhere.
Collect all Lvars. Try those that sound good
or
Use the model behavior debugger in MSFS Developer Mode (I don’t)
or
Use Notepad++ “Find in Files” and analyze the actual code in the sim content. (that’s what I do)
or use all three together. In the end, it is all trial&error.
Hello. I just started yesterday some tries to assign commands to a midi controller. I face an issue with ‘toggle switches’. Sorry if my question is already answered, but it will take me days to read through the whole thread.
I try to handle a simple switch between on and off (like a light or pitot heat switch). The button or keypad on the controller is illuminated and indicates on/off status with a certain light or color.
If the regarding button is programmed to be ‘momentary’ every press of the button indeed toggles the switch in the simulator. Unfortunately the illumination is not synchronized, as it does not change.
If the regarding button is programmed to be ‘toggle’ only every second press will toggle the switch in the simulator. Unfortunately the button illumination changes with every press, so the light is also not in sync.
What i have seen are the midi events that will be sent:
Momentary: CC 28 Value 127 followed by CC28 Value 0 (one press sends both events)
Toggle:
First press: CC 28 Value 127
Second press: CC 28 Value 0
It looks like AAO is not executing the assigned event in case it gets CC28 with a Value of 0 only.
It looks like AAO is not executing the assigned event in case it gets CC28 with a Value of 0 only.
Thanks for a hint.
That is correct. The events are identical and there is no practical way how the app could distinguish between a momentary press and a toggle, where there is no release event. I will look into adding another user selectable flag for this - but the editor dialogs are becoming crowded… We’ll see.
Instead, set them all to momentary and use MIDI Out to control the LEDs on the device. There is a section about this in the AAO manual. That way the LEDs will also turn on when you switch the associated simvar from somewhere else (virtual cockpit or other hardware controller)
Hi @LorbySi. Thanks for the quick response. I will have a look at the MIDI out option you mention.
But in the manuals of my devices I can’t find any hint in regards to control the LEDs. I’m afraid this is not possible. I use an Arturia Keylab 61 MK2 and an Akai MPD226.
Guess a checkbox ‘is toggle’ for the ‘Assigned button/keys’ would be fine (as it’s available for 'Assigned Combo). Of course I see your point in regards to crowded dialogs.
Hi @LorbySi. Thanks for the quick response. I will have a look at the MIDI out option you mention.
But in the manuals of my devices I can’t find any hint in regards to control the LEDs. I’m afraid this is not possible. I use an Arturia Keylab 61 MK2 and an Akai MPD226.
Guess a checkbox ‘is toggle’ for the ‘Assigned button/keys’ would be fine (as it’s available for 'Assigned Combo). Of course I see your point in regards to crowded dialogs.
Thanks you anyway.
Just a thought: try using both Key Down and Key Up events in your button assignment in AAO. That should help with those hardware toggles.
If you only have a toggle simevent, assign that to both Key Down and Up.
If you have simevents for ON and OFF, assign ON to the Key Down event, and OFF to the Key Up event.
cheers once again for help and advice…turns out you where spot on I had emptied out the hooks when I updated…so once it was back in the range knob worked right away …but strangely the mode knob didnt …it starts turn with the encoder and flips back instantly … and even stranger when i use the mouse to control the onscreen knob it does the same thing it wont hold any change to the mode so ive had to delete the script for it to be able to take control of the knob. I just wish the microsoft wouldnt constantly keep making the changes that they are doing , at least give folk the option to decline any updates.I as happy ow things where for me prior to yesterdays update.
I tested this again (also after an update to the new MSFS version), and now it is indeed working fine for me too. Don’t know if it had anything to do with the update (doubt it) or if something else was astray the time I tried it first.
In any case, thanks again for the script, this is very useful!
That’s the solution - assigning the event to both Key Down and UP events works. Will now try to dive a bit deeper into the possibilities. Was also successful with assigning knobs to dial Com and Nav frequencies.
I really like the midi functionality your tool provides. So with only the Midi Keyboard which is placed on my desk anyway I have 40 illuminated buttons and 61 non-illuminated buttons (the piano keys), 24 rotary knobs and 24 sliders. The Akai Controller adds another 64 illuminated keys pads, 12 illuminated buttons, 12 rotary knobs and 12 sliders. And this can even been expanded with the use of modifier keys.
So next step is to get a concept what functions to assign to all these controls, without loosing the overview.