Jump to content

Can't seem to get the MIDI control to work as I'd like.


Jeff Greenlee

Recommended Posts

Hello!   There seem sto be something I am missing  when trying to map a Midi Knob to a contginuous control.   My MIDI controller is a Midi Fighter Twister.   I am trying to get a knob to control the Elevator Trim control on a Cessna 172SP.    (The one that comes with X-Plane). 

This is the line in the TOML file:  

{ ch = 1, cc = 0, type = "enc", dataref = "sim/cockpit2/controls/elevator_trim", modifier_up = 0.0125, modifier_down = -0.0125, value_min = -1, value_max = 1, value_wrap = true },

It sort of works....   but the trim wheel doesn't behave correctly.  it will move when I twist the knob.. but when I then twist the knob in the opposite direction, the wheel keeps turning in the direction I started in. Eventually it turns the right direction if I keep turning it back and forth... but its not working like it should. 
   So what am I doing wrong here?    I originally tried the control "command_up = "sim/flight_controls/pitch_trim_up" with the accompanying "command_down" but that just really screwed it up... (and I got error messages that it didn't like negative values in the parameters!)    If I use the up/down hat switch on my flight yoke,  I notice it deflects the value up or down by increments of about 0.125 degrees. 
My desire is to get an actual rotary feel in controlling the Trim wheel instead of move a switch up or down a whole bunch of times.. which doesn't feel as intuitive. 
 

I based this off of the example provided in the Xmidicntrl manual where it shows the command for a rotary knob on a Nav radio... I thought that might be an appropriate model, but that apparently is not going to work.  

Any suggestions? 

 

Link to comment
Share on other sites

Hello Jeff,

It's difficult to say what wrong without an log on debug level. It could be that your Midi Fighter Twister is sending range messages instead of relative messages. You can try that very easily by just adding the mode parameter to your mapping.

It would look like this:

{ ch = 1, cc = 0, type = "enc", mode = "range", dataref = "sim/cockpit2/controls/elevator_trim", modifier_up = 0.0125, modifier_down = -0.0125, value_min = -1, value_max = 1, value_wrap = true }

 

When you commands instead of a dataref no negative values are required at all. You just have to define command_up and command_down. A correct mapping would be:

{ ch = 11, cc = 1, type = "enc", command_up = "sim/instruments/barometer_up", command_down = "sim/instruments/barometer_down" }

 

Please enable the debug mode in the settings, turn the knob a couple of times up and down and send me the XMidiCtrl_log.txt, please. Then I can see what kind of messages your device is sending. I'm pretty sure that are using the range mode.

Have a nice day,
Marco

Edited by VirtualCPT
spelling
Link to comment
Share on other sites

  • 2 weeks later...

Hello Marco... I replied to this thread with a couple paragraphs and added both the XMidiCtrl_log.txt file and the x-plane log.txt file... but inexplicably, I went to check on this forum today and my reply vanished and turned into steam in the internet pipes.  :).    

I am away from my home Mac at the moment,  so I can't  re-produce those files right now. However,  I did act on your suggested remedy of adding the "mode = range" parameter and tried it again.  It did partially fix one issue where the movement of the wheel is continuous.  but the behavior was not as expected:  For each entry for all of  values from 0 to 127, I confirmed from the debugger enabled XMidiCtrl_log file that my Twisted sister (My joke name for My control - "MIDI fighter Twister")  knob is making the expected 0.0125 changes in the log file  - all the way from 1 to -1, however the observed behavior of the Sim's trim wheel still seemed wonky.   All changes in value - negative or positive  - only turned the trim wheel to values below  0  - (the center marking or takeoff setting on the trim wheel.).    I need a positive trim  for climbing attitudes!


So,  it then occured to me to see what happens if I change to "value_wrap = false".  Presto!   that seems to have worked!!! At first it did nothing ... but I discovered that  It required that I do a full twist of the knob to max and then to Mininum .. and then it started working!    My understanding of that parameter was that it is designed for a center detented control that utilizes negative and positive values.. but apparently that does not apply to Trim Wheels!   I have an idea in my mind that instead of spending $150 on a "real" trim wheel,  I might see if I can build my own MIDI trim wheel - maybe with an Arduino chip  and attach it to the side of my Throttle control.  

I want to try XMidiCtrl on some of the instruments now,  Like the heading bug, the Altimeter setting and the radio and nav knobs. So I'll keep playing with it.  The irresistible  feature of the MIDI Fighter Twister (designed for DJ's). is that it has the capability of controlling 128 separate controls (16 knobs that can affect 128 distinct CC values AND each knob also a pushbutton control as well! for toggling  - It's magic for Computer Synthesizer geeks - I am one of them! ).  If I ever find myself flying a simulated airliner,  having this many controls would be better than mousing around!  For now, I stick to the trusty 'ol Cessna 172SP .

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...