A technical support community for Apple Logic Pro users.

 
noisyneil
Posts: 74
Joined: Thu Dec 14, 2006 4:21 am
Contact:

Re: Scripting Logic Pro X using Keyboard Maestro

Sun Apr 04, 2021 6:11 pm

I've managed to figure out how to insert plugins using Keyboard Maestro and PlugSearch together, using the 'found image' action. It's fiddly, inelegant and has some limitations, but if you're aware of them it works just fine. It took a fair bit of work to get going! So now I can hit a button on my Stream Deck and the chosen plugin will be inserted into the first available slot in the selected channel.

I'll detail my Logic Stream Deck / Keyboard Maestro macros:

- Panning and fader bumps: One button for each increment of panning using CC10 and approx 3db bumps in either direction for fader level.
- Fade in/out/crossfade on buttons, set to 1/10/30/100 and one with a pop-up prompt where you can enter your own value.
- Region gain up or down by 1/3/6db, on buttons.
- Region end to playhead (for reverse cymbals and the like, when you want them to end at a specific point)
- As mentioned before, plugins on buttons, categorised in folders and subfolders on the Stream Deck
- De-ess with one button: loads Melodyne ARA into the first channel slot, plays and stops the audio to load it into the plugin, selects all, switches to Sibilant Balance tool and turns Sibilant Balance down to -40%, then closes the plugin window.
- Transport controls on the Stream Deck.
- Copy selected midi up/down an octave, up a fifth or down a fourth.
- Reset tempo data for selected audio.
- All UAD Console presets on dedicated buttons, bypassing the "Do you want to save" dialogue, so I can switch amp sims or routing options in one press.
- Hitting record in Logic disables my headphone/speaker correction (if it's enabled) and switches my Console headphone routing to direct to avoid latency from Sonarworks, which I use via Audio Hijack.
- UAD Console extras: listen in mono, mute speakers.
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: 3215
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 6:38 pm

I'd like to figure how to assign articulation ID's to notes easily using KM
OSX 10.15 (Catalina) on OpenCore - Logic Pro 10.6.1, VePro7, Mainstage3
5,1 MacPro 3.46ghz x 12 128gb ram
 
User avatar
des99
Posts: 5250
Joined: Tue Jan 27, 2015 12:08 pm

Re: Scripting Logic Pro X using Keyboard Maestro

Wed Apr 07, 2021 5:41 pm

Dewdman42 wrote:
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.


You should be driven by need, rather than what's possible. If you have no need of anything, then that's easy enough to implement! ;)

I use KM a lot for many reasons with many applications. For Logic, I don't require KM stuff for general music use, but I have two specific cases where I use it a lot - one is to save out plugin presets to Logic presets, so KM will for example, get the current patch name and bank, then save a Logic preset with that name (creating the necessary folders), increment the patch, and repeat.

The other one is to batch change controller assignments. I've I need to change, for instance, Vpot assignments from relative to absolute mode, and change direct to scaled, for 100+ assignments, and I simply get KM to do it for me - select the first assignment ,and KM will change the parameters to what i need, then move on to the next assignment, etc. These kinds of batch changes can be very painful done manually, but a lot more workable getting the computer to do it as a batch.

So both those needs are basically remote-controlling Logic to perform repetitive batch operations. But obviously there is a world of possibilities out there, including setting key or MIDI shortcuts to functions that don't have key commands, or operations with one trigger that do multiple things in sequence, and so on.
mu:zines | music magazine archive | difficultAudio
 
User avatar
des99
Posts: 5250
Joined: Tue Jan 27, 2015 12:08 pm

Re: Scripting Logic Pro X using Keyboard Maestro

Wed Apr 07, 2021 5:43 pm

Dewdman42 wrote:
I'd like to figure how to assign articulation ID's to notes easily using KM


Break down what the exact steps are to achieve what you want, and then build those steps into a macro in KM.
mu:zines | music magazine archive | difficultAudio
 
User avatar
Dewdman42
Posts: 3215
Joined: Tue Sep 09, 2014 3:01 pm
Location: Salt Lake City, UT

Re: Scripting Logic Pro X using Keyboard Maestro

Wed Apr 07, 2021 6:04 pm

des99 wrote:

You should be driven by need, rather than what's possible. If you have no need of anything, then that's easy enough to implement! ;)


Maybe I just don't know what I don't know. I'd like to hear how other people are using KM to make their life easier, maybe I will go "aaha,...I need that too!".


I use KM a lot for many reasons with many applications. For Logic, I don't require KM stuff for general music use, but I have two specific cases where I use it a lot - one is to save out plugin presets to Logic presets, so KM will for example, get the current patch name and bank, then save a Logic preset with that name (creating the necessary folders), increment the patch, and repeat.


I like it

The other one is to batch change controller assignments. I've I need to change, for instance, Vpot assignments from relative to absolute mode, and change direct to scaled, for 100+ assignments, and I simply get KM to do it for me - select the first assignment ,and KM will change the parameters to what i need, then move on to the next assignment, etc. These kinds of batch changes can be very painful done manually, but a lot more workable getting the computer to do it as a batch.


Another good one. thanks for sharing!

I bought KM mainly for controlling Dorico, which really needs it. but I plan to expand to many apps and different things, but now I'm just asking people how they are using it so that I can think of things also. it goes without saying that if I find myself doing some long and tedious thing over and over again, if I can find a way to script it with KM I will. But I'm just asking what you guys have been using it for.

thanks for telling me your two main ways in logicPro.
OSX 10.15 (Catalina) on OpenCore - Logic Pro 10.6.1, VePro7, Mainstage3
5,1 MacPro 3.46ghz x 12 128gb ram
 
noisyneil
Posts: 74
Joined: Thu Dec 14, 2006 4:21 am
Contact:

Re: Scripting Logic Pro X using Keyboard Maestro

Wed Apr 07, 2021 11:52 pm

@dewdman42, In case it wasn't clear before, that list of stuff I wrote out is all KM macros assigned to buttons on the stream deck but you don't need a stream deck to use them. I think I've given you a pretty good idea of what's possible.

@des99, I've been using Murgaa to automate plugin preset saving (UAD H910 for example), but I'd be interested to know how your KM macro works. with Murgaa, you record a sequence, then start playback and walk away. Does your macro repeat the process until complete or do you have to manually keep triggering it for each preset?
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: 3215
Joined: Tue Sep 09, 2014 3:01 pm
Location: Salt Lake City, UT

Re: Scripting Logic Pro X using Keyboard Maestro

Thu Apr 08, 2021 12:35 pm

Does Murgaa offer some specific feature that can't be done with KM?
OSX 10.15 (Catalina) on OpenCore - Logic Pro 10.6.1, VePro7, Mainstage3
5,1 MacPro 3.46ghz x 12 128gb ram
 
noisyneil
Posts: 74
Joined: Thu Dec 14, 2006 4:21 am
Contact:

Re: Scripting Logic Pro X using Keyboard Maestro

Thu Apr 08, 2021 12:38 pm

It's totally different. Just records your mouse/kb actions and then plays them back on repeat.
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
des99
Posts: 5250
Joined: Tue Jan 27, 2015 12:08 pm

Re: Scripting Logic Pro X using Keyboard Maestro

Sun Apr 11, 2021 1:32 pm

noisyneil wrote:
@des99, I've been using Murgaa to automate plugin preset saving (UAD H910 for example), but I'd be interested to know how your KM macro works. with Murgaa, you record a sequence, then start playback and walk away. Does your macro repeat the process until complete or do you have to manually keep triggering it for each preset?


It's much more advanced than that, and has evolved to use a few different methods as you need to use different methods for different plugins. I think I've documented this before but in short I have a main script than handles initialising, and the main loop, then I have sub-macro scripts for getting patch/bank names from the plugin, saving as a Logic patch etc. I can essentially do whatever I need to, and like I say it various between plugins.

So I can work through the entire plugin's presets automatically, picking up bank names and creating the necessary bank names in Logic's presets directories and saving the named patches there.

If there is no way to get bank names from the plugin, then I can flip some different variables and it will ask me to input a bank name manually, then work through that bank, move on to the next bank and prompt for that name etc. I have versions where if you can't pull out the patch names from the plugin directly, i can pull them out from a finder window displaying the patch files and sync preset changes from that. Sometimes you have to get creative with this stuff!

And of course different plugins have different methods required for extracting names, so I tend to copy this macro set uniquely for each plugin type, and modify what I need to modify for that plugin/range of plugins(click in different places, use a different method to pick up the patch name etc). And I keep all those versions as I often need to go back to redo the plugin, or modify them for a new version (eg Arturia V4 to V5 etc).

I even have code in it to send me text updates of progress, so if I'm eg leaving it going all night, I can check my phone and see how many banks it's done, whether it's stopped and so on - this was invaluable for converting the Dexed stuff as there was well over 100,000 patches to do...

So it's basically evolved to do what I need to, and when I hit a new plugin and it requires something different, that method then gets added in...
mu:zines | music magazine archive | difficultAudio
 
noisyneil
Posts: 74
Joined: Thu Dec 14, 2006 4:21 am
Contact:

Re: Scripting Logic Pro X using Keyboard Maestro

Sun Apr 11, 2021 1:51 pm

b.l.o.o.d.y. h.e.c.k.

that's deep! colour me impressed, especially the text message bit! woah!
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
des99
Posts: 5250
Joined: Tue Jan 27, 2015 12:08 pm

Re: Scripting Logic Pro X using Keyboard Maestro

Sun Apr 11, 2021 3:18 pm

KM is awesome and has saved my butt for many many things... one of my essential utilities.
mu:zines | music magazine archive | difficultAudio
 
User avatar
Dewdman42
Posts: 3215
Joined: Tue Sep 09, 2014 3:01 pm
Location: Salt Lake City, UT

Re: Scripting Logic Pro X using Keyboard Maestro

Sun Apr 11, 2021 3:21 pm

do you tend to use the image approach for clicking on things, or what are some of the most common KM approaches you used to get things done with LogicPro in particular?
OSX 10.15 (Catalina) on OpenCore - Logic Pro 10.6.1, VePro7, Mainstage3
5,1 MacPro 3.46ghz x 12 128gb ram
 
User avatar
des99
Posts: 5250
Joined: Tue Jan 27, 2015 12:08 pm

Re: Scripting Logic Pro X using Keyboard Maestro

Sun Apr 11, 2021 3:30 pm

Dewdman42 wrote:
do you tend to use the image approach for clicking on things, or what are some of the most common KM approaches you used to get things done with LogicPro in particular?


Me? I use whatever the best methods are, bearing in mind the speed of getting things done.
If it's a simple macro I just need to run once for a one-time batch task, I'll often use the quickest/simplest method and don't need it to be bulletproof.

If it's something that I will re-use a lot, then I'll often build it a bit more robustly (and also refine over time). if I need to trigger things via the GUI, I will tend to use in this order:

- key commands (as this does not depend on the UI state at all)
- Clicking on things/buttons (or orientating) based on image recognition (because this doesn't require windows to be in particular positions etc)
- Clicking on a particular pixel location on screen (the most fragile as gui elements can be in different places, but fine for one time tasks etc)

You can often use image recognition to determine state (eg, if the image at this location matches this disabled button state, do one thing, but if it matches this enabled button state, do something else, etc). Image recognition is one of KM's super-powers (as is triggering by MIDI commands, which I also use a lot to set up actions from connected MIDI controllers - eg, I trigger a hands-free image scan process from a footswitch connected to my MIDI keyboard, as an example).

But really every task has different implementation problems to solve, depending on what needs to be done. It's essentially a very simplified form of programming, and there's often many ways to implement a given task.
mu:zines | music magazine archive | difficultAudio
 
noisyneil
Posts: 74
Joined: Thu Dec 14, 2006 4:21 am
Contact:

Re: Scripting Logic Pro X using Keyboard Maestro

Sun Apr 11, 2021 5:06 pm

Yeah I've gone pretty deep with some logic macros with a lot of if/else actions within if/else actions, dependent on one or multiple found images. It can get pretty confusing if you don't rename things with handy descriptions as you go! I have to admit when one of them goes a bit janky and doesn't work as expected, I feel a mixture of frustration and excitement that I get to dive into it and solve the problem. It's tantamount to a hobby! Dear lord I need to get out more! (Don't we all!)
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: 3215
Joined: Tue Sep 09, 2014 3:01 pm
Location: Salt Lake City, UT

Re: Scripting Logic Pro X using Keyboard Maestro

Sun Apr 11, 2021 6:58 pm

@Des thanks for sharing your ideas and experiences. Some macros to auto-create LogicPro Patches could be really useful eventually.. I will put some thought into that..
OSX 10.15 (Catalina) on OpenCore - Logic Pro 10.6.1, VePro7, Mainstage3
5,1 MacPro 3.46ghz x 12 128gb ram