Avid Pro Audio Community

Avid Pro Audio Community

How to Join & Post  •  Community Terms of Use  •  Help Us Help You

Knowledge Base Search  •  Community Search  •  Additional Resources


Avid Home Page

Go Back   Avid Pro Audio Community > Pro Tools Software > Tips & Tricks

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-14-2014, 08:30 AM
Oliver M Oliver M is offline
Member
 
Join Date: Jan 1970
Location: Europe
Posts: 912
Default Automation AppleScripts for Pro Tools (Mac)

In another thread I shared an Automator Service which creates a Track Preset in PT 11. The latest version didn't work as expected
due to a bug in Automator so I decided to share the AppleScript bundle instead.
It works as it should and faster, too.

While I was at it I overhauled a few of my other scripts, made them general-purpose compatible and created a package.
I hope you enjoy it.



Pro Tools Automation Scripts Vol. 1 - Update 2


Minimum System Requirements
  • OS X 10.8.4 or higher, Pro Tools 11.1 or higher
  • Pro Tools and OS X running in english


Settings to make before you can use the scripts

There are a few security settings to make in OS X Yosemite, Mavericks and Mountain Lion.
Please read the Installer Read Me or refer to the “Security & Privacy settings to
be made.pdf” which comes with the Disk Image.


About the scripts and how to use them

This is a collection of run-only AppleScripts I accumulated over the years in order
to automate several things in Pro Tools. Everything is achieved with GUI scripting.

All scripts get installed in ~/Library/Scripts/Applications/Pro Tools and can be executed
from applications like FastScripts or Keyboard Maestro.
Macros for all scripts are included and ready to be used with Keyboard Maestro,
they can be found in the Extras folder of the Disk Image from where they can be
imported. Users of FastScripts open its Preferences/Script Shortcuts section and
add a shortcut to each script.

The functionality of most scripts is self-explanatory, however here is a brief description
of all scripts.


AudioSuite Plug-in Launcher Scripts

A set of scripts that launch AudioSuite plug-ins. Included are:
  • Launch D-Verb in Pro Tools
  • Launch Duplicate - Process & Close in Pro Tools
  • Launch Gain in Pro Tools
  • Launch Invert - Process & Close in Pro Tools
  • Launch Normalize - Process & Close in Pro Tools
  • Launch Pitch II in Pro Tools
  • Launch Reverse - Process & Close in Pro Tools
  • Launch TCE in Pro Tools
  • Launch Time Shift in Pro Tools
  • Launch Vari-Fi in Pro Tools
  • Launch X-Form in Pro Tools

The scripts for “Duplicate”, “Invert”, “Normalize” and “Reverse” don’t just open the plug-
in but also process the selected audio clip and close the AudioSuite window when the
process is finished. There is also an editable script template available which you can
modify to your needs in order to launch a different AudioSuite plug-in. For info on how to
do this open the script in a Script Editor of your choice. This script template can be found
in the Extras folder on the Disk Image.


Close AudioSuite Window Script

In Pro Tools you can use Control+Option+Command+W to hide an AudioSuite window
but this shortcut actually hides all floating windows like the Memory Locations window,
too. The command does not close a window.
This script closes the AudioSuite window.


Create New Track Scripts

A set of scripts that create different kinds of new tracks. Included are:
  • Create New Track - Audio - Mono
  • Create New Track - Audio - Stereo
  • Create New Track - Aux - Mono
  • Create New Track - Aux - Stereo
  • Create New Track - Instrument - Mono
  • Create New Track - Instrument - Stereo
  • Create New Track - Master - Mono
  • Create New Track - Master - Stereo
  • Create New Track - MIDI
  • Create New Track - VCA
  • Create New Track - Video

All new tracks will be created as sample based tracks.
A version of each script with tick based enabled will probably follow at a later date.


Create Session Template Script

This script creates a Session Template of all the tracks in your current session and
saves it in the directory ~/Documents/Pro Tools/Session Templates/User.
If the folder "User" doesn't exist, which may be the case if you never saved Session
Templates with this script before, it gets created automatically.

