View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
external usenet poster
 
Posts: 1,236
Default MP3 ID3 API Calls for excel

I don't know a lot about MP3 tags except that they occupy the last 128 bytes
of an mp3.

I did some Google searching and found the offsets. It seems to work.

Type MP3Tag
ID As String * 3
Title As String * 30
Artist As String * 30
Album As String * 30
Year As String * 4
Comment As String * 28
ID3Tag As Byte
TrackNumber As Byte
End Type

Sub test()
Const cRecordLen = 128
Dim strFile As String, lngFileLen As Long
Dim tag As MP3Tag, intFF As Integer

strFile = "C:\MP3\Prodigy - Always Outnumbered Never Outgunned\06 -
Prodigy - Wake Up Call.mp3"
lngFileLen = FileLen(strFile)

intFF = FreeFile
Open strFile For Binary Access Read As intFF

Get intFF, lngFileLen - cRecordLen + 1, tag

If tag.ID = "TAG" Then
Debug.Print tag.Album; Tab; tag.TrackNumber; Tab; tag.Title
End If

Close intFF
End Sub


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Chad Cameron" wrote in message
...
I am trying to setup a sheet that has filenames, ID3 info fr all my MP3's.
Does anyone know of a site that can provide API info for ID3 tags? or a
way to get the info into excel?

Thanks
Chad