EyeDee3 Tags

BlitzPlus Forums/BlitzPlus Programming/EyeDee3 Tags

thelizardking(Posted 2006) [#1]
Hi everybody,
I need a free ID3 Tag Editor DLL for BlitzPlus.
In case you don't know what a ID3 Tag is, then go away. lol jk a ID3 Tag is the info for a song file (e.g., Title, Artist, Album, ect.) I would really like a DLL for this. If you find one, PLZ post it here.
tnxs


Andres(Posted 2006) [#2]
It's very easy to modify ID3v1 with blitz's own I/O functions.


Andres(Posted 2006) [#3]
Here's a function for reading ID3v1 tags:

Function ReadID3v1Tag$(path$, tag%)
	Local file% = ReadFile(path$), char%, result$ = "", bytes% = 0
	If file%
		SeekFile(file%, FileSize(path$) - 125)
		
		Select tag%
			Case 0
				SeekFile(file%, FilePos(file%) - 3)
				bytes% = 3
			Case 1 ; Title
				SeekFile(file%, FilePos(file%) + 0)
				bytes% = 30
			Case 2 ; Artist
				SeekFile(file%, FilePos(file%) + 30)
				bytes% = 30
			Case 3 ; Album
				SeekFile(file%, FilePos(file%) + 60)
				bytes% = 30
			Case 4 ; Year
				SeekFile(file%, FilePos(file%) + 90)
				bytes% = 4
			Case 5 ; Comment
				SeekFile(file%, FilePos(file%) + 94)
				bytes% = 30
			Case 6 ; Genre
				SeekFile(file%, FilePos(file%) + 124)
				bytes% = 1
		End Select
		
		For i = 0 To bytes% - 1
			char% = ReadByte(file%)
			If char% = 0 Then Exit
			result$ = result$ + Chr(char%)
		Next
		CloseFile(file%)
		Return result$
	EndIf
End Function


If ID3v1 tags exist then ReadID3v1Tag$(path$, 0) = "TAG"


plash(Posted 2006) [#4]
How about creation date and whatnot?


Andres(Posted 2006) [#5]
The fourth field?


plash(Posted 2006) [#6]
I meant like in a normal file's creation date..


kfprimm(Posted 2006) [#7]
creation date is not a ID3 tag its standard on any file


plash(Posted 2006) [#8]
OK. How do you get it in Blitz?


thelizardking(Posted 2006) [#9]
Very cool Andres! Thnxs! Works perfect! (Except genre)


Andres(Posted 2006) [#10]
Genre works too, but you just need to know what each byte represents.