Cameron Posted January 20, 2022 Report Posted January 20, 2022 Hi there @VirtualCPT! I saw that you ultimately plan Mac support. Is that still on the table soon? This concept seems great, and I'd be willing to buy the hardware if we can get rolling on a Mac build. Quote
VirtualCPT Posted January 20, 2022 Report Posted January 20, 2022 Hi @Cameron , Mac support is still planned! The plugin works already on Linux, so getting a build for mac shouldn't be too difficult. I'm currently working on a docker container for the cross compilation, but it's not an easy task to get everything running. As I fallback solution I can use the MacBook of my wife, but I would prefer a build container on my PC. Hopefully, the next version will have support for all platforms. 1 Quote
VirtualCPT Posted January 25, 2022 Report Posted January 25, 2022 Hi Cameron, I just released the new version 0.62 which includes support for macOS. 2 Quote
Cameron Posted January 26, 2022 Author Report Posted January 26, 2022 On 1/25/2022 at 4:56 AM, VirtualCPT said: Hi Cameron, I just released the new version 0.62 which includes support for macOS. Thanks for the update! Off to order the hardware now. Quote
Pils Posted January 26, 2022 Report Posted January 26, 2022 11 minutes ago, Cameron said: Thanks for the update! Off to order the hardware now. Jelly! I was told I have to wait 2 months. Quote
tpwpny Posted February 2, 2022 Report Posted February 2, 2022 Hello- I just bought an XTouch Mini and I'm very confused on how to load this plugin. I put the folder in the plugins folder of XP and nothing shows up for the plugins menu. I'm using a AFL C172 and just want to map the XTouch to the Garmin 530 COM/NAV. The template / profile approach is confusing me. Doesn't this just map the Mini to buttons in the joystick menu of XP? The manual seems like a need a coding degree even though I believe that others say it's easy. Any advice appreciated! Quote
VirtualCPT Posted February 2, 2022 Report Posted February 2, 2022 Hello @tpwpny, There is definitely some learning curve involved getting my plugin working. However, once you understand the system it will become very easy and quick to create new mappings for aircraft. Okay, lets have a look at your questions: 1. How to load the addon? Do you see the submenu XMidiCtrl within the plugins menu? If you are using a Mac, make sure to follow the steps described on the installation page (Link). Within the XMidiCtrl submenu you will see quite a few options, like opening a log window, reloading the aircraft profile, etc. 2. What is a template or profile? XMidiCtrl does not offer a user interface for the mapping and I have not planned to develop one. In addition, it's not possible to extend the default joystick screen of X-Plane. The config file, which contains all the mappings for a specific aircraft is called a profile. It's a file called XMidiCtrl.toml and it should be placed directly in the aircraft folder. In your case you should have it in X-Plane/Aircrafts/AFL C172 (don't know exactly how the folder is called, as I don't own this Cessna). When you load an aircraft, the plugin checks if a XMidiCtrl.toml file exists in the aircraft directory and loads it. Templates are just a template to create a new profile. I included one for the Behringer X-Touch to make it easier for people. I believe it's easier to have something to start with. Just copy the XMidiCtrl.toml file from the templates folder and copy it into your AFL C172 folder. After that you can start added commands to the different buttons and encoders. 3. How map buttons? No comes the tricky bit. You have to map the X-Plane commands to the buttons of the X-Touch. In the XMidiCtrl.toml file you will find a parameter called mapping_in. This is where you define all inbound mappings - events which sent from the MIDI device to the plugin. This section looks like that: mapping_in = [ #-------------------------------------------------------------------------------------------------------------------- # Layer A #-------------------------------------------------------------------------------------------------------------------- # Slider { ch = 11, cc = 0, type = "sld", command_up = "", command_middle = "", command_down = "" }, # Encoders { ch = 11, cc = 1, type = "enc", command_up = "", command_down = "" }, { ch = 11, cc = 2, type = "enc", command_up = "", command_down = "" }, { ch = 11, cc = 3, type = "enc", command_up = "", command_down = "" }, { ch = 11, cc = 4, type = "enc", command_up = "", command_down = "" }, { ch = 11, cc = 5, type = "enc", command_up = "", command_down = "" }, { ch = 11, cc = 6, type = "enc", command_up = "", command_down = "" }, { ch = 11, cc = 7, type = "enc", command_up = "", command_down = "" }, { ch = 11, cc = 8, type = "enc", command_up = "", command_down = "" }, # Encoder Buttons { ch = 11, cc = 9, type = "cmd", command = "" }, { ch = 11, cc = 10, type = "cmd", command = "" }, { ch = 11, cc = 11, type = "cmd", command = "" }, { ch = 11, cc = 12, type = "cmd", command = "" }, { ch = 11, cc = 13, type = "cmd", command = "" }, { ch = 11, cc = 14, type = "cmd", command = "" }, { ch = 11, cc = 15, type = "cmd", command = "" }, { ch = 11, cc = 16, type = "cmd", command = "" }, I added some comments in the template to make it easier finding the right button and or encoder. Each button and encoders sends a MIDI message on a specific Channel and a Control Change number. If you applied my settings to the device as described here, all buttons and encoders are sending on channel 11 and the encoders will send a Control Change number from 1 to 8. The top row of the buttons sends 17 to 24 and the bottom row 25 to 32. Each encoder has a button included as well and sends between 9 and 16. I hope you can still follow me. If you want to add a command to a specific button, just write the command name as command parameter. Let's say you want to clear the master warning when pressing the first button on the bottom row. The command is called"sim/annunciator/clear_master_warning. The mapping would look like that: { ch = 11, cc = 25, type = "cmd", command = "sim/annunciator/clear_master_warning" }, The plugin offers much more advanced options, such as modifying datarefs or even sending messages from the simulator to the X-Touch to illuminate buttons when certain functions are activated. You will find quite a few examples of complete mappings in the examples folder. They can be a great help getting started. However, it's important to understand a bit the internals of X-Plane. So speaking, what is a command, what are datarefs etc. It's a very rewarding process and once you understand it you will be able to customize your X-T-Touch exactly the way you want it. Hope that helps! Best wishes, Marco Quote
tpwpny Posted February 4, 2022 Report Posted February 4, 2022 Thanks, Marco! I'll try this and let you know if I have any further trouble. I appreciate the very thorough response!! Quote
tpwpny Posted February 6, 2022 Report Posted February 6, 2022 (edited) Hi Marco @VirtualCPT - still attempting setup as you described above, but three issues so far: 1. There is no XMidiCtrl file in XPlane/Output/preferences - do I need to move it there from another folder? In the package folder I see a XMidiCtrl.xpl folder. 2. I have started XP11 with the .toml file in the aircraft folder (Airfoil Labs C172 folder). But nothing shows up for XMidi Ctrl in the Plugins menu when I start up XP11. (Using XP11.55) 3. You describe setting up the X-Mini Touch using the Behringer setup software - however, this software from Boehringer is not available for Mac. Any advice appreciated. Edited February 7, 2022 by tpwpny Edited for clarity. Quote
VirtualCPT Posted February 7, 2022 Report Posted February 7, 2022 Hi, If I understand you correctly, the plugin didn't start with X-Plane. You should see a submenu called XMidiCtrl in the Plugins menu of X-Plane. Did you follow the steps required for MacOS (https://mauer.github.io/xmidictrl/#/installation)? The plugin is obviously not signed by Apple, so you need to allow it manually. A copy of your Log.txt wouldn't harm either. Thanks, Marco Quote
tpwpny Posted February 7, 2022 Report Posted February 7, 2022 @VirtualCPT Here are my steps so far: - The installer never showed a Security warning from Mac OS. I was able to download the folder and move directly into XPlane/Resources/Plugins without a problem. - The .toml file has been placed in the Airfoil Labs/C172 folder - Still, no Xmidi Ctrl submenu is showing up in the XPlane "Plugins" menu when XP11 is up and running. Log file attached. Any advice appreciated. p.s. OSX is Mojave and XP version is 11.55. Log.txt Quote
VirtualCPT Posted February 8, 2022 Report Posted February 8, 2022 Good Morning, I just checked your log and found these entries: dlerror:dlopen(/Volumes/ButtKicker SSD/X-Plane 11/Resources/plugins/XMidiCtrl/mac_x64/XMidiCtrl.xpl, 6): Symbol not found: __ZNSt3__14__fs10filesystem18__create_directoryERKNS1_4pathEPNS_10error_codeE Referenced from: /Volumes/ButtKicker SSD/X-Plane 11/Resources/plugins/XMidiCtrl/mac_x64/XMidiCtrl.xpl (which was built for Mac OS X 10.15) Expected in: /usr/lib/libc++.1.dylib in /Volumes/ButtKicker SSD/X-Plane 11/Resources/plugins/XMidiCtrl/mac_x64/XMidiCtrl.xpl I use a function called std::filesystem::create_directory to create a new folder in the preferences folder. This function was added in C++17 and it seems that it's not supported by your macOS. Mojave is rather old, could you update to 10.15 at least? This is also the version I build the plugin for. Many thanks, Marco Quote
tpwpny Posted February 8, 2022 Report Posted February 8, 2022 @VirtualCPT Thanks so much for checking up on this. I really appreciate it. Unfortunately, I am on a classic Mac Pro 5,1 and it isn’t upgradable to 10.15 without some very risky hacking. Looks like my hopes of using the XMini Touch are dashed. Good thing I saved the box. Probably best that I return it. Thanks again for your help, Marco! Quote
VirtualCPT Posted February 8, 2022 Report Posted February 8, 2022 Let me do some tests later, would be a real shame if we don't get this working. I will contact you later again, just have to do some research how to create a new directory cross platform compatible without using the function mentioned in my previous post. Quote
tpwpny Posted February 8, 2022 Report Posted February 8, 2022 @VirtualCPT You're too kind, Marco! Thanks a ton! Quote
VirtualCPT Posted February 20, 2022 Report Posted February 20, 2022 For everyone following this thread, it tried to compile XMidiCtrl for older macOS versions, but it didn't work. You need at least macOS 10.15 to get it working. I'm sorry about that, but lots of the libraries I'm using (such as RtMidi) require at least C++11 Quote
Lightcivvie Posted June 30, 2023 Report Posted June 30, 2023 Hi Marco, I'm having what looks like a similar issue, trying to install XMidiCtrl on a MacBookPro (M1 Pro chip 16GB, Mac OS 13.4.1 ) per your instructions at https://mauer.github.io/xmidictrl/#/installation My ultimate goal is to get the StreamDeck+ running with XP12 and the HotStart CL650. When I launch XPlane 12, I get an error dialog box (screenshot attached), but no security popup of any kind. XPlane's plugin admin page doesn't show XMidiCtrl. Log.txt shows the following (excerpt only): 0:00:00.000 G64: core: Gizmo64 Script Engine v21.03.16.0101 macOS 0:00:00.000 G64: core: built: Mar 16 2021, 02:23:43 0:00:00.000 G64: core: X-P Folder:[/Users/LCV/X-Plane 12/] 0:00:00.000 G64: core: Sim Langauge set to: us Loaded: /Users/LCV/X-Plane 12/Resources/plugins/Gizmo64.plugin/mac_x64/Gizmo64.plugin.xpl (gizmo.x-plugins.com). dlerror:dlopen(/Users/LCV/X-Plane 12/Resources/plugins/XMidiCtrl/mac_x64/XMidiCtrl.xpl, 0x0006): tried: '/Users/LCV/X-Plane 12/Resources/plugins/XMidiCtrl/mac_x64/XMidiCtrl.xpl' (code signature in <82E49753-46B0-3B8C-A0AC-4A028484A0DC> '/Users/LCV/X-Plane 12/Resources/plugins/XMidiCtrl/mac_x64/XMidiCtrl.xpl' not valid for use in process: library load disallowed by system policy), '/System/Volumes/Preboot/Cryptexes/OS/Users/LCV/X-Plane 12/Resources/plugins/XMidiCtrl/mac_x64/XMidiCtrl.xpl' (no such file), '/Users/LCV/X-Plane 12/Resources/plugins/XMidiCtrl/mac_x64/XMidiCtrl.xpl' (code signature in <82E49753-46B0-3B8C-A0AC-4A028484A0DC> '/Users/LCV/X-Plane 12/Resources/plugins/XMidiCtrl/mac_x64/XMidiCtrl.xpl' not valid for use in process: library load disallowed by system policy) Appreciate any help you might be able to provide. It does appear to me this has something to do with Mac OS security. Cheers! Quote
Pils Posted June 30, 2023 Report Posted June 30, 2023 2 hours ago, Lightcivvie said: Appreciate any help you might be able to provide. It does appear to me this has something to do with Mac OS security. https://x-plane.helpscoutdocs.com/article/26-mac-xpl-not-starting Quote
Lightcivvie Posted June 30, 2023 Report Posted June 30, 2023 34 minutes ago, Pils said: https://x-plane.helpscoutdocs.com/article/26-mac-xpl-not-starting Privacy & Security in Mac OS Settings looks a bit different in Ventura. Regardless, no warnings of any kind appear there, nor do they pop up anywhere else. All I get is that "damaged" dialog box. Quote
Pils Posted June 30, 2023 Report Posted June 30, 2023 2 hours ago, Lightcivvie said: Privacy & Security in Mac OS Settings looks a bit different in Ventura. Regardless, no warnings of any kind appear there, nor do they pop up anywhere else. All I get is that "damaged" dialog box. You may have to do it via command line? Quote
Lightcivvie Posted July 1, 2023 Report Posted July 1, 2023 (edited) Got it to work! I couldn't find a way to do it via command line, but found the following article, which provided the necessary clue. https://support.apple.com/en-gb/guide/mac-help/mh40616/mac TLDR & comments: Since I mostly fly HotStart's Challenger 650 and it uses Gizmo which as yet doesn't run native on an M1Pro MBP, I have the X-plane.app configured to use Rosetta mode, and use an alias to launch that file. I downloaded XMidiCtrl, unzipped it and placed it into the XP12/Resources/plugins folder. To allow XMidiCtrl to run, I located the file named XMidiCtrl.xpl using Finder in the XP12/Resources/plugins folder, right-clicked it, and then selected Open With... I then pointed it to the alias I use to launch XP12, and selected that. Mac OS then displayed a dialog box "this is from an unknown developer, run anyway". Accepting this caused XPlane to start, and the XMidiCtrl plugin now properly appeared in the plugins menu. Now the fun really starts, trying to get StreamDeck+ to talk to XMidiCtrl... Cheers, LCV Edited July 1, 2023 by Lightcivvie specific file name added. Rosetta info added. Quote
Pils Posted July 1, 2023 Report Posted July 1, 2023 6 hours ago, Lightcivvie said: Got it to work! I couldn't find a way to do it via command line, but found the following article, which provided the necessary clue. https://support.apple.com/en-gb/guide/mac-help/mh40616/mac TLDR & comments: Since I mostly fly HotStart's Challenger 650 and it uses Gizmo which as yet doesn't run native on an M1Pro MBP, I have the X-plane.app configured to use Rosetta mode, and use an alias to launch that file. I downloaded XMidiCtrl, unzipped it and placed it into the XP12/Resources/plugins folder. To allow XMidiCtrl to run, I located the file named XMidiCtrl.xpl using Finder in the XP12/Resources/plugins folder, right-clicked it, and then selected Open With... I then pointed it to the alias I use to launch XP12, and selected that. Mac OS then displayed a dialog box "this is from an unknown developer, run anyway". Accepting this caused XPlane to start, and the XMidiCtrl plugin now properly appeared in the plugins menu. Now the fun really starts, trying to get StreamDeck+ to talk to XMidiCtrl... Cheers, LCV I find this rather bizarre, but good news! Quote
Lightcivvie Posted February 10 Report Posted February 10 (edited) Got the StreamDeck+ to work with the HotStart Challenger 650, on a M1 Macbook Pro with xmidictrl. AND IT WORKS SPLENDIDLY!!! This gets rid of the latency issues I had when I first set it up using the StreamDeck+ without xmidictrl (and only sending keypresses). Now the dial knobs on the SD+ work like a charm to control the heading, speed, map range, VS/pitch wheel, and more. Here are the individual steps, in case anyone else with a Mac and a StreamDeck+ wants to do this. I assume that you have the SD+ connected and the Elgato Stream Deck app is installed. I basically got all the info from Xplane.org, https://mauer.github.io/xmidictrl/#/, and Trevliga Spel's youtube videos. Many thanks to them/their sites for all that good stuff! The xmidictrl plugin officially supports some Behringer and LoupeDeck, so it was just a matter of adapting that. 1) launch the Elgato Stream Deck app, and from there, click the icon to get to the Elgato Marketplace (the colorful one near the top). From there, find the Midi plugin from Trevliga Spel and install it. 2) download xmidictrl, from Xplane.org. Version 1.12. Unzipped it and moved the resulting folder to Xplane/Resources/Plugins, as per the instructions. Also make a copy of the CL60_XMidiCtrl.toml file in that folder, and place it in the X-PlaneNN/Aircraft/X-Aviation/CL650 folder. You may need to edit this file later on to make the magic happen, but this is real easy and only involves making some numbers match. I've attached my copy of that file here, so you can just take that and place it in the CL650 folder. 3) Set up the Mac's midi interface. On the mac, launch the Audio MIDI Setup.app (comes with Mac OS). Once it's launched, you need to reveal the 'MIDI studio' part of the app, by going to the menu bar, selecting the Window option, and then the 'show MIDI Studio' option. Now select the IAC Driver icon shown there, by double-clicking. An IAC Driver Properties window will appear. Here, you want to add 2 ports that will have specific names. To do that, below the Ports subwindow that is shown, click + to add 2 ports. Name the first port 'StreamDeck2Daw', and the second one 'Daw2StreamDeck'. Each port will be created with one MIDI In and one MIDI out connection. Finally, near the top of the window, set a checkmark in the 'Device is online' option. 4) Launch X-Plane. It will give you a warning about the xmidictrl plugin not being able to be run because it's not signed. Select the cancel option (not the 'move to bin' option. Now switch to MacOSs' settings app, go into Privacy and Security, and find the warning that xmidictrl is not signed. Allow it to run anyway. When this is done, switch back to Xplane, quit, and relaunch it. After relaunching, in the top left menu bar, find Plugins. You should see XMidiCtrl. Select, and click the Show MIDI devices. At this point, you should see a window showing 2 sections. One lists INBOUND PORTS, and the other OUTBOUND PORTS. Both sections should show 2 entries, Port 0 with a corresponding MIDI device named 'IAC Driver StreamDeck2Daw', and port 1 with a device named 'IAC Driver Daw2StreamDeck'. Go back to Plugins - XmidiCtrl in the menu bar, and this time select 'Settings'. Go to the MIDI tab, and read the channel number for virtual MIDI messages. It said 16 on my mac. Make a note of whatever number you have there, and close the settings window. 5) Using the Mac OS finder, go to the CL60_XMidiCtrl.toml file you copied into the Xplane/Aircraft/XAviation/CL650 folder earlier, and open it using TextEdit. For each CL650 control that you want the SD+ to be able to drive, set the 'ch = ' entry to the channel number you noted earlier. Comment out all the other ones by putting a # at the beginning of each line. If your channel was 16, and you copied my version of the .toml file, you don't have to do anything. 6) Final step. Open the Sream Deck App (it normally minimizes to the Mac OS menu bar top right of the screen) by clicking on it's logo. Now, for every CL650 control that you want to drive, drag a 'Generic Midi' item to a rotary button on the interface. Then configure the dial rotate action to send a 'Control Change (CW/CCW)', so that the 2 channel numbers match the one you put into the .toml file, and the 2 Ctrl values match the 'cc = ' value for the control in the .toml file. I've attached a screenshot for one of my dials so you can see what it looks like. For more controls, you can just copy and paste from one dial on the SD app interface to another, and then tweak the Ctrl values. The HotStart 650 is already an incredibly good simulation of the real Challenger. Adding the SD+ and Xmidictrl as described above just takes it to an even higher level. Might be an idea to donate to both Marco Auer, who created the xmidictrl plugin, and to Trevliga Spel, for his StreamDeck plugin. Cheers. LCV PS. the VC, VNAV, NAV, APPR and other buttons I configured to just send keypresses, no need to use Xmidictrl for those. Just for the dials. PPS. Attached my version of SD+ profile for the HotStart. Note you may have to edit some of the key bindings in either XPlane or the Stream Deck profile, as mine are not standard. CL60_XMidiCtrl.toml XP12 CL650 Stream15.streamDeckProfile Edited February 10 by Lightcivvie Added SD+ Profile file and comment. 1 Quote
Pils Posted March 25 Report Posted March 25 3 hours ago, zephyrzhang said: Any update on Mac native support .... Arm64 support was added to xmidictrl over a year ago. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.