1. Invoke the script and enter the name for your new Session Template.


2. In the next step you can choose whether or not to include Media (audio and/or
video files) with the template.


3. When clicking the “Yes” or “No” button the process will be completed by saving
the new Session Template in ~/Documents/Pro Tools/Session Templates/User
and a Notification will inform you that the new Session Template has been saved.





4. Your new Session Template is immediately available from the Pro Tools New
Session Dialog Window under the category “User”.


The advantage in comparison to the build in Session Template functionality in
Pro Tools is that this script performs real fast and the user does not need to
manually make the mandatory settings in the various Pro Tools dialogs prior
to saving a template.
Refer to the default Session Template feature if you’d like to create a template
but prefer to save it to one of the existing categories.


Create Track Preset Script

This script creates a Track Preset from a selection of one or more tracks and
saves it in the directory ~/Documents/Pro Tools/Track Presets.
If the folder "Track Presets" doesn't exist, which may be the case if you never
saved a Track Preset before, it gets created automatically.

1. Make your track selection and invoke the script, then enter the name for your
new Track Preset. It is optional to create a subfolder prior to saving which is handy
if you want to create a sub category to save to.


2. After you saved the Track Preset a Notification will inform you that the new
Track Preset has been saved.




3. Your new Track Preset is immediately available in the Pro Tools menu Track/New…




Display Current Session Tempo Script

I originally developed this script way back when the BPM field in the MIDI Controls
window was very hard to read as the text was green and pretty small.
In current versions of Pro Tools it is white but still not easy to read.




This script displays the current session tempo via Notification Center.




Event Operations - Quantize & Transpose MIDI Scripts

The first script lets you quickly quantize MIDI notes or clips to a grid of a 1/8, 1/16
or 1/32 note.


All other options from the Event Operations/Quantize dialog window are being ignored
as the combinations of possible settings are too extensive to be incorporated into a
general-purpose script.

The second script lets you transpose MIDI notes in semitone steps from -96 to +96.


Save Session Copy Scripts

A set of four scripts that save a session copy with:
  • Audio Files
  • Audio Files and Session Plug-In Settings Folder
  • Audio Files, Movie/Video Files and Session Plug-In Settings Folder
  • Audio Files, Movie/Video Files, Selected Tracks Only and Session Plug-In Settings Folder


Important info about different languages in Pro Tools and OS X

All scripts are intended to be used with Pro Tools and OS X running in english.
They will not work with any other language combination.
Multi language support may be added in the future.


Additional Notes

I encourage everyone to use Default Folder X in combination with the scripts.
It is no must-have but it speeds up the process in several scripts.

http://stclairsoft.com/DefaultFolderX/


What’s new in Update 1 (10/2015)
  • All scripts and the installer are code signed now, thus Gatekeeper savvy
  • Support for Pro Tools 12.2 and higher has been added
  • Some scripts have been slightly renamed for different reasons
  • The Save Session Copy scripts have been enhanced by a 4th script which saves the session copy with audio files only
  • All scripts should work with OS X El Capitan, however this has not been fully tested as there has been no El Capitan compatible Pro Tools version released yet


What’s new in Update 2 (03/2016)
  • All scripts are now compatible with OS X 10.11 El Capitan
  • Support for Pro Tools 12.5 has been added
  • Support for Default Folder X version 5 has been added
  • The Save Session Copy scripts were enhanced so that the prefix "Copy of "
    will be removed from the session copy name, a feature that previously only existed in personal versions of the scripts

Fixes
  • Added two checks to the Process & Close AudioSuite launcher scripts:

    The first one closes another AudioSuite window if there is one left open.
    This was necessary because those scripts hang if the user lets another AudioSuite window open prior to invoking one of these scripts.

    The second one determines if audio is selected. This check is handled by Pro Tools itself but the Process & Close scripts open the AudioSuite
    plug-in and attempt to process nevertheless. Thus those scripts needed their own check.


Download Pro Tools Automation Scripts Vol. 1 - Update 2


Make sure to delete the older scripts from Vol. 1 - Update 1 prior to installing this Vol. 1 - Update 2 package or use the following Uninstall app or Uninstall script:

