A technical support community for Apple Logic Pro users.

 
sjgam
Posts: 130
Joined: Sun Sep 11, 2016 7:06 pm

Re: Scripting Logic Pro X using Keyboard Maestro

Mon Jul 23, 2018 6:01 am

des99 wrote:
Interesting method for the Valhalla plugins.

Again, with these, there is no direct way of getting the patch name - when you click "Save", the current preset name does not populate the save dialog.

So, instead, the plugin has a "Copy patch to clipboard" feature, which creates a text representation of the patch to the system clipboard - so we do that, then use a regular expression text search step to extract the name from the patch in the clipboard. Works great!


Now if they had a "Copy all patches to aupreset" feature we could close down this thread.
 
User avatar
des99
Posts: 5151
Joined: Tue Jan 27, 2015 12:08 pm

Re: Scripting Logic Pro X using Keyboard Maestro

Mon Jul 23, 2018 6:31 am

sjgam wrote:
Now if they had a "Copy all patches to aupreset" feature we could close down this thread.


I've uploaded all the Valhalla stuff now.
mu:zines | music magazine archive | difficultAudio
 
User avatar
vanhaze
Posts: 419
Joined: Sun May 15, 2005 3:32 am
Location: Netherlands

Re: Scripting Logic Pro X using Keyboard Maestro

Tue Aug 07, 2018 2:26 pm

Hi 2 all,

Just wanted to make a global statement regarding the use of Keyboard Maestro in conjunction with Logic Pro X;
If you are always looking to speed up workflows in Logic Pro X, (like me), Keyboard Maestro may be your best friend.
The lack of making macro actions in Logic always annoyed me but using Keyboard Maestro you can make macro actions that work in Logic, speeding up
things that you want to accomplish in Logic greatly.

I am in no way connected to Keyboard Maestro so don't see this as a commercial talk, but i honestly think KM is worth every penny.
But in the end, native support for macro actions would be the bomb ofcourse.

Look at Reaper or Cubase or Waveform 9, these DAW's greatly support marco actions.
Reaper even takes it a step further, supporting scripting languages like lua, python and eel.
There are hundreds of free scripts availabe for Reaper, made on a (mostly) free basis by scripting people.
The stuff that you can do with those scripts is insane, not possible in any other DAW (that doesnt support macro actions and/or scripting).

Please Apple , introduce macro actions in Logic please !
#MoreCreativityInLessTime.
Macbook Pro Retina 2015 - OSX 10.15 - Always latest version of Logic Pro X - UAD Apollo Twin.
 
User avatar
carlcaulkett
Topic Author
Posts: 128
Joined: Sat May 13, 2017 2:50 am

Re: Scripting Logic Pro X using Keyboard Maestro

Thu Aug 23, 2018 6:07 pm

I'm slowly getting used to the Keyboard Maestro way of doing things. My first effort is a macro designed to be used with the Auganizer application. The idea is that I can easily step through the list of Plugin names, and view the "Show plug-in info" data for each item. It's just ⌥⌘↓ to activate the macro, ↓ to dismiss the popup, and ↓ again to move down to the next entry.

Here's the macro...
as an image...
Show Info.png
Show Info.png (107.36 KiB) Viewed 3801 times


