|
From: Peter M. <pet...@ab...> - 2012-08-06 18:14:14
|
Hi
The following script using SOX, inputs a standard headered WAV file, but
produces a headerless WAV, why?
Thanks
-pm
on open (droppedFolder)
set TheInputFile to droppedFolder as alias
--display dialog TheInputFile as string
set OpenTextEdit to TheInputFile as string
set Inputfile to the quoted form of (the POSIX path of TheInputFile)
set theSuffix to ""
set theSuffix2 to ""
set new_FolderName to "DeEmph_Files"
tell application "Finder"
if (exists folder new_FolderName of folder droppedFolder) is false
then
make new folder at folder droppedFolder with properties
{name:new_FolderName}
end if
end tell
tell application "Finder"
do shell script "chmod -R 777 " & Inputfile
end tell
tell application "Finder"
set aList to every file in folder droppedFolder
set Noitems to number of items in aList
--display dialog thebuttonName
repeat with i from 1 to number of items in aList
display dialog "Processing File Number " & i & " of " & Noitems
giving up after 2
--display dialog i
set AACFile to (item i of aList)
set Infile to name of (item i of aList)
set Inpath to Inputfile & the quoted form of (Infile)
set outpath to Inputfile & new_FolderName & Infile
set oldDelims to my text item delimiters
set my text item delimiters to ".wav"
set outfile to first text item of Infile
set my text item delimiters to oldDelims
set outpath to Inputfile & new_FolderName & "/" & the quoted
form of (outfile)
display dialog Inpath
try
do shell script "/usr/local/bin/sox " & Inpath & " " &
outpath & "_deEmph.wav " & "deemph"
on error
display dialog "There are too many errors in the file '" &
Inpath & "' To Proceed Quitting Script"
repeat
beep
error number -128
end repeat
end try
end repeat
end tell
display dialog "Job Done"
end open
---------------------------------------------------------------------
Music from EMI
This e-mail including any attachments is confidential and may be legally privileged. If you have received it in error please advise the sender immediately by return email and then delete it from your system. The unauthorised use, distribution, copying or alteration of this email is strictly forbidden. If you need assistance please contact us on +44 20 7795 7000.
This email is from a unit or subsidiary of EMI Group Limited.
Registered Office: 27 Wrights Lane, London W8 5SW
Registered in England No 229231.
---------------------------------------------------------------------
|