Announcement

Collapse
No announcement yet.

Need a better MP3 Player

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need a better MP3 Player

    Dare I say it, shunned though I might be, i'm not happy with iTunes as the music driver for an in car audio source.

    My issue is that controling it via AppleScript is kludgy at best, impractical at worst, and doesn't do somethings i'd like in between.

    By kludgy, I mean that by definition an interpreted language is slower than a compiled language.

    By impractical, I mean that importing your track list via AS is fine for <100 songs. I just killed my App after 12 minutes on a 1.8 G5 and it was still trying to get all the song titles from my full library and god only knows where it was in the list at the time.

    The main thing I want that it doesn't support (i've seen Apps (Synergy for one) that do it, but according to the dictionary there isn't a way and I couldn't find docs/examples for doing it anywhere) that I wanted the ability to do was change playlists.

    Based on this i'm writing my own MP3 Player library. I have already started, but i'd like others input for ideas that I haven't thought of or things that might not make sense to the rest of the world.

    Here is my list of features/thoughts, any input would be most appreciated:
    • Use the QuickTime API to actually play the music.
    • Make it a Framework so it is useable in any UI.
    • Backend it with SQL to store searchable song info and playlists.
    • Have user support with "authentication" to select playlists.
    • Track play counts by playlist.
    • Track ratings by playlist.
    • Auto adjust ratings by actual play time.
    • Read the files from the iTunes directory structure (i.e. don't dup files)
    • Have a utility that runs in the back ground to sync it's library information with the iTunes library.
    • Still use iTunes for track creation (i.e. import your music via iTunes)
    • Support changing the play order.
    • Support a true random mode (i.e. the same song *could* play twice in a row).
    • Support a weighting system so that the higher the rating the song has, the more likely you are to hear it in the random mode.

    Some notes:
    • What I have so far uses MySQL for the DB as I found a simple to use Framework for it.
    • By authentication I mean some token to identify a user. In my case I want to read the Serial Number of a mounted iPod and identify the user that way. This would allow it to switch directly that users playlists (to suport multiple drivers). It would be up to the UI to determine the auth token and pass it to the Framework.
    • For the auto ratings, my thought is that I put a lot of songs in my normal iPod playlists, but then end up skipping them as i'm not in the mood and always forget to remove them the next time I sync the iPod. So the idea would be that it would adjust the rating (scale of 0 to 100 just like iTunes) slightly based on the percentage of the track you let play. Over time this would give you a better more accurate view of your musical tastes.

    So far the info I am tracking about the song (for searching/ordering purposes) is:
    • Title
    • Artist
    • Album
    • Length
    • Rating (from the playlist)
    • Play Count (from the playlist)

    I was actually well into it when it got monotonous and I left it, so I haven't touched it in about 3 months now. But since I have now dropped a bunch of money (Lilly with WRX housing) into the project, I figure it's time to start working on it again.

    Any thoughts would be great, but I would like to keep this thread clean if there is actual interest/input so please keep the "I want it when you're done" and "me too" posts to a minimum. Supposing I actually ever finish anything, I plan to make all my code available somewhere as long as it doesn't violate licenses (I got the info from the MFG for talking to my radar detector, and I promised I wouldn't pass that out (but that will be micro-controller code anyway)).

    Input I would love to have:
    • Info that I should track that i'm not.
    • Better ideas that MySQL to use for the backend storage (I want SQL as I do a lot of SQL, but a full DB like MySQL is A) over kill here and B) more than the average user should have to mess with for this to work).
    • Cool features I haven't thought of (while this should, since i'm using QT, play the audio for Video files, I have no plans/interest to do video support in the near future for both safety and lack of interest reasons).
    • A good cheap Mac friendly Web hosting service (preferably with Perl and DB support) that I can actually create a full site for.
    • Links to other Frameworks that maybe do most of this (i.e. use something other than iTunes for the playlists/sorting/etc..) that I could wrap/extend with my additional functionality (i.e. multi-user support, auto-rating, etc..).

    Thanks,
    -dave
    My pathetic worklog.
    CarFrontEnd (now it's own sub-forum!!!!)

  • #2
    I have more than 15000 songs in iTunes. Scrolling is way too long. I can use some already existing virtual keyboard but you would need to include some sort of search like iTunes or just bring the select song to the letter that just it.

    It would be nice to have the Album picture as big as possible.

    Thank you
    Help me keep my web site up to date.
    Mac-Mini in Passat

    Comment


    • #3
      I don't know too much about this but doesnt itunes write all of the database files in XML? if this is the case can't you have your software read the files and set all the info into some kind of a searchable table? This way you might be able to import playlists, read ID3 tags, and find file paths all at once> but thats just my $.02 and i'm not even sure if any of that is possible

      Comment


      • #4
        Originally posted by bcohen5055
        I don't know too much about this but doesnt itunes write all of the database files in XML?
        Nope. It stores it in a binary format of some type. You can export your playlists/library though and that writes an XML file. If I recall correctly from the last time I looked at it, it doesn't have all the info (like play count, rating, etc..).
        if this is the case can't you have your software read the files and set all the info into some kind of a searchable table? This way you might be able to import playlists, read ID3 tags, and find file paths all at once
        I am playing with possibly using CoreData instead of SQL as an option, but my nights have been long this week so I haven't made any progress in that direction. There are two issues with doing things in memory though. The first is that it is in memory which is a waste if you aren't using it all. The second is how to quickly search it. SQL DBs are designed to be able to quickly retrieve the data you want. CoreData also appears to have that capability, but I want to fill it up with my library info to see A) how quickly it can find 1 song of a group of songs and B) how much memory that will eat up for a moderate (~5500) sized library.

        As far as the ID3 tags go, what I have written so far does process them (via QT), but it only does it at certian times (i.e. when a song is getting ready to be played). I duplicate the important information in the DB so that it is easily searchable and retrievable, but when I get to the point of opening the file I make sure to update the DB if anything has changed. If you were to instead load all the ID3 info when you load your playlist you have three problems. The first is that you are again eating more memory than needed (album art is a killer in this case) and the second is that you won't know if the files change underneath you. Finally is the processing time it will take to open and read each file.

        Much of my view is based on my personal beliefs. Yes memory is cheap, fast, and easy, but I believe it is a testament to how sloppy the average programmer has gotten (from the OS layer all the way to the App) that we need as much RAM as we do (both from using it when it's not needed and not cleaning it up properly).

        -dave
        My pathetic worklog.
        CarFrontEnd (now it's own sub-forum!!!!)

        Comment


        • #5
          Originally posted by MacMobile
          I have more than 15000 songs in iTunes. Scrolling is way too long. I can use some already existing virtual keyboard but you would need to include some sort of search like iTunes or just bring the select song to the letter that just it.
          This is just a Framework to retrieve and present the data. It would be up to the UI for things like searching. But yes the library will support searching for just such a reason.

          It would be nice to have the Album picture as big as possible.
          I don't have any current plans to support it directly (just not a fan of it myself) (again this isn't working with the UI itself), but I do provide access to the QT object so that the caller can do anything with it that I may not support (like retrieving the art). I will look into adding a retrieval method for artwork though (shouldn't be too difficult).

          -dave
          My pathetic worklog.
          CarFrontEnd (now it's own sub-forum!!!!)

          Comment


          • #6
            iamgnat,

            First of all, the idea of MySQL is great. It’s light weight and can handle data/query which will be more than adequate for this particular purpose. The downside is, users have to install the MySQL first if they wanna use this application. I’m working with MySQL since the days of RedHat 6.2 (but not that much in recent years) and I think normal users will face some form of difficulties during the installation/configuration (again, the level of difficulties depend upon the application’s requirements). I never tried MySQL on OS X – what sort of binary they have for OS X?

            What’s your actual plan – inserting the song itself into the database as a field value (say, “song”) or just making an entry (with song, artist, album etc. as fields) for each and every song you have in your iTunes music folder?

            I just didn’t quite follow your “authentication” - what if I don’t have an iPod (or not mounted)? UID/GID could be used in stead for user authentication. What about the UI to access the backend?

            What do you mean “Mac friendly Web hosting” – OS X Server based web server or a Linux/Unix one?

            Cheers!!!

            Comment


            • #7
              Are you sure it's not XML? I've got a 6mb xml file in my iTunes library that has stuff like this in it:

              <key>659</key>
              <dict>
              <key>Track ID</key><integer>659</integer>
              <key>Name</key><string>Jump</string>
              <key>Artist</key><string>Van Halen</string>
              <key>Album</key><string>The Best of Van Halen, Vol. 1</string>
              <key>Genre</key><string>Rock</string>
              <key>Kind</key><string>Protected AAC audio file</string>
              <key>Size</key><integer>3863344</integer>
              <key>Total Time</key><integer>242323</integer>
              <key>Disc Number</key><integer>1</integer>
              <key>Disc Count</key><integer>1</integer>
              <key>Track Number</key><integer>7</integer>
              <key>Year</key><integer>1996</integer>
              <key>Date Modified</key><date>2005-08-26T17:19:22Z</date>
              <key>Date Added</key><date>2004-10-27T00:01:12Z</date>
              <key>Bit Rate</key><integer>128</integer>
              <key>Sample Rate</key><integer>44100</integer>
              <key>Play Count</key><integer>9</integer>
              <key>Play Date</key><integer>-1087063491</integer>
              <key>Play Date UTC</key><date>2005-08-26T17:23:25Z</date>
              <key>Compilation</key><true/>
              <key>Artwork Count</key><integer>1</integer>
              <key>Season</key><integer>0</integer>
              <key>Persistent ID</key><string>2C122AC0249548FA</string>
              <key>Track Type</key><string>File</string>
              <key>File Type</key><integer>1295274016</integer>
              <key>File Creator</key><integer>1752133483</integer>
              <key>Location</key><string>file://localhost/Users/tberry/Music/iTunes/iTunes%20Music/Compilations/The%20Best%20of%20Van%20Halen,%20Vol.%201/07%20Jump.m4p</string>
              <key>File Folder Count</key><integer>4</integer>
              <key>Library Folder Count</key><integer>1</integer>
              </dict>
              <key>660</key>

              That seems to be everything.

              By the way, the CCarproject used MySQL as the library. It's open source and you may get lucky in that he did a lot of the work for you.
              Originally posted by ghettocruzer
              I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
              Want to:
              -Find out about the new iBug iPad install?
              -Find out about carPC's in just 5 minutes? View the Car PC 101 video

              Comment


              • #8
                Originally posted by MacUsers
                I never tried MySQL on OS X – what sort of binary they have for OS X?
                I've been using PostgreSQL for awhile, but the latest version finally added Stored Procedures (not that i'm using it here). Since I installed it shortly (days) after the last release, i'm guessing that I got the binary off their site (or maybe it played nice compiling, I can't remember). There is also a nice Framework (SMySQL_bundled) for Obj-C that's pretty straight forward and simple. There are also a couple of great tools (MySQL Administrator and MySQL Query Browser) built for OSX.

                I completely agree with your assesment about the average user having to install MySQL, which is why I would like to do something different.

                What’s your actual plan – inserting the song itself into the database as a field value
                Nope, just the file's URL as well as some commonly searched information (album, artist, track name, length, etc..). Reading the contents of the file is actually faster from the file system than via a DB call (though probably not noticable for this application) and there is no need to effectively duplicate your library.

                I just didn’t quite follow your “authentication” - what if I don’t have an iPod (or not mounted)? UID/GID could be used in stead for user authentication. What about the UI to access the backend?
                The iPod is just how I plan to do it, but the method would be up to the Application programmer. The idea is just to have a way to have multiple users without forcing the user to log out and back in with a different OSX account (i.e. specifically for a CarPuter application). I am choosing the iPod SN as my wife and I both have a few of them and it is a simple way to figure out who is driving (or controling the music ).

                What do you mean “Mac friendly Web hosting” – OS X Server based web server or a Linux/Unix one?
                Last time I looked I found a few, but they either forced to use their web based tools or front page. So I suppose non-windows friendly is better

                -dave
                My pathetic worklog.
                CarFrontEnd (now it's own sub-forum!!!!)

                Comment


                • #9
                  Originally posted by Bugbyte
                  Are you sure it's not XML? I've got a 6mb xml file in my iTunes library that has stuff like this in it
                  Well i'll be damned, they updated it sometime since the last time I looked. Thanks for making me look at it again. One way or another I can make good use of that file.

                  -dave
                  My pathetic worklog.
                  CarFrontEnd (now it's own sub-forum!!!!)

                  Comment


                  • #10
                    If you need to Run MySQL on the Mac, http://www.mamp.info/ is the way to go. It's a nice graphical UI that allows for the installation and running my MySQL and PHP 4 or 5. I use this for all of my Test Server Applications to test locally.
                    The Car:
                    2003 Nissan Pathfinder
                    4x4, MacMini, In-Dash


                    Part of the following Forums:
                    audiforums.com - afruss2007
                    theaudiroom.com - airforceruss
                    mp3car.com - airforceruss
                    r6-forum.com - airforceruss

                    Comment


                    • #11
                      i'd like to see something that dosent use the quicktime engine, something like VLC would be much better because of the wider range of formats it supports
                      Signature: [==||========] 20% complete

                      Comment


                      • #12
                        Benjamin, the guy from CCarProject was working on a new version of his software when he disappear. His new code used a database. If some programer start to work on his open source code, maybe it will be enough to interested Benjamin to start again.

                        All his open source code is at:
                        https://opensvn.csie.org/traccgi/CCa...browser/trunk/

                        I have downloaded his code a couple of months ago and I was able to compile it, but it still needed work.

                        CCarProject
                        http://ccarproject.net/

                        I think he wanted to use MPlayer or VLC (open source)
                        http://www.videolan.org/vlc/
                        for movie.

                        If you do not want to start from scratch, you might want to look at his code.

                        Franco
                        Help me keep my web site up to date.
                        Mac-Mini in Passat

                        Comment

                        Working...
                        X