|
-
May 26th, 2000, 06:15 AM
#1
Thread Starter
Member
Hey Fellow Programmers:
Is there a way I can extract ID3 tags from MP3s using VB? Like Album, Artist, Genre, Comments??
Please help...thanks
-
May 26th, 2000, 06:40 AM
#2
transcendental analytic
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 26th, 2000, 07:16 AM
#3
Thread Starter
Member
Thank you very much Kadaman!! That was much appreciated.
I was wondering if there was a way I could make the program search for all MP3 files in a directory and look extract the ID3 tag from each one into a file or database?
-
May 26th, 2000, 07:35 AM
#4
transcendental analytic
You could use the dir function to retrieve the files, or the fso object
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 26th, 2000, 07:37 AM
#5
Thread Starter
Member
thanks
I have a question about your code
Before splitting up the ID3TAG into various parts, I just tried to show ID3TAG in a label. It didn't work. How do I see the contects of 'astring' or hte variable ID3TAG?
-
May 26th, 2000, 07:48 AM
#6
transcendental analytic
it's probably a nullchar there blocking the content, or maybe the text disappeared on another line in the label, it's a bit hard to tell you from here. Try to break somewhere and put ?id3tag in your immediate box
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 28th, 2000, 07:39 AM
#7
Thread Starter
Member
ok, I got it to read any mp3 file i select and show my the Id3tag.
Now my second question is how can i select a directory, and make hte program search thru the directory for all mp3 files and read their ID3tag and put it in a database?
I know i have to use a loop, but i'm not sure as to how to check for any file that ends in *.mp3 and check it's id3tag?
-
May 28th, 2000, 04:29 PM
#8
transcendental analytic
Code:
a=dir(path & "\*.mp3"
do while len(a)
If Left(ID3TAG(a), 3) = "TAG" Then ...
a=dir
loop
Ok, this will retrieve the all the mp3files from your path, and put them into a database where the "..." are
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 28th, 2000, 08:19 PM
#9
Thread Starter
Member
thanks a lot Kedaman!
Just wondering but how did you know what the offsets are to get the information from the ID3 tag? Like which part shows the artist, album and stuff?
Also that file finding code you gave, does it work with subdirectories too? Or just one level?
Thanks again. I'll try out the code when I get home.
-
May 28th, 2000, 09:57 PM
#10
transcendental analytic
I was hexaediting a mp3 file when i suddenly noticed that there was text stored in the end of the file. So i made my first ID3Tag editor.
No it doesn't work with subdirs i have posted the code somewhere recently, go search for it
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 2nd, 2000, 03:40 AM
#11
New Member
Hex editing an mp3? what in god's name for?
greetings,
of what use exactly is the raw hex of an mp3? not meaning to be critical, but it intrigues me. what's in there that's recognizeable?
on a semi topic related note, would this code still work if the mp3 were in use (ie: playing) and can you write to the ID3 tag in this fashion?
while broken = true do
hit it
loop
-
Jun 2nd, 2000, 05:37 AM
#12
transcendental analytic
Heh, i actually didn't get anything of it, i just was testrunning my own hexaeditor on it. The mp3 encryption is evil. No, you can't change the running mp3, at least if it's playing or even paused in winamp. But i've got around that problem
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 2nd, 2001, 06:37 PM
#13
New Member
hey madd indian, maybe this snippet is of some use
(recursing subdirectories looking for mp3s...)
'just some helpfuncs...
Private Function fileSuffix(fileName As String) As String
Dim Index As Integer
Index = InStrRev(fileName, ".")
fileSuffix = Mid(fileName, Index, 4)
End Function
Private Function removeSuffix(fileName As String) As String
Dim Index As Integer
Index = InStrRev(fileName, ".")
removeSuffix = Left(fileName, Index - 1)
End Function
Private Function addDir(path As String)
Dim fileName As String
fileName = Dir$(path + "\*.mp3")
Do While fileName <> ""
If fileSuffix(fileName) = ".mp3" Then
Call addToMp3s(path, fileName)
End If
fileName = Dir$
Loop
End Function
Private Function recurseSubdirectories(path As String)
Dim subDirs() As String
Dim nofSubdirs As Integer
Dim directory As String
Dim i As Integer
displayInStatusBar ("Searching in " + path + "\")
Call addDir(path)
nofSubdirs = 0
directory = Dir$(path + "\", vbDirectory)
Do While directory <> ""
If (GetAttr(path + "\" + directory) And vbDirectory) = vbDirectory Then
If directory <> "." And directory <> ".." Then
ReDim Preserve subDirs(nofSubdirs + 1)
subDirs(nofSubdirs) = directory
nofSubdirs = nofSubdirs + 1
End If
End If
directory = Dir$
Loop
For i = 0 To nofSubdirs - 1
Call recurseSubdirectories(path + "\" + subDirs(i))
Next i
Erase subDirs
End Function
-
May 2nd, 2001, 06:51 PM
#14
Lively Member
Just for info a great place to get information about the format of ANY (almost) file is at http://www.wotsit.org/ for MP#'s specifically http://www.wotsit.org/search.asp?page=5&s=music
This place rocks
Zevlag
Josh -- Name
Zevlag13 -- AIM
www.WotsIt.org for all your file format spec questions!
-
May 3rd, 2001, 02:00 AM
#15
transcendental analytic
note, it's been 11 months since he got what he wanted.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|