Hello!
My MIDI controller broke, so I need to use another where I have to do program changes to load up presets I've made to control various instruments in Ableton.
I want to trigger these program changes automatically on my controller while I scroll. So far I've been able to make that happen according to what image is on screen in a certain area, with a blurry version of the image it's looking for, so it's really reacting to a big block of colour (my instrument groups are colour coded) for each program change. This makes it change programs automatically while I scroll through the session, however, it means I can't sustain notes when I want to play because the program change is constantly being triggered by the image on screen.
What I'd like:
to make it work by screen capturing that area of the screen to clipboard "Temporary", converting the image on "Temporary" to text using "OCR Image on Clipboard "Temporary" and pasting that text to clipboard Temporary 2. Then trigger the program change with If/Then, if any of that text matches text in a list that I've defined (defined as that same text it's converting, per instrument group). So I'll have a separate If/Then for each instrument group.
I've gotten everything to work except actually making the program changes using the extracted text. I've tried: If clipboard "Temporary 2" contains: (the text it extracts for each instrument group) but that doesn't work because it appears to be looking at the text I write int he box as an entire string that it's comparing it to. I've also tried: If clipboard "Temporary 2" contains "Variable" where I've made a variable for each instrument group, and entered the text it's extracting as it's own item, separated by commas, but I'm clearly not understanding how variables work.
Note: it doesn't bother me that the text being captured and pasted into Temporary 2 doesn't always match what's on screen because it's always consistently the same which is all that really matters.
Photo of my macro:
My second question is: having KM screen capture every second isn't going to eat up space on my computer right? Each screen cap just replaces the last one?
Thanks in advance for any help you guys can offer!
SL MKIII Periodic Program Change Trigger.kmmacros (60.1 KB)