ProTools Markers Import
Explanation
Export markers from ProTools to a text file, then import to QLab.
This script will have you select a text file, and ask you if you want to import the markers as new Start Cues, or add slices in an audio or video cue. (To import as slices, an audio or video cue must be selected before running the script.)
Exporting Markers from ProTools
-
In ProTools, Open the Memory Locations window (Ctrl + 5 on numberpad)
-
In the top right corner, click on the downward triangle, select "Export markers as text...
-
Out of the top 5 checkboxes, leave only "Include Markers" as checked
-
Leave File Format as TextEdit 'TEXT'
-
Time Format option is not important
-
Script
Copy the text to the right, and paste it into a script cue in your QLab workspace.
I recommend assigning it a hotkey, or I like to give each script cue a unique cue number using letters, and then trigger it from Bitfocus Companion.
Download QLab Workspace Here
--by Taylor Glad. Updated 8/4/21
--Script will prompt you for a txt file.
--select the txt of exported markers from ProTools
--This script prompts if you want to import new Start Cues or Memo cues, or add Slices.
set TheFile to choose file of type "txt" with prompt "Please select your exported text file from ProTools Markers"
set theFileContents to read TheFile
set thetids to AppleScript's text item delimiters
set AppleScript's text item delimiters to tab
set thenumberofrows to (count of paragraphs of theFileContents) - 1
display dialog "Import ProTools Markers as new Start cues, Memo cues, or as slices to selected audio/video cue?" with title "ProTools Markers" with icon 1 buttons {"Start Cues", "Memo Cues", "Slices"}
set userChoice to button returned of result
--START CUES
if userChoice is "Start Cues" then
set newCueGroupName to text item 2 of paragraph 1 of theFileContents & " Marker Import"
set sampleRate to text item 2 of paragraph 2 of theFileContents
tell application id "com.figure53.QLab.4" to tell front workspace
try
set current cue list to last cue list whose q name is newCueGroupName
on error
make type "cue list"
set q name of last cue list to newCueGroupName
set current cue list to last cue list whose q name is newCueGroupName
end try
repeat with makeCues from 13 to thenumberofrows
set theRow to (paragraph makeCues) of theFileContents
make type "start"
set theCue to last item of (selected as list)
set the pre wait of theCue to (text item 3 of theRow as string as real) / sampleRate
set the q name of theCue to text item 5 of theRow
end repeat
end tell
--MEMO CUES
else if userChoice is "Memo Cues" then
set newCueGroupName to text item 2 of paragraph 1 of theFileContents & " Marker Import"
set sampleRate to text item 2 of paragraph 2 of theFileContents
tell application id "com.figure53.QLab.4" to tell front workspace
try
set current cue list to last cue list whose q name is newCueGroupName
on error
make type "cue list"
set q name of last cue list to newCueGroupName
set current cue list to last cue list whose q name is newCueGroupName
end try
repeat with makeCues from 13 to thenumberofrows
set theRow to (paragraph makeCues) of theFileContents
make type "memo"
set theCue to last item of (selected as list)
set the pre wait of theCue to (text item 3 of theRow as string as real) / sampleRate
set the q name of theCue to text item 5 of theRow
end repeat
end tell
--SLICES
else
tell application id "com.figure53.QLab.4" to tell front workspace
set theSelection to the selected as list
repeat with theCue in theSelection
if (the q type of theCue is "Video") or (the q type of theCue is "Audio") then
set theCueEndTime to the end time of theCue
set sampleRate to text item 2 of paragraph 2 of theFileContents
set theMarkers to {}
repeat with rowCount from 13 to thenumberofrows --starts in 13 to skip the other pasted jargon
set eachRow to (paragraph rowCount) of theFileContents
set theSliceTime to (text item 3 of eachRow as string as real) / sampleRate
if theSliceTime as real is greater than theCueEndTime as real then
display dialog "One of the imported slices in your CSV is past the end time of your selected cue" with title "Incompatible Marker" with icon 2
return
end if
set end of theMarkers to {time:theSliceTime, playCount:1}
end repeat --for eachLine
set the slice markers of theCue to theMarkers
else --theCue is an Audio or Video cue
display dialog "Please select an audio or video cue before running this script." with title "Select Audio or Video Cue" with icon 2
end if --theCue is an Audio or Video cue
end repeat --of the selected cues
end tell
end if --which option was selected (Start Cues or Slices)
set AppleScript's text item delimiters to thetids