--
--
Change your preferences or unsubscribe here:
http://groups.google.com/group/qlab
Follow Figure 53 on Twitter: http://twitter.com/Figure53
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/dd83c059-d033-4449-bdd0-93788bd0fcf5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
Change your preferences or unsubscribe here:
http://groups.google.com/group/qlab
Follow Figure 53 on Twitter: http://twitter.com/Figure53
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/bc61a2c7-26a7-4e7b-9242-c89aef826723%40googlegroups.com.
BTW, I rarely use Qcart, only if I'm doing broadcast work, but I think you can do it with that program, I wonder why not Qlab as well...
--
--
Change your preferences or unsubscribe here:
http://groups.google.com/group/qlab
Follow Figure 53 on Twitter: http://twitter.com/Figure53
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/22a639af-754f-4ab8-82af-fc2b6135a145%40googlegroups.com.
-Elliot
--
--
Change your preferences or unsubscribe here:
http://groups.google.com/group/qlab
Follow Figure 53 on Twitter: http://twitter.com/Figure53
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/0e1a1067-4a8b-4032-bc9d-166e33ed2a38%40googlegroups.com.
--
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/e29b0095-8b14-42f5-b241-da0c4e3ecb9d%40googlegroups.com.
set userPathToSox to "~/Desktop/sox-14.4.2/sox" -- Where is SoX? (Need to use "\\ " for any spaces in this path, ie: escape them)set userTruncatedFlag to ".trunc" -- Extension to add to copied & truncated file; it will be made next to the original-- Declarationsglobal dialogTitleset dialogTitle to "Trim selected audio file with SoX"-- Main routinetell application id "com.figure53.qlab.3" to tell front workspace
try
set selectedCue to last item of (selected as list)
if q type of selectedCue is "Audio" then
set fileTarget to file target of selectedCue
set {startTime, endTime, fileTarget} to {start time, end time, file target} of selectedCue
set trimLength to endTime - startTimeset originalFile to fileTarget as alias
tell application "System Events"set theContainer to path of container of originalFileset theExtension to name extension of originalFileif theExtension is "" thenset theName to name of originalFileelseset theFullName to name of originalFileset theExtension to "." & theExtensionset theName to text 1 through (-1 - (length of theExtension)) of theFullNameend ifset newFile to theContainer & theName & userTruncatedFlag & theExtensionset fileExists to exists file newFileend tell
if fileExists thendisplay dialog "The destination file for the truncation already exists. What now?" with title dialogTitle ¬with icon 0 buttons {"Cancel", "Replace"} default button "Replace" cancel button "Cancel"end if
do shell script userPathToSox & " " & quoted form of POSIX path of originalFile & " " & quoted form of POSIX path of newFile & " trim " & startTime & " " & trimLength
set file target of selectedCue to newFile
end if
end try
end tell
set userPathToSox to "~/Desktop/sox-14.4.2/sox" -- Where is SoX? (Need to use "\\ " for any spaces in this path, ie: escape them)set userTruncatedFlag to ".trunc" -- Extension to add to copied & truncated file; it will be made next to the original-- Declarationsglobal dialogTitleset dialogTitle to "Trim selected audio file with SoX"-- Main routinetell application id "com.figure53.qlab.3" to tell front workspace
tryset selectedCue to last item of (selected as list)
on errorreturn -- Handle no selection without breaking a Script Cue, if run like thatend try
if q type of selectedCue is "Audio" then
set fileTarget to file target of selectedCueset {startTime, endTime, fileTarget} to {start time, end time, file target} of selectedCue
set trimLength to endTime - startTimeset originalFile to fileTarget as alias
tell me to set fileDuration to do shell script "afinfo " & quoted form of POSIX path of originalFile ¬& " | grep \"estimated duration\" | grep -o -E '[0-9.]+'"
if (trimLength - fileDuration) * 1000 ≤ 1 and (fileDuration - trimLength) * 1000 ≤ 1 then -- Exit if the file & cue lengths are within ±1msdisplay dialog "The source file is the same length as the selected Audio Cue; it will not be processed." with title dialogTitle ¬with icon 0 buttons {"OK"} default button "OK"returnend if
tell application "System Events"set theContainer to path of container of originalFileset theExtension to name extension of originalFileif theExtension is "" thenset theName to name of originalFileelseset theFullName to name of originalFileset theExtension to "." & theExtensionset theName to text 1 through (-1 - (length of theExtension)) of theFullNameend ifset newFile to theContainer & theName & userTruncatedFlag & theExtensionset fileExists to exists file newFileend tell
if fileExists thendisplay dialog "The destination file for the truncation already exists. What now?" with title dialogTitle ¬with icon 0 buttons {"Cancel", "Replace"} default button "Replace" cancel button "Cancel"end if
tell me to do shell script userPathToSox & " " & quoted form of POSIX path of originalFile & " " & quoted form of POSIX path of newFile & ¬
" trim " & startTime & " " & trimLength
set file target of selectedCue to newFile
end if
end tell
--
--
Change your preferences or unsubscribe here:
http://groups.google.com/group/qlab
Follow Figure 53 on Twitter: http://twitter.com/Figure53
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/589315506.972006.1453933916018.JavaMail.yahoo%40mail.yahoo.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/CAJ3i%2Bp%3DQCm2hk%2B%2BAUMfBO5ocf1_2p6Gk5sQJ%2BzsEhS2QhZYQnA%40mail.gmail.com.