Uninstall app: Download Uninstall Pro Tools Automation Scripts Vol. 1 - Update 1 app

Uninstall script: Download Uninstall Pro Tools Automation Scripts Vol. 1 - Update 1 script



Pro Tools Automation Scripts Vol. 2


Minimum System Requirements
  • OS X 10.8.4 or higher, Pro Tools 11.1 or higher (unless otherwise noted)
  • Pro Tools and OS X running in english


Settings to make before you can use the scripts

There are a few security settings to make in OS X El Capitan, Yosemite, Mavericks and Mountain Lion.
Please read the Installer Read Me or refer to the “Security & Privacy settings to
be made.pdf” which comes with the Disk Image.


About the scripts and how to use them

This is a collection of run-only AppleScripts I accumulated over the years in order
to automate several things in Pro Tools. Everything is achieved with GUI scripting.

All scripts get installed in ~/Library/Scripts/Applications/Pro Tools and can be executed
from applications like FastScripts or Keyboard Maestro.

I strongly recommend FastScripts to execute the scripts as it proved to be
the most reliable application to trigger AppleScripts and apps.
However, this is my humble opinion only, based on my own personal experience.


Clear Muted Clips Scripts

A couple of scripts that clear muted audio, MIDI and fade clips on the selected track
or several tracks.

Please note: These scripts only work while in Waveform or Blocks View!
  • Clear Muted Clips From Selected Track

Clears all muted audio, MIDI and fade clips from the currently selected track.

1. Select a track and invoke the script. It will go through the entire track and removes
all muted clips. When done it throws a Notification.



Clear Muted Clips Demo Video 1

  • Clear Muted Clips From Several Tracks

Clears all muted audio, MIDI and fade clips from several tracks. It starts with the
currently selected track, then prompts whether to proceed with the next track or not
and if yes goes down a track to continue. It stops if no clips are found on the next track
or if the user cancels.

1. Select a track and invoke the script. It will go through the entire track and removes
all muted clips. When done it throws a Dialog.


2. If you cancel it simply stops, if you continue it goes down a track and repeats
the process for that track.

Note: If you enter the return key to engage the “Continue” button the script will stop
and report that there are no more clips to be processed on the next track.
Use the enter key or perform a mouse click instead!


Repeat this process for as much tracks as you like but when you reach an empty
track the script will stop with another Dialog.


Clear Muted Clips Demo Video 2


Close Every AudioSuite Window Script

This script closes every AudioSuite plug-in window that’s currently open.


Create New Tick Based Track Scripts

A set of scripts that create different kinds of new tick based tracks. Included are:
  • Create New Track - Audio - Mono - Ticks
  • Create New Track - Audio - Stereo - Ticks
  • Create New Track - Aux - Mono - Ticks
  • Create New Track - Aux - Stereo - Ticks
  • Create New Track - Instrument - Mono - Ticks
  • Create New Track - Instrument - Stereo - Ticks
  • Create New Track - Master - Mono - Ticks
  • Create New Track - Master - Stereo - Ticks
  • Create New Track - MIDI - Ticks
  • Create New Track - VCA - Ticks

All new tracks will be created as tick based tracks.


Export Selected Tracks Scripts

A few scripts that create a new session from a selection of one or more
tracks and save this session to the user’s desktop.
  • Export Selected Tracks To Desktop With Audio & Main Playlist

Saves the session copy with Audio Files and Main Playlist Only options checked.
  • Export Selected Tracks To Desktop With Audio & Media

Saves the session copy with Audio Files and Movie/Video Files options checked.
  • Export Selected Tracks To Desktop With Audio

Saves the session copy with Audio Files option checked.

1. Select the tracks you want to export as new session and invoke the script.
You’ll be prompted to enter the name for the session. As default the name of the
current session is being used.


2. After clicking “Continue” the session will be saved and a Notification will inform you about it.




Select Unused Clips Scripts

A set of scripts that do the following:
  • Select & Clear Unused Clips
  • Select Offline Audio
  • Select Unused Audio Except Whole Files

