gikoha’s blog

個人的メモがわり

MIDI (or MP3) to AIFF AppleScript

  • ファイルをまとめてこのスクリプトにドラッグしてください。
  • AppleScriptが思いの外優秀で変換作業がらくちんでした
on open these_items
	repeat with i from 1 to the count of these_items
		set this_item to (item i of these_items)
		tell application "QuickTime Player"
			activate
			open this_item
			set newFile to this_item as string
			set newFile to (newFile & ".aiff")
			
			if saveable of movie 1 is false then
				error "保存できないムービーでござる."
			end if
			if (can export movie 1 as AIFF) is true then
				export movie 1 to (file newFile) as AIFF
				close movie 1 saving no
			else
				error "AIFFとして保存できないムービーでござった."
			end if
		end tell
	end repeat
end open