IDV3 tag writer?

Richard Gaskin ambassador at fourthworld.com
Wed Sep 22 21:12:44 EDT 2004


Trevor DeVore wrote:
> On Sep 22, 2004, at 5:37 PM, Trevor DeVore wrote:
> 
>> Anyone know of a library for writing idv3 tags to mp3 files?
> 
> 
> Umm, I meant id3, not idv3.

I wrote this a long time ago.  It might work:

function MP3Info pFile, pSize
   open file pFile for read
   Err the result
   read from file pFile at (pSize - 127) for 128
   put it into tInfo
   close file pFile
   if char 1 to 3 of tInfo = "TAG" then
     put char 4 to 33 of tInfo into tTitle
     put char 34 to 63 of tInfo into tArtist
     put char 64 to 93 of tInfo into tAlbum
     put tTitle &tab& tArtist &tab& tAlbum into tInfo
     return tInfo
   else return tab&tab
end MP3Info


This helps:

function FileSize pFile
   set the itemDel to "/"
   put the directory into tSaveDir
   put pFile into tDir
   put last item of pFile into tFile
   delete last item of tDir
   set the directory to tDir
   put the detailed files into tFiles
   set the directory to tSaveDir
   put lineOffset(cr&urlEncode(tFile)&",", cr&tFiles) into tLine
   if tLine > 0 then
     set the itemdel to comma
     return item 2 of line tLine of tFiles
   end if
end FileSize



--
  Richard Gaskin
  Fourth World Media Corporation
  __________________________________________________
  Rev tools and more: http://www.fourthworld.com/rev


More information about the use-livecode mailing list