The first script selects and clears all unused clips in a session with clearing the undo queue.
The other two do exactly what they are named after.


Separate Clip By Markers Script

This script separates an audio clip on a track by Markers.
The script will go through all the Markers that have been created within the clip’s selection
and separates the clip accordingly, it will then inform you via Notification Center when done.

1. Select one or more clips on a track.




2. Invoke the script.


3. Determine how much Markers you want to process. In the screenshot above we
have created 8 Markers and want to process them all in order to separate the clip
into 8 sub clips.


4. The script goes from one Marker to the next and separates the clip accordingly.




When done a Notification will inform you that the process has been finished.



Seperate Clip By Markers Demo Video


Snap Clip Scripts

Two very convenient scripts:
  • Snap Clip To Next Clip
  • Snap Clip To Previous Clip

They do what they are named after, snap the currently selected clip to the next or previous clip on a track.


Time Stretch Batch Processing Scripts

A set of BPM time stretch batch processing scripts for the plug-ins Pitch 'n Time Pro
and Time Compression Expansion.

Note: These scripts are designed to time stretch audio clips in BPM using the BPM
values of the two plug-ins.

  • Time Stretch Auto Batch Processing With PnT Pro

This script automates the entire process with Pitch ’n Time Pro.
Invoke the script, it prompts to enter the necessary data like which algorithm to use:


The length of the clips to be processed:


The output BPM value:


And the number of clips to be processed:


The script then opens the Pitch ’n Time Pro plug-in and processes all clips and
shows a notification when done:



Time Stretch Auto Batch Processing PnT Demo Video

  • Time Stretch Auto Batch Processing With TCE

This script automates the entire process with Time Compression Expansion.
The procedure is similar to the Pitch ’n Time Pro procedure described above.
The dialogs are slightly different in their order and content, e.g. there are no
different algorithms to choose from in TCE.

Invoke the script, it prompts to enter the necessary data, then opens the Time Compression
Expansion plug-in and processes all clips and shows a notification when done.
  • Time Stretch Batch Processing With PnT Pro

This script automates the actual processing, however it does not open the plug-in window
itself. This script version is intended to give the user the chance to make
changes to the plug-in settings which are not automatically covered by the
Auto Batch Processing version of the script.

Therefore the workflow is slightly different:
First invoke the plug-in, make your settings in the Pitch ’n Time Pro plug-in window,
then run this script. When its done a notification is thrown:



Time Stretch Auto Batch Processing TCE Demo Video

  • Time Stretch Batch Processing With TCE

This script is the same alternative described above but for TCE.
First invoke the plug-in, make your settings in the Time Compression Expansion
plug-in window, then run this script.


Toggle Scripts

A set of scripts that toggle certain things:
  • Toggle Edit & Mix Window

This script toggles the Edit & Mix Window in Pro Tools.
It’s a workaround for a bug in Pro Tools where the default shortcut to toggle Edit and Mix
Windows does not work on German and other foreign keyboards without numeric keypad.
  • Toggle Full Screen Mode *

This script toggles Full Screen Mode in Pro Tools.

Note: This script only works on OS X 10.11 El Capitan and Pro Tools 12.2.1 and higher!

Full Screen Mode only works with the Edit and Mix Windows of Pro Tools, when running this script
all floating windows will be hidden.


The next 4 do what they are named after.
  • Toggle Show & Hide Clip List
  • Toggle Show & Hide MIDI Editor
  • Toggle Show & Hide Track List
  • Toggle Show & Hide Universe


Important info about different languages in Pro Tools and OS X

All scripts are intended to be used with Pro Tools and OS X running in english.
They will not work with any other language combination.

Multi language support may be added in the future but will require extensive testing
and help from foreign users. Drop me a mail if you are interested to help.


Additional Notes

I encourage everyone to use Default Folder X in combination with the scripts.
It is no must-have but it speeds up the process in several scripts.

http://stclairsoft.com/DefaultFolderX/


Download Pro Tools Automation Scripts Vol. 2


__________________
www.olivermomm.com

Last edited by Oliver M; 04-27-2017 at 06:48 AM.
Reply With Quote
  #2  
