Music

ネットラジオをplaylistに登録する


【スクリプトエディタで開く】 |

ネットラジオをplaylist登録.scpt
ソース
001#!/usr/bin/env osascript
002----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
003(*
004ネットラジオをplaylistに登録する
005
006見本はドイツのストリーミングラジオ
007https://laut.fm/
008
009
010https://stream.laut.fm/funk.m3u 拡張子m3u m3u8の場合
011https://stream.laut.fm/funk.pls 拡張子pls形式の場合
012この形式の場合『インターネットの曲』となるので
013playlist『インターネットの曲』に追加されて
014指定したplaylistに登録(duplicate=複製)される感じになる
015
016https://stream.laut.fm/funk といった
017ストリーミングURLの直接登録の場合は
018『インターネットの曲』には追加されない
019
020
021com.cocolog-nifty.quicktimer.icefloe *)
022----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
023use AppleScript version "2.8"
024use scripting additions
025############################
026#【設定項目】作成するプレイリスト名
027#登録したいplaylists
028#このplaylists名のplaylistがなければ作る
029set strPlaylistsName to ("FUNK") as text
030############################
031#【設定項目】登録するストリームURL
032set strURL to ("https://stream.laut.fm/funk") as text
033
034
035#ストリームを開く
036with timeout of 20 seconds
037   tell application "Music"
038      open location strURL
039   end tell
040end timeout
041
042#プレイリストがなければ作る
043tell application "Music"
044   set listPlayList to (get name of user playlists) as list
045   if listPlayList contains strPlaylistsName then
046      log "playlists" & strPlaylistsName & "がある"
047   else
048      log "playlists" & strPlaylistsName & "が無い"
049      make new playlist with properties {name:strPlaylistsName}
050   end if
051end tell
052
053#playlistに登録(duplicateだから複製的な)
054tell application "Music"
055   set objCurrentTrack to current track
056   duplicate objCurrentTrack to user playlist strPlaylistsName
057end tell
058
059return
060
AppleScriptで生成しました

| | コメント (0)

[Music app]プレイリスト基本(ユーザープレイリスト)


【スクリプトエディタで開く】 |

iTune プレイリスト フォルダに属しているか?.scpt
ソース
001#!/usr/bin/env osascript
002----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
003(*
004プレイリストの『フォルダ』の処理
005com.cocolog-nifty.quicktimer.icefloe *)
006----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
007use AppleScript version "2.8"
008
009use scripting additions
010
011property refMe : a reference to current application
012
013tell application "Music"
014   set listPlayList to (get user playlists) as list
015   #ユーザープレイリストを順番に処理
016   repeat with itemPlayList in listPlayList
017      #プレイリストのIDを取得して
018      set numPlayListID to (id of itemPlayList) as text
019      #対象のプレイリストの詳細
020      tell user playlist id numPlayListID
021         #      properties
022         #フォルダに属しているか?
023         set boolParent to (exists parent) as boolean
024         if boolParent is true then
025            -->フォルダに属している場合の処理
026         end if
027      end tell
028   end repeat
029end tell
030
031
032
033
034return
AppleScriptで生成しました

| | コメント (0)

ユニコードのSJISバケをデコードする v1 絶賛テスト中(とっても必要になったら使うだけ)

EU文字化けFixV2.scpt

AppleScript サンプルコード

【スクリプトエディタで開く】 |

