Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Seeking 6 beta testers for TeslaShuffle project (shuffling/randomizing USB music)

This site may earn commission on affiliate links.
The lack of a simple shuffle/random feature on USB music playback has prompted me to code a small Windows application to hack my own no-repeat random playback in the Model S.

I'm seeking 6 beta testers for evaluation.

This program will require the following:

- mp3 or flac files only
- all files on root drive of USB device (no folder structure)
- existing files are properly tagged
- filenames are <artist> <title> only (i.e. "The Beatles - I Want to Hold Your Hand.flac")

Please Note: The are many programs available to accomplish <artist> <title> naming convention. I'd highly recommend Media Monkey: http://www.mediamonkey.com

What this program does:

- Counts the number of media files (i.e. 750)
- Randomizes 001 thru 750 and assigns each file a number
- Retrieves file "Title" tag and changes to the assigned random number + Title (i.e. Title tag "Help" becomes "045 Help")
- Retrieves file "Track Number" tag & eliminates it (Tesla keys on track # and Album tags to correctly title song thus defeating shuffling)
- Renames file itself (i.e. "The Beatles - Help.flac" is renamed to "The Beatles - 045 Help.flac"
- With playback, proper artist/album/image appears
- Will play all 750 files in randomized non-repeating order.

After all music has played thru once, it will repeat from 001 or you can reshuffle with TeslaShuffle program again.

Please click my username to send a private message with your email address if you're interested in evaluating.
 
I'm surely missing something so bear with me.

Why isn't it as simple as:
1. input: all files in the root directory of the USB with unique names
2. count the files
3. strip "[#] " prefix from each filename if present
4. add "[#] " prefix to each filename

Why does it matter what the file extension or format is?

(In case it's not obvious, step 3 allows you to rerun the tool with the same content to get a different order.)
 
I'm surely missing something so bear with me.

Why isn't it as simple as:
1. input: all files in the root directory of the USB with unique names
2. count the files
3. strip "[#] " prefix from each filename if present
4. add "[#] " prefix to each filename

Why does it matter what the file extension or format is?

(In case it's not obvious, step 3 allows you to rerun the tool with the same content to get a different order.)

That's what I was thinking too. I tried messing around with some other solutions, but unfortunately FAT32 doesn't support symlinks. Wonder if you could format a USB stick to something else and have the on board media player recognize it? You could have something generate files like 001.mp3 002.mp3 etc and have those symlinked (or shortcutted) so that the actual track played is a random track from your library
 
Brianman

Tesla code appears to access all tags (title,track,album,artist,etc) within the file & the filename itself in trying to determine the song actually playing. Tesla then displays best guess Title, Artist, Album info plus image. Excellent coding on their part because of the numerous naming/tagging conventions and erroneous auto-tagging tags. Difficult if you simply wish to numerically rename your file & play in numerical as opposed to alphabetical order. Do a simple test yourself & you'll see what I mean.
 
you can reshuffle with TeslaShuffle program again.

Please click my username to send a private message with your email address if you're interested in evaluating.

lets not run random binaries and give the NSA a backdoor to our driving habits now, capeesh? lol :p

well actually they already have that from the ez-pass rfid tags and insurance driving habit devices.... oh well
 
The lack of a simple shuffle/random feature on USB music playback has prompted me to code a small Windows application to hack my own no-repeat random playback in the Model S.
... snip ...
Huh? How does a windows app help playback on a linux mounted drive? AFAIK the OS for the model S appears to be some variation on the nVidia linux for Tegra dev.
 
I assume you have to put the USB back in your windows machine every time you want to shuffle right?
Oh, lol. Do that in perl!

I should've read closer. Of course that's what the program does! Hmmm... seems like could do same thing with a batch file or shell script into a folder within the USB and then just play from the random folder. With large flash drives and compressed files you could have some fun with this.
 
Incidentally, based on my testing, the car caches album artwork based on filename. This means that if you have 1000 songs, and they're renamed each time through, then each time through your playlist the album artwork will need to be redownloaded and recached. Not sure how big the cache can get before the system purges it.

Either way...Tesla...are you listening? This should be trivial to implement once the energy saving issues are in order!
 
Appreciate the attempt to hack around the limitation :)

I understand Tesla has priorities, but seriously, how hard can it be to build in this functionality?
Collections.shuffle( USBUtil.readAllSongs() )
 
Incidentally, based on my testing, the car caches album artwork based on filename. This means that if you have 1000 songs, and they're renamed each time through, then each time through your playlist the album artwork will need to be redownloaded and recached. Not sure how big the cache can get before the system purges it.

Either way...Tesla...are you listening? This should be trivial to implement once the energy saving issues are in order!

Yes but is it cached locally or on the drive itself? I never checked to see if there was any type of index file written to after plugging in. (From experience I know that other media players do this...but it guess that's because they don't have any internal storage of their own).