Capture One ´20 picture editing with MIDI Controller and KM by scripts

Hi, I´m a KM beginner and new here. Thank you very much for your help in advance.
I want to speed up my picture editing in capture one ´20 on MacOS 11.5 by the Arturio BeatStep MIDI Controller.
Many parameters such as brightness, contrasts etc. can be controlled directly via shortcuts in Capture One. So this is easy to control with KM: Take a MIDI value by turning a knob and simulate a key pressing which will e.g. increase brightness by 0.1.
But for many parameters like Hue, brightness and saturation of individual colours there are no shortcuts in Capture one 20.
Is here anyone here who knows about capture one '20 scripts?

For example, I would need a script or macro for "increase brightness for green by 0.1“.at Can anyone help me and perhaps already has such scripts or knows a library?

Many thanks!
Guido

You seem well aware of the first way to control or automate an app, which is using keyboard shortcuts that the app builds and documents in its menus. Most apps are good with this, but even Apple apps sometimes force you to move and click the mouse to do things (eg, Find My.)

The second way to control or automate an app is using AppleScript. Most apps have a mechanism that allows users to control the app using AppleScript commands. But as with keyboard shortcuts, many apps are missing some of the methods needed to control the app this way. In order to see how much support your app has for AppleScript, you can check that yourself by using a macOS app called Script Editor and opening the application file itself in Script Editor. Since I don't own the app in question, I can't do this. And even if I had the app, I'm not very adept at writing solutions using AppleScript.

The third way to control or automate an app is using KM actions which read the screen, analyze the screen's images or text, and simulate keys and mouse movements in order to automate the things you want to do. This is usually a complex methodology, but when it works, it works. I do this all the time to solve problems. For example, on Saturday I noticed that the Apple Find My App doesn't support either the first or second approach for controlling it, so I wrote a KM macro that reads the screen, clicks on it, and sends me the text of my friend's addresses to my iPhone via SMS. I had to account for the position of the Find My window, the locations of my friends' names in the sidebar, and the location of the inspection window on the right side when it pops up. It sounds complicated, but once you know how to do it, it's not that hard.

I trust that you've correctly eliminated the first approach as a possibility. We don't know if we can eliminate the second approach yet.

One thing you haven't indicated is how you perform the requested action right now. Do you use the mouse on the screen to achieve this? Are you manipulating a control on the screen? Can you find a video online (or can you create one) that shows how you are currently doing this?

Everything Sleepy said, plus—if you need to do more with MIDI, consider using MIDI Translator, as well. I've got MIDI Translator set up to send data packets to Keyboard Maestro via AppleScript. Super simple, as long as you're passing one item at a time. This is especially helpful because you can grab a BOME Box, and download the MT code into the BOME Box. Then, plug your Arturia's MIDI out into the BOME Box, and the BOX into your computer—you now have pure hardware that feeds KM. While KM does support sending key commands, don't use it for that—leave everything but MIDI to KM.

Thank you very much @Sleepy and @notsteve for your fast and helpful replys!
I have attached a screen video. There you can see which values I want to influence with KM.
On the video it is the brightness for blue, as an example. It would be great if a macro could increase or decrease this value for the brightness of blue by 0.1.
The controller has infinitely rotating knobs. If I turn the knob to the right, the value of the knob goes to "127", if I turn it to the left, the value goes to "1". Otherwise, the value is "0". It is as if I press a button. You can use the turning of a wheel as a trigger for KM. I tested it and it works fine.

The Arturio BeatStep can be connected via USB, so fortunately I don't need a bomebox.

@Sleepy Is it actually possible to build a macro approximately like this?..:

Read value "Brightness Blue"
Increase value "Brightness Blue" by 0.1
Write value back to "Brightness Blue".

What would such a macro look like?

I didn't see a video on your post. You may need to edit your post, or add a new post.

I think you said you wanted to control the C1 software using the ABC hardware (please permit my use of acronyms.) But then you also talk about controlling C1 with KM. So I'm still trying to understand the problem. Or maybe there are two independent problems here.

