- 积分
- 641
- 在线时间
- 1089 小时
- 最后登录
- 2024-3-4
- 阅读权限
- 50
- 精华
- 0
 
- UID
- 103167
- 帖子
- 769
- 精华
- 0
- 经验
- 641 点
- 金钱
- 592 ¥
- 注册时间
- 2009-5-10
|
大家应该也会像我一样,有很多专辑没有CUE文件,只能把文件一个一个拉进去,导致FOOBAR2000显示的专辑名和艺术家名都是空,甚至用cuesheet_creator.dll生成CUE文件,曲名也都是数字而已。
现我发一个能根据对"flac", ".ape", ".wav", ".dts", ".mp3", ".wma"生成CUE文件的小程序,懂编程的人还能再进行改善。这个程序主要是来自网上,我再加了点小功能。用了它,方便快捷。
使用说明:双击CreateCue_pub.vbs,然后把音乐文件所在的目录输入,点确定,程序就会把音乐文件所在文件夹名当成是专辑名和专辑艺术家名,而遇到是音乐文件属性里有写明艺术家的,程序还能列出来,方便mp3之类的音乐文件。只要不断地运行此程序,并把目录输入,就可以很快捷地把没有CUE文件的音乐文件都变成有CUE文件的专辑,方便FOOBAR2000播放与自己查找。
举例:L:\music\群星.-.[中国民歌集锦].专辑.(MP3)下的MP3:
PERFORMER "群星.-.[中国民歌集锦].专辑.(MP3)"
TITLE "群星.-.[中国民歌集锦].专辑.(MP3)"
FILE "01.采蘑菇的小姑娘.mp3" WAVE
TRACK 1 AUDIO
TITLE "01.采蘑菇的小姑娘"
PERFORMER "靳小才"
INDEX 01 00:00:00
FILE "02.歌唱农村新面貌.mp3" WAVE
TRACK 2 AUDIO
TITLE "02.歌唱农村新面貌"
PERFORMER "罗天婵"
INDEX 01 00:00:00
程序可能有些杀软会报毒,本身没事的。程序如下:
'名称:cue(索引)文件生成脚本
'功能:为分轨flac、ape、wav、dts、mp3、wma生成分轨专用cue(索引)文件
'作者:朱鹏东&钟文创
'此脚本可自由转播,但须保留以上信息。
'
'-------------------------
'Function area
Function testProfix(ByVal str1)
Dim prefix
prefix = Array("flac", ".ape", ".wav", ".dts", ".mp3", ".wma")
testProfix = False
For Each pfix In prefix
If LCase(Right(str1, 4)) = pfix Then
testProfix = True
Exit For
End If
Next
End Function
Function getFileName(ByVal file)
getFileName = Left(file, Len(file) - InStr(StrReverse(file), "."))
End Function
Function createItem(ByVal folder,ByVal file, ByVal PERFORMER, ByVal i)
createItem = "FILE """ & file & """ WAVE" & vbCrLf
createItem = createItem & " TRACK " & i & " AUDIO" & vbCrLf
createItem = createItem & " TITLE """ & getFileName(file) & """" & vbCrLf
Set oShell = CreateObject("Shell.Application")
Set oDir = oShell.NameSpace(folder+"\")
Set oFile = oDir.ParseName(file)
PERFORMER2 =oDir.GetDetailsOf(oFile,13)
If PERFORMER2 <> "" then
createItem =createItem & " PERFORMER """ & PERFORMER2 & """" & vbCrLf
End if
Set oFile = Nothing
Set oDir = Nothing
Set oShell = Nothing
'createItem = createItem & " PERFORMER """ & PERFORMER & """" & vbCrLf
createItem = createItem & " INDEX 01 00:00:00"
End Function
'--------------------------
Set fs = CreateObject("scripting.filesystemobject")
Dim PERFORMER, cueFile, Response
cueFile = "\CDImage.cue"
folder = InputBox("请输入目录,默认为当前目录", "输入目录")
If folder = "" Then
systemfolder = fs.GetFolder(CreateObject("wscript.shell").currentdirectory)
folder =systemfolder
arrFolderPath = Split(systemfolder, "\")
TITLEandPERFORMER = arrFolderPath(UBound(arrFolderPath))
Else
arrFolderPath = Split(folder, "\")
TITLEandPERFORMER = arrFolderPath(UBound(arrFolderPath))
End If
If fs.FileExists(folder & cueFile) Then
Response = MsgBox("文件" & folder & cueFile & "已经存在,按确定后退出!", vbOKOnly + vbExclamation, "错误")
Wscript.Quit
End If
Set tf = fs.opentextfile(folder & cueFile, 8, True)
strInput = TITLEandPERFORMER '去掉此句时,下面两句要启用
'strInput = InputBox("请输入艺术家,默认为文件夹名", "输入艺术家")
'If strInput = "" Then strInput = TITLEandPERFORMER
PERFORMER = strInput
tf.Writeline "PERFORMER """ & strInput & """"
strInput = TITLEandPERFORMER '去掉此句时,下面两句要启用
'strInput = InputBox("请输入专辑名称,默认为文件夹名", "输入专辑名称")
'If strInput = "" Then strInput = TITLEandPERFORMER
tf.Writeline "TITLE """ & strInput & """"
Set fd = fs.GetFolder(folder)
Set fc = fd.Files
Dim position
position = 1
For Each f1 In fc
If testProfix(f1.Name) Then
tf.Writeline createItem(folder,f1.Name, PERFORMER, position)
position = position + 1
End If
Next
'Response = MsgBox("完成生成索引文件", vbOKOnly, "完成")
程序在此:
CreateCue_pub.zip
(1.38 KB, 下载次数: 14534)
|
|