Electrical For discussions regarding wiring up electrical modifications such as radar detectors, brake light mods, power sockets, and driving lights in Clubman (R55), Cooper and Cooper S (R56), and Cabrio (R57) MINIs.

Electrical "List" of songs from USB input?

Thread Tools
 
Search this Thread
 
Old May 24, 2013 | 11:32 AM
  #1  
Slave to Felines's Avatar
Slave to Felines
Thread Starter
|
6th Gear
Joined: Aug 2011
Posts: 2,064
Likes: 15
From: Silly-con Valley
"List" of songs from USB input?

Hi, all. I like to play music off the USB input with a small thumb drive.

It looks like the "list" function to have a playlist to go through randomly would be neat. Any idea how to create a list? I dug the XML file out of the iTunes settings folder and put it on the drive, but I still get a "no playlists" error.

Thanks for any help!
 
Reply
Old May 24, 2013 | 12:15 PM
  #2  
speedkills66's Avatar
speedkills66
3rd Gear
iTrader: (1)
Joined: Apr 2010
Posts: 165
Likes: 0
From: Oakland Bay Area
Originally Posted by Slave to Felines
Hi, all. I like to play music off the USB input with a small thumb drive.

It looks like the "list" function to have a playlist to go through randomly would be neat. Any idea how to create a list? I dug the XML file out of the iTunes settings folder and put it on the drive, but I still get a "no playlists" error.

Thanks for any help!
I'll look at my old thumb drive of songs when I get back home but I'm pretty sure it's a plain text file (cant remember the extension off hand) and the paths have to be relative, not absolute, I believe.
I'll get back to this shortly.
 
Reply
Old May 24, 2013 | 12:49 PM
  #3  
speedkills66's Avatar
speedkills66
3rd Gear
iTrader: (1)
Joined: Apr 2010
Posts: 165
Likes: 0
From: Oakland Bay Area
Well I don't have any playlists on my USB at the moment, but I do remember now the playlists are .m3u format and the paths must be:

artist/album/song
or
album/song
or
song

or something similar.
They cannot be:

D:/artist/song or /artist/song

ie there can be no drive letter or slash in front of the path or you will get an error.
 
Reply
Old May 24, 2013 | 01:12 PM
  #4  
speedkills66's Avatar
speedkills66
3rd Gear
iTrader: (1)
Joined: Apr 2010
Posts: 165
Likes: 0
From: Oakland Bay Area
ps
Unless someone has an easy way of exporting the music and creating the m3u file I don't think its worth the effort.
Alot of manual editing and the playlist function was difficult to use.
I found it easier to load up a USB stick and put it on random.

If i want playlists or more music than is on my USB I use my phone or ipod.
 
Reply
Old May 24, 2013 | 06:23 PM
  #5  
KeyPlayaJim's Avatar
KeyPlayaJim
4th Gear
10 Year Member
Liked
Joined: Apr 2013
Posts: 377
Likes: 15
From: Salem County, NJ, USA
I just tested a flash drive in my MCS last night for the first time, and I have all the music organized in folders, rather than using playlists. It works fine and I found it to be easier that way.
 
Reply
Old May 24, 2013 | 07:52 PM
  #6  
Slave to Felines's Avatar
Slave to Felines
Thread Starter
|
6th Gear
Joined: Aug 2011
Posts: 2,064
Likes: 15
From: Silly-con Valley
Thanks, Speed, I'll check into that format. I can probably put together a scraper to build it from the XML file if I put a little effort into it, so that might work for me.

Jim, I have my stuff in folders, I was just looking for an extra way to organize it.
 
Reply
Old May 29, 2013 | 12:30 PM
  #7  