AppleScript サンプルソース(参考)
行番号ソース
001#!/usr/bin/env osascript
002----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
003#
004# サウンドファイルのタイトル等の文字化けFIX用
005#  作り直したv1  20250309  テスト中
006# com.cocolog-nifty.quicktimer.icefloe
007----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
008use AppleScript version "2.8"
009use framework "Foundation"
010use framework "AppKit"
011use scripting additions
012
013property refMe : a reference to current application
014
015---iTune呼び出し
016tell application "Music"
017  try
018    ----選択されているファイルの実体先をリストで取得
019    set listTrackSelection to selection as list
020  on error
021    ---選択していないとエラーになる
022    log "曲を選択してください"
023    return "曲を選択してください"
024  end try
025  log listTrackSelection
026end tell
027
028
029
030repeat with objTrack in listTrackSelection
031  ################################
032  #ゲット 値の取得
033  tell application "Music"
034    tell objTrack
035      set strGetValue3 to album artist as text
036      set strGetValue1 to album as text
037      set strGetValue2 to artist as text
038      set strGetValue4 to name as text
039    end tell
040  end tell
041  ################################
042  #置換
043  set strSetValue1 to doReplasceStr(strGetValue1)
044  set strSetValue2 to doReplasceStr(strGetValue2)
045  set strSetValue3 to doReplasceStr(strGetValue3)
046  set strSetValue4 to doReplasceStr(strGetValue4)
047  
048  set strForDialog to ("album: " & strSetValue1 & "\r") as text
049  set strForDialog to (strForDialog & "artist: " & strSetValue2 & "\r") as text
050  set strForDialog to (strForDialog & "album artist: " & strSetValue3 & "\r") as text
051  set strForDialog to (strForDialog & "name: " & strSetValue4 & "\r") as text
052  
053  
054  ################################
055  #ダイアログ
056  set strName to (name of current application) as text
057  if strName is "osascript" then
058    tell application "SystemUIServer" to activate
059  else
060    tell current application to activate
061  end if
062  set aliasIconPath to POSIX file "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertNoteIcon.icns"
063  try
064    set recordResponse to (display dialog "この内容で設定します\rいいですか?" with title "設定します" default answer strForDialog buttons {"OK", "キャンセル"} default button "OK" cancel button "キャンセル" with icon aliasIconPath giving up after 20 without hidden answer)
065    
066  on error
067    log "エラーしました"
068    return "エラーしました"
069  end try
070  if true is equal to (gave up of recordResponse) then
071    return "時間切れですやりなおしてください"
072  end if
073  if "OK" is equal to (button returned of recordResponse) then
074    log "処理継続"
075  else
076    log "キャンセルしました"
077    return "キャンセルしました"
078  end if
079  
080  
081  #セット
082  tell application "Music"
083    tell objTrack
084      set album to strSetValue1
085      set artist to strSetValue2
086      set album artist to strSetValue3
087      set name to strSetValue4
088    end tell
089  end tell
090end repeat
091
092
093
094################################
095#サブルーチン
096to doReplasceStr(argString)
097  set strString to argString as text
098  #NSSTRING
099  set ocidInputString to refMe's NSMutableString's alloc()'s init()
100  ocidInputString's setString:(strString)
101  set numStringLength to ocidInputString's |length|()
102  ##バイト数
103  #SJISコードを調べて
104  set strCommandText to ("/usr/bin/python3 -c \"print(len(\\\"" & strString & "\\\".encode('utf-8')))\"") as text
105  try
106    #コマンド実行
107    set strResponse to (do shell script strCommandText) as text
108  on error
109    log "python3 でエラーしました"
110    return false
111  end try
112  set numByteCount to strResponse as integer
113  
114  log numStringLength
115  log numByteCount
116  #この部分は妥協している
117  if numStringLength = (numByteCount / 3) then
118    #日本語と見てそのまま返す
119    return strString
120  end if
121  
122  #出力用の文字列
123  set strOutputText to ("") as text
124  #1文字づつ順番に
125  repeat with itemCharNo from 0 to (numStringLength - 1) by 1
126    #文字を取得して10進文字コード取得
127    #こっちはキャラクター=文字
128    set ocidChar to (ocidInputString's characterAtIndex:(itemCharNo))
129    set strChar to ocidChar as string
130    #10新数に整形して
131    set strSaveDelim to AppleScript's text item delimiters
132    set AppleScript's text item delimiters to "d"
133    set listCharCodeDec to every text item of strChar
134    set AppleScript's text item delimiters to ""
135    set strChar to listCharCodeDec as text
136    set AppleScript's text item delimiters to strSaveDelim
137    set numCharNoDec to strChar as integer
138    #こっちはテキストとしての文字
139    set ocidRange to refMe's NSRange's NSMakeRange(itemCharNo, 1)
140    set strCharString to (ocidInputString's substringWithRange:(ocidRange)) as text
141    #コードがFFより大きい値ならバケている可能性が高いので
142    if numCharNoDec > 255 then
143      #SJISコードを調べて
144      set strCommandText to ("/usr/bin/python3 -c \"print([hex(byte) for byte in \\\"" & strCharString & "\\\".encode('shift_jis')])\"") as text
145      try
146        #コマンド実行
147        set strResponse to (do shell script strCommandText) as text
148      on error
149        log "python3 でエラーしました"
150        return false
151      end try
152      # log strResponse
153      #文字列整形して
154      set ocidMulchBiteChar to refMe's NSMutableString's alloc()'s init()
155      (ocidMulchBiteChar's setString:(strResponse))
156      set ocidMulchBiteChar to (ocidMulchBiteChar's stringByReplacingOccurrencesOfString:("[") withString:(""))
157      set ocidMulchBiteChar to (ocidMulchBiteChar's stringByReplacingOccurrencesOfString:("]") withString:(""))
158      set ocidMulchBiteChar to (ocidMulchBiteChar's stringByReplacingOccurrencesOfString:("'") withString:(""))
159      set ocidMulchBiteChar to (ocidMulchBiteChar's stringByReplacingOccurrencesOfString:(",") withString:(""))
160      set ocidMulchBiteChar to (ocidMulchBiteChar's stringByReplacingOccurrencesOfString:("0x") withString:(""))
161      set ocidMulchBiteChar to (ocidMulchBiteChar's stringByReplacingOccurrencesOfString:(" ") withString:(""))
162      set strMulchBiteChar to ocidMulchBiteChar as text
163      #ラテン文字にデコードして
164      set strCommandText to ("/usr/bin/python3 -c \"print(bytes.fromhex('" & strMulchBiteChar & "').decode('latin1'))\"") as text
165      try
166        #コマンド実行
167        set strResponse to (do shell script strCommandText) as text
168      on error
169        log "python3 でエラーしました"
170        return false
171      end try
172      set strOutputText to (strOutputText & strResponse) as text
173    else
174      set strOutputText to (strOutputText & strCharString) as text
175    end if
176    
177    
178  end repeat
179  
180  return strOutputText
181end doReplasceStr
AppleScriptで生成しました

|

【考え中】ユニコードのSJISバケをデコードする

サウンドファイルの文字化けFIX(東欧 EU系) 少し文字を追加した

メカニカルに処理したいなぁと思って考え中
色々やったけどpython3の力を借りるのが最もシンプルだな…
ユニコードのSJISバケをデコードする.scpt

AppleScript サンプルコード

【スクリプトエディタで開く】 |

AppleScript サンプルソース(参考)
行番号ソース
001#!/usr/bin/env osascript
002----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
003#com.cocolog-nifty.quicktimer.icefloe
004(*
005*)
006----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
007use AppleScript version "2.8"
008use framework "Foundation"
009use framework "UniformTypeIdentifiers"
010use framework "AppKit"
011use scripting additions
012property refMe : a reference to current application
013
014#
015set strString to ("Sin饌d O'Connor") as text
016
017
018#NSSTRING
019set ocidInputString to refMe's NSMutableString's alloc()'s init()
020ocidInputString's setString:(strString)
021set numStringLength to ocidInputString's |length|()
022#出力用の文字列
023set strOutputText to ("") as text
024#1文字づつ順番に
025repeat with itemCharNo from 0 to (numStringLength - 1) by 1
026  #文字を取得して10進文字コード取得
027  #こっちはキャラクター=文字
028  set ocidChar to (ocidInputString's characterAtIndex:(itemCharNo))
029  set strChar to ocidChar as string
030  #10新数に整形して
031  set strSaveDelim to AppleScript's text item delimiters
032  set AppleScript's text item delimiters to "d"
033  set listCharCodeDec to every text item of strChar
034  set AppleScript's text item delimiters to ""
035  set strChar to listCharCodeDec as text
036  set AppleScript's text item delimiters to strSaveDelim
037  set numCharNoDec to strChar as integer
038  #こっちはテキストとしての文字
039  set ocidRange to refMe's NSRange's NSMakeRange(itemCharNo, 1)
040  set strCharString to (ocidInputString's substringWithRange:(ocidRange)) as text
041  #コードがFFより大きい値ならバケている可能性が高いので
042  if numCharNoDec > 255 then
043    #SJISコードを調べて
044    set strCommandText to ("/usr/bin/python3 -c \"print([hex(byte) for byte in \\\"" & strCharString & "\\\".encode('shift_jis')])\"") as text
045    try
046      #コマンド実行
047      set strResponse to (do shell script strCommandText) as text
048    on error
049      log "python3 でエラーしました"
050      return false
051    end try
052    # log strResponse
053    #文字列整形して
054    set ocidMulchBiteChar to refMe's NSMutableString's alloc()'s init()
055    (ocidMulchBiteChar's setString:(strResponse))
056    set ocidMulchBiteChar to (ocidMulchBiteChar's stringByReplacingOccurrencesOfString:("[") withString:(""))
057    set ocidMulchBiteChar to (ocidMulchBiteChar's stringByReplacingOccurrencesOfString:("]") withString:(""))
058    set ocidMulchBiteChar to (ocidMulchBiteChar's stringByReplacingOccurrencesOfString:("'") withString:(""))
059    set ocidMulchBiteChar to (ocidMulchBiteChar's stringByReplacingOccurrencesOfString:(",") withString:(""))
060    set ocidMulchBiteChar to (ocidMulchBiteChar's stringByReplacingOccurrencesOfString:("0x") withString:(""))
061    set ocidMulchBiteChar to (ocidMulchBiteChar's stringByReplacingOccurrencesOfString:(" ") withString:(""))
062    set strMulchBiteChar to ocidMulchBiteChar as text
063    #ラテン文字にデコードして
064    set strCommandText to ("/usr/bin/python3 -c \"print(bytes.fromhex('" & strMulchBiteChar & "').decode('latin1'))\"") as text
065    try
066      #コマンド実行
067      set strResponse to (do shell script strCommandText) as text
068    on error
069      log "python3 でエラーしました"
070      return false
071    end try
072    set strOutputText to (strOutputText & strResponse) as text
073  else
074    set strOutputText to (strOutputText & strCharString) as text
075  end if
076  
077  
078end repeat
079
080#元テキスト
081log strString as text
082--> (*Sin饌d O'Connor*)
083#置換テキスト
084log strOutputText as text
085-->(*Sinéad O'Connor*)
086return
087
088
089
090
091
AppleScriptで生成しました

|

サウンドファイルの文字化けFIX(東欧 EU系) 少し文字を追加した

202503090548201_1618x790
通称:ユニコードのSJISバケ
EU文字化けFix.scpt

AppleScript サンプルコード

【スクリプトエディタで開く】 |

AppleScript サンプルソース(参考)
行番号ソース
001#!/usr/bin/env osascript
002----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
003#
004# サウンドファイルのタイトル等の文字化けFIX用
005# 少し追加した
006# com.cocolog-nifty.quicktimer.icefloe
007----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
008use AppleScript version "2.8"
009use scripting additions
010
011
012property refMe : a reference to current application
013
014---iTune呼び出し
015tell application "Music"
016  try
017    ----選択されているファイルの実体先をリストで取得
018    set listTrackSelection to selection as list
019  on error
020    ---選択していないとエラーになる
021    log "曲を選択してください"
022    return "曲を選択してください"
023  end try
024  log listTrackSelection
025end tell
026
027
028
029repeat with objTrack in listTrackSelection
030  #ゲット
031  tell application "Music"
032    tell objTrack
033      set strGetValue1 to album as text
034      set strGetValue2 to artist as text
035      set strGetValue3 to album artist as text
036      set strGetValue4 to name as text
037    end tell
038  end tell
039  #置換
040  set strSetValue1 to doReplasceStr(strGetValue1)
041  set strSetValue2 to doReplasceStr(strGetValue2)
042  set strSetValue3 to doReplasceStr(strGetValue3)
043  set strSetValue4 to doReplasceStr(strGetValue4)
044  #セット
045  tell application "Music"
046    tell objTrack
047      set album to strSetValue1
048      set artist to strSetValue2
049      set album artist to strSetValue3
050      set name to strSetValue4
051    end tell
052  end tell
053end repeat
054
055
056to doReplasceStr(argGetValue)
057  #ここだけargGetValue間違えないように
058  set strSetValue to doReplace(argGetValue, "ヒ", "a")
059  set strSetValue to doReplace(strSetValue, "チ", "Á")
060  set strSetValue to doReplace(strSetValue, "ォ", "á")
061  set strSetValue to doReplace(strSetValue, "ョ", "®")
062  set strSetValue to doReplace(strSetValue, "キ", "·")
063  
064  set strSetValue to doReplace(strSetValue, "馘", "éd")
065  set strSetValue to doReplace(strSetValue, "馥", "ée")
066  set strSetValue to doReplace(strSetValue, "馼", "éh")
067  set strSetValue to doReplace(strSetValue, "駻", "ér")
068  set strSetValue to doReplace(strSetValue, "駻", "ér")
069  set strSetValue to doReplace(strSetValue, "駭", "én")
070  set strSetValue to doReplace(strSetValue, "師", "ét")
071  set strSetValue to doReplace(strSetValue, "駸", "és")
072  set strSetValue to doReplace(strSetValue, "馭", "éf")
073  set strSetValue to doReplace(strSetValue, "駘", "él")
074  #20250309追加
075  set strSetValue to doReplace(strSetValue, "饌", "éa")
076  set strSetValue to doReplace(strSetValue, "鮟", "é ")
077  set strSetValue to doReplace(strSetValue, "馮", "ég")
078  set strSetValue to doReplace(strSetValue, "屍", "ér")
079  set strSetValue to doReplace(strSetValue, "士", "ém")
080  set strSetValue to doReplace(strSetValue, "始", "én")
081  set strSetValue to doReplace(strSetValue, "駑", "ém")
082  set strSetValue to doReplace(strSetValue, "駱", "ép")
083  set strSetValue to doReplace(strSetValue, "騁", "ét")
084  
085  set strSetValue to doReplace(strSetValue, "不", "ïs")
086  
087  
088  set strSetValue to doReplace(strSetValue, "輟", "ço")
089  set strSetValue to doReplace(strSetValue, "殲", "ür")
090  
091  
092  set strSetValue to doReplace(strSetValue, "鈩", "èn")
093  set strSetValue to doReplace(strSetValue, "鑽", "èr")
094  set strSetValue to doReplace(strSetValue, "鑪", "èm")
095  set strSetValue to doReplace(strSetValue, "鑚", "ès")
096  set strSetValue to doReplace(strSetValue, "鑒", "èg")
097  set strSetValue to doReplace(strSetValue, "峻", "ès")
098  
099  set strSetValue to doReplace(strSetValue, "黐", "êv")
100  set strSetValue to doReplace(strSetValue, "嘖", "êh")
101  
102  set strSetValue to doReplace(strSetValue, "歡", "üc")
103  set strSetValue to doReplace(strSetValue, "穫", "än")
104  set strSetValue to doReplace(strSetValue, "殄", "üh")
105  set strSetValue to doReplace(strSetValue, "嬰", "♯ ")
106  
107  
108  set strSetValue to doReplace(strSetValue, "疝", "ál")
109  set strSetValue to doReplace(strSetValue, "疚", "ák")
110  
111  set strSetValue to doReplace(strSetValue, "臟", "äf")
112  
113  
114  set strSetValue to doReplace(strSetValue, "敏", "ïq")
115  
116  set strSetValue to doReplace(strSetValue, "獲", "äl")
117  set strSetValue to doReplace(strSetValue, "嗷", "ör")
118  set strSetValue to doReplace(strSetValue, "殳", "üt")
119  set strSetValue to doReplace(strSetValue, "喞", "öc")
120  set strSetValue to doReplace(strSetValue, "殤", "ün")
121  
122  set strSetValue to doReplace(strSetValue, "歸", "üd")
123  set strSetValue to doReplace(strSetValue, "洫", "üß")
124  set strSetValue to doReplace(strSetValue, "侒", "úo")
125  
126  set strSetValue to doReplace(strSetValue, "隔", "äu")
127  set strSetValue to doReplace(strSetValue, "舅", "än")
128  set strSetValue to doReplace(strSetValue, "臙", "äb")
129  set strSetValue to doReplace(strSetValue, "廓", "äf")
130  
131  set strSetValue to doReplace(strSetValue, "羡", "ît")
132  set strSetValue to doReplace(strSetValue, "杯", "ît")
133  
134  set strSetValue to doReplace(strSetValue, "僘", "ía")
135  
136  set strSetValue to doReplace(strSetValue, "", "óm")
137  set strSetValue to doReplace(strSetValue, "", "óc")
138  set strSetValue to doReplace(strSetValue, "", "óh")
139  
140  
141  return strSetValue
142  
143end doReplasceStr
144
145
146
147to doReplace(argOrignalText, argSearchText, argReplaceText)
148  set strDelim to AppleScript's text item delimiters
149  set AppleScript's text item delimiters to argSearchText
150  set listDelim to every text item of argOrignalText
151  set AppleScript's text item delimiters to argReplaceText
152  set strReturn to listDelim as text
153  set AppleScript's text item delimiters to strDelim
154  return strReturn
155end doReplace
156
157
158
AppleScriptで生成しました

|

[Music]曲のスキップ 次の曲が未再生の曲を再生する(自分用)

未再生の曲だけ再生する.scpt

AppleScript サンプルコード

【スクリプトエディタで開く】 |

AppleScript サンプルソース(参考)
行番号ソース
001#!/usr/bin/env osascript
002----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
003#
004#   com.cocolog-nifty.quicktimer.icefloe
005----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
006use AppleScript version "2.6"
007use framework "Foundation"
008use scripting additions
009
010property refMe : a reference to current application
011
012set strBundleID to "com.apple.Music" as text
013
014
015
016##スクリプトメニューから実行させない
017tell current application
018  set strName to name as text
019end tell
020####スクリプトメニューから実行したら
021if strName is "osascript" then
022  tell application "Finder"
023    set aliasPathToMe to path to me as alias
024    tell application "Script Editor"
025      open aliasPathToMe
026    end tell
027    return "中止しました"
028  end tell
029else
030  tell current application
031    activate
032  end tell
033end if
034
035
036#ランダム再生
037tell application "Music"
038  set boolShuffle to shuffle enabled
039  if boolShuffle is false then
040    set shuffle enabled to true
041  end if
042end tell
043
044#ランダム再生
045tell application "Music"
046  set strShuffle to shuffle mode
047  if strShuffle is not songs then
048    set shuffle mode to songs
049  end if
050end tell
051
052#再生していないなら再生スタート
053tell application "Music"
054  set strState to player state
055  log strState
056  if strState is stopped then
057    play
058  end if
059end tell
060
061
062
063tell application "Music"
064  #現在再生中の位置 秒
065  set numPalyerPosition to player position
066  tell current track
067    set strArtist to artist as text
068    set strTitle to name as text
069    set strAlbum to album as text
070    log "\r" & strArtist & "\r" & strTitle & "\r" & strAlbum & "\r"
071    #全秒
072    set numDuration to duration as number
073    #開始位置 秒
074    set numStart to start as number
075    #終了位置 秒
076    set numFinish to finish as number
077    #再生回数
078    set numPlayedCount to played count as integer
079  end tell
080end tell
081
082#再生回数カウントアップ
083set numPlayedCount to numPlayedCount + 1 as integer
084#曲終了1秒前
085# set numDist to numDuration - 0.5 as number
086
087tell application "Music"
088  #今の曲の再生回数をカウントアップ
089  tell current track
090    set played count to numPlayedCount
091  end tell
092  # set player position to numDist
093end tell
094tell application "Music"
095  next track
096end tell
097repeat
098  tell application "Music"
099    #次の曲
100    tell current track
101      #再生回数
102      set numPlayedCount to played count as integer
103      set strArtist to artist as text
104      set strTitle to name as text
105      set strAlbum to album as text
106    end tell
107    #再生済みなら次へ
108    if numPlayedCount = 0 then
109      log "\r" & strArtist & "\r" & strTitle & "\r" & strAlbum & "\r"
110      exit repeat
111    else
112      #次の曲へ
113      next track
114    end if
115  end tell
116end repeat
117
118#再生していないなら再生スタート
119tell application "Music"
120  if player state is stopped then
121    play
122  end if
123end tell
AppleScriptで生成しました

|

[Logic Pro]サウンドファイルのMIDI変換

202501080415362_1180x1040

サウンドトラック1
202501080415361_1180x1040


Flex Pitch
202501080415571_2562x1268

Flex Pitch処理
202501080416061_830x522

処理中1分以内で終わります
202501080416062_830x522

選択範囲をMIDIに書き出して完了
202501080416311_1280x641

CD等の音楽オーディオファイルの場合は
結果が期待通りとはいかない

|

[iTune]購入済みのファイル

リセット後には
ダウンロードが発生するので
ファイルは抜ける
~/Library/Caches/com.apple.iTunes/CloudPurchasesPlayCache/
~/Library/Caches/com.apple.Music/CloudPurchasesPlayCache/

|

[Music]感情電車 私立恵比寿中学 松野莉奈さん歌唱の歌詞違いに気が付く

松野さん:わかぎたつまちにはるのはな
楽曲版:わかぎたちさくのははるのはな
楽曲版の方が確かにいい歌詞だとは思うが
『違い』があるのが『唯一』な感じがして良いです。



スマホで見る場合はこちらから
https://www.youtube.com/watch?v=cEZccmcktSM




好きだからこそ聞けない はかない未来のありか
咲いているあなたの肌に触れた時 泣いた 今が時かな

インフォメーション走らす境界線をまた引っ張って
情報なんて持っていなくたって道はどうにかなる
上昇中の愛を歌っていて 怖くないよ
なんにもないなんでもないよと言って
強い人だから

通常版:わかぎたちさくのははるのはな
松野版:わかぎたつまちにはるのはな

きらりとびかわしてなつのゆめ
せなかにおちゆくはあきのそら
てのひらにつつんだふゆのたね

感情電車に乗っかって 駆け出してよどんどん行っちゃって
愛情大小詰め込んでってよ そう そう
離しはしないでよ
頑張る上手になりたいね 楽しんだりもっと忘れないで
感情電車は特快で 今 もう もう
どこにも止まれないよ

インフォメーション絶賛継続中の目を引っ掻いて
標準なんて知っていなくたって明日はやって来るんだ
等身大の愛を誓ってみて 怖くないよ
かけがえのない人だよ

あかねさしまつのはあさのにわ
ゆらりはぐらかしてひるのこえ
めかくしとりあうはよるのはば
となりあうすそねをえにかいた

感情電車に乗っかって 踏み出してよぐっと突き進んで
愛情百杯はすくってってよ そう そう
こぼしはしないでよ
頑張れ上手もなりたいね 照れないで少し手も取り合って
感情電車は特快で 今 もう もう
どこにも止まれないよ

好きだからこそ言えない はかない時間のありか
時間のありか
咲いているあなたの肌に触れた時に 泣いた
その空

感情電車に乗っかって 駆け出してよどんどん行っちゃって
愛情大小詰め込んでってよ そう そう
離しはしないでよ
頑張る上手になりたいね 楽しんだりもっと忘れないで
感情電車は特快で 今もう もう
どこにも止まれない

感情電車に乗っかって
愛情何杯もすくって
楽しむ上手もなりたいね
感情電車は特快で 今もう もう
どこにも止まれないよ

|

[Audio]BPMの取得とファイルのメタデータへの書き込み

Serato DJ Liteが便利
https://serato.com/dj/lite/downloads/mac

1:曲を選んで
2:アナライズ ファイルでbpmを取得してファイルに書き込みます

20220703001215_1444x532x144_0

転調や変調な曲はアレですが、概ね正しい目安になるbpmが取得できます

|

より以前の記事一覧

その他のカテゴリー

Accessibility Acrobat Acrobat 2020 Acrobat 2024 Acrobat AddOn Acrobat Annotation Acrobat AppleScript Acrobat ARMDC Acrobat AV2 Acrobat BookMark Acrobat Classic Acrobat DC Acrobat Dialog Acrobat Distiller Acrobat Form Acrobat GentechAI Acrobat JS Acrobat JS Word Search Acrobat Maintenance Acrobat Manifest Acrobat Menu Acrobat Merge Acrobat Open Acrobat PDFPage Acrobat Plugin Acrobat Preferences Acrobat Preflight Acrobat Print Acrobat Python Acrobat Reader Acrobat Reader Localized Acrobat Reference Acrobat Registered Products Acrobat SCA Acrobat SCA Updater Acrobat Sequ Acrobat Sign Acrobat Stamps Acrobat URL List Mac Acrobat URL List Windows Acrobat Watermark Acrobat Windows Acrobat Windows Reader Admin Admin Account Admin Apachectl Admin ConfigCode Admin configCode Admin Device Management Admin LaunchServices Admin Locationd Admin loginitem Admin Maintenance Admin Mobileconfig Admin NetWork Admin Permission Admin Pkg Admin Power Management Admin Printer Admin Printer Basic Admin Printer Custompapers Admin SetUp Admin SMB Admin softwareupdate Admin Support Admin System Information Admin TCC Admin Tools Admin Umask Admin Users Admin Volumes Admin XProtect Adobe Adobe AUSST Adobe Bridge Adobe Documents Adobe FDKO Adobe Fonts Adobe Reference Adobe RemoteUpdateManager Adobe Sap Code AppKit Apple AppleScript AppleScript Duplicate AppleScript entire contents AppleScript List AppleScript ObjC AppleScript Osax AppleScript PDF AppleScript Pictures AppleScript record AppleScript Video Applications AppStore Archive Archive Keka Attributes Automator BackUp Barcode Barcode Decode Barcode QR Bash Basic Basic Path Bluetooth BOX Browser Calendar CD/DVD Choose Chrome Chromedriver CIImage CityCode CloudStorage Color Color NSColor Color NSColorList com.apple.LaunchServices.OpenWith Console Contacts CotEditor CURL current application Date&Time delimiters Desktop Desktop Position Device Diff Disk do shell script Dock Dock Launchpad DropBox Droplet eMail Encode % Encode Decode Encode HTML Entity Encode UTF8 Error EXIFData exiftool ffmpeg File File Name Finder Finder Window Firefox Folder FolderAction Font List FontCollections Fonts Fonts Asset_Font Fonts ATS Fonts Emoji Fonts Maintenance Fonts Morisawa Fonts Python Fonts Variable Foxit GIF github Guide HTML Icon Icon Assets.car Illustrator Image Events ImageOptim Input Dictionary iPhone iWork Javascript Jedit Ω Json Label Language Link locationd lsappinfo m3u8 Mail Map Math Media Media AVAsset Media AVconvert Media AVFoundation Media AVURLAsset Media Movie Media Music Memo Messages Microsoft Microsoft Edge Microsoft Excel Microsoft Fonts Microsoft Office Microsoft Office Link Microsoft OneDrive Microsoft Teams Mouse Music Node Notes NSArray NSArray Sort NSAttributedString NSBezierPath NSBitmapImageRep NSBundle NSCFBoolean NSCharacterSet NSData NSDecimalNumber NSDictionary NSError NSEvent NSFileAttributes NSFileManager NSFileManager enumeratorAtURL NSFont NSFontManager NSGraphicsContext NSGraphicsContext Crop NSImage NSIndex NSKeyedArchiver NSKeyedUnarchiver NSLocale NSMetadataItem NSMutableArray NSMutableDictionary NSMutableString NSNotFound NSNumber NSOpenPanel NSPasteboard NSpoint NSPredicate NSRange NSRect NSRegularExpression NSRunningApplication NSScreen NSSet NSSize NSString NSString stringByApplyingTransform NSStringCompareOptions NSTask NSTimeZone NSUbiquitous NSURL NSURL File NSURLBookmark NSURLComponents NSURLResourceKey NSURLSession NSUserDefaults NSUUID NSView NSWorkspace Numbers OAuth PDF PDF Image2PDF PDF MakePDF PDF nUP PDF Pymupdf PDF Pypdf PDFContext PDFDisplayBox PDFImageRep PDFKit PDFKit Annotation PDFKit AnnotationWidget PDFKit DocumentPermissions PDFKit OCR PDFKit Outline PDFKit Start PDFPage PDFPage Rotation PDFView perl Photoshop PlistBuddy pluginkit plutil postalcode PostScript PowerShell prefPane Preview Python Python eyed3 Python pip QuickLook QuickTime ReadMe Regular Expression Reminders ReName Repeat RTF Safari SaveFile ScreenCapture ScreenSaver Script Editor Script Menu SF Symbols character id SF Symbols Entity Shortcuts Shortcuts Events sips Skype Slack Sound Spotlight sqlite StandardAdditions StationSearch Subtitles LRC Subtitles SRT Subtitles VTT Swift swiftDialog System Events System Settings TemporaryItems Terminal Text Text CSV Text MD Text TSV TextEdit Tools Translate Trash Twitter Typography UI Unit Conversion UTType valueForKeyPath Video VisionKit Visual Studio Code VMware Fusion Wacom Weather webarchive webp Wifi Windows XML XML EPUB XML HTML XML LSSharedFileList XML LSSharedFileList sfl2 XML LSSharedFileList sfl3 XML objectsForXQuery XML OPML XML Plist XML Plist System Events XML RSS XML savedSearch XML SVG XML TTML XML webloc XML xmllint XML XMP YouTube Zero Padding zoom