and as a file (you'll need to unzip it)...
Show Info.kmmacros.zip
(2.68 KiB) Downloaded 69 times


I've used the "Find Image" action to fix the mouse position to a listbox so that I can do a right-click action over the selected item. This apparently is something that is not supported directly because of limitations in macOS. I'll be using his technique in future macros, but hopefully, this may be worth looking at.
Last edited by carlcaulkett on Fri Aug 24, 2018 1:30 am, edited 1 time in total.
Logic 10.5
macOS 10.14.6 Mojave (thanks to dosdude1.com/mojave)
Apple Mac Pro (early 2009) - 4,1 -> 5,1 - 32GB RAM - 2.66 GHz Quad-Core Intel Xeon
Novation Impulse 49
Novation Launchpad X
Scarlett 2i2 Audio Interface
 
User avatar
carlcaulkett
Topic Author
Posts: 128
Joined: Sat May 13, 2017 2:50 am

Re: Scripting Logic Pro X using Keyboard Maestro

Thu Aug 23, 2018 6:12 pm

The use-case for this macro was the fact that I need to scan my Plugin components and find out if any of them are made by the manufacturer "Slate".
Logic 10.5
macOS 10.14.6 Mojave (thanks to dosdude1.com/mojave)
Apple Mac Pro (early 2009) - 4,1 -> 5,1 - 32GB RAM - 2.66 GHz Quad-Core Intel Xeon
Novation Impulse 49
Novation Launchpad X
Scarlett 2i2 Audio Interface
 
User avatar
carlcaulkett
Topic Author
Posts: 128
Joined: Sat May 13, 2017 2:50 am

Re: Scripting Logic Pro X using Keyboard Maestro

Fri Aug 24, 2018 1:32 am

Note that following advice from a couple of Keyboard Maestro erm... Maestros, I have updated the attachments in the above post.
Logic 10.5
macOS 10.14.6 Mojave (thanks to dosdude1.com/mojave)
Apple Mac Pro (early 2009) - 4,1 -> 5,1 - 32GB RAM - 2.66 GHz Quad-Core Intel Xeon
Novation Impulse 49
Novation Launchpad X
Scarlett 2i2 Audio Interface
 
User avatar
esaruoho
Posts: 36
Joined: Mon Apr 22, 2013 11:49 pm
Location: Vuosaari, Eastern Helsinki, Finland
Contact:

Re: Scripting Logic Pro X using Keyboard Maestro

Thu Apr 16, 2020 1:48 pm

Hi. Looking at the IMGUR post. I'm seeing this.
"Insert Note at Mouse".

Does anyone have any idea how it is actually done? I mean, listing a bunch of macros, great, but how to do this?
 
User avatar
fuzzfilth
Posts: 4625
Joined: Mon Aug 03, 2009 2:31 am
Location: Germany

Re: Scripting Logic Pro X using Keyboard Maestro

Thu Apr 16, 2020 2:31 pm

esaruoho wrote:
Insert Note at Mouse

Three steps in KM:

- Type a Keystroke (let it type the key command for Set Pencil Tool)
- Move And Click Mouse @ 0,0 from current mouse location
- Type a Keystroke (let it type the key command for Set Previous Tool)

Now hover over the desired spot in the Piano Roll and hit your new-fangled Ü or whatever triggers the KM macro and voila, just like magic - a note is there. Might not seem much when you just could have clicked, but may speed things up considerably when you're populating Regions like this all day.
Christian Obermaier
Contact me for private Logic Consulting, Training, Troubleshooting via Skype, Zoom or Teamviewer

1 x MacPro 6core 2010 24Gb RAM
2 x MacBookPro i7 2012 16Gb RAM
OSX.14.6. Mojave, Logic X.4.4 & 5.1
 
User avatar
esaruoho
Posts: 36
Joined: Mon Apr 22, 2013 11:49 pm
Location: Vuosaari, Eastern Helsinki, Finland
Contact:

Re: Scripting Logic Pro X using Keyboard Maestro

Sat Apr 18, 2020 12:24 am

fuzzfilth wrote:
esaruoho wrote:
Insert Note at Mouse

Three steps in KM:

- Type a Keystroke (let it type the key command for Set Pencil Tool)
- Move And Click Mouse @ 0,0 from current mouse location
- Type a Keystroke (let it type the key command for Set Previous Tool)

Now hover over the desired spot in the Piano Roll and hit your new-fangled Ü or whatever triggers the KM macro and voila, just like magic - a note is there. Might not seem much when you just could have clicked, but may speed things up considerably when you're populating Regions like this all day.


Thanks! And to me, it does feel like quite a lot, and a really useful thing to have, and a good start to getting Logic Pro X to do what I want it to do, rather than me trying to modify myself into doing what it wants me to do. Can't wait to use Keyboard Meastro more with Logic Pro X.

What do you think the steps would be to also be able to use the same shortcut to delete a note? i.e. Same shortcut for creating and deleting a note?
 
User avatar
fuzzfilth
Posts: 4625
Joined: Mon Aug 03, 2009 2:31 am
Location: Germany

Re: Scripting Logic Pro X using Keyboard Maestro

Sat Apr 18, 2020 3:41 am

No. KM would need to know if a note is already there to decide whether it should delete or create a note. Which it doesn't.

But you can create a second command so it doesn't need to decide.
Christian Obermaier
Contact me for private Logic Consulting, Training, Troubleshooting via Skype, Zoom or Teamviewer

1 x MacPro 6core 2010 24Gb RAM
2 x MacBookPro i7 2012 16Gb RAM
OSX.14.6. Mojave, Logic X.4.4 & 5.1
 
drisa
Posts: 9
Joined: Tue Sep 01, 2020 11:43 pm

Re: Scripting Logic Pro X using Keyboard Maestro

Sat Sep 05, 2020 3:18 am

I've been trying to use Automator/Keyboard Maestro (trial) to automate the process of converting lots of presets to au.presets.
But I cant figure out how. I tried following @des99's method for KM but didnt quite understand it.
Maybe if someone would make a tutorial or something on how to do this.

That way others could use this method which could make others contribute factory presets faster.
Any help would be appreciated!
 
User avatar
fuzzfilth
Posts: 4625
Joined: Mon Aug 03, 2009 2:31 am
Location: Germany

Re: Scripting Logic Pro X using Keyboard Maestro

Sat Sep 05, 2020 10:56 am

The procedure explained in des99's post here:

viewtopic.php?f=8&t=15267&p=623825#p623825

*is* the tutorial. Where do you get stuck ?
Christian Obermaier
Contact me for private Logic Consulting, Training, Troubleshooting via Skype, Zoom or Teamviewer

1 x MacPro 6core 2010 24Gb RAM
2 x MacBookPro i7 2012 16Gb RAM
OSX.14.6. Mojave, Logic X.4.4 & 5.1
 
drisa
Posts: 9
Joined: Tue Sep 01, 2020 11:43 pm

Re: Scripting Logic Pro X using Keyboard Maestro

Sat Sep 05, 2020 1:25 pm

@fuzzfilth Not a problem anymore!
Played around a little in Macs Automator and it was easy to automate the process.
Even found a way to quickly automate copy+pastying preset names.
But thank you for your suggestion! :)
 