zcast's Avatar
zcast
3rd Gear
iTrader: (1)
Joined: May 2011
Posts: 268
Likes: 1
From: Orlando, FL
I just recently did this for thumb drive in my MINI. Basically I just stored my music in folders however I wanted. No real rhyme or reason. I think I did genre>artist>album>song. I dumped everything onto the drive. I then used an app (forget the name right now) on my iMac that creates a playlist file (.m3u) based on what songs you drag into it. So for example, I created a playlist called "Classic Rock" and in the app I dragged all the folders and artists that are classic rock into the app. Made the playlist, and dropped the playlist file the app created into the classic rock folder on the thumb drive. I did that for every genre as well as some specialized playlists for other things.

Upon initial boot-up, the system will take a minute to read the drive and locate all your playlist files. Once it does though, you can call up all your playlists from the radio and randomize songs on it.

Works great.

-Z
 
Reply
Old Jun 7, 2013 | 03:14 PM
  #8  
Slave to Felines's Avatar
Slave to Felines
Thread Starter
|
6th Gear
Joined: Aug 2011
Posts: 2,064
Likes: 15
From: Silly-con Valley
I used the "export playlist" feature in iTunes to build the m3u files.

No joy. The path names are all absolute, and they're all colon-delimited instead of slash- or backslash-delimited. The absolute is definitely a problem, I'm not sure if the delimiter is or not.

I'm going to try making a couple of changes to the playlist files and see if I can get it to show up.
 
Reply
Old Jun 8, 2013 | 12:17 PM
  #9  
Slave to Felines's Avatar
Slave to Felines
Thread Starter
|
6th Gear
Joined: Aug 2011
Posts: 2,064
Likes: 15
From: Silly-con Valley
Changing the path to relative didn't help. Changing the path delimiter is harder than I thought it would be. Gotta write up a regular expression to pull it out, and not any of the time references.
 
Reply
Old Jun 9, 2013 | 11:36 AM
  #10  
PNWMini's Avatar
PNWMini
2nd Gear
Joined: Jun 2011
Posts: 51
Likes: 1
This is my method. It might be overcomplicated but it works for me. YMMV.

I use iTunes to export to the thumb drive as .M3U. Then I open it in notepad, then copy the contents to Excel. Then I do an A-Z sort, which puts all the extraneous M3U lines at the top. I page down until I just have the path and then copy and paste that back to the .M3U file. Then in Notepad I search and replace to remove the drive letter and path to the first "\" so d:\users\username\music\Artist\Album becomes \Artist\Album. You shouldn't have to use a regular expression.

I know this is complicated but it let's me use this DOS string to copy only the music on the playlist:

Code:
for /F "usebackq delims==" %i in (Rock.m3u) do if not exist "%i" echo f | xcopy "d:\users\username\music\%i" ".%i"
When I update, I just go through the process and then copy just the added files. You need to run the copy from the root of thumb drive.
 
Reply
Old Jun 10, 2013 | 03:07 PM
  #11  
Slave to Felines's Avatar
Slave to Felines
Thread Starter
|
6th Gear
Joined: Aug 2011
Posts: 2,064
Likes: 15
From: Silly-con Valley
Heh, that looks a lot like bash script.

I don't have a DOS system. I'm pretty sure I can use some of my standard UNIX filters to change the delimiters, I just have to get 'round to it.
 
Reply
Old Jun 13, 2013 | 10:10 AM
  #12  
Slave to Felines's Avatar
Slave to Felines
Thread Starter
|
6th Gear
Joined: Aug 2011
Posts: 2,064
Likes: 15
From: Silly-con Valley
"Empty list" still. I think I'm about to give up.

I suppose I could try using the Windows delimiter (backslash) instead of the Unix delimiter (forward slash).
 
Reply
Old Jun 26, 2013 | 08:49 AM
  #13  
Errant's Avatar
Errant
2nd Gear
Joined: Mar 2013
Posts: 137
Likes: 0
I've tried it with playlists and all music at root level, the playlists and all associated music in a separate folders, playlists at root and music in folders... still get "empty playlist."

I would love to get this figured out! I'm using an iTunes script to create the M3U file and copy the music to the flash drive. This is what the output looks like, when putting everything at root:

