darktable-org / darktable

darktable is an open source photography workflow application and raw developer
https://www.darktable.org
GNU General Public License v3.0
9.5k stars 1.12k forks source link

Midi encoder for shortcuts #10909

Closed schmoelder closed 2 years ago

schmoelder commented 2 years ago

Introduction I have a rotary encoder on a midi keyboard which I would like use to for setting sliders. Since I only have a limited number of encoders, I would like to use some modifier for it.

Describe the bug/issue When setting e,CC16 for exposure and then f,CC16 for FilmicRGB/White relative exposure, only the last setting will be active when turning the knob, regardless whether e or f is pressed.

To Reproduce Please provide detailed steps to reproduce the behaviour, for example:

  1. Go to 'Shortcuts'
  2. Go to Processing Modules/Exposure
  3. Assign Exposure
  4. Press e and rotate encoder
  5. Go to Processing Modules/Filmic RGB
  6. Assign White relative exposure
  7. Press f and rotate encoder
  8. Press e and rotate encoder > Filmic White relative Exposure is adjusted

Expected behavior

  1. Press e and rotate encoder > Exposure is adjusted

Edit Sorry for my butterfingers, I accidentally pressed enter before I was finished.

elstoc commented 2 years ago

There's very little actual information in this issue. Most of the text you have included is the guidance (written by the darktable team) on how to raise an issue. Instead of just including the guidance verbatim, please use the guidance to write an issue and provide the information requested.

Please help us to help you

schmoelder commented 2 years ago

Sorry, I had butter fingers and accidentally submitted the issue while editing the post.

MStraeten commented 2 years ago

did you check what's in your shortcutsrc file? Maybe attach it so the result of your assignment can be checked.

dterrahe commented 2 years ago

Besides providing the shortcutsrc file; do you have fallbacks enabled?

  • Press e and rotate encoder

Are you keeping e pressed while rotating the encoder?

  • Assign White relative exposure

Do you get a message asking you to overwrite the previous assignment?

schmoelder commented 2 years ago

Thank you all so much for your replies and suggestions. In trying to get a more reproducible setup, I deleted my shortcutsrc (and keyboardrc) and the issue sorta resolved itself (probably should have done that earlier already!). Directly after assigning the shortcut, the rotary still always modifies the last entry (even when no other key is pressed). But after using any other shortcut (with a key), this behavior stops and I can use everything as intended. So maybe there was just some glitch earlier. I think the issue can be closed. Still, I try to answer all the questions in case it's relevant for something else:

did you check what's in your shortcutsrc file? Maybe attach it so the result of your assignment can be checked. Here is the relevant section. I started from scratch, that's the only shortcuts I've assigned.

[...]
e;midi1:CC16=iop/exposure/exposure
f;ctrl=global/panels/filmstrip and timeline
f;shift;ctrl=global/toggle focus peaking
f;midi1:CC16=iop/filmicrgb/white relative exposure
[...]

Besides providing the shortcutsrc file; do you have fallbacks enabled?

I tried both with and without fallbacks

Are you keeping e pressed while rotating the encoder?

Tried both, keeping it pressed, as well as a sequence; they result in the same entry in the shortcutsrc. For using the shortcut, only the one keeping the key pressed works.

Do you get a message asking you to overwrite the previous assignment?

No.


If I may, here are some other general observations/ideas I had while using Darktable with Midi:

Finally, thanks to everyone. I really love Darktable and adding MIDI Support was a great idea!

dterrahe commented 2 years ago

Tried both, keeping it pressed, as well as a sequence; they result in the same entry in the shortcutsrc.

That is strange; upon releasing the key, a shortcut should be created for just the key press.

  • the buttons and encoders send Midi CCs

Have you tried configuring the buttons to send notes? That's the intended configuration. You should then be able to combine midi-button-press and midi-encoder-turns in one shortcut.

  • enocder 1 is used for the first slider of the module, encoder 2 for the second etc.

This is one of the ideas in https://github.com/darktable-org/darktable/issues/9487#issue-941202322 (last item under widgets). Not the highest priority on my list, but I (or someone else) might eventually get round to it.

jerryhard commented 2 years ago

for people who compile darktable is needed portmidi* (portmidi-devel) i have portmidi,portmidi-devel,portmidi-tools I buy Xtouch mini - because is supported as primary, great idea, small and cheap device - dual layer - then is like double Maybe is good idea make some schema what is best, now i have exposure - A-1, color-temp- A-2 ... i have plan shadow-highlights.

for people need know f is supported or not ... from cmd must darktable write [midi_open_devices] opened midi device 'X-TOUCH MINI MIDI 1' via 'ALSA' as midi0

My device come in MC mode (light orange led in "MC MODE") unplud gevice, press and hold MC gummy button (white, left down), plug back to USB, wait light-off orange led ... and release button ... now is mode write to device memory and next power off-on be on standard mode and not in MC mode.

I write it, because i don't find all these info on web, some is in README in source code, where is write about portmidi library, on web is write about don't use MC mode.

HOWTO set - only double click in shortcut setting and press or rotate xtouch-mini button or potentiometer and that is all. idea is use tablet-or-mouse + Xtouch-mini only ... but now is sometime needed CTRL,SHIFT,ALT

Maybe in feature we crete ideal layout for X-touch mini + printable layout with labels

some crazy howto with push button and potentiometer ... + template for crete own label ... i test darktable and he work diff. he use buttons as buttons, not as switcher that stay light - pressed full time ... combination is possible, but is needed press button + rotate pot. ... maybe idea, but now is possible use SVC template for button labeling https://aperturized.com/lightroom-and-midi-33-my-midi2lr-setup.html

MStraeten commented 2 years ago

I doubt there’s such thing as an ideal layout ;) it depends on your workflow. I need the knobs for exposure and the colorbalance rgb sliders - not representative for others. Further an attached XTouch minimise just detected as midi0 if there are no further midi devices attached. so maybe better provide shortcutsrc layouts on discuss.pixls.us, so these can be adapted to the own midi config while importing.

dterrahe commented 2 years ago

but now is sometime needed CTRL,SHIFT,ALT

You can define a midi key as modifier by mapping to global\modifiers and selecting the element you want.

github-actions[bot] commented 2 years ago

This issue did not get any activity in the past 60 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.