noisyneil
Posts: 74
Joined: Thu Dec 14, 2006 4:21 am
Contact:

Re: Scripting Logic Pro X using Keyboard Maestro

Sat Oct 31, 2020 8:19 pm

jdoo wrote:
Also... (as long as we're here). There was a recent thread on GearSluz, where a user (@vanhaze) posted up a list of the macros that he has created for Logic Pro. The list is at this location: https://imgur.com/Q9B1VJH . Some good ideas imo.

Joe
Did you manage to recreate any of them? They look super handy!!!
16" Macbook Pro
2.4 GHz 8-Core Intel Core i9
32GB RAM, 2TB SSD
AMD Radeon Pro 5500M 8 GB
OSX Catalina 10.15.7
Logic Pro X 10.5.1
UA Apollo 8P
 
noisyneil
Posts: 74
Joined: Thu Dec 14, 2006 4:21 am
Contact:

Re: Scripting Logic Pro X using Keyboard Maestro

Fri Mar 05, 2021 4:21 am

I found this script on the Soundflow forum for adding a plugin to the first available channel slot in Logic Pro. It's set up to add an instance of Fabfilter Pro-Q3 but could be adapted for any plugin in theory. I'm wondering if there's a way to trigger it without needing Soundflow, as their Logic support is currently quite limited. Any script geniuses out there who can make sense of this?

```applescript
```applescript
const logic = sf.ui.app('com.apple.logic10'); const pluginPath = ['Audio Units', 'FabFilter', 'FF Pro-Q 3'];

function openInspector() {
const inspectorBtn = logic.mainWindow.groups.whoseDescription.is('Control Bar').first.checkBoxes.whoseTitle.is('Inspector').first;

if (!inspectorBtn.isCheckBoxChecked) {
inspectorBtn.elementClick();
}
}

function addInsertNextFreeSlot(pluginPath) {
const inspector = logic.mainWindow.groups.whoseDescription.is('Inspector').first;

inspector.childrenByRole("AXList").first.groups
.filter(group => group.children.whoseDescription.is('Mixer').first.childrenByRole("AXLayoutItem").first.buttons.whoseDescription.is('audio plug-in').first.exists)
.map(group => group.children.whoseDescription.is('Mixer').first.childrenByRole("AXLayoutItem").first.buttons.whoseDescription.is('audio plug-in').first.popupMenuSelect({
menuPath: pluginPath,
}));
}

function main() {
logic.appActivateMainWindow();
logic.mainWindow.invalidate();

openInspector();

addInsertNextFreeSlot(pluginPath);
}

main();

sf.keyboard.press({ keys: "right, return", });
```
```
16" Macbook Pro
2.4 GHz 8-Core Intel Core i9
32GB RAM, 2TB SSD
AMD Radeon Pro 5500M 8 GB
OSX Catalina 10.15.7
Logic Pro X 10.5.1
UA Apollo 8P
 
User avatar
Dewdman42
Posts: 3093
Joined: Tue Sep 09, 2014 3:01 pm
Location: Salt Lake City, UT

Re: Scripting Logic Pro X using Keyboard Maestro

Sun Apr 04, 2021 12:06 am

That isn't AppleScript, and I don't know for sure what it is or how it is supposed to work in sound flow.
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.15 on OpenCore, Logic Pro 10.5, Mainstage3, Cubase10.5, StudioOne4, Reaper, DP10, VEP7, VSL, too many plugins to list
 
noisyneil
Posts: 74
Joined: Thu Dec 14, 2006 4:21 am
Contact:

Re: Scripting Logic Pro X using Keyboard Maestro

Sun Apr 04, 2021 3:28 am

[SoundCloud][/SoundCloud]
Dewdman42 wrote:
That isn't AppleScript, and I don't know for sure what it is or how it is supposed to work in sound flow.


Not being a Soundflow user myself, I can't shed any light I'm afraid. According to the forum it does work, so I'm hopeful that some genius out there knows how to turn this into something usable for the Keyboard Maestro users among us.

https://forum.soundflow.org/-3719/is-th ... ogic-pro-x
16" Macbook Pro
2.4 GHz 8-Core Intel Core i9
32GB RAM, 2TB SSD
AMD Radeon Pro 5500M 8 GB
OSX Catalina 10.15.7
Logic Pro X 10.5.1
UA Apollo 8P
 
User avatar
Dewdman42
Posts: 3093
Joined: Tue Sep 09, 2014 3:01 pm
Location: Salt Lake City, UT

Re: Scripting Logic Pro X using Keyboard Maestro

Sun Apr 04, 2021 3:47 pm

What I gather is that soundflow has its own embedded scripting language, which is using javascript, but with extensions to do the wonderful things that soundflow can do. that's all I know at this point. The subscription price they want for it is way too high for me to justify, but it does look like it might be best in class work flow automation, especially if you're using ProTools.

Anyway, I don't see any way that script is going to work outside of Soundflow.

I'm just getting up to speed with Keyboard Maestro... I think its hypothetically possible to program things that would open your desired plugin and control it...But...would probably be quite finicky in actual use...

It would probably be better in that kind of situation to setup smart controls linked to the parameters you want and then use key commands and/or keyboard maestro to control the smart controls...but who knows..I haven't tried anything like that. KM looks to be pretty deep and can do a lot, but the problem here has more to do with how little LogicPro is exposed for outside apps to automate it.
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.15 on OpenCore, Logic Pro 10.5, Mainstage3, Cubase10.5, StudioOne4, Reaper, DP10, VEP7, VSL, too many plugins to list
 
User avatar
Dewdman42
Posts: 3093
Joined: Tue Sep 09, 2014 3:01 pm
Location: Salt Lake City, UT

Re: Scripting Logic Pro X using Keyboard Maestro

Sun Apr 04, 2021 3:49 pm

I am curious what effective, useful and must-have macros for KM people are creating and using? I want to make some for LogicPro, Dorico and some other apps, but I only have a couple things definitely in mind that are simple for Dorico and when I think about LogicPro I can't even think of what I would do that isn't already covered by key commands and wouldn't also be impossible to do.
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.15 on OpenCore, Logic Pro 10.5, Mainstage3, Cubase10.5, StudioOne4, Reaper, DP10, VEP7, VSL, too many plugins to list
 
User avatar
fuzzfilth
Posts: 4625
Joined: Mon Aug 03, 2009 2:31 am
Location: Germany

Re: Scripting Logic Pro X using Keyboard Maestro

Sun Apr 04, 2021 4:43 pm

I don't think that there is a set that any two people can agree upon, as everyone's workflow situation, personal preferences (do I rather use the mouse or do I use key commands, etc.?) and also frustration threshold are very much different.

I'll list a couple of my KM macros in order of depth of the rabbit holes you must get into to understand their purpose

1. Very simple ones, useful in all apps
Today's date on a key

My email address on a key

Single letter keys to directly jump to one of many currently open apps, which I do a lot:
- ctrl-L > Logic
- ctrl-W > Word
- ctrl-D > Davinci Resolve
- ctrl- C > Chrome
- ctrl-4 > Cinema 4D
- ctrl-P > Photohop
- ctrl-O > OBS

Any menu command of any app which can't be assigned to a key

2. Overcoming recent OS limitations ("Hey Apple, in Logic I have chosen to keep using the Tab key the way *I* like it, thank you")

- tab > Play From Selection
- option-tab > Goto Selection Start
- shift-tab > Goto Selection End

3. A bit more involved sequences of actions

Putting Logic's Region Gain and Fade Ins / Outs on keys

Hitting a MIDI drum pad makes a PDF viewer turn pages of a lead sheet, likewise, choosing a scene for one specific song of the set makes the PDF viewer jump to the correct page

Opening one app automatically opens one or more others (if I work in Sketchup, I also need Raster to show a zoom-independent grid and iCheckClock for time reporting to bill my clients properly)

MS Outlook has lost its ability to switch email accounts, so i now have a KM sequence to
- Quit Outlook in case it's running
- Launch the hidden Outlook Profile Manager
- Select another account
- Close OPM
- (re)launch Outlook

4. Putting parts of complex workflows onto single keys
Getting 50 videos that have been synchronized in Davinci as TIFF-sequences with correct length, names an subfolders into Cinema 4D is not exactly a one-click affair, but being able to initiate
- Select all Clips on a track
- Open the Clip Attributes window
- Tab into the clip name field
- Copy the name
- Close the Clip Attributes window
- Create a Compound Clip from the selection
- Paste the just copied name into the Compound Clip's name field
- Select the next track
from just one key gets it pretty close to being one.

5. Entirely automated workflows
I have a couple of these, but they are by nature very specialized. Think along the lines of "Ok, I bought a drum module with a large, highly multi-sampled library in a proprietary format and I'm going to extract and convert all its 15000+ samples into EXS format, complete with every drum name, sample name and velocity range, in less than a day."
Christian Obermaier
Contact me for private Logic Consulting, Training, Troubleshooting via Skype, Zoom or Teamviewer

1 x MacPro 6core 2010 24Gb RAM
2 x MacBookPro i7 2012 16Gb RAM
OSX.14.6. Mojave, Logic X.4.4 & 5.1