10-15-2011, 08:27 PM | #1 |
Grand Sorcerer
Posts: 7,020
Karma: 39312118
Join Date: Jun 2008
Location: near Philadelphia USA
Device: Kindle Kids Edition, Fire HD 10 (11th generation)
|
Is There A Secret to Changing the Order Music Files Play In?
As background, I have a tiny personal little VB .NET 2010 Express program that automatically deletes those annoying notices (including the new ones for library books) whenever I attach my Kindle to my PC and press the annointed multi-key combination. I'm thinking that I might buff this up a little and make it my first freeware release since the days of the Apple II. Along those buffing up lines, I added a feature to randomize music tracks. My code goes through each MP3 on my K3, picking the music files at random and giving them a treatment like this:
My.Computer.FileSystem.CopyFile (strOriginalFilePath, strTempFilePath) My.Computer.FileSystem.DeleteFile (strOriginalFilePath) My.Computer.FileSystem.RenameFile (strTempFilePath, strOriginalFileName) This does seem to reset the order in which the MP3 tracks play. And the whole process would be fast -- except that the CopyFile line above takes roughly forever AKA many seconds for most tracks. I could try doing an API call file copy, but I don't think it will much help, as doing a similar copy with Windows Explorer takes at least as long. Maybe this is just how it has to be, in which case I will give the user an up-front estimate of how long it will take to randomize their songs before proceding. But before I do that -- does anyone know, at the lowest level, how the Kindle decides which order to play the songs? It seems there should be way to change some file characteristic that determines the order, rather than re-copy the whole track. Thanks for all ideas. |
10-15-2011, 11:15 PM | #2 |
BLAM!
Posts: 13,477
Karma: 26012464
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Might just be based on the timestamps, in which case touch would be your friend, if you were on an Unix system . But I have no idea, never really used the MP3 player.
|
Advert | |
|
10-16-2011, 10:46 AM | #3 | |
Grand Sorcerer
Posts: 7,020
Karma: 39312118
Join Date: Jun 2008
Location: near Philadelphia USA
Device: Kindle Kids Edition, Fire HD 10 (11th generation)
|
Quote:
Anyway, I tried updating, from code, each of the following attributes to see if it changed the order of play for an MP3: -- LastAccessTime -- CreationDate -- LastWriteTime No effect! Than I tried toggling these attributes: -- Offline -- Hidden -- Encyrpted Nothing. It may be that the Kindle doesn't even store some of these, although changing them raises no error. Renaming, and then renaming back, also made no difference. Last, I tried to change 1 random byte in a MP3 and then change it back, since this can be done far faster than reading and writing an entire file. Actually, I didn't do that in VB, since I had forgotten how, but, as proof of concept, did it using the XVI32 freeware hex editor. No effect. So, at least for now, I'm going to stick with the slow full rewrite of all MP3's. Last night, when I had 97 MP3 files, totalling 693 MB, on my K3, full track randomization took 9 minutes. The good part is that, in the help, I can assure users that the program is safe because it only does what they can, and probably would, do manually with Windows Explorer. Plus, few MP3 users will actually tolerate something that slow, so if asked for MP3 support, I'll have time to give it I just realized that I can also provide a simple rewind feature, although it will take just as long as track randomization. Last edited by SteveEisenberg; 10-16-2011 at 10:48 AM. |
|
10-16-2011, 01:13 PM | #4 |
Member
Posts: 19
Karma: 12
Join Date: Sep 2011
Device: Kindle 4.1.0
|
Hi,
I guess the files on Kindle are played in order they are listed in FAT directory table. Here is a nice example (unfortunately in C++) on how to modify it. By the way, Drive Sort or any of the applications listed here can sort mp3 files according to their file names. |
10-16-2011, 03:32 PM | #5 | ||
Grand Sorcerer
Posts: 7,020
Karma: 39312118
Join Date: Jun 2008
Location: near Philadelphia USA
Device: Kindle Kids Edition, Fire HD 10 (11th generation)
|
Quote:
Quote:
Trying, with my Vista 32 bit PC, six of the eight programs on your last link above, against my Kindle Keyboard 3G, still at firmware version 3.1, here was my experience, going from bad to good: FatSort 1.0.6 - I could not get this to work. Maybe it requires an old PC using FAT, such as one running Windows 98. MP3DirSorter 1.0 - Strange user interface. I could not get it working. FatSorter 1.0.4 - Works, but only sorts ascending by name. FatSorter AKA Alphanumeric Fat Sorter 1.0 - Works. Only sorts ascending by name. Has possibly unique feature that is really good, or really bad, depending on your needs: It realizes track 7xxx.mp3 goes before 10xxx.mp3. Drive Sort - Works. Sorts by name, ascending or descending. No shuffle/randomize feature. Re-Organize! 2.3.1 - This is the one I recommend. It does everything I might want in terms of organizing the music on my Kindle, other than to do it while disconnected from a PC. You can sort by name, or by file date, or randomize, or drag and drop to put MP3's in the exact order desired. I didn't test the other two programs. FATSortUtility requires Linux, which I don't have. YAFS sounds flexible but has a command-line interface that looked time-consuming. Last edited by SteveEisenberg; 10-16-2011 at 03:49 PM. |
||
Advert | |
|
10-18-2011, 04:10 AM | #6 |
Connoisseur
Posts: 79
Karma: 2718
Join Date: Aug 2011
Device: Kindle 3G
|
I know every programmer thinks his favorite language is the best tool for every situation, but damn this would be so easy to do on a nix system with bit of BASH scripting. Are you seriously COPYING and then deleting each track? My mind is blown.
In other news, I couldn't stand the limitations of the built-in mp3 player, including lack of ability to sort or choose tracks. After rooting and installing mplayer + kinamp, I'm totally happy. |
10-18-2011, 01:07 PM | #7 |
BLAM!
Posts: 13,477
Karma: 26012464
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
A quick check in the Portage tree turned out fatsort. If it builds on ARM, it might be usable natively on the Kindle.
|
10-18-2011, 10:07 PM | #8 | ||
Grand Sorcerer
Posts: 7,020
Karma: 39312118
Join Date: Jun 2008
Location: near Philadelphia USA
Device: Kindle Kids Edition, Fire HD 10 (11th generation)
|
Quote:
Quote:
|
||
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PRS-650 Is there a way to be able to get ALL my music files to play... | kelliedn | Sony Reader | 6 | 03-04-2011 11:51 PM |
Play Order | Soxendom | Calibre | 4 | 01-02-2010 01:36 PM |
E-Book reader for music play usage | t-mies | Which one should I buy? | 10 | 06-16-2009 08:07 PM |
Play.com (UK) now have the PRS-505 up for pre-order | simond | News | 3 | 08-15-2008 10:16 AM |