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  •  Learn & Support


Avid Home Page

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

Reply
 
Thread Tools Search this Thread Display Modes
  #151  
Old 07-10-2017, 09:30 AM
nucelar's Avatar
nucelar nucelar is offline
Member
 
Join Date: May 2006
Location: Barcelona
Posts: 403
Default Re: Automation AppleScripts for Pro Tools (Mac)

Quote:
Originally Posted by Oliver M View Post
Hello,

absolutely this can be done without mouse clicks as long as you know the names of given tracks, else you have to determine which tracks are currently in what state with a rather complicated check.
One of my scripts, that I use every day, checks whether certain tracks are record enabled or not and record enables them if not.
The same "current state checks" can be done with muted tracks or soloed tracks.

Mouse clicks can be performed by button position. You first determine their position and then engage a click at that position, e.g. with the Command Line Interface utility cliClick.

I hope this helps.


Oliver
Wow, it helps absolutely, I know the track names, as it is a template. I'll have a closer look at you're examples, I've also downloaded UI browser. This opens a new world of possibilities
Thank you!
Reply With Quote
  #152  
Old 07-11-2017, 10:29 AM
nucelar's Avatar
nucelar nucelar is offline
Member
 
Join Date: May 2006
Location: Barcelona
Posts: 403
Default Re: Automation AppleScripts for Pro Tools (Mac)

Hi,
unfortunately I do not have ProTools v11 or v12 yet. In the context of developing my own scripts, do you think it's possible to make something simple work with PT10 or even older? Or is it unreasonable to try it, what are the limitations?

On the other Hand, just FYI I managed to trigger an applescript using the mobile app "TouchOsc" (iOS/android) in conjunction with "Osculator" which hears the osc/midi commands and in turn triggers e.g. an applescript, yay!
Reply With Quote
  #153  
Old 07-11-2017, 12:42 PM
Oliver M Oliver M is offline
Member
 
Join Date: Dec 1969
Location: Europe
Posts: 1,100
Default Re: Automation AppleScripts for Pro Tools (Mac)

Quote:
Originally Posted by nucelar View Post
Hi,
unfortunately I do not have ProTools v11 or v12 yet. In the context of developing my own scripts, do you think it's possible to make something simple work with PT10 or even older? Or is it unreasonable to try it, what are the limitations?

On the other Hand, just FYI I managed to trigger an applescript using the mobile app "TouchOsc" (iOS/android) in conjunction with "Osculator" which hears the osc/midi commands and in turn triggers e.g. an applescript, yay!
Avid introduced some decent -positive- changes in PT 11 in regards to AppleScript. Some things simply won't work in older versions of PT but do not ask me which, I do not remember as its too long ago that I scripted things for those versions.
Reply With Quote
  #154  
Old 09-25-2017, 02:17 PM
caradubaxu caradubaxu is offline
Member
 
Join Date: Sep 2017
Location: Beverly Farms
Posts: 5
Default Re: Automation AppleScripts for Pro Tools (Mac)

Hi Oliver,

Thank you for the in depth and an educational thread! your discussions with Marco and other members have really opened up a door in making script work with ProTools.

Anyway, I'm struggling a bit with creating a simple delete clips script that will do the following:

...After selecting a track in Protools and pressing F13

1-The script will prompt the user to input the start location (timecode, feet+frames etc...) and end location in the same format.
2-Then it will begin deleting only up until the end location specified by the user.
3 (optional) It will ask to go down a track and proceed as it was until the user requests no.

My struggle basically is, how do I get the real time information displayed on the counters translated into something useful I can enter as a value and have the script obey it.

Would UI Browser be of any help? I've seen it mentioned before, but have not used it.

Obrigado
Reply With Quote
  #155  
Old 09-25-2017, 02:23 PM
Marco Bernardo's Avatar
Marco Bernardo Marco Bernardo is offline
Member
 
Join Date: Jan 2007
Location: Lisboa, Portugal
Posts: 787
Default Re: Automation AppleScripts for Pro Tools (Mac)

Quote:
Originally Posted by caradubaxu View Post
Hi Oliver,

Thank you for the in depth and an educational thread! your discussions with Marco and other members have really opened up a door in making script work with ProTools.

Anyway, I'm struggling a bit with creating a simple delete clips script that will do the following:

...After selecting a track in Protools and pressing F13

1-The script will prompt the user to input the start location (timecode, feet+frames etc...) and end location in the same format.
2-Then it will begin deleting only up until the end location specified by the user.
3 (optional) It will ask to go down a track and proceed as it was until the user requests no.

My struggle basically is, how do I get the real time information displayed on the counters translated into something useful I can enter as a value and have the script obey it.

Would UI Browser be of any help? I've seen it mentioned before, but have not used it.

Obrigado
Hi,

One question, if you're giving the info of start and end, why don't you use that in/out to make a selection and simple delete it when that track is selected, after that it will ask if you want to go down or up the track to clean another track? I could be more simple than going clip by clip. I'm assuming all the clips inside that in/out you gave can be deleted.

UI Browser will help you for sure.
__________________
Marco Bernardo

Dialog Editor, Sound Designer, Re-Recording mixer

nMacPro 6Core/D500/512GB/64Gb ram | PT HD 12 HDN Thunderbolt | HD OMNI | Avid Artist Mix | Novation Impulse 25 | Waves Mercury Native | Audioease All In Bundle | SoundToys | McDSP Classic Pack | DUY Overpack | Arturia Beatstep Pro
Reply With Quote
  #156  
Old 09-25-2017, 02:58 PM
caradubaxu caradubaxu is offline
Member
 
Join Date: Sep 2017
Location: Beverly Farms
Posts: 5
Default Re: Automation AppleScripts for Pro Tools (Mac)

Hi Marco,

Thanks for responding, that was fast :)

Right on! Perhaps I used a much too simple example. Let's say that there are muted and unmuted clips on the track. The script would be deleting unmuted clips only up until that end point. So basically what I am trying to do will be irrelevant to the highlighted selection (Apologies if I am not clear)

I understand the part where the script figures out the difference between the clip states. Now instead of having the script complete the whole track, I basically need it to stop at a certain point that I indicate.

Again, apologies if I'm not making myself clear.

PS: Are you from Brasil?
Reply With Quote
  #157  
Old 09-25-2017, 03:02 PM
Marco Bernardo's Avatar
Marco Bernardo Marco Bernardo is offline
Member
 
Join Date: Jan 2007
Location: Lisboa, Portugal
Posts: 787
Default Re: Automation AppleScripts for Pro Tools (Mac)

Quote:
Originally Posted by caradubaxu View Post
Hi Marco,

Thanks for responding, that was fast :)

Right on! Perhaps I used a much too simple example. Let's say that there are muted and unmuted clips on the track. The script would be deleting unmuted clips only up until that end point. So basically what I am trying to do will be irrelevant to the highlighted selection (Apologies if I am not clear)

I understand the part where the script figures out the difference between the clip states. Now instead of having the script complete the whole track, I basically need it to stop at a certain point that I indicate.

Again, apologies if I'm not making myself clear.

PS: Are you from Brasil?
Np, I understand you well.

I think you can do that with some work.

I'm from the other side, Portugal
__________________
Marco Bernardo

Dialog Editor, Sound Designer, Re-Recording mixer

nMacPro 6Core/D500/512GB/64Gb ram | PT HD 12 HDN Thunderbolt | HD OMNI | Avid Artist Mix | Novation Impulse 25 | Waves Mercury Native | Audioease All In Bundle | SoundToys | McDSP Classic Pack | DUY Overpack | Arturia Beatstep Pro
Reply With Quote
  #158  
Old 09-25-2017, 03:45 PM
caradubaxu caradubaxu is offline
Member
 
Join Date: Sep 2017
Location: Beverly Farms
Posts: 5
Default Re: Automation AppleScripts for Pro Tools (Mac)

With some work indeed!

Thanks Marco, hopefully Oliver can shed some insight into this.
Reply With Quote
  #159  
Old 09-28-2017, 03:34 AM
Oliver M Oliver M is offline
Member
 
Join Date: Dec 1969
Location: Europe
Posts: 1,100
Default Re: Automation AppleScripts for Pro Tools (Mac)

Quote:
Originally Posted by caradubaxu View Post
...
My struggle basically is, how do I get the real time information displayed on the counters translated into something useful I can enter as a value and have the script obey it.

Would UI Browser be of any help? I've seen it mentioned before, but have not used it.

Obrigado
Hi there,

you need to enter the value of start and end selections in input dialogs, put them into variables and then enter/paste the values into the correct fields in the PT user interface, like the "Edit Selection Start" field and the "Edit Selection End" field.

Here is an example for the start value:

Code:
tell application "Pro Tools"
	activate
	delay 0.1 -- Give PT time to go to foreground
	-- Display Dialog, get input
	try
		-- Enter value of Start location
		set myStartValue to text returned of (display dialog "Enter timecode start value (Example \"01:02:03:04\")" default answer "") as string
	on error
		return
	end try
end tell

set the clipboard to myStartValue

tell application "System Events"
	tell process "Pro Tools"
		-- Set Main Counter to Timecode
		click menu item "Timecode" of menu 1 of menu item "Main Counter" of menu "View" of menu bar 1
		set editWindow to (1st window whose title contains "Edit: ")
		tell editWindow
			try
				tell group "Counter Display Cluster"
					click text field "Edit Selection Start"
					delay 0.1
					keystroke "v" using command down -- Paste the start value into field -- "Edit Selection Start"
				end tell
			end try
		end tell
	end tell
end tell
Do the same with the end value.
And yes, UI Browser is a must have. Else you'll never find out how these fields are called and how to locate them. ;-)


Oliver
Reply With Quote
  #160  
Old 09-28-2017, 08:51 AM
caradubaxu caradubaxu is offline
Member
 
Join Date: Sep 2017
Location: Beverly Farms
Posts: 5
Default Re: Automation AppleScripts for Pro Tools (Mac)

Thanks Oliver,

I'm gonna give this script a shot with UI browser. It's a bummer we can't specify it without going through UI browser. Hopefully, my goal of deleting muted clips within a specific start and end point in the time line will be achieved. Fingers crossed for this one. It'll be a time saver if it works.

Meanwhile, if you have another suggestion into how I can approach it differently (using markers or audio clips to set boundaries etc..) that would also help.

Thank you again :)
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 [email protected] Pro Tools 12 2 08-16-2015 04:25 AM
Pro Tools 11.2.1 Automation Bug?! Gneal550 Pro Tools 11 1 11-22-2014 01: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 06:55 PM


All times are GMT -7. The time now is 10:24 PM.


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