Old 12-18-2014, 05:43 AM
semeir semeir is offline
Member
 
Join Date: Dec 2014
Location: Ramat Gan Israel
Posts: 1
Default Re: Automation AppleScripts for Pro Tools 11 (Mac)

Thanks, man. This is marvelous, working like a charm with Keyboard Maestro!
Do you know any script that can reach the automation section, like toggling between automation modes (latch, touch etc...)?

Thanks anyway, the transpose set just made my day!
Reply With Quote
  #3  
Old 12-19-2014, 03:38 AM
Oliver M Oliver M is offline
Member
 
Join Date: Jan 1970
Location: Europe
Posts: 912
Default Re: Automation AppleScripts for Pro Tools 11 (Mac)

Quote:
Originally Posted by semeir View Post
Thanks, man. This is marvelous, working like a charm with Keyboard Maestro!
Do you know any script that can reach the automation section, like toggling between automation modes (latch, touch etc...)?
This can be done, I actually have written such a script but the functionality is limited as it only works for one specific track at a time and its name has to be known, else you would need one script per track you want to toggle the automation state for. The reason for this is that AppleScript cannot read which track is currently selected/highlighted.

In case you only want to automate a few tracks and their names do not change it would work like this:
Say you only want to toggle the automation states for the 4 bus tracks in your session, you then would need 4 scripts.
One each for tracks Bus 1, Bus 2, Bus 3, Bus 4. Its sums up, the more tracks you want to automate the more scripts you need, not very practical I’d say.

A workaround to make it functional for any track in your session:
Have a script that asks you for the name of the track you want to automate. A dialog would pop up asking you for the name of the track, you then enter the name, press “Continue” and the script would go on and change the automation state for that track.
But thats not very practical, is it?

My current script works for one specific track whose name doesn't change and I have 4 script versions for the modes off, read, touch and write. Its no toggle really but that shouldn't be an issue.

Quote:
Originally Posted by semeir View Post
Thanks anyway, the transpose set just made my day!
You're welcome.
Reply With Quote
  #4  
Old 12-21-2014, 08:49 AM
Larold Larold is offline
Member
 
Join Date: Mar 2005
Location: Los Angeles
Posts: 216
Default Re: Automation AppleScripts for Pro Tools 11 (Mac)

Do you have anything.... for PT 10....that would Export selected tracks to desktop as a new session, audio tracks included, using only the main playlist? I use this function a lot, and it's tedious sometimes to click on all the boxes each time...

Last edited by Larold; 12-21-2014 at 08:50 AM. Reason: left something out
Reply With Quote
  #5  
Old 12-21-2014, 02:31 PM
Oliver M Oliver M is offline
Member
 
Join Date: Jan 1970
Location: Europe
Posts: 912
Default Re: Automation AppleScripts for Pro Tools 11 (Mac)

Quote:
Originally Posted by Larold View Post
Do you have anything.... for PT 10....that would Export selected tracks to desktop as a new session, audio tracks included, using only the main playlist? I use this function a lot, and it's tedious sometimes to click on all the boxes each time...
I am not doing any more scripts for PT 10 because of serious AppleScript related flaws in v10.
The Avid engineers were so kind to fix a lot in version 11.1, which is why 11.1 is a requirement for my scripts to work, sorry.
A script (for v11.1 and up) you ask for would be a simplification of the Create Track Preset script. I like the idea and will consider it for a Vol. 2 package.
Reply With Quote
  #6  
Old 02-04-2015, 09:13 AM
musicmixer04 musicmixer04 is offline
Member
 
Join Date: Jul 2004
Location: Oslo
Posts: 261
Default Re: Automation AppleScripts for Pro Tools 11 (Mac)

Hi Oliver. These Applescripts looks cool. One question, Im not familiar with the apps for triggering those scripts. Pro Tools is already occupying a lot of the keyboard for its built in shortcuts. Do you know of any apps that will trigger the scripts with like double clicked commands : ii - create instrument track, aa - create audio track etc ?

Reply With Quote
  #7  