#EXTM3U
#EXTINF:227,Heather - Zambri
Zambri Heather.m4a
#EXTINF:256,Into My Arms - Nick Cave & The Bad Seeds
Nick Cave & The Bad Seeds Into My Arms.mp3
#EXTINF:240,Rock N Roll ****** - Patti Smith
Patti Smith Rock N Roll ******.mp3
#EXTINF:277,Astronaut: A Short History Of Nearly Nothing - Amanda Palmer
Amanda Palmer Astronaut_ A Short History Of Nearly Nothing.m4a
#EXTINF:229,The Kill - The Dresden Dolls
The Dresden Dolls The Kill.m4a
#EXTINF:188,Yes Way - Tanlines
Tanlines Yes Way.mp3
#EXTINF:246,Balance - Future Islands
Future Islands Balance.m4a
#EXTINF:210,Don't Know You At All - Blood Feathers
Blood Feathers Don't Know You At All.m4a
#EXTINF:286,July - Youth Lagoon
Youth Lagoon July.m4a
 
Reply
Old Jun 26, 2013 | 09:47 AM
  #14  
Errant's Avatar
Errant
2nd Gear
Joined: Mar 2013
Posts: 137
Likes: 0
I tried another iTunes script (iTuneMyWalkman) and it was able to read the playlist! This one placed the M3U at root, and music into folders (name/album/song). This script wrote a more simple M3U file, that looked like this:

#EXTM3U
David Bowie/Changesbowie/04 Ziggy Stardust.m4a
The Dresden Dolls/No, Virginia.../09 The Kill.m4a
Florence + The Machine/Lungs/05 Kiss With a Fist.m4a
Modest Mouse/Good News For People Who Love Bad News/02 The World At Large.m4a
Red Hot Chili Peppers/Greatest Hits/07 Suck My Kiss.m4a
Vampire Weekend/Vampire Weekend/06 Campus.m4a

Now to try it with more than one playlist...
 
Reply
Old Jun 26, 2013 | 05:56 PM
  #15  
PNWMini's Avatar
PNWMini
2nd Gear
Joined: Jun 2011
Posts: 51
Likes: 1
I told iTunes to just Export a playlist (M3U) to a flash drive. I did not edit it, not even to change the drive letter. I put the playlist on the root. Then I coped songs to Artist\Album Song just as in my library. My Mini picked it up and played fine. It even showed the accents in "Café Carnivál" correctly. It's a 2011 with Nav if that matters.

Code:
#EXTM3U
#EXTINF:176,Green Onions - Booker T. & the MG's
E:\Users\<username>\My Music\Booker T. and The MG's\Green Onions\01 Green Onions.m4a
#EXTINF:347,Innocent Kiss - Craig Chaquico
E:\Users\<username>\My Music\Craig Chaquico\Shadow and Light\01 Innocent Kiss.m4a
#EXTINF:251,Westside Hotel - Craig Chaquico
E:\Users\<username>\My Music\Craig Chaquico\Shadow and Light\02 Westside Hotel.m4a
#EXTINF:236,Luminosa - Craig Chaquico
E:\Users\<username>\My Music\Craig Chaquico\Shadow and Light\03 Luminosa.m4a
#EXTINF:370,Hurry Home - Craig Chaquico
E:\Users\<username>\My Music\Craig Chaquico\Shadow and Light\04 Hurry Home.m4a
#EXTINF:357,Keepers Of The Flame - Craig Chaquico
E:\Users\<username>\My Music\Craig Chaquico\Shadow and Light\05 Keepers Of The Flame.m4a
#EXTINF:269,Afterglow - Craig Chaquico
E:\Users\<username>\My Music\Craig Chaquico\Shadow and Light\06 Afterglow.m4a
#EXTINF:311,Shadow And Light - Craig Chaquico
E:\Users\<username>\My Music\Craig Chaquico\Shadow and Light\07 Shadow And Light.m4a
#EXTINF:244,Could We Fall In Love - Craig Chaquico
E:\Users\<username>\My Music\Craig Chaquico\Shadow and Light\08 Could We Fall In Love.m4a
#EXTINF:271,Café Carnivál (Sax in the Sun Remix) - Craig Chaquico
E:\Users\<username>\My Music\Craig Chaquico\Shadow and Light\10 Cafe Carnival (Sax In The Sun Remix).m4a
#EXTINF:338,Compared To What - Craig Chaquico/Jeff Kashiwa/Warren Hill
E:\Users\<username>\My Music\Craig Chaquico\Shadow and Light\09 Compared To What.m4a
 
