#155900 - 17/04/2003 15:23
Palantir 0.72 and Palantir PDB Creator
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
I wrote a small GUI for converting .csv files to a Palantir .pdb file in java, and an update is available for the Palantir app. They are both available on the project page here. The Palantir PDB Creator will take .csv files from either Emplode or JEmplode and convert them to a .pdb file you can load onto your Palm device for use with Palantir. You do not need to edit the .csv file at all, the app does all of the sorting for you. Here's a screenshot:
Also, Palantir 0.72 is released. This release fixes a bug where the save state might be wrong if you upload a new music database (for example if you were to upload a smaller database, the save state might be incorrect).
Attachments
154044-exporter.gif (735 downloads)
Edited by cushman (17/04/2003 15:24)
|
Top
|
|
|
|
#155901 - 18/04/2003 11:00
Re: Palantir 0.72 and Palantir PDB Creator
[Re: cushman]
|
old hand
Registered: 28/04/2002
Posts: 770
Loc: Los Angeles, CA
|
i'm trying to get this work. it seems to freeze on Reading input file...
i'll let it go without touching it longer, but its not taking any cpu cycles as far as i can see.
|
Top
|
|
|
|
#155902 - 18/04/2003 11:06
Re: Palantir 0.72 and Palantir PDB Creator
[Re: image]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Is your .csv file unmolested?
You should extract it directly from Emplode/Jemplode and without any modification, then select the file and an output file.
If you still cannot get it to work, send me the .csv file and I will investigate.
|
Top
|
|
|
|
#155903 - 18/04/2003 11:11
Re: Palantir 0.72 and Palantir PDB Creator
[Re: cushman]
|
old hand
Registered: 28/04/2002
Posts: 770
Loc: Los Angeles, CA
|
yeah, straight from jemplode. here it is, rar'd.
btw, i'm running jre 1.4, if thats relevant.
Attachments
154176-export.rar (226 downloads)
|
Top
|
|
|
|
#155904 - 18/04/2003 11:15
Re: Palantir 0.72 and Palantir PDB Creator
[Re: image]
|
old hand
Registered: 28/04/2002
Posts: 770
Loc: Los Angeles, CA
|
looking at the csv file, i'm seeing that i have line breaks where the comments are. that might be the problem, i guess. not sure how your app would handle those.
|
Top
|
|
|
|
#155905 - 18/04/2003 11:45
Re: Palantir 0.72 and Palantir PDB Creator
[Re: image]
|
enthusiast
Registered: 18/02/2002
Posts: 335
|
same thing for me, i tried jemplode and emplode to extract csv. also running jre 1.4.0 something
|
Top
|
|
|
|
#155906 - 18/04/2003 12:56
Re: Palantir 0.72 and Palantir PDB Creator
[Re: cushman]
|
addict
Registered: 02/04/2002
Posts: 691
|
same thing here. the PDB creator just prints "reading input file..." then nothing else.
_________________________
Oliver
mk1 30gb: 129 | mk2a 30gb: 040104126
|
Top
|
|
|
|
#155907 - 18/04/2003 13:19
Palantir PDB Creator 0.23
[Re: image]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Okay, updated version here.
It was partially my fault and partially your fault
The line breaks did prove to be a problem. The CSV file is actually malformed if it has line breaks in it, and JEmplode/Emplode shouldn't have written the line breaks from the ID3 tag (and the line breaks probably shouldn't have been in the database to begin with). Anyway that was one problem. Another problem is that I was not validating either year numbers or track numbers to make sure they were valid ints, just checking to see if they were blank "" before moving on.
I've fixed these, and it now processes your default .csv export just fine. It will print out some errors (because of the linebreaks) that you can see if you run the jar file from a command line like:
java -jar palantir.jar <inputfile> <outputfile>
The inputfile and outputfile are optional, it just fills in the fields for you. Everyone please try this version out and let me know what happens. If it does hang, run it from a command line and tell me the results.
Oh, and BTW, all you guys should get MP3 Tag Studio and tag your files correctly
|
Top
|
|
|
|
#155908 - 18/04/2003 14:08
Re: Palantir PDB Creator 0.23
[Re: cushman]
|
addict
Registered: 02/04/2002
Posts: 691
|
Does this error mean i need to keep filling in all my missing tags? i've already done so many, but there are still a few. I've attached the error log.
Attachments
154208-error.txt (407 downloads)
_________________________
Oliver
mk1 30gb: 129 | mk2a 30gb: 040104126
|
Top
|
|
|
|
#155909 - 18/04/2003 14:53
Re: Palantir PDB Creator 0.23
[Re: cushman]
|
old hand
Registered: 28/04/2002
Posts: 770
Loc: Los Angeles, CA
|
it works well. i forgot how much 250k takes to upload onto a palm... got me kind of worried, but a little patience and it was finished. its a great app. my passengers will love it. a little gripe though. my collection deals with mostly singles, so i'd like to disable the albums screen, and just show all of the tracks for the artist. can this be configurable? otherwise, its a good program. you werent kidding about the IrDA range. like 2 inches max =)
|
Top
|
|
|
|
#155910 - 18/04/2003 16:55
Re: Palantir PDB Creator 0.23
[Re: oliver]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Oliver (and actually everyone),
You should re-download the file, or at least compile it from source. I uploaded it with a stale .class file, but all the .java source was updated. If you re-download (from the same link) and replace your .jar file it will work now.
Hope I've got all the bugs out!
|
Top
|
|
|
|
#155911 - 18/04/2003 16:58
Re: Palantir PDB Creator 0.23
[Re: image]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
The album view is kinda built in to the app. I'm probably not going to make that a configurable option, it would take quite a bit of rewriting. The app _is_ open source, though, so if there are enough people who want this functionality, I'm sure someone will take the time to develop it.
|
Top
|
|
|
|
#155912 - 18/04/2003 20:43
Re: Palantir PDB Creator 0.23
[Re: cushman]
|
addict
Registered: 02/04/2002
Posts: 691
|
sweet, yup works like a charm.
after seeing all my tracks on the palm, i noticed that i have alot of artist tags that vary a bit from one another. Instead of planatir thinking its 2 completely different groups, can't you read the file structure we have setup on the empeg, and display that on the palm? this would solve the problem with various artists cd where the artist tag is different for each track. Can't you figure out the directory structure by the values in the FID? I remember reading somewhere on this bss how the FID numbers are generated with the file structure embedded into them? something similar to this
_________________________
Oliver
mk1 30gb: 129 | mk2a 30gb: 040104126
|
Top
|
|
|
|
#155913 - 18/04/2003 22:20
Slightly Odd Behavior
[Re: cushman]
|
new poster
Registered: 17/09/2002
Posts: 22
Loc: Minneapolis, MN
|
I got my Palm Vx in the mail today and immediately set to work trying to get Palantir to work.
Once I had everything loaded and configured as per the new web page instructions I tried to sync a simple playlist of 10 songs to the empeg. I was watching the console via the serial connection and on it I saw two seg fault messages, one each for the player and empire, and then both shut down. The player restarted automatically, empire did not. (expected since it's run once in the config.ini) I rebooted the whole thing and tried several times, and each time it did the same thing. I went back over the installation and checked it out. The was only two differences. First I could see the file permissions were slightly different than the file listing on the setup page. I chmod'ed a bit and cleaned everything up. Secondly, my libopenobex.la was slightly different, so I redownloaded the empire.zip file and got the same 776 byte file rather than the 744 in the pic. I figured this was a documentation error.
Satisified that my install was correct and all permissions were correct but still with the seg fault errors, I went into the empeg menuing system and picked out a random song to play and started it up to see if the empeg still worked. All the usual empeg functionality worked fine. I fired up Palantir again and it now worked as well.
I experimented a bit and it appears that Palantir inserts the songs into the currently playing list after the currently playing song. However when I first started the player there was no songs in the list at all and nothing was playing (I'm assuming because of the kernel update), so perhaps it was trying to insert into position 2 of a 0 length list and crashed because of this?
Also if this is how it works (adding after the current song) is it somehow possible to make an option to have Palantir instead stop playing, replace the current song/playlist, and then start playing the new list rather than modifying the current one? Perhaps a checkbox on the palm app of some sort.
I personally would prefer to do that alot of the time, and that's generally how the empeg menu system works as well.
Another bit of strange behavior comes if the player has completed a playlist and stopped and you upload a Palantir list. It adds the new songs after the first song in the now completed list. So then you have to hit play and next song to get to the songs you just sent. This doesn't seem like how it should work. If it's not playing because it's at the end of a list I'd expect it to at the least add the new playlist's songs to the end and start playing them, or even better as suggested above replace the completed playlist (since it's done anyway) with the new one and start playing it.
Does any of this make sense?
Also I'd like to second the viewing options thing someone else suggested. A good example of where an album view would be useful is in Soundtracks. Since they have many different artists the only way for me to beam a full soundtrack over now is to know every song on it and select them all and send it over. Even if I do manage to find them all hey'll probably still be out of order since you can't reorder the list.
All these things aside, this is a really cool app, and I'm glad I picked up a Palm to try it out with. Everyone who has seen my empeg loves it, but using the interface to search was difficult for them. This would make it much, much easier.
|
Top
|
|
|
|
#155914 - 19/04/2003 05:42
Re: Palantir PDB Creator 0.23
[Re: oliver]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
can't you read the file structure we have setup on the empeg, and display that on the palm?
I'm not sure what you mean, do you mean your playlist structure?
I'm getting all of the data for Palantir from the player database (by exporting to csv, you are exporting the database). Wouldn't it be easier to fix your tags? At the very least, you could go into your playlists, select all, right click and select properties and then edit the artist name for that entire playlist.
As for having varied artist names, I've made a point to keep all of my tags clean to take advantage of the other options the Empeg has to offer, such as Tweak by Artist, etc. I have rules I tag my songs by, and I never have varied artist names. A song by R.E.M. and Natalie Merchant gets tagged as:
R.E.M - Songname [with Natalie Merchant]
so that it gets played with the rest of the R.E.M. songs. It would be nice if we could use multiple tags on the Empeg, but anyway.
|
Top
|
|
|
|
#155915 - 19/04/2003 06:15
Re: Slightly Odd Behavior
[Re: GooRoo]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
I think that we've actually found a bug in the player. Let me confirm this, however.
I insert the songs using serial commands. I haven't tested this, but if you don't have a playlist, and you use the insert serial command, I expect the player would do the same thing (segfault). I'm busy until tonight, so if someone else could confirm this, that would be great.
The default for Palantir is to insert the playlist after the currently playing song. In the future this will be customizable, but When I Get To It (tm). The entire player _is_ open source, though
I understand your view about soundtracks and various artists. However, if you know the Soundtrack or various album you wish to hear, why not just search for it using the Empeg remote? The Palantir application is a very simple app as it is, and I don't want to make it any more complicated than it has to be. The design would have to change significantly to be able to view all tracks by Artist or all tracks by Album.
|
Top
|
|
|
|
#155916 - 19/04/2003 18:49
Re: Slightly Odd Behavior
[Re: cushman]
|
old hand
Registered: 28/04/2002
Posts: 770
Loc: Los Angeles, CA
|
hmm, thinking about it, we can start to extend the use of the irda. if we can make an empeg-side app that will transmit the current song's stats (title, time, etc), then we can recieve it to the palm, and then mark it accordingly.
|
Top
|
|
|
|
#155917 - 20/04/2003 06:28
Re: Slightly Odd Behavior
[Re: cushman]
|
enthusiast
Registered: 18/02/2002
Posts: 335
|
ive noticed that when I beam songs to the empeg it can sometimes freeze the player, this is a freeze can only be fixed by pulling the player out of the sled. It seems to also only happen in car (has not yet happened to me on ac) , has anyone else seen this type of error?
|
Top
|
|
|
|
#155918 - 01/05/2003 16:46
Re: Slightly Odd Behavior
[Re: eliceo]
|
enthusiast
Registered: 14/07/2002
Posts: 344
Loc: South Carolina
|
Just a thought... I tried to install Palantir onto my Tungsten which runs the Palm OS 5.0. The program will pull up but it will not show the playlist. Have any ideas?
_________________________
Russ --------------------------------------------------------- "The difference between a successful person and others is not a lack of strength, not a lack of knowledge, but rather a lack of will." Vince Lombardi
|
Top
|
|
|
|
#155919 - 01/05/2003 17:38
Re: Slightly Odd Behavior
[Re: russmeister]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Hi Russ,
I'll install the 5.0 ROM image for my emulator and see if I can reproduce your problem.
Be back in a second.
|
Top
|
|
|
|
#155920 - 01/05/2003 17:39
Re: Slightly Odd Behavior
[Re: cushman]
|
enthusiast
Registered: 14/07/2002
Posts: 344
Loc: South Carolina
|
Thanks, man. Awesome... If it works.
_________________________
Russ --------------------------------------------------------- "The difference between a successful person and others is not a lack of strength, not a lack of knowledge, but rather a lack of will." Vince Lombardi
|
Top
|
|
|
|
#155921 - 01/05/2003 18:14
Re: Slightly Odd Behavior
[Re: russmeister]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Yeah, there is some sort of problem with OS 5. I'll debug it sometime later (maybe tomorrow) and get a new version out sometime soon.
Edit: yes, it looks like what I did to make it compatible with PalmOS 3 broke it in PalmOS 5. The workaround for a missing function for 3 has been depricated. Grr. it's like designing web pages for older browsers, I hate to do it but I think I'm going to have to do some version checking code.
I've been thinking about getting a Tungsten or m515 with a bluetooth card and trying to make it work with Palantir and Empire on the Empeg. This would require some hacking to fool the player app into reading from a virtual serial port, while a bluetooth adapter was plugged into the actual serial port. That feature would be great for other apps too, like the GPS project. If I get it working, the range for the app would improve greatly
Edited by cushman (01/05/2003 18:22)
|
Top
|
|
|
|
#155922 - 01/05/2003 21:12
Re: Slightly Odd Behavior
[Re: russmeister]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Try this new .prc file.
I tested it using the Palm 5 Simulator, and it should work correctly for you. Let me know if it does, and I'll upload it to my webpage.
Attachments
156627-palantir.prc (511 downloads)
|
Top
|
|
|
|
#155923 - 02/05/2003 01:13
Re: Slightly Odd Behavior
[Re: cushman]
|
enthusiast
Registered: 28/03/2002
Posts: 230
Loc: Dudley, UK
|
......Bluetooth..........If I get it working, the range for the app would improve greatly
.......GO MAN GO !!
|
Top
|
|
|
|
#155924 - 02/05/2003 05:39
Re: Slightly Odd Behavior
[Re: cushman]
|
enthusiast
Registered: 14/07/2002
Posts: 344
Loc: South Carolina
|
It seems to be working just fine. Meatballman is going to add the app to my empeg this afternoon so I can test it.
Just a note: You left a debug message in there that says, "OS is at least 3.5." This comes up when you open the program and if you click ok you get right in.
_________________________
Russ --------------------------------------------------------- "The difference between a successful person and others is not a lack of strength, not a lack of knowledge, but rather a lack of will." Vince Lombardi
|
Top
|
|
|
|
#155925 - 02/05/2003 07:09
Palantir version 0.74 - PalmOS 5 compatible
[Re: russmeister]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Ok, 0.74 is released. You can get it from the project webpage. This version fixes compatibility issues with PalmOS 5.
Have fun!
|
Top
|
|
|
|
#155926 - 02/05/2003 07:58
Re: Slightly Odd Behavior
[Re: cushman]
|
enthusiast
Registered: 14/07/2002
Posts: 344
Loc: South Carolina
|
Bluetooth....If I get it working, the range for the app would improve greatly
Is this something we can expect in the near future?
_________________________
Russ --------------------------------------------------------- "The difference between a successful person and others is not a lack of strength, not a lack of knowledge, but rather a lack of will." Vince Lombardi
|
Top
|
|
|
|
#155927 - 02/05/2003 09:20
Re: Slightly Odd Behavior
[Re: russmeister]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Probably not. I won't work on it until I get some bluetooth hardware (Palm device + access point) which might be a while. On a side note, the access point I was looking at is this one from Brain Boxes that would go nicely with the sled in your car. It could be placed in your glove box, or even extended to sit under a seat or center console for better reception.
|
Top
|
|
|
|
#155928 - 02/05/2003 10:21
Re: Slightly Odd Behavior
[Re: cushman]
|
enthusiast
Registered: 14/07/2002
Posts: 344
Loc: South Carolina
|
Did you happen to notice the price for those adapters? As great as that sounds, I'm not sure I could justify spending $240 anytime soon.
On a side note, is there a way you couild make Palantir not case sensitive? I know it's picking up the unique names it finds but if you have an artist that has a case difference (i.e. Match box 20/Match Box 20) It adds them to the list seperately. Is there a way around that?
I know the short answer is to fix your "cases" but if there is another route...
_________________________
Russ --------------------------------------------------------- "The difference between a successful person and others is not a lack of strength, not a lack of knowledge, but rather a lack of will." Vince Lombardi
|
Top
|
|
|
|
#155929 - 02/05/2003 10:39
Re: Slightly Odd Behavior
[Re: russmeister]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Did you happen to notice the price for those adapters? As great as that sounds, I'm not sure I could justify spending $240 anytime soon.
Yeah, that's why I said that I wouldn't be working on it for a while I think that in a year or so the price might go down, or some might start popping up on eBay, and if the price does go down I might buy one then. I've been mulling over making the Palm into a remote display for the Empeg like PalmEmpeg does, only over Bluetooth instead of the serial line. Also, the way PalmEmpeg works is kinda borked, it fast forwards your entire current playlist to get the song names/titles, etc. Kind of a pain. And it's not open source, and hasn't been updated since 2001.
On a side note, is there a way you couild make Palantir not case sensitive? I know it's picking up the unique names it finds but if you have an artist that has a case difference (i.e. Matchbox 20/MatchBox 20) It adds them to the list seperately. Is there a way around that?
No, fix your tags in Emplode, then re-export.
|
Top
|
|
|
|
#155930 - 03/05/2003 20:18
Re: Slightly Odd Behavior
[Re: cushman]
|
enthusiast
Registered: 14/07/2002
Posts: 344
Loc: South Carolina
|
Mark, would it be possible to have Palantir sort the playlist on the Palm as we see fit? For example, if I want to hear 3 different songs from the same artist and I select those songs all at the same time, that's the order they will play in. Is there a way to sort the playlist after it's loaded so we don't have to pick the song from this artist, another artist, and then back to this artist again?
It would be a nice added bonus
_________________________
Russ --------------------------------------------------------- "The difference between a successful person and others is not a lack of strength, not a lack of knowledge, but rather a lack of will." Vince Lombardi
|
Top
|
|
|
|
#155931 - 03/05/2003 21:39
Re: Slightly Odd Behavior
[Re: russmeister]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Yeah, that's actually what I've been working on next. Some of the code for sorting the playlist is already in the current version, just not activated yet. It is probably 30% done. It will work like the Memo app, you'll be able to drag the items around. The items that I would like to finish are (in current order):
* Confirmation dialog before Remove All
* Sorting the playlist before beaming
* Search functionality for the Artist screen
* Preferences dialog with options for insert/replace/append
|
Top
|
|
|
|
#155932 - 05/05/2003 07:55
Re: Slightly Odd Behavior
[Re: cushman]
|
carpal tunnel
Registered: 19/01/2002
Posts: 3584
Loc: Columbus, OH
|
Sounds pretty cool. We've enjoyed playing around with it this week. Thanks for the great app.
_________________________
~ John
|
Top
|
|
|
|
#155933 - 05/05/2003 08:24
Re: Slightly Odd Behavior
[Re: JBjorgen]
|
enthusiast
Registered: 14/07/2002
Posts: 344
Loc: South Carolina
|
Yeah, if I can only remember to keep my tungsten with me now. I thought I lost it this weekend only to find it in my room buried and lost in the numerous piles of junk.
I'll have to be more careful about where I set it down.
_________________________
Russ --------------------------------------------------------- "The difference between a successful person and others is not a lack of strength, not a lack of knowledge, but rather a lack of will." Vince Lombardi
|
Top
|
|
|
|
#155934 - 05/05/2003 10:07
Re: Slightly Odd Behavior
[Re: russmeister]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
|
Top
|
|
|
|
#155935 - 07/05/2003 15:32
Re: Palantir 0.72 and Palantir PDB Creator
[Re: cushman]
|
journeyman
Registered: 22/10/2002
Posts: 82
Loc: Vancouver, BC, Canada
|
What a wicked app, thanks so much! Just got mine all installed/configured today, very very nice!
One thing that did show up when I was using hyperterm to watch the boot sequence (although I'm sure it was not caused by Palantir, but first time I've used hyperterm in a very long time) is the following error:
Mounting first music partition
Tried to mount /dev/hda4 as reiserfs but got error 19
I searched the faq, but didn't see this specific error, unless I missed it - anyone know what this means? Everything seems to work, but nonetheless...
|
Top
|
|
|
|
#155936 - 07/05/2003 15:45
Re: Palantir 0.72 and Palantir PDB Creator
[Re: sphengali]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
Mounting first music partition
Tried to mount /dev/hda4 as reiserfs but got error 19 This is not an error message, it is normal.
|
Top
|
|
|
|
#155937 - 03/06/2003 18:23
Re: Blue tooth etc.
[Re: cushman]
|
journeyman
Registered: 23/08/2002
Posts: 93
Loc: South Texas
|
Mark,
Great app.
Would it be possible to transfer playlists via the empeg's serial port? (as is in a 'Hot Sync" cradle)
I have one of these for my Palm device -Handera 330.
(I used the car cradle quite a bit with PalmAmp / WinAmp before I got my first MkIIa.)
Thanks,
|
Top
|
|
|
|
#155938 - 03/06/2003 19:21
Re: Blue tooth etc.
[Re: jamville]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
I'll put it on my list of things to do.
The serial interface isn't that hard to implement, but I just need to finish up a few projects here before working on Palantir some more. I've still got my original goasl of re-arranging playlist items and selcting which action to take (insert/append/replace), but I'll do the serial interface when I do the rest. Since I'm making one menu it won't be hard to add another option to it.
|
Top
|
|
|
|
#155939 - 03/06/2003 21:28
Re: Blue tooth etc.
[Re: cushman]
|
pooh-bah
Registered: 25/08/2000
Posts: 2413
Loc: NH USA
|
Mark,
Is there any way browsing by song title only (I have tons of 1-hit wonders whose names I never remember) can make it onto your wish list? I'd agree that re-ordering playlists is a bigger priority tho. Can't wait to try out the 336 kernel & new empire. Woohoo!
-Zeke
_________________________
WWFSMD?
|
Top
|
|
|
|
#155940 - 04/06/2003 04:50
Re: Blue tooth etc.
[Re: Ezekiel]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Maybe quite a bit later. The way the database is organized right now makes it hard for me to do any kind of different "views" of the songs. This is why it is difficult to do a view of songs by source instead of by artist, then by source. The reason the database is organized this way is to save space on your Palm device. Most likely if I were to redesign the .pdb file it would increase in size by at least 50%. Let me explain the way it works now. The .pdb file looks like this:
Palm header information
This section includes create date, modfication date, db owner id, etc. It's a standard header that is on every .pdb file
Record list index
This section contains byte offsets for every record in the database. This is the record index. This is another standard section in every .pdb database.
Record 0
Palantir header record. This record is 4 ints smashed together. The 4 ints represent:
1 - index of the first Artist record
2 - number of Artist records
3 - index of the first Track record
4 - number of Track records
Record 1 - (Number of Artist Records)
These are records that store the Artist information These are separate so I don't have to store the artist name in every track record, and so I can iterate through an artist view easily to display the artist names. The format of these records is defined in the PDB Creator Java program in PDBArtistRecord.java
public int artistID;
public int trackCount;
public int sourceCount; //how many sources
public int[] sourceOffset; //where they sources are (first one is always first record)
public String name;
Basically I store where the albums start and end in the sourceOffset array so when someone selects an Artist, then I can iterate through the track listings beginning at sourceOffset[0] and get the album names for the Album view in Palantir.
Record (Number of Artist Records +1) - (Total number of records)
These are the Track records. They store the artistID and the rest of the details about the track listing. This is defined in PDBTrackRecord.java as such:
public int fid;
public int artistID; //integer value for artist
public String data; //year + source + track + title + genre + bitrate + duration
I can get the Title, Genre, Bitrate and Duration out of the packed data string by looking for null terminators '\n".
You can see by the format of the .pdb that it would be hard to key a view off of anything but an Artist. I could redesign everything so that each source had a sourceRecord, and those were all stored at the top of the .pdb file along with the Artist Records, but that would increase the size of the file a lot since you usually have more sources than artists. Another thing to think about is the screen real estate you have on the Palm. It doesn't have the space to display Title - Artist usually, and something would have to be truncated to work that in.
I'm not really opposed to the ideas of viewing by source first (like with soundtracks) or viewing by track only, but you can see that it's a redesign effort to do so. If anyone can suggest a better way of formatting the .pdb file I would appreciate it, but I can't see a better size/functionality combination right now. My track listing of 5800 songs takes somewhere around 420k, and I think that's pretty good considering how much data we're dealing with.
|
Top
|
|
|
|
|
|