信助さんのオーディオ

いい音で音楽を聴きたい

Quicktimeでアルバム一枚聞きたい その2

2008-03-12 13:15:00 | オーディオ
もし、曲をつなげて一曲にしてしまうスクリプトがあったら、
Quicktimeでアルバムが聴けるのにとブログにと書いたら、
Westacularさんの作ったスクリプトを40番さんに教えていただいた。
いい情報ありがとうございました。ブログをやって良かったと感じました。

そのスクリプトを私なりにモディファイしてみた。
以下は変更点。

1. Chapter番号しか表示されなかったので、
曲名がチャプターに表示されるようにした。

2. ファイルをつなげた後、ポインタが先頭に来るようにした。
(スタートボタンを押せば、すぐ再生出来るようにした。
オリジナルバージョンでは最後の位置)

3. 高域を少し持ち上げた。
(私のシステムではこれぐらいがちょうどいい)

アルバム名も表示されるようにしたいが、現在アイデアなし。
誰か、そこだけ作ってくれるとありがたい。

以下はモディファイしたスクリプト。
赤字は私がモディファイしたところ。

on run {input, parameters}
tell application "Finder" to set input
to sort input by name
repeat with i from 1 to the count of input
set this_item to (item i of input)
tell application "QuickTime Player"
if i is equal to 1 then
make new movie
end if
open this_item
tell movie 1
set MusicName to name of this_item
rewind
select all
copy
select none
end tell
close movie 1 saving no
tell movie 1
add
select none
if i is equal to 1 then
set this_track to make new track at beginning with data "Chapter 1"
set enabled of this_track to false
set the name of this_track to "Chapter Track"
set chapterlist of track 1 to track "Chapter Track"
set the movie_length to the duration
tell chapter 1
set the time to 0
set the duration to movie_length
set the name to MusicName
end tell
else
set the newmovielength to the duration
set the duration of this_track to newmovielength
set the chapter_list to the name of every chapter
set the new_chapter_list to chapter_list & (i as string)
set the contents of the current chapter track to the new_chapter_list
set the time of chapter i to movie_length
set the duration of chapter i to newmovielength - movie_length
set the name of chapter i of this_track to MusicName
set movie_length to the duration
end if
end tell
end tell
end repeat
tell application "QuickTime Player"
tell movie 1
set treble gain to 95
rewind
end tell
end tell

return input
end run