My area of specialty is getting KM to make macOS or its applications automated. I'm not sure if I can advise authoritatively on external hardware devices.

Oh sorry!
Here it is.
It seems to be that I cannot upload .mp4 screen videos.

See the corner on the bottom right

Hey Guido,

When necessary please use YouTube as the host.

Take Care,
Christopher Stone

(Keyboard Maestro Moderator)

Capture One has robust scripting support for both AppleScript and JavaScript, both of which Keyboard Maestro can handle. See Scripting for Capture One for some helpful links (documentation, forum).

Since C1 has robust support for AppleScript, then I probably shouldn't spend time creating a screen/mouse type of shortcut for this problem. However after looking at the screenshot he provided, it certainly looks doable, both easily and reliably.

The first thing I noticed is that there are a series of ten coloured blocks directly above the slider and number boxes. That would allow the KM action "Find Image" to reliably find the location of these elements on the screen (or in the app) at any time, and with high reliability. The second think I noticed is that there are three text boxes below and to the right of this element. In my experience, Monterey would have no problem using OCR to read these values with perfect accuracy (maybe even the KM OCR action would work.) Once the values were read, it would be quite easy to use the KM mouse click action to place the text cursor inside the text boxes, select the text, and change the value.

AppleScript always has 100% reliability, while my approaches are usually only 99% reliable and often depend upon things that AppleScript doesn't require like having the control elements visible on the screen. For example, if the window was half off the monitor, my method wouldn't work at all.

@Sleepy You good on this? I know the Arturia stuff pretty well, but I don't think that's germane here. Hit me up if there's a question on that or the MIDI end.

I'm good with screen manipulation, but as MrPasini said, this is probably best solved using AppleScript, which is not something I'm very adept with. If Leone wants a non-applescript solution, I'm probably good on this topic.

Thank you very much for your kind replies folks!
Yes, heard that C1 has a good apple script support. And I think the script solution would be more robust. To be honest, I don't know scripts at all. I have only found scripts for other areas of C1 on the net. Can anyone of you write such a script that I could use as a template?

In order to write such a script a person would need to have the app (I don't) and would need to be decent at writing AppleScript scripts (I'm not.) MrPasini seems to indicate that he meets these criteria. Let's wait for him to chime in again. If for some reason AppleScript doesn't suit you, we can try the other method of using screen image searches and mouse clicks. That's a different approach, but for some simple situations, is easy enough.

I know some AppleScript and MIDI, and can probably suggest some things. First, how are you using a knob on the BeatStep to trigger a macro in KM?

I think you are right, Leone is trying to send signals from ABMC -> KM [-> AS] -> C1, with AS being optional.

What is „ABMC“?
Unknown

My idea is to do like this on KM:
MIDI Trigger: If knob „12" is „127“ (value for turning it to right)
than execute applescript e.g. „increase green brightness by 0.1“
And the AppleScript would use the script dictionary from Capture one.
Unfortunately I have no idea how to write scripts

The Beat Step is this one on the pic.

"Arturio BeatStep MIDI Controller."

Your overall process is to send data from ABMC to KM [perhaps then to AS] and then finally to C1. This is what you are trying to achieve. My posts and my advice deal with the KM to C1 portion. Other people here seem willing to give advice on the ABMC to KM process. Do you see that different people are trying to help with different parts of your process?

:joy: sorry

Thank you very much!
Sorry if I have misunderstood something, maybe my english is not good enough.
The part from ABMC to KM is working well. KM got triggered by ABMC and is ready to start a Script. It would be great if there was a script with which I could specifically influence image values, such as increasing or decreasing the brightness of green.
Can any of you AS and have a tip how the script should be?

Not only do we need someone who knows AS, but they also have to own the C1 app. I think MrPasini implied that he does. Using AS is always the best way to go. But sometimes AS can be ignored and KM can manipulate the app through mouse and screen controls. Let's not go there until we have to.