Results 1 to 4 of 4

Thread: MP3 Files

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2000
    Posts
    18

    Lightbulb

    How do I get information from a MP3 file..
    like the ID3 tag, the amount of KB/s and the frequency...
    all that....

    Thanx
    Raz.
    Da illest G in da room

  2. #2
    Lively Member
    Join Date
    Sep 2000
    Location
    NC, USA
    Posts
    102

  3. #3
    Addicted Member Michel Jr's Avatar
    Join Date
    Jan 2000
    Location
    Brazil
    Posts
    175

    Wink

    Hi,

    Take a look at http://www.planet-source-code.com
    Search for MP3 or something else.
    There is a big chance you get some code about this...

    Have fun...

  4. #4
    Guest
    ID3 Tags

    Code:
    'Author: kedaman (i think)
    'Origin: http://forums.vb-world.net
    'Purpose: Get MP3 ID3 Tags
    'Version: VB5/VB6
    
    Sub ID3splitTAG(ID3TAG, ID3Title, ID3Artist, ID3Album, ID3Year, ID3Comment, ID3Genre)
        If Left(ID3TAG, 3) = "TAG" Then
            ID3Title = RTrim(Mid(ID3TAG, 4, 30))
            ID3Artist = RTrim(Mid(ID3TAG, 34, 30))
            ID3Album = RTrim(Mid(ID3TAG, 64, 30))
            ID3Year = Val(RTrim(Mid(ID3TAG, 94, 4)))
            ID3Comment = RTrim(Mid(ID3TAG, 98, 30))
            ID3Genre = Val(Asc(Mid(ID3TAG, 128, 1)))
        End If
    End Sub
    Function ID3createTAG(ID3Title, ID3Artist, ID3Album, ID3Year, ID3Comment, ID3Genre)
        ID3createTAG = "TAG" & Left(ID3Title & Space(30), 30) & Left(ID3Artist & Space(30), 30) & Left(ID3Album & Space(30), 30) & Left(ID3Year & Space(4), 4) & Left(ID3Comment & Space(30), 30) & Chr(Val(ID3Genre))
    End Function
    Function ID3getTAG(filename As String) As String
        Dim astring As String * 128
        ff = FreeFile
        Open filename For Binary As ff
            Get ff, LOF(ff) - 127, astring
        Close ff
        ID3getTAG = astring
    End Function
    Sub ID3setTAG(filename As String, aTAG As String)
        Dim astring As String * 128: astring = aTAG
        ff = FreeFile
        Open filename For Binary As ff
            If Left(ID3getTAG(filename), 3) = "TAG" Then
                Put ff, LOF(ff) - 127, astring
            Else
                Put ff, LOF(ff) + 1, astring
            End If
        Close ff
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width