I was wondering is it possible to convert music files to mp3 or even wma without using itunes. i simple want it to copy the file and convert it, but i do not want the new file added to itunes or the old one deleted
it needs to be able to convert AAC and possible AIFF to MP3/WMA
You can do something like this. Convert the track, move the converted tracks file, and delete the track from iTunes. This does one but you can convert more than one depending on how you get your list of tracks.
tell application "iTunes"
activate
set some_track to first track of first library playlist
set converted_tracks to (convert some_track)
set first_track to item 1 of converted_tracks
set track_location to location of first_track
end tell
tell application "Finder" to move track_location to desktop
tell application "iTunes"
delete first_track
quit
end tell
I’m not sure if they said the library playlist object is no longer used.
Just like the Full Screen trick with QuickTime, I wonder if you could script it to convert tracks without having a pro license. I can’t test this though all of my machines do have Pro.
set _file to choose file
set deskPath to path to desktop as Unicode text
tell application "Finder" to set {_name, _ext} to {name, name extension} of _file
set _newName to text 1 through -((count _ext) + 1) of _name & "aif"
tell application "QuickTime Player"
open _file
export front movie to (deskPath & _newName) as AIFF
close front movie saving no
end tell
-- the basic idea (didn't work for me)
tell application "iTunes"
set {curEnc, current encoder} to {current encoder, "MP3"}
-- do your converting...
set current encoder to curEnc
end tell
the working script:
-- script to choose from available converters and set the converter back to what it was
try
tell application "iTunes"
-- build list of available encoders
set encoderNameList to {}
repeat with thisEncoder in encoders
copy thisEncoder's name to end of encoderNameList
end repeat
-- choose encoder from available encoders
set myEncoder to choose from list encoderNameList
if false is not myEncoder then
-- Q:Is there a more elegant way to find the >>position<< of an item in a list?
repeat with counter from 1 to count encoders
if myEncoder = encoderNameList's item counter then exit repeat
end repeat
-- save & change encoder settings
set {curEnc, current encoder} to {current encoder, encoders's item counter}
-- do your converting...
-- leave encoder settings to what they were before we converted our tunes
set current encoder to curEnc
end if
end tell
on error eMsg number eNum
display dialog eMsg & " " & eNum giving up after 12
end try