Re: Batch MP3 Editing
Re: Batch MP3 Editing
- Subject: Re: Batch MP3 Editing
- From: "Michael D. Atella" <email@hidden>
- Date: Mon, 17 Mar 2003 22:01:55 -0800
That is excellent, thank you for your hard work. I do believe this would
work for my purpose. The one downside though is that I believe the ID3 tags
would be stripped from the resulting file. :(
On 3/17/03 9:45 AM, "Mr Tea" <email@hidden> wrote:
>
This from Michael D. Atella - dated 17-03-03 07758am:
>
>
> OK, a bit of an under-whelming response to my question, so let me ask a
>
> different question that could also solve the same problem:
>
>
>
> Is it possible to use Finder scripting to drag files one at a time into an
>
> open window of a non-scriptable application? And also use the finder to
>
> type commands, like command-S, command-V, command-C, etc? I know QuickKeys
>
> used to do this kind of thing (dragging), but as far as I know, AppleScript
>
> doesn't let you script a file drag.
>
>
That's right. The nearest it comes is 'open x using y' where x is a document
>
and y is the app file you want to open it with. And no. You can't script key
>
presses with plain AppleScript.
>
>
Like Emmanuel, I was going to suggest that you try using QuickTime (Pro) to
>
achieve your ends, but a glance through QT Player's export options suggests
>
that it can't save the amended file as an MP3. But you could still use QT as
>
a staging post, then reconvert the file with iTunes.
>
>
Here's a (very) rough script demonstrating how to achieve the goal you
>
stated in your original message. This just works on one file (so you can
>
test it without too much grief). To make it work on a folder, you'll need to
>
change the 'choose file' command to 'choose folder', and wrap the cut&paste
>
section of the script in a repeat loop. This assumes that you want the
>
tracks cut exactly in half and the same ad appended to each. (NB - This was
>
written and tested in OS X, but I don't think I've included anything that
>
will break in OS 9)
>
>
set theAd to alias [path to the file whose contents you want to paste at the
>
end of your edited mp3]
>
choose file with prompt "Select a track to work on:" returning theTrack
>
tell application "QuickTime Player"
>
open theAd
>
tell movie 1
>
select all
>
copy
>
close
>
end tell
>
open theTrack returning currentTrack
>
set theTime to duration of currentTrack
>
select currentTrack at theTime / 2 to theTime
>
tell currentTrack
>
clear
>
set current time to theTime / 2
>
paste
>
end tell
>
set theTempFile to (theDest & "X-" & name of currentTrack)
>
export currentTrack to file theTempFile as AIFF with replacing
>
close every window saving no
>
end tell
>
>
tell application "iTunes"
>
convert alias theTempFile returning newMP3Ref
>
set newMP3 to location of item 1 of newMP3Ref
>
end tell
>
>
tell application "Finder"
>
delete alias theTempFile
>
make new alias file to newMP3 at alias theDest
>
end tell
>
>
>
HTH
>
>
>
Nick
>
pp Mr Tea
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.