Old 02-08-2015, 03:30 PM
Oliver M Oliver M is offline
Member
 
Join Date: Jan 1970
Location: Europe
Posts: 912
Default Re: Automation AppleScripts for Pro Tools 11 (Mac)

Quote:
Originally Posted by musicmixer04 View Post
Hi Oliver. These Applescripts looks cool. One question, Im not familiar with the apps for triggering those scripts. Pro Tools is already occupying a lot of the keyboard for its built in shortcuts. Do you know of any apps that will trigger the scripts with like double clicked commands : ii - create instrument track, aa - create audio track etc ?

Well, what you ask for seems not very practical without using a modifier key upfront. Because typing an "i" will execute the PT shortcut "Snap End to TC", no matter if you type it twice, same goes for several other single key commands. And if you tell an app like QuicKeys or Keyboard Maestro to overwrite the PT commands it will create a mess, rendering common PT shortcuts useless.

Try to create unique key combinations for shortcuts that include modifier keys when you use simple a-z letters. Play with Keyboard Maestro, you will see what I mean. Make sure that you use every shortcut (key combination) only for PT on a per app basis.

I hope this helps.


Oliver

Last edited by Oliver M; 02-10-2015 at 02:24 PM.
Reply With Quote
  #8  
Old 03-22-2015, 02:07 PM
Frecord Frecord is offline
Member
 
Join Date: Apr 2011
Location: Brasil
Posts: 34
Default Re: Automation AppleScripts for Pro Tools 11 (Mac)

Hi

Works with Pro Tools 9 and OS10.7.5? Or is definitely not a good idea?

Thanks
__________________
AMD Phenom 8650 , ASUS M2NPV-VM ,3GB RAM , 3 Samsung Hds ,Presonus FireStudio Tube ,Pro Tools 9
Reply With Quote
  #9  
Old 03-26-2015, 07:59 AM
Oliver M Oliver M is offline
Member
 
Join Date: Jan 1970
Location: Europe
Posts: 912
Default Re: Automation AppleScripts for Pro Tools 11 (Mac)

Quote:
Originally Posted by Frecord View Post
Hi

Works with Pro Tools 9 and OS10.7.5? Or is definitely not a good idea?

Thanks
No I am afraid, same goes for the Automator Services, sorry.
Reply With Quote
  #10  
Old 05-20-2015, 07:17 AM
musicmixer04 musicmixer04 is offline
Member
 
Join Date: Jul 2004
Location: Oslo
Posts: 261
Default

Quote:
Well, what you ask for seems not very practical without using a modifier key upfront. Because typing an "i" will execute the PT shortcut "Snap End to TC", no matter if you type it twice, same goes for several other single key commands. And if you tell an app like QuicKeys or Keyboard Maestro to overwrite the PT commands it will create a mess, rendering common PT shortcuts useless.

Try to create unique key combinations for shortcuts that include modifier keys when you use simple a-z letters. Play with Keyboard Maestro, you will see what I mean. Make sure that you use every shortcut (key combination) only for PT on a per app basis.

I hope this helps.


Oliver
Thanks:)

Tried to install today, but I can't find the scripts on my computer after installation. I've been looking in the Scripts folder but nothing there, just the scripts from Fastscripts. I'm on Mavericks 10.9.5 . Any clue where I should look?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pro Tools 12 Trim Automation bleu@cheerful.com Pro Tools 12 Discussion 2 08-16-2015 04:25 AM
Pro Tools 11.2.1 Automation Bug?! Gneal550 Pro Tools 11 Discussion 1 11-22-2014 02:15 PM
GRM tools automation bug? D'Animation Pro Tools TDM Systems (Mac) 6 10-08-2014 08:21 AM
scripting Pro Tools; automation Bermaster 003, Mbox 2, Digi 002, original Mbox, Digi 001 (Mac) 12 10-01-2004 12:38 PM
AppleScripts and other Macros for PT Bergeron Tips & Tricks 1 11-15-1999 07:55 PM


All times are GMT -7. The time now is 08:57 PM.


Powered by: vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Limited. Forum Hosted By: URLJet.com