Attribute VB_Name = "modMP3" Option Explicit '============================================================================================================= ' ' modMP3 Module ' ------------- ' ' Created By : Kevin Wilson ' http://www.TheVBZone.com ( The VB Zone ) ' http://www.TheVBZone.net ( The VB Zone .net ) ' ' Created On : November 24, 2003 ' Last Update : November 24, 2003 ' ' VB Versions : 5.0 / 6.0 ' ' Requires : NOTHING ' ' Description : This module makes it easy to get and set the MP3 ID3v1 TAG's within MP3 files. This module ' does not yet have the ability to read or write MP3 ID3v2 TAG's, thought it will probibly ' do so in the future. ' ' See Also : http://www.id3.org/ ' http://www.dv.co.yu/mpgscript/mpeghdr.htm ' http://www.freevbcode.com/ShowCode.Asp?ID=1118 ' '============================================================================================================= ' ' LEGAL: ' ' You are free to use this code as long as you keep the above heading information intact and unchanged. Credit ' given where credit is due. Also, it is not required, but it would be appreciated if you would mention ' somewhere in your compiled program that that your program makes use of code written and distributed by ' Kevin Wilson (www.TheVBZone.com). Feel free to link to this code via your web site or articles. ' ' You may NOT take this code and pass it off as your own. You may NOT distribute this code on your own server ' or web site. You may NOT take code created by Kevin Wilson (www.TheVBZone.com) and use it to create products, ' utilities, or applications that directly compete with products, utilities, and applications created by Kevin ' Wilson, TheVBZone.com, or Wilson Media. You may NOT take this code and sell it for profit without first ' obtaining the written consent of the author Kevin Wilson. ' ' These conditions are subject to change at the discretion of the owner Kevin Wilson at any time without ' warning or notice. Copyright© by Kevin Wilson. All rights reserved. ' '============================================================================================================= ' Structure - MP3 ID3v1 Private Type ID3TAG Header As String * 3 Title As String * 30 Artist As String * 30 Album As String * 30 Year As String * 4 Comments As String * 30 Genre As Byte End Type ' Win32 API Declarations Private Declare Sub CopyMemory Lib "KERNEL32.DLL" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long) ' This function takes the specified MP3 file and gets the ID3v1 tags from it. Note that ID3v2 tags are different. Public Function MP3_GetID3(ByVal strFilePath As String, Optional ByVal blnErrorIfNoTag As Boolean = False, Optional ByRef Return_Title As String, Optional ByRef Return_Artist As String, Optional ByRef Return_Album As String, Optional ByRef Return_Year As String, Optional ByRef Return_GenreNumber As Byte, Optional ByRef Return_GenreName As String, Optional ByRef Return_Comments As String, Optional ByRef Return_ErrNum As Long, Optional ByRef Return_ErrSrc As String, Optional ByRef Return_ErrDesc As String) As Boolean On Error GoTo ErrorTrap Dim ID3 As ID3TAG Dim intFileNum As Integer Dim blnOpened As Boolean Dim strTemp As String ' Set default values Return_Album = "" Return_Artist = "" Return_Comments = "" Return_GenreName = "" Return_GenreNumber = 255 Return_Title = "" Return_Year = "" Return_ErrNum = 0 Return_ErrSrc = "" Return_ErrDesc = "" ' Validate the passed parameters strFilePath = Trim(strFilePath) If strFilePath = "" Then Err.Raise -1, "MP3_GetID3", "No file specified to get the ID3 tags from" ElseIf Dir(strFilePath, vbArchive Or vbHidden Or vbNormal Or vbReadOnly Or vbSystem) = "" Then Err.Raise 50, "MP3_GetID3", "[ " & strFilePath & "] Specified MP3 file was not found" ElseIf FileLen(strFilePath) < 130 Then Err.Raise -1, "MP3_GetID3", "The file specified is invalid" End If ' Open the file in binary mode and get the LAST 128 bytes from the file intFileNum = FreeFile Open strFilePath For Binary Access Read As #intFileNum blnOpened = True Get #intFileNum, LOF(1) - 127, ID3 Close #intFileNum blnOpened = False ' If the file does not contain a valid MP3 ID3v1 tag, exit If UCase(Trim(ID3.Header)) <> "TAG" Then If blnErrorIfNoTag = True Then Err.Raise -1, "MP3_GetID3", "No valid MP3 ID3v1 tags found within the specified file." Else MP3_GetID3 = True Exit Function End If End If With ID3 ' Get the ID3 tag information Return_Title = RTrim(.Title) Return_Artist = RTrim(.Artist) Return_Album = RTrim(.Album) Return_Year = RTrim(.Year) Return_Comments = RTrim(.Comments) strTemp = RTrim(.Genre) ' If there are NULLs in the string, trim them off If InStr(1, Return_Title, Chr(0)) > 0 Then Return_Title = Left(Return_Title, InStr(1, Return_Title, Chr(0)) - 1) If InStr(1, Return_Artist, Chr(0)) > 0 Then Return_Artist = Left(Return_Artist, InStr(1, Return_Artist, Chr(0)) - 1) If InStr(1, Return_Album, Chr(0)) > 0 Then Return_Album = Left(Return_Album, InStr(1, Return_Album, Chr(0)) - 1) If InStr(1, Return_Year, Chr(0)) > 0 Then Return_Year = Left(Return_Year, InStr(1, Return_Year, Chr(0)) - 1) If InStr(1, Return_Comments, Chr(0)) > 0 Then Return_Comments = Left(Return_Comments, InStr(1, Return_Comments, Chr(0)) - 1) ' Validate the GENRE code, then get the name from the code If strTemp = "" Or IsNumeric(strTemp) = False Then strTemp = 255 If CInt(strTemp) < 0 Then strTemp = 255 If strTemp > 255 Then strTemp = 255 Return_GenreNumber = CByte(strTemp) Return_GenreName = MP3_GetGenreName(Return_GenreNumber) End With ' Successfully retrieved the information MP3_GetID3 = True Exit Function ErrorTrap: Return_ErrNum = Err.Number Return_ErrSrc = Err.Source Return_ErrDesc = Err.Description Err.Clear If blnOpened = True And intFileNum > 0 Then Close #intFileNum End Function ' This function takes the specified MP3 file and updates the existing ID3v1 tags if they exist, or creates them if they don't. Public Function MP3_SetID3(ByVal strFilePath As String, ByVal strTitle As String, ByVal strArtist As String, ByVal strAlbum As String, ByVal strYear As String, ByVal strComments As String, Optional ByVal bytGenreNumber As Byte = 255, Optional ByRef Return_ErrNum As Long, Optional ByRef Return_ErrSrc As String, Optional ByRef Return_ErrDesc As String) As Boolean On Error GoTo ErrorTrap Dim abytInfo() As Byte Dim ID3 As ID3TAG Dim intFileNum As Integer Dim blnOpened As Boolean Dim blnUpdate As Boolean Dim strTemp As String Dim lngFileLen As Long ' Set default values Return_ErrNum = 0 Return_ErrSrc = "" Return_ErrDesc = "" ' Validate the passed parameters strFilePath = Trim(strFilePath) If strFilePath = "" Then Err.Raise -1, "MP3_SetID3", "No file specified to save the ID3 tags to" ElseIf Dir(strFilePath, vbArchive Or vbHidden Or vbNormal Or vbReadOnly Or vbSystem) = "" Then Err.Raise 50, "MP3_SetID3", "[ " & strFilePath & "] Specified MP3 file was not found" End If strTitle = Left(RTrim(strTitle), 30) strArtist = Left(RTrim(strArtist), 30) strAlbum = Left(RTrim(strAlbum), 30) strYear = Left(Trim(strYear), 4) strComments = Left(RTrim(strComments), 30) ' Make sure the file contains enough information to be an MP3 file lngFileLen = FileLen(strFilePath) If lngFileLen < 130 Then Err.Raise -1, "MP3_SetID3", "The file specified is invalid" End If ' Open the file in binary mode and get the file intFileNum = FreeFile ReDim abytInfo(0 To lngFileLen - 1) As Byte Open strFilePath For Binary Access Read As #intFileNum blnOpened = True Get #intFileNum, , abytInfo 'Get #intFileNum, LOF(1) - 127, ID3 Close #intFileNum blnOpened = False ' Move the last 128 bytes into our structure to test CopyMemory ID3, abytInfo(lngFileLen - 128), Len(ID3) ' If the file does not contain a valid MP3 ID3v1 tag, exit If UCase(Trim(ID3.Header)) = "TAG" Then blnUpdate = True Else blnUpdate = False End If ' Set the values to write out With ID3 .Header = "TAG" .Artist = strArtist .Album = strAlbum .Title = strTitle .Year = strYear .Genre = bytGenreNumber .Comments = strComments End With ' Copy the newly modified information back into our byte array If blnUpdate = True Then CopyMemory abytInfo(lngFileLen - 128), ID3, Len(ID3) ' Append the ID3 tag to the end of our file Else ReDim Preserve abytInfo(0 To lngFileLen + 128) As Byte CopyMemory abytInfo(lngFileLen + 1), ID3, Len(ID3) End If ' Save to a temporary file (just in case) intFileNum = FreeFile If Dir(strFilePath & "_NEW", vbArchive Or vbHidden Or vbNormal Or vbReadOnly Or vbSystem) <> "" Then Kill strFilePath & "_NEW" Open strFilePath & "_NEW" For Binary Access Write Lock Read Write As #intFileNum blnOpened = True Put #intFileNum, , abytInfo Close #intFileNum blnOpened = False ' Delete the original and copy over the temp Kill strFilePath DoEvents FileCopy strFilePath & "_NEW", strFilePath DoEvents Kill strFilePath & "_NEW" DoEvents ' Successfully saved the information MP3_SetID3 = True Exit Function ErrorTrap: Return_ErrNum = Err.Number Return_ErrSrc = Err.Source Return_ErrDesc = Err.Description Err.Clear On Error Resume Next If Dir(strFilePath & "_NEW", vbArchive Or vbHidden Or vbNormal Or vbReadOnly Or vbSystem) <> "" Then Kill strFilePath & "_NEW" Err.Clear End Function ' This function takes the given Genre code (0 - 255) and returns the name of it Public Function MP3_GetGenreName(ByVal bytCode As Byte) As String Select Case bytCode ' Standard codes Case 0: MP3_GetGenreName = "Blues" Case 1: MP3_GetGenreName = "Classic Rock" Case 2: MP3_GetGenreName = "Country" Case 3: MP3_GetGenreName = "Dance" Case 4: MP3_GetGenreName = "Disco" Case 5: MP3_GetGenreName = "Funk" Case 6: MP3_GetGenreName = "Grunge" Case 7: MP3_GetGenreName = "Hip-Hop" Case 8: MP3_GetGenreName = "Jazz" Case 9: MP3_GetGenreName = "Metal" Case 10: MP3_GetGenreName = "New Age" Case 11: MP3_GetGenreName = "Oldies" Case 12: MP3_GetGenreName = "Other" Case 13: MP3_GetGenreName = "Pop" Case 14: MP3_GetGenreName = "R&B" Case 15: MP3_GetGenreName = "Rap" Case 16: MP3_GetGenreName = "Reggae" Case 17: MP3_GetGenreName = "Rock" Case 18: MP3_GetGenreName = "Techno" Case 19: MP3_GetGenreName = "Industrial" Case 20: MP3_GetGenreName = "Alternative" Case 21: MP3_GetGenreName = "Ska" Case 22: MP3_GetGenreName = "Death Metal" Case 23: MP3_GetGenreName = "Pranks" Case 24: MP3_GetGenreName = "Soundtrack" Case 25: MP3_GetGenreName = "Euro-Techno" Case 26: MP3_GetGenreName = "Ambient" Case 27: MP3_GetGenreName = "Trip-Hop" Case 28: MP3_GetGenreName = "Vocal" Case 29: MP3_GetGenreName = "Jazz+Funk" Case 30: MP3_GetGenreName = "Fusion" Case 31: MP3_GetGenreName = "Trance" Case 32: MP3_GetGenreName = "Classical" Case 33: MP3_GetGenreName = "Instrumental" Case 34: MP3_GetGenreName = "Acid" Case 35: MP3_GetGenreName = "House" Case 36: MP3_GetGenreName = "Game" Case 37: MP3_GetGenreName = "Sound Clip" Case 38: MP3_GetGenreName = "Gospel" Case 39: MP3_GetGenreName = "Noise" Case 40: MP3_GetGenreName = "AlternRock" Case 41: MP3_GetGenreName = "Bass" Case 42: MP3_GetGenreName = "Soul" Case 43: MP3_GetGenreName = "Punk" Case 44: MP3_GetGenreName = "Space" Case 45: MP3_GetGenreName = "Meditative" Case 46: MP3_GetGenreName = "Instrumental Pop" Case 47: MP3_GetGenreName = "Instrumental Rock" Case 48: MP3_GetGenreName = "Ethnic" Case 49: MP3_GetGenreName = "Gothic" Case 50: MP3_GetGenreName = "Darkwave" Case 51: MP3_GetGenreName = "Techno-Industrial" Case 52: MP3_GetGenreName = "Electronic" Case 53: MP3_GetGenreName = "Pop-Folk" Case 54: MP3_GetGenreName = "Eurodance" Case 55: MP3_GetGenreName = "Dream" Case 56: MP3_GetGenreName = "Southern Rock" Case 57: MP3_GetGenreName = "Comedy" Case 58: MP3_GetGenreName = "Cult" Case 59: MP3_GetGenreName = "Gangsta" Case 60: MP3_GetGenreName = "Top 40" Case 61: MP3_GetGenreName = "Christian Rap" Case 62: MP3_GetGenreName = "Pop/Funk" Case 63: MP3_GetGenreName = "Jungle" Case 64: MP3_GetGenreName = "Native American" Case 65: MP3_GetGenreName = "Cabaret" Case 66: MP3_GetGenreName = "New Wave" Case 67: MP3_GetGenreName = "Psychadelic" Case 68: MP3_GetGenreName = "Rave" Case 69: MP3_GetGenreName = "Showtunes" Case 70: MP3_GetGenreName = "Trailer" Case 71: MP3_GetGenreName = "Lo-Fi" Case 72: MP3_GetGenreName = "Tribal" Case 73: MP3_GetGenreName = "Acid Punk" Case 74: MP3_GetGenreName = "Acid Jazz" Case 75: MP3_GetGenreName = "Polka" Case 76: MP3_GetGenreName = "Retro" Case 77: MP3_GetGenreName = "Musical" Case 78: MP3_GetGenreName = "Rock & Roll" Case 79: MP3_GetGenreName = "Hard Rock" ' WinAmp expanded this table with next codes Case 80: MP3_GetGenreName = "Folk" Case 81: MP3_GetGenreName = "Folk-Rock" Case 82: MP3_GetGenreName = "National Folk" Case 83: MP3_GetGenreName = "Swing" Case 84: MP3_GetGenreName = "Fast Fusion" Case 85: MP3_GetGenreName = "Bebob" Case 86: MP3_GetGenreName = "Latin" Case 87: MP3_GetGenreName = "Revival" Case 88: MP3_GetGenreName = "Celtic" Case 89: MP3_GetGenreName = "Bluegrass" Case 90: MP3_GetGenreName = "Avantgarde" Case 91: MP3_GetGenreName = "Gothic Rock" Case 92: MP3_GetGenreName = "Progressive Rock" Case 93: MP3_GetGenreName = "Psychedelic Rock" Case 94: MP3_GetGenreName = "Symphonic Rock" Case 95: MP3_GetGenreName = "Slow Rock" Case 96: MP3_GetGenreName = "Big Band" Case 97: MP3_GetGenreName = "Chorus" Case 98: MP3_GetGenreName = "Easy Listening" Case 99: MP3_GetGenreName = "Acoustic" Case 100: MP3_GetGenreName = "Humour" Case 101: MP3_GetGenreName = "Speech" Case 102: MP3_GetGenreName = "Chanson" Case 103: MP3_GetGenreName = "Opera" Case 104: MP3_GetGenreName = "Chamber Music" Case 105: MP3_GetGenreName = "Sonata" Case 106: MP3_GetGenreName = "Symphony" Case 107: MP3_GetGenreName = "Booty Brass" Case 108: MP3_GetGenreName = "Primus" Case 109: MP3_GetGenreName = "Porn Groove" Case 110: MP3_GetGenreName = "Satire" Case 111: MP3_GetGenreName = "Slow Jam" Case 112: MP3_GetGenreName = "Club" Case 113: MP3_GetGenreName = "Tango" Case 114: MP3_GetGenreName = "Samba" Case 115: MP3_GetGenreName = "Folklore" Case 116: MP3_GetGenreName = "Ballad" Case 117: MP3_GetGenreName = "Poweer Ballad" Case 118: MP3_GetGenreName = "Rhytmic Soul" Case 119: MP3_GetGenreName = "Freestyle" Case 120: MP3_GetGenreName = "Duet" Case 121: MP3_GetGenreName = "Punk Rock" Case 122: MP3_GetGenreName = "Drum Solo" Case 123: MP3_GetGenreName = "A Capela" Case 124: MP3_GetGenreName = "Euro-House" Case 125: MP3_GetGenreName = "Dance Hall" Case Else: MP3_GetGenreName = "Unknown" End Select End Function Public Function MP3_GetGenreCode(ByVal strName As String) As Byte Select Case LCase(Trim(strName)) ' Standard Codes Case "blues": MP3_GetGenreCode = 0 Case "classic rock": MP3_GetGenreCode = 1 Case "country": MP3_GetGenreCode = 2 Case "dance": MP3_GetGenreCode = 3 Case "disco": MP3_GetGenreCode = 4 Case "funk": MP3_GetGenreCode = 5 Case "grunge": MP3_GetGenreCode = 6 Case "hip-hop": MP3_GetGenreCode = 7 Case "jazz": MP3_GetGenreCode = 8 Case "metal": MP3_GetGenreCode = 9 Case "new age": MP3_GetGenreCode = 10 Case "oldies": MP3_GetGenreCode = 11 Case "other": MP3_GetGenreCode = 12 Case "pop": MP3_GetGenreCode = 13 Case "r&b": MP3_GetGenreCode = 14 Case "rap": MP3_GetGenreCode = 15 Case "reggae": MP3_GetGenreCode = 16 Case "rock": MP3_GetGenreCode = 17 Case "techno": MP3_GetGenreCode = 18 Case "industrial": MP3_GetGenreCode = 19 Case "alternative": MP3_GetGenreCode = 20 Case "ska": MP3_GetGenreCode = 21 Case "death metal": MP3_GetGenreCode = 22 Case "pranks": MP3_GetGenreCode = 23 Case "soundtrack": MP3_GetGenreCode = 24 Case "euro-techno": MP3_GetGenreCode = 25 Case "ambient": MP3_GetGenreCode = 26 Case "trip-hop": MP3_GetGenreCode = 27 Case "vocal": MP3_GetGenreCode = 28 Case "jazz+funk": MP3_GetGenreCode = 29 Case "fusion": MP3_GetGenreCode = 30 Case "trance": MP3_GetGenreCode = 31 Case "classical": MP3_GetGenreCode = 32 Case "instrumental": MP3_GetGenreCode = 33 Case "acid": MP3_GetGenreCode = 34 Case "house": MP3_GetGenreCode = 35 Case "game": MP3_GetGenreCode = 36 Case "sound clip": MP3_GetGenreCode = 37 Case "gospel": MP3_GetGenreCode = 38 Case "noise": MP3_GetGenreCode = 39 Case "alternrock": MP3_GetGenreCode = 40 Case "bass": MP3_GetGenreCode = 41 Case "soul": MP3_GetGenreCode = 42 Case "punk": MP3_GetGenreCode = 43 Case "space": MP3_GetGenreCode = 44 Case "meditative": MP3_GetGenreCode = 45 Case "instrumental pop": MP3_GetGenreCode = 46 Case "instrumental rock": MP3_GetGenreCode = 47 Case "ethnic": MP3_GetGenreCode = 48 Case "gothic": MP3_GetGenreCode = 49 Case "darkwave": MP3_GetGenreCode = 50 Case "techno-industrial": MP3_GetGenreCode = 51 Case "electronic": MP3_GetGenreCode = 52 Case "pop-folk": MP3_GetGenreCode = 53 Case "eurodance": MP3_GetGenreCode = 54 Case "dream": MP3_GetGenreCode = 55 Case "southern rock": MP3_GetGenreCode = 56 Case "comedy": MP3_GetGenreCode = 57 Case "cult": MP3_GetGenreCode = 58 Case "gangsta": MP3_GetGenreCode = 59 Case "top 40": MP3_GetGenreCode = 60 Case "christian rap": MP3_GetGenreCode = 61 Case "pop/funk": MP3_GetGenreCode = 62 Case "jungle": MP3_GetGenreCode = 63 Case "native american": MP3_GetGenreCode = 64 Case "cabaret": MP3_GetGenreCode = 65 Case "new wave": MP3_GetGenreCode = 66 Case "psychadelic": MP3_GetGenreCode = 67 Case "rave": MP3_GetGenreCode = 68 Case "showtunes": MP3_GetGenreCode = 69 Case "trailer": MP3_GetGenreCode = 70 Case "lo-fi": MP3_GetGenreCode = 71 Case "tribal": MP3_GetGenreCode = 72 Case "acid punk": MP3_GetGenreCode = 73 Case "acid jazz": MP3_GetGenreCode = 74 Case "polka": MP3_GetGenreCode = 75 Case "retro": MP3_GetGenreCode = 76 Case "musical": MP3_GetGenreCode = 77 Case "rock & roll": MP3_GetGenreCode = 78 Case "hard rock": MP3_GetGenreCode = 79 ' WinAmp expanded this table with next codes Case "folk": MP3_GetGenreCode = 80 Case "folk-rock": MP3_GetGenreCode = 81 Case "national folk": MP3_GetGenreCode = 82 Case "swing": MP3_GetGenreCode = 83 Case "fast fusion": MP3_GetGenreCode = 84 Case "bebob": MP3_GetGenreCode = 85 Case "latin": MP3_GetGenreCode = 86 Case "revival": MP3_GetGenreCode = 87 Case "celtic": MP3_GetGenreCode = 88 Case "bluegrass": MP3_GetGenreCode = 89 Case "avantgarde": MP3_GetGenreCode = 90 Case "gothic rock": MP3_GetGenreCode = 91 Case "progressive rock": MP3_GetGenreCode = 92 Case "psychedelic rock": MP3_GetGenreCode = 93 Case "symphonic rock": MP3_GetGenreCode = 94 Case "slow rock": MP3_GetGenreCode = 95 Case "big band": MP3_GetGenreCode = 96 Case "chorus": MP3_GetGenreCode = 97 Case "easy listening": MP3_GetGenreCode = 98 Case "acoustic": MP3_GetGenreCode = 99 Case "humour": MP3_GetGenreCode = 100 Case "speech": MP3_GetGenreCode = 101 Case "chanson": MP3_GetGenreCode = 102 Case "opera": MP3_GetGenreCode = 103 Case "chamber music": MP3_GetGenreCode = 104 Case "sonata": MP3_GetGenreCode = 105 Case "symphony": MP3_GetGenreCode = 106 Case "booty brass": MP3_GetGenreCode = 107 Case "primus": MP3_GetGenreCode = 108 Case "porn groove": MP3_GetGenreCode = 109 Case "satire": MP3_GetGenreCode = 110 Case "slow jam": MP3_GetGenreCode = 111 Case "club": MP3_GetGenreCode = 112 Case "tango": MP3_GetGenreCode = 113 Case "samba": MP3_GetGenreCode = 114 Case "folklore": MP3_GetGenreCode = 115 Case "ballad": MP3_GetGenreCode = 116 Case "poweer ballad": MP3_GetGenreCode = 117 Case "rhytmic soul": MP3_GetGenreCode = 118 Case "freestyle": MP3_GetGenreCode = 119 Case "duet": MP3_GetGenreCode = 120 Case "punk rock": MP3_GetGenreCode = 121 Case "drum solo": MP3_GetGenreCode = 122 Case "a capela": MP3_GetGenreCode = 123 Case "euro-house": MP3_GetGenreCode = 124 Case "dance hall": MP3_GetGenreCode = 125 Case Else: MP3_GetGenreCode = 255 End Select End Function ' This function takes the specified ComboBox or ListBox and populates it with the Genre's in alphabetical order (encoding the Genre code into the .ListData property) Public Function MP3_FillComboBox(ByRef objComboBox As Object) As Boolean On Error GoTo ErrorTrap objComboBox.Clear With objComboBox .AddItem "A Capela": .ItemData(0) = 123 .AddItem "Acid": .ItemData(1) = 34 .AddItem "Acid Jazz": .ItemData(2) = 74 .AddItem "Acid Punk": .ItemData(3) = 73 .AddItem "Acoustic": .ItemData(4) = 99 .AddItem "Alternative": .ItemData(5) = 20 .AddItem "AlternRock": .ItemData(6) = 40 .AddItem "Ambient": .ItemData(7) = 26 .AddItem "Avantgarde": .ItemData(8) = 90 .AddItem "Ballad": .ItemData(9) = 116 .AddItem "Bass": .ItemData(10) = 41 .AddItem "Bebob": .ItemData(11) = 85 .AddItem "Big Band": .ItemData(12) = 96 .AddItem "Bluegrass": .ItemData(13) = 89 .AddItem "Blues": .ItemData(14) = 0 .AddItem "Booty Brass": .ItemData(15) = 107 .AddItem "Cabaret": .ItemData(16) = 65 .AddItem "Celtic": .ItemData(17) = 88 .AddItem "Chamber Music": .ItemData(18) = 104 .AddItem "Chanson": .ItemData(19) = 102 .AddItem "Chorus": .ItemData(20) = 97 .AddItem "Christian Rap": .ItemData(21) = 61 .AddItem "Classic Rock": .ItemData(22) = 1 .AddItem "Classical": .ItemData(23) = 32 .AddItem "Club": .ItemData(24) = 112 .AddItem "Comedy": .ItemData(25) = 57 .AddItem "Country": .ItemData(26) = 2 .AddItem "Cult": .ItemData(27) = 58 .AddItem "Dance": .ItemData(28) = 3 .AddItem "Dance Hall": .ItemData(29) = 125 .AddItem "Darkwave": .ItemData(30) = 50 .AddItem "Death Metal": .ItemData(31) = 22 .AddItem "Disco": .ItemData(32) = 4 .AddItem "Dream": .ItemData(33) = 55 .AddItem "Drum Solo": .ItemData(34) = 122 .AddItem "Duet": .ItemData(35) = 120 .AddItem "Easy Listening": .ItemData(36) = 98 .AddItem "Electronic": .ItemData(37) = 52 .AddItem "Ethnic": .ItemData(38) = 48 .AddItem "Eurodance": .ItemData(39) = 54 .AddItem "Euro-House": .ItemData(40) = 124 .AddItem "Euro-Techno": .ItemData(41) = 25 .AddItem "Fast Fusion": .ItemData(42) = 84 .AddItem "Folk": .ItemData(43) = 80 .AddItem "Folklore": .ItemData(44) = 115 .AddItem "Folk-Rock": .ItemData(45) = 81 .AddItem "Freestyle": .ItemData(46) = 119 .AddItem "Funk": .ItemData(47) = 5 .AddItem "Fusion": .ItemData(48) = 30 .AddItem "Game": .ItemData(49) = 36 .AddItem "Gangsta": .ItemData(50) = 59 .AddItem "Gospel": .ItemData(51) = 38 .AddItem "Gothic": .ItemData(52) = 49 .AddItem "Gothic Rock": .ItemData(53) = 91 .AddItem "Grunge": .ItemData(54) = 6 .AddItem "Hard Rock": .ItemData(55) = 79 .AddItem "Hip-Hop": .ItemData(56) = 7 .AddItem "House": .ItemData(57) = 35 .AddItem "Humour": .ItemData(58) = 100 .AddItem "Industrial": .ItemData(59) = 19 .AddItem "Instrumental": .ItemData(60) = 33 .AddItem "Instrumental Pop": .ItemData(61) = 46 .AddItem "Instrumental Rock": .ItemData(62) = 47 .AddItem "Jazz": .ItemData(63) = 8 .AddItem "Jazz+Funk": .ItemData(64) = 29 .AddItem "Jungle": .ItemData(65) = 63 .AddItem "Latin": .ItemData(66) = 86 .AddItem "Lo-Fi": .ItemData(67) = 71 .AddItem "Meditative": .ItemData(68) = 45 .AddItem "Metal": .ItemData(69) = 9 .AddItem "Musical": .ItemData(70) = 77 .AddItem "National Folk": .ItemData(71) = 82 .AddItem "Native American": .ItemData(72) = 64 .AddItem "New Age": .ItemData(73) = 10 .AddItem "New Wave": .ItemData(74) = 66 .AddItem "Noise": .ItemData(75) = 39 .AddItem "Oldies": .ItemData(76) = 11 .AddItem "Opera": .ItemData(77) = 103 .AddItem "Other": .ItemData(78) = 12 .AddItem "Polka": .ItemData(79) = 75 .AddItem "Pop": .ItemData(80) = 13 .AddItem "Pop/Funk": .ItemData(81) = 62 .AddItem "Pop-Folk": .ItemData(82) = 53 .AddItem "Porn Groove": .ItemData(83) = 109 .AddItem "Poweer Ballad": .ItemData(84) = 117 .AddItem "Pranks": .ItemData(85) = 23 .AddItem "Primus": .ItemData(86) = 108 .AddItem "Progressive Rock": .ItemData(87) = 92 .AddItem "Psychadelic": .ItemData(88) = 67 .AddItem "Psychedelic Rock": .ItemData(89) = 93 .AddItem "Punk": .ItemData(90) = 43 .AddItem "Punk Rock": .ItemData(91) = 121 .AddItem "R&B": .ItemData(92) = 14 .AddItem "Rap": .ItemData(93) = 15 .AddItem "Rave": .ItemData(94) = 68 .AddItem "Reggae": .ItemData(95) = 16 .AddItem "Retro": .ItemData(96) = 76 .AddItem "Revival": .ItemData(97) = 87 .AddItem "Rhytmic Soul": .ItemData(98) = 118 .AddItem "Rock": .ItemData(99) = 17 .AddItem "Rock & Roll": .ItemData(100) = 78 .AddItem "Samba": .ItemData(101) = 114 .AddItem "Satire": .ItemData(102) = 110 .AddItem "Showtunes": .ItemData(103) = 69 .AddItem "Ska": .ItemData(104) = 21 .AddItem "Slow Jam": .ItemData(105) = 111 .AddItem "Slow Rock": .ItemData(106) = 95 .AddItem "Sonata": .ItemData(107) = 105 .AddItem "Soul": .ItemData(108) = 42 .AddItem "Sound Clip": .ItemData(109) = 37 .AddItem "Soundtrack": .ItemData(110) = 24 .AddItem "Southern Rock": .ItemData(111) = 56 .AddItem "Space": .ItemData(112) = 44 .AddItem "Speech": .ItemData(113) = 101 .AddItem "Swing": .ItemData(114) = 83 .AddItem "Symphonic Rock": .ItemData(115) = 94 .AddItem "Symphony": .ItemData(116) = 106 .AddItem "Tango": .ItemData(117) = 113 .AddItem "Techno": .ItemData(118) = 18 .AddItem "Techno-Industrial": .ItemData(119) = 51 .AddItem "Top 40": .ItemData(120) = 60 .AddItem "Trailer": .ItemData(121) = 70 .AddItem "Trance": .ItemData(122) = 31 .AddItem "Tribal": .ItemData(123) = 72 .AddItem "Trip-Hop": .ItemData(124) = 27 .AddItem "Unknown": .ItemData(125) = 255 .AddItem "Vocal": .ItemData(126) = 28 End With MP3_FillComboBox = True Exit Function ErrorTrap: Err.Clear End Function