Feature #10919

darktable and MIDI controler

Added by daniel patin over 4 years ago. Updated 7 months ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Affected Version:
hardware architecture:


Hi, sorry for my poor english.

many Lightroom users use USB MIDI controler for fast and confortable use. you can assign each setting to one controler for time saving and accuracy
on tread on twitter, but in french:
this feature is possible to implant in Darktable?

beatstep.bmtp (43.9 KB) beatstep.bmtp Bome's Midi Translater Classic configuration for Arturio BeatStep Diederik ter Rahe, 07/10/2019 07:33 PM


#1 Updated by Tobias Ellinghaus over 4 years ago

In theory that would be possible. However, until a developer needs that it will most likely not happen.

WARNING: Brainstorming about darktable internals ahead.

One way to handle that could be handled is interfacing Lua to vimkeys (or rather, using the same mechanism to access controls) and then have a Lua script that interfaces with MIDI controllers.

#2 Updated by Tobias Jakobs over 4 years ago

Gimp supports MIDI controller, perhaps there is some code to share.

#3 Updated by daniel patin over 4 years ago

you can find here old mac app for assign MIDI keyboard to keystrokes:
and the source code is on github

#4 Updated by Christian Kanzian over 3 years ago

Tobias is working on this. More about the progress can be found here:

#5 Updated by Tim Sinthofen almost 3 years ago

I checked the link and saw that Tobias was basically trying to build some Midi Hardware, which didn't work out.
I just want to leave a affordable device here, if somebody still wants to try to implement MIDI: Akai LPD8.
50€ for a board with 8 pads, 8 rotary knobs. And as far as i understand can switch between 4 "programs" basically giving you 4 different mappings for each of the controls.
For implementation you could also check (DJing software)

#6 Updated by Philippe Gauthier over 2 years ago

Hi there,
I'm very interested in this feature too and I have a Korg nanoKontrol2, so I gave it a try.
I found a basic midi C library : : reading and writing (turning pannel's leds on/off) to the controller works fine.
I don't know how darktable's insides are designed, but I tried to hardcode a basic midi mapping as proof of concept.
I did a dirty thread in the main loop, listening for midi inputs, and called some image processing function I found, for exemple : dt_dev_exposure_set_exposure(darktable.develop,midiValue);
It kinda works but it stacks too many processing jobs while you move the knobs, and takes forever.
How do I abord previous job if the knob moved while previous job is still in process?
If there is some documentation on the image processing pipeline/jobs API, I'd be glad to read it.

#7 Updated by Tobias Ellinghaus over 2 years ago

  • System changed from Mac OS X to all
  • % Done changed from 0 to 20
  • Status changed from New to Triaged
  • Category changed from Darkroom to General
  • Tracker changed from Bug to Feature

Currently the whole control infrastructure inside darktable is not suited to something like that. It will require a major rewrite of several parts.

I started work on that a while ago and hope to continue it once we have the next release out.

#8 Updated by Matthew Harrison over 2 years ago

Please can the new infrastructure be flexible enough to support:
Absolute position sliders or dials
Relative position sliders or dials
Motor driven sliders
Led indexed dials
I'll be buying a controller when support is added. Thanks Tobias for the work.

#9 Updated by Tobias Ellinghaus over 2 years ago

Yes, all of that is on my list already.

#10 Updated by Philippe Gauthier over 2 years ago

Ok, thanks Tobias, good luck then! :)
Just to keep track, I published what I did here :

#11 Updated by Slipe Lop almost 2 years ago

It kinda works but it stacks too many processing jobs while you move the knobs, and takes forever.

Would it be possible to do rate limiting? You can probably move a slider or knob from 0 to 127 in 0.1 seconds. That's 1270 events per second. What if you set a maximum of 5 events per second, for instance? (discarding the rest).

Different question: could midi support be implemented using the Lua interface? Then one could support any kind of input hardware, not only midi (say VR controllers or a Leap motion).

#12 Updated by Andreas Kreuzer about 1 year ago

Hi, I am new to darktable-developement and interested in contributing to implement this feature.
I have some experience in embedded C but not very much with git and such a complex project.
Could anybody give me a hint how and where to start implementing?

#13 Updated by Diederik ter Rahe 12 months ago

Until this gets implemented in darktable itself, I'm using Bome's Midi Translator Classic to translate midi knob turns on my Arturio Beatstep into (multiple) keystrokes on the numeric keypad (modified with "Ctrl-" for down moves) that can then be bound to increase/decrease shortcuts for any slider. I've attached the configuration file for Bome's Translator. It requires the beatstep knobs to be configured in either Relative #1 or Relative #2 mode. I believe this may have been the default, but it can be configured in the Arturio Midi Control Center. Also, "knob acceleration" should be set to "Slow (Off)". Otherwise, when the knobs are moved quickly up (or down), they may generate changes larger than +5 (or -5) and only the first 5 are mapped to (as many) keystrokes.

#14 Updated by Diederik ter Rahe 7 months ago

Please see here for an initial implementation (windows not yet supported).
Any comments, especially for different controllers, would be very welcome.

Also available in: Atom PDF

Go to top