Reply
Old Jun 27, 2013 | 03:43 PM
  #16  
Slave to Felines's Avatar
Slave to Felines
Thread Starter
|
6th Gear
Joined: Aug 2011
Posts: 2,064
Likes: 15
From: Silly-con Valley
Interesting. When I exported an m3u playlist from iTunes, a whole lot more information was included than just the location. Perhaps if I chop out all of the other stuff, it could read it? Hmm...

Thanks for the ideas, I'll keep trying.
 
Reply
Old Jun 27, 2013 | 04:58 PM
  #17  
PNWMini's Avatar
PNWMini
2nd Gear
Joined: Jun 2011
Posts: 51
Likes: 1
Do we need to check versions and such?
This was from Windows 8, not OS X. iTunes version was 11.0.4.4.
There are three export formats: text, XML, M3U, and M3U8 and only M3U worked.
 
Reply
Old Jun 28, 2013 | 07:55 AM
  #18  
Errant's Avatar
Errant
2nd Gear
Joined: Mar 2013
Posts: 137
Likes: 0
Hmmm with all of the posts in this thread, it never dawned on me to just let iTunes do the export. I'll give that a try, too (although this script works well). I'll post back my results

Oh, and I'm running OSX10.7.6 and iTunes 11.0.4 (4) on this computer.
 
Reply
Old Jun 29, 2013 | 09:36 AM
  #19  
PNWMini's Avatar
PNWMini
2nd Gear
Joined: Jun 2011
Posts: 51
Likes: 1
I played around a little more. The slashes need to be Windows-style (\) and not Unix-style (/) or the playlists are ignored.

I don't know what's up with the drive letters. It worked for the list I posted but on a 2500 song playlist it would not unless I removed the drive letters. It looks like paths just start at the root ( e.g. OneRepublic\Waking Up\06 Good Life.m4a). It's easy to wipe out the initial part after iTunes does the export.
 
Reply
Old Jun 29, 2013 | 10:44 AM
  #20  
Slave to Felines's Avatar
Slave to Felines
Thread Starter
|
6th Gear
Joined: Aug 2011
Posts: 2,064
Likes: 15
From: Silly-con Valley
New version of iTunes now. I did the .m3u export, left in the windows-style carriage returns, and removed the path up until the artist folder.

Still get "empty list". :(
 
Reply
Old Jun 30, 2013 | 09:38 AM
  #21  
PNWMini's Avatar
PNWMini
2nd Gear
Joined: Jun 2011
Posts: 51
Likes: 1
I noticed when I was experimenting that the system remembers the drive's info. I don't know what it cues off of but I did notice that different drives with different volume labels seemed to be indexed faster. If you can, try with a different drive or change the volume label with no more than 50 or so files.

When I was done and put the same drive back in with 6,000+ songs, it took 15 minutes for the system to finish indexing and show the playlists. It showed the song and artist info first so I think playlists are last or lower priority for indexing. Also you cannot see the playlists browsing the directly until the system has finished looking at all the songs.
 
Reply
Old Jun 30, 2013 | 03:57 PM
  #22  
Slave to Felines's Avatar
Slave to Felines
Thread Starter
|
6th Gear
Joined: Aug 2011
Posts: 2,064
Likes: 15
From: Silly-con Valley
That's a good point! I have seen that you don't get most of the options for navigating the USB for a while the first time you plug it in. It also happens after you make large changes. Presumably that's when it is doing the indexing.

I think I've been checking during that time, so it may simply have been that it wasn't done indexing.

I'll try again.
 
Reply
Old Jul 1, 2013 | 08:24 AM
  #23  
Errant's Avatar
Errant
2nd Gear
Joined: Mar 2013
Posts: 137
Likes: 0
Letting iTunes do the export didn't work for me. I'm going stick with using the iTuneMyWalkman script, which works great
 
Reply
Old Jul 2, 2013 | 10:22 AM
  #24  
Slave to Felines's Avatar
Slave to Felines
Thread Starter
|
6th Gear
Joined: Aug 2011
Posts: 2,064
Likes: 15
From: Silly-con Valley
Got it working! I made four different lists, and set them up with different combinations of things.

- All had "relative paths", which started from the root of the USB stick
- In all files, the non-comment lines were only the path to a music file
- One file had Windows-style carriage returns (shown as ^M in vim, or escaped as \r in other Unix tools) and Unix-style forward-slash path separators.
- One file had Windows-style carriage returns and Windows-style backslashes as path separators
- One file had Unix-style newlines (escaped as \n in most Unix utilities) and Unix-style forward-slash path separators
- One file had Unix-style newlines and Windows-style backslash path separators.

The two files with backslash separators worked. It did not appear to matter which end-of-line was used.

Here is a snippet from one file:
Code:
#EXTINF:241,Frank Sinatra - CAKE
CAKE/Fashion Nugget/01 Frank Sinatra.mp3
#EXTINF:180,The Distance - CAKE
CAKE/Fashion Nugget/02 The Distance.mp3
#EXTINF:202,Friend Is A Four Letter Word - CAKE
CAKE/Fashion Nugget/03 Friend Is A Four Letter Word.mp3
#EXTINF:224,Open Book - CAKE
CAKE/Fashion Nugget/04 Open Book.mp3
#EXTINF:224,Daria - CAKE
CAKE/Fashion Nugget/05 Daria.mp3
#EXTINF:81,Race Car Ya-Yas - CAKE
CAKE/Fashion Nugget/06 Race Car Ya-Yas.mp3
So, my process, using iTunes (11.0.4(4)) on a Mac:
- In iTunes, go to the playlist you want to export.
- Select "Export..." from the file menu or from the right-click context menu.
- Export as M3U file. This file is saved with Unix-style forward-slash path separators, and Windows-style carriage returns.
- From a Terminal window, filter out the path names up to the artist name. (I used 'sed -i -e "s/\/Users\/<username>\/Music\/iTunes\/iTunes Media\/Music\///g" *.m3u' to tear out the first part of the path in all of the m3u files after I had exported them.
- Change the forward slashes to backslashes. I used 'sed -i -e "s/\/\\/g" *.m3u' to change all forward slashes to backslashes in all m3u files.
- Copy the files onto the USB stick.
- Plug into car, drive for several minutes. Eventually the stereo should recognize the playlist files.

One of the things I had been doing wrong is copying the wrong files onto the memory stick! I had a previous version saved in one spot, and I was saving the new lists to a new spot. Then I would edit the new ones, and copy the old ones onto the stick. Oops.

Anyway, I hope this helps others looking for how to get this set up in the future.
 

Last edited by Slave to Felines; Jul 2, 2013 at 10:27 AM.
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
gar56
MINIs & Minis for Sale
1
Nov 15, 2016 06:41 AM
rikaro
Interior/Exterior
2
Nov 24, 2015 02:05 PM
eliseo1981
MINI Parts for Sale
4
Nov 2, 2015 11:24 AM
Wombat Pie
Navigation/Audio
7
Oct 5, 2015 08:00 PM
krohm
1st Gear
7
Sep 28, 2015 12:16 PM




All times are GMT -7. The time now is 05:43 PM.