X-Touch Mini midi controller for darktable

I have been trying to get an X-Touch Mini controller to work with darktable. For the most part this has been successful. I can get the knobs and keys to perform darktable actions and the ring of lights around the knobs correctly reflects the position of an associated slider. The only issue I have is that the lights under the keys only illuminate when a key is held down. From what I have read in the manuals I thought that these lights toggled on and off with the switch. Am I right or wrong? I am using a self built latest master version.

FWIW, mine don’t, but I didn’t realise that they might. Would be nice

maybe that depends on the assigned aaxtions - at least using the buttons for expanding or collapsing snapshot, history, … keeps the illumination on while the assigned module is expanded.
So maybe give some more infos which actions you assigned to the buttons

1 Like

My experience is the same as that of @TonyBarrett.

I, too would like to see this, but it is not straightforward. In layer B (which I use for lighttable), for example, I have the last 4 buttons on the bottom row assigned to 4 different export presets. So the moment I press one, one of the other three (if illuminated) would need to be extinguished.

A simple on/off toggle (like enabling a module - e.g. profiled denoise) may possibly be easier.

I’d also like to be able to trigger an event on changing from layer A to layer B and vice versa, but that is something internal to the X-touch and does not generate any MIDI messages.

I have also wished for the ability to imitate the mouse wheel with the rotary knobs.

It is actually pretty freaking awesome how well the X-touch can work with darktable, given it was designed with a very different intended use. So kudos to the developers for the redesign of the shortcut system to allow easy programming of midi-controllers in general and the X-touch mini in particular.

1 Like

there‘s an example lua script for x-touch that allows conditional handling of some controls.
Even this is not a one size fits it all solution it can be used as an inspiration for further ways to customize the use of midi controllers

1 Like

Yes, I have found that example and I am trying to adapt it to my wishes which is taxing my Lua programming somewhat, but I will get there. It is using this example where I have found that the LEDs on the buttons will not remain illuminated so some of the shortcuts I have are:

midi:G#-1=lib/masks; show
midi:A-1=iop/colorequal; show
midi:A#-1=iop/toneequal; show
midi:B-1=iop/colorbalancergb; show
midi:C0=iop/channelmixerrgb; show

I changed from ‘focus’ to ‘show’ so that I can see the iop open up/expand.

I had a look at the darktable code (I am not a C programmer) and it certainly looks like there is code there that is designed to set all the LED lights to the correct (on or off) state each time there is a midi event. Anyway I will persevere with getting the X-Touch to work how I want it to. As @martin.scharnke wrote what has been achieved by the developers with this interface is impressive.

I’ve had a play with this script and hope to customise it to my needs when I don’t have such a backlog of processing as I have now.

That is encouraging.

I also note that it is possible to send a MIDI message to the X-touch to change the active layer, so something to experiment with together with the lua scripting.

Ok, I have solved my problem and maybe that of some others. I have reported this as an issue on github as it means that either the manual or code needs to be changed.

Darktable uses channel 10 (on 0-15 numbering) as the channel to read from and channel 0 to write to (i.e as the controller’s global Rx channel). As received from factory the controller does indeed send on channel 10, but its global Rx channel is channel 11. Using the X-touch editor on a windows machine to change this to zero (in this editor this actually means channel 1 as it uses 1-16 numbering) all works as expected with the lights staying on when they should. What remains a mystery to me is why the lights around the controllers worked before when the wrong channel was being used. I did however notice when I was using the little command line program sendmidi to test, that occassionally sent messages on the wrong channel were responded to.

If the lights don’t work correctly for you I suggest that you try what I did. If you haven’t already got the editor it can be downloaded from here, but it does need a windows machine.

1 Like