Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tattwamasi committed Mar 17, 2015
1 parent d7ab83f commit e197497
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# TeslaTunes
Copy your iTunes or other music library, automatically converting Apple Lossless to Flac, to a destination for use with your Tesla Model S

This is a little Mac OS X utility I wrote for personal use to simplify a reoccurring need to get new music from my home music library into the external drive I use in my Model S. My library is mostly composed of Apple Lossless tracks, but also has a number of other formats as well, chiefly mp3, aac (m4a), and a few wave files. While it's easy enough to copy the whole library manually, there are a few issues that make that enough of a pain that I wanted something easier - thus this utility was created:

1. Unfortunately the Model S doesn't (yet) handle the Apple Lossless format - though it does handle FLAC, another lossless audio format which Apple Lossless can be converted to.
2. I don't want to convert all my Apple Lossless to FLAC in my home library, though I'd reconsider if Apple started directly supporting it.
3. While other programs exist that can copy or sync directories, none of them worked automatically while also handling automatic conversion of *just* files that need to be converted, while leaving others alone.

So I built this. The app will scan a source and destination directory of your choosing (and remember it, so you don't have to choose it each time), and will copy or convert as appropriate all files in the source directory that don't exist in the destination directory (including in converted FLAC form, if the source is Apple Lossless).
* It won't copy files it doesn't think the Model S can play (though as noted will convert Apple Lossless to FLAC automatically).
* It won't overwrite any files, and it won't create extra copies of any files, including leaving around Apple Lossless copies at the destination.
* It won't leave partially copied or converted files laying around if you stop it partway through (though no promises in the event of crashes, system hangs, etc.).
* It's vaguely fast... with qualifications.
* It's multithreaded and once it gets to the actual Apple Lossless to FLAC bits, it's quite good at loading up the machine and doing them fast as possible. The FLAC conversions use the Flac project libraries directly rather than calling out to another program. It could be faster... but not a lot, I don't think.
* Copies are also reasonable (and also multithreaded), if not fast - similar to what it'd be if you just dragged and dropped the files yourself. It's mostly system time. Not sure how to get them any faster.
* Scanning for what to copy or convert in the first place is fairly fast, but limited to a single thread and in the event of m4a files, each has to be opened to see if it is actually an Apple Lossless file rather than a AAC file, since both use the MPEG4 audio file container.

My intent for this project, in addition to the obvious one of make life easier with the music library management, was to use it as a testbed for different implementations as well. I wanted to do largely the same small program in Swift, Objective C, and (to the extent I could) standard and portable as possible C++ (C++14 / 17 to be more specific). I also wanted to make Windows and Linux versions with as much common code as possible, as interest and time permits. That said, I wanted to go ahead and put this out there on the off chance it may help a few other people with the same library management goals as me.


![EXAMPLE: after re-scanning my libary to make sure there are no new songs to copy](https://cloud.githubusercontent.com/assets/3465489/6682923/3ba0a67a-cc3c-11e4-991a-f6597cf2d42d.png "EXAMPLE: after re-scanning my libary to make sure there are no new songs to copy")

0 comments on commit e197497

Please sign in to comment.