Re: MP3 artist and albumn listing
AFAIK you're only limited by available memory. In other words, you should be able to store some big, big strings in a variable.
The bigger the string, the slower it is to work with, of course, so don't go storing 10 megabytes of text in a variable unless you really, really need to. [img]/ubbthreads/images/icons/wink.gif[/img]
Announcement
Collapse
No announcement yet.
MP3 artist and albumn listing
Collapse
X
-
Re: MP3 artist and albumn listing
One last question, what is my limit on the length of my variable's content?
Leave a comment:
-
Re: MP3 artist and albumn listing
I will try these suggestions this evening. Thanks guys!
Leave a comment:
-
Re: MP3 artist and albumn listing
Oh, and if you want to include newlines, use the special #ASC_# design-time constants. (Search this forum for #ASC_CR# for more info.)
Leave a comment:
-
Re: MP3 artist and albumn listing
Instead of using InsertLine inside the loop, try storing the lines in variables, and then output the variables' contents to a file all at once with Text File - Write actions (outside the loop, so they only happen once).
To append %b% to the end of %a%, just assign %a%%b% to %a% like so:
%a% = %a%%b%
Appending each line to a string (in a variable) will be faster than performing a bunch of file operations each time through the loop.
Leave a comment:
-
Re: MP3 artist and albumn listing
Here is the action. I have alot of dialog boxes commented out that I was using for troubleshooting the performance. It searches c:\music\ for .mp3 files.
%FileList% = File.Search ("*.mp3", CustomPaths)
%FileCount% = String.CountDelimitedStrings ("%FileList%", ";;")
%Position% = "0"
TextFile.Write ("c:\music\catalog.idx", "NoSee")
TextFile.Write ("c:\music\allmusic.m3u", "NoSee")
TextFile.Write ("c:\music\artist.idx", "NoSee")
TextFile.Write ("c:\music\album.idx", "NoSee")
TextFile.DeleteLine ("c:\music\catalog.idx", 0)
TextFile.DeleteLine ("c:\music\allmusic.m3u", 0)
TextFile.DeleteLine ("c:\music\artist.idx", 0)
TextFile.DeleteLine ("c:\music\album.idx", 0)
WHILE (%Position% != %FileCount%)
%File% = String.GetDelimitedString ("%FileList%", ";;", %Position%)
// %Result% = Dialog.MessageBox ("File", "%File%", Ok, Question)
MP3.Load ("%File%")
// %Result% = Dialog.MessageBox ("Loading File", "%File%", Ok, Question)
%Title% = MP3.GetProperty ("Title")
// %Result% = Dialog.MessageBox ("Title", "%Title%", Ok, Question)
%Artist% = MP3.GetProperty ("Artist")
// %Result% = Dialog.MessageBox ("Artists", "%Artist%", Ok, Question)
%Album% = MP3.GetProperty ("Album")
// %Result% = Dialog.MessageBox ("Album", "%Album%", Ok, Question)
TextFile.Write ("c:\music\catalog.idx", "%Position%;;%Title%;;%Artist%;;%Album%;;%File%;;" )
TextFile.InsertLine ("C:\Music\allmusic.m3u", "%File%", -1)
IF (%Artist% != "")
TextFile.InsertLine ("c:\music\artist.idx", "%Position%;;%artist%", -1)
END IF
IF (%Album% != "")
TextFile.InsertLine ("c:\music\album.idx", "%position%;;%album%", -1)
END IF
// %Result% = Dialog.MessageBox ("pos title artist album file", "%Position%;;%Title%;;%Artist%;...", Ok, Question)
%Position% = Evaluate (%Position% + 1)
// %Result% = Dialog.MessageBox ("new position", "%Position%", Ok, Question)
END WHILE
Dialog.TimedMessage (5, "Master Playlist has been completed.")
ENDSCRIPT
RETURN
Leave a comment:
-
Re: MP3 artist and albumn listing
Thanks for your responses so far.
7 files are taking about 20 something seconds or more.
Not including the music on a CD. This original file list will be built off a search of a specified local hard drives folder for .mp3's
Thanks again.
Leave a comment:
-
Re: MP3 artist and albumn listing
Are you including these MP3s on your CD? If so you can specify the items in the list box at design time. This will add some design effort but will dramatically increase the speed of the loading time.
Just a Thought.
Leave a comment:
-
Re: MP3 artist and albumn listing
How long does it take to create your list? How many MP3s are you using?
Corey Milner
Creative Director, Indigo Rose Software
Leave a comment:
-
MP3 artist and albumn listing
I need to build an artist list and an album list that will lead into the songs by that artist or album.
My understanding is that to get this info i need to pull it from the id3 tag.
So I have a simple while script that after pulling a list of all files into a variable i step throgh the delimited string variable, loading each song then doing a get property for the artist and appending it to an artist.txt file. I then do a get property of album info and do the same thing.
Although this works it seems to take way too long.
Are there any parts of this process can I change to speed this up?
Thanks
Tags: None
Leave a comment: