Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading id3v2 tags?

Status
Not open for further replies.

fenris

Programmer
May 20, 1999
824
CA
Does anybody know how to read these?

Troy Williams B.Eng.
fenris@hotmail.com

 
id3v2 tags belong to mp3, it is the format that allows meta data to be stored along side the music data. I can read id3v1 tags, but id3v2 are an entirely different animal.

Troy Williams B.Eng.
fenris@hotmail.com

 
'Place a command button and a text box on a form
'Remove Text1 from the Text property
'Set the Text box to multiline and scrollbars to both
'Place everything belwo into the click event of Command1


Dim fNum As Integer
Dim sTagIdent As String * 3
Dim sTitle As String * 30
Dim sArtist As String * 30
Dim sAlbum As String * 30
Dim sYear As String * 4
Dim sComment As String * 30
fNum = FreeFile

'Change this to your file path
Open "D:\Inetpub\Visual Basic\VectorTop10\1.mp3" For Binary As fNum

Seek #fNum, LOF(fNum) - 127
Get #fNum, , sTagIdent
If sTagIdent = "TAG" Then
Get #fNum, , sTitle
Get #fNum, , sArtist
Get #fNum, , sAlbum
Get #fNum, , sYear
Get #fNum, , sComment
End If
Close #fNum

'This will display the info into a text box, in this case named Text1.Text
Text1.Text = sTitle & "," & sArtist & "," & sAlbum & "," & sYear & "," & sComment


'This next one displays a msgbox with the ID info, jsy remove the comment tag
'MsgBox sTitle & "," & sArtist & "," & sAlbum & "," & sYear & "," & sComment -
radium.gif

Looking Toward The Future
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top