Results 1 to 6 of 6

Thread: best way to do this...

  1. #1

    Thread Starter
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111

    Post

    at the end of every mp3 file is it's TAG tells you various info about the mp3...
    how would I go about getting this info?
    it looks something like this:
    ---
    TAGFireStarter Prodigy Fat o' The land! 1999Digital's a FireStarter! 
    ---
    Thanks

    ------------------
    DiGiTaIErRoR

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Tags are saved as last 128 bytes in the MP3 file.
    Code:
        Dim strPath As String
        Dim intFFN As Integer
        Dim strBuffer As String
        Dim lngRec As Long
        Dim strTitle As String
        Dim strArtist As String
        Dim strAlbum As String
        Dim strMsg As String
        
        strPath = "C:\MyMp.mp3"
        intFFN = FreeFile
        Open strPath For Binary As intFFN
        lngRec = LOF(intFFN) - 128
        strBuffer = Space(128)
        Get #intFFN, lngRec, strBuffer
        Close #intFFN
        strTitle = Mid(strBuffer, InStr(strBuffer, "TAG") + 3, 30)
        strArtist = Trim(Mid(strBuffer, 31, 30))
        strAlbum = Trim(Mid(strBuffer, 61, 30))
        strMsg = "Title: " & strTitle & vbCrLf
        strMsg = strMsg & "Artist: " & strArtist & vbCrLf
        strMsg = strMsg & "Album: " & strAlbum
        MsgBox strMsg

    ------------------

    Serge

    Programmer Analyst
    [email protected]
    [email protected]
    ICQ#: 51055819


  3. #3
    Junior Member
    Join Date
    Jun 1999
    Location
    Victoria, Australia
    Posts
    23

    Post


    just wondering is there a way that u can edit and save the mp3 tag thru a vb app???

    ------------------

  4. #4
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    Post

    Read in the entire file, edit the bit you are interested in, write file back out again. Simple..?

    ------------------
    - Chris
    [email protected]
    If it ain't broke - don't fix it

  5. #5
    Guest

    Post

    serge that code doens't work when i run it

  6. #6
    Junior Member
    Join Date
    Jan 2000
    Location
    MFAU
    Posts
    19

    Post

    maybe his code doesnt work exactly, but he told you all you need to know to make your own, just read the file, and experiment till you get it right

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