Modify MP3 ID3 Tag info

lcarvaja

New member
Local time
Today, 22:57
Joined
Feb 22, 2002
Messages
6
Do you know how can one modify ID3 Tag info of MP3 files from Access?
 
I'm working on one right now... there's a thread in here somewhere that was started a week or so ago that go me addicted to the task & I've been working on it in my spare time (which amounts to roughly 10 minutes a week!). I'll post a full module once I'm finished,hopefully it won't take too much longer.
 
Great! I´ll be waiting..

So far, I have only been able to READ tag info from MP3 files but had no success when trying to modify it and WRITE it back..

Thx jatfill.
smile.gif
 
Here's a piece to play around with in the meantime, I might be able to speed up work considerably if you guys are all working on it as well.

The purpose of this code is to create a new, blank ID3v1 tag into an mp3 file that has no tag at all. Eventally it will just be a piece to a larger module, but I built it independently so I could test it.

Anyone who sees any improvements or problems with this, I'm very new to file I/O so I'd love to hear some suggestions

Code:
Public Function NewID3(strFileName As String)
    
On Error GoTo ErrHandler

    Dim newData As String
    Dim curdata As String
    
        
    
    readfileNum = FreeFile
    writeFileNum = FreeFile
    curdata = String(FileLen(strFileName), Chr(0)) 'Buffer
    
    
        Open strFileName For Binary As #readfileNum
        Get #readfileNum, 1, curdata
        Close #readfileNum
    
    If Left(Right(curdata, 128), 3) = "TAG" Then
        MsgBox strFileName & " already contains ID3 information.", vbOKOnly, "Unable to Write"
        Exit Function
    End If
            
            newData = "TAG" & String(125, Chr(0))
            Open strFileName For Binary As #writeFileNum
                Put #writeFileNum, FileLen(strFileName) + 1, newData
            Close #writeFileNum
            
ErrHandler:
    Close #readfileNum
    Close #writeFileNum
    MsgBox Err.Description, , Err.Number
    Exit Function
    
    
End Function
 

Users who are viewing this thread

Back
Top Bottom