[Music] 自動曲送り 曲送り(擬似フェードイン フェードアウト)
#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
use AppleScript version "2.8"
use framework "Foundation"
use scripting additions
####1曲何秒聴く?
set numTimer to 30 as integer
###何曲
set numCntRep to 5000 as number
####何曲目
set numCnt to 0 as number
repeat numCntRep times
tell application "Music"
set sound volume to 100
set objState to (player state)
if objState is playing then
log "再生中"
set objNowTrack to current track
set objNowTrack to current track
name of objNowTrack as text
album of objNowTrack as text
artist of objNowTrack as text
##################
delay numTimer
##################
###フェードアウト
set sound volume to 100
set numVolume to 100 as integer
repeat 10 times
set sound volume to numVolume
set numVolume to numVolume - 10 as integer
delay 0.1
end repeat
##################
###次の曲
next track
##################
###フェードイン
set numVolume to 10 as integer
repeat 10 times
set sound volume to numVolume
set numVolume to numVolume + 10 as integer
delay 0.1
end repeat
else if objState is paused then
set sound volume to 100
log "停止中"
set objNowTrack to current track
play
else if objState is stopped then
set sound volume to 100
log "停止中"
set objNowTrack to current track
play
end if
end tell
set numCnt to (numCnt + 1) as number
log numCnt
---リピートの終わり
end repeat
| 固定リンク
「Media Music」カテゴリの記事
- [Music]メタデータの文字化け置換(EU系の文字化けの置換) 少し増えた(2024.03.18)
- [shortcut]再生中の音楽をShazamでしらべてタイトルアーティストを設定する(2023.12.11)
- [Music]メタデータの文字化け置換(1つ毎処理)(2023.12.09)
- [afinfo]ミュージックファイルの詳細メタ情報の取得(2023.11.01)
- [com.apple.metadata]オーディオファイルのコメントにビットレートを入れる(2023.11.01)