Jump to content

Scripting Logic Pro X using Keyboard Maestro


carlcaulkett

Recommended Posts

sure.

 

Move to playhead

Set Locators by Regions

Move Locators Backwards by Cycle Length

Go to Left Locator

Move Region to Playhead Position

Toggle Cycle Mode off

 

Works perfectly, THANK YOU!

 

EDIT: Just wanted to point out that "Toggle Cycle Mode off" isn't needed in this macro, it works without that command.

Link to comment
Share on other sites

Correct, but generally speaking I don't want it on, cycling an arbitrary portion of the timeline, so it saves me turning it off manually, which I suspect you'll also want to do.

 

I don't have Cycle on throughout either. It's completely off the entire time that I'm executing the macro. Both "Set Locators by Regions" and "Move Locators Backwards by Cycle Length" work even without the Cycle turned on.

Link to comment
Share on other sites

Correct, but generally speaking I don't want it on, cycling an arbitrary portion of the timeline, so it saves me turning it off manually, which I suspect you'll also want to do.

 

Here's a GIF I made so you can see what I'm talking about: 1570605982_NoCyclerequired.gif.ad75cfd7a54345ece445c0340f151b08.gif

I added one more command to the macro, Forward (by 1 bar).

Link to comment
Share on other sites

Interesting. Changing the locators' position turns on cycle mode here. Must be a preference I have set differently. I don't mind though, as the result is the same.

 

Sounds like you either have Auto Select Locators switched On or you're using the Set Locators/Rounded Locators by Regions/Events/Marquee and Enable Cycle/Loop key command instead of the regular Set Locators/Rounded Locators by Regions/Events/Marquee (which is what I use)

Link to comment
Share on other sites

  • 1 year later...
On 4/4/2021 at 7:43 PM, fuzzfilth said:

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

<snip>

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."

Lol...sorry to resurrect this old thread, but while researching input devices for LPX, I landed here...and that brought to mind my 2023 adventure in workflows that I solved in KM that I had to share here:  I had a paid-for library of videos online that I wanted copies of dl'd to my NAS.  But instead of EXS samples, there were almost 7000 separately titled Lectures, each about 30 mins long, across almost 400 titled topics.  First, downloading 7000 separate video files had to be accomplished, then the logistics of scraping the website text, distinguishing titles from topics, and then copy/pasting them on to the correct video file in the Finder seemed hellish to do by hand.  I'd actually shelved the project years ago after doing a few dozen.  After coming to LPH last year for scripting advice and getting into KM (migrating from my defunct macroscripter, Quickeys) to automate a bit on LPX, I realized KM might be capable of automating the downloading and labeling task, that involved scraping website text and transferring each title to the correct video file.  How to automate that?  Well, in the classic fashion of breaking down a big problem into little pieces, I was able to leverage a minimum of manual input and prep work, to be able to finish the project within about 2 months while holding down a full time job.  Everything was done in 3 apps, not including KM itself, Finder, Textedit, and Safari.

I love macroscripters like KM.  They fulfill what many of us always imagined computers would be good for.  Removing the drudgery of repetitive tasks.

  • Like 2
Link to comment
Share on other sites

7 minutes ago, fr3Q said:

Well, in the classic fashion of breaking down a big problem into little pieces

This is the way! 👍

Thanks for sharing your experience. I'm a huge believer in building custom workflows and I've done, and continue to do, many things that would be simply unachievable otherwise. KM, BBEdit, scripting languages like PHP and so on are all pressed into service regularly for "glue" in my various workflows.

  • Like 2
Link to comment
Share on other sites

Quote
On 4/4/2021 at 6:47 PM, Dewdman42 said:

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.

 

 

Soundflow uses Javascript.  They say it right on their website.  As such, in theory, it shouldn't take much to adapt their scripts (which they're nice enough to expose, when you're in the right subscription-tier) for use offline, with input devices (or apps) that can trigger JS.  KM could be config'd to provide a palette triggering js targets in LPX.  Afaik, the Soundflow product monitors the internet connection, but doesn't install anything like an engine or interpreter on a host computer, which means I'd expect its js calls to be MacOS jvm executable.  Has anyone here heard of someone trying this?  Or am I behind the curve in all this?  Obviously, it would require someone to subscribe to the Soundflow product.

Link to comment
Share on other sites

I've since examined a few of Soundflow's scripts and I'm now skeptical that they're usable 'as is' or anything close to it.  It looks like their js code is making calls back to Soundflow's servers, likely for some kind of authentication that allows the host OS to execute the command, hence their biz model as a 'service' rather than downloadable product.  The js code they do provide is great template for someone to reverse engineer, but not to simply add or subtract a bit of code and have it run without a Soundflow connection on the host.  Clever blokes, those Soundflow folks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...