YAPL - a new playlist creator for the FUZE

Hi all - 

My first post, and it’s to announce a very early version of my playlist creator for my new FUZE. It’s for Windows, and requires you to connect your FUZE in MSC mode. It creates playlists which can reference both the drives the FUZE uses.

The UI is very rough, and there will be bugs. Unfortunately, there is nobody else around me that has a FUZE, so I’m throwing this out for testing on here. It works by asking you which drives correspond to your FUZE drives (internal and u-SD slot) and then builds a list of media on those drives. You use a simple select-and-assign method to add your files to a playlist which can then be saved to the FUZE. Thanks to Christian Packmann, these files can reference either drive within the same playlist - something that I see a few people have asked for.

The prog is very rough, and can be considered Beta-quality. There will be bugs and issues that I have yet to see on my machine, but will appear on yours. If you could leave feedback here (both about bugs and features/enhancements you’d like to see) then I’d be happy to get them sorted.

You can find the prog here:

http://paul.dunn.googlepages.com/YAPL.zip

Thanks for your time!

D.

Message Edited by Dunny on 07-25-2009 02:03 AM

 No support for ogg?

Anyway, this would be extremely useful for me if it did support ogg format but unfortunately it doesnt. I can see, however, this does have huge amounts of potential :slight_smile:

As you’re the first person to request something, then I’ll add ogg support (including Vorbis comments) to the next release.

Cheers :slight_smile:

D. 

That would actually be awesome, thanks so much :slight_smile:

Looks promising, if only it wasn’t win32-only…

If you are not willing to port it to other operating systems, could you please post the source code, so another could could do it?

If it’s in a easyly-readable language, I might implement it’s functions to video4fuze.

Thank you for your contribution to the sansa community :slight_smile:

It’s written in Borland Delphi 5, and relies for the most part upon Win32 API to get most of the job done from a UI perspective - the actual playlist creation is pretty easy and can be done with a script. Basically you need to use unix paths, and reference the internal drive as /mmc:0:/somefolder/sometune and the micro-sd as /mmc:1:/somefolder/sometune.

I may release the source when I complete the next version, I need to check the licenses of the components I’m using.

D.

Great information! Those paths work in m3u files, I assume.

Delphi? Ouch, it could’nt be less portable then, I think. If it was in another language, the win32 issue still could be worked around using winelib…

Sorry about the delphi :slight_smile:

Basically, Delphi handles the Win32 side of the UI - I’ve implemented USB stack searching to automatically determine the drives that the Fuze utilises, and a lot of heavy API To get drag and drop working, with alpha blended images for the sheer hell of it. The actual file-search is done using the free audio library ATL (http://mac.sourceforge.net/atl/) which just pulls out tags (though I shall be adding batch tag editing and possibly replaygain tags too).

The routine to generate a playlist is thus:

DriveLetter := FuzeStatus.Internal.DriveLetter;



SaveList := TStringlist.Create;



For Idx := 0 To PlayList.Count -1 Do Begin



Str := PlayList[Idx];



Idx2 := 1;



While Idx2 \< Length(Str) Do Begin



If Str[Idx2] = '\' Then



Str[Idx2] := '/';



Inc(Idx2);



End;



If Str[1] = DriveLetter Then



Str := '/mmc:0' + Copy(Str, 2, Length(Str))



Else



Str := '/mmc:1' + Copy(Str, 2, Length(Str));



SaveList.Add(Str);



End;

You cannot use files from both the internal and external storage with any playlists other than .pla format. m3u and others cannot be used. 

You have to make a playlist using two files - one blank file ( “playlist.pla” ) of zero bytes, and one ( “playlist.pla.refs” ) which contains the filenames in unix format. Both need to reside in the Fuze’s PLAYLISTS folder, on the root of the internal storage.

Other than that, it’s pretty easy.

The only license that any of my source components use is the LGPL, so I shall have no problems making the source available when it’s in a fit state to do so. 

D.

Message Edited by Dunny on 08-20-2009 03:34 PM

@ssorgatem wrote:
Great information! Those paths work in m3u files , I assume.

Delphi? Ouch, it could’nt be less portable then, I think. If it was in another language, the win32 issue still could be worked around using winelib…

No, they don’t work in m3u files but in SanDisk Sansa’s own pla playlist files. See also this post (and others). Should not be difficult to code as it is plain absolute file names only …

But they work only for MTP?

I’ve read something somewhere about m3u in the fuze in MSC…

.pla files are created by WMP et al when in MTP mode, yes, but the Fuze doesn’t care which mode it’s in when reading files :wink:

You can use m3u, and they do have to be created in MSC mode, but they cannot reference both drives in one playlist - you have to use relative paths and put the playlist on one drive or the other, with only files on that drive being in the playlist.

.pla can reference files from either drive.

D.

I’m going to implement playlist creation/edition in video4fuze, and I have some questions:

Which one should I use, .m3u or .pla format, if I want it to be able to create playlists for both mtp and msc connected fuzes?

Could anyone send me (or even better: post) an example .pla file? Are they binary or plain text? I haven’t found much information on the net about them… so any help would be apreciated :wink:

Oh, and it would help also a lot if you posted YAPL’s playlist-creation code (it shouldn’t be a very long code snippet, am I right?)

No problem -

you should use .pla format. .m3u cannot contain files from both internal and uSD slot within the same playlist. When the Fuze is connected in MTP mode, the .pla format is the type used by the Fuze itself.

There are two files needed for the .pla format. First, is <filename>.pla which is an empty zero byte file. In the same directory, you should add a <filename>.pla.refs file, which contains the songs. One per line, with unix path formats. The internal drive is designated /mmc:0:/ and the uSD slot is /mmc:1:/. the filenames in unix format follow those headers.

for example, here’s my war-of-the-worlds playlist:

/mmc:1:/music/jeff wayne/war of the worlds/jeff wayne - war of the worlds - 01 - the eve of the war.mp3

/mmc:1:/music/jeff wayne/war of the worlds/jeff wayne - war of the worlds - 02 - horsell common and the heat ray.mp3

/mmc:1:/music/jeff wayne/war of the worlds/jeff wayne - war of the worlds - 03 - the artilleryman and the fighting machine.mp3

/mmc:1:/music/jeff wayne/war of the worlds/jeff wayne - war of the worlds - 04 - forever autumn.mp3

/mmc:1:/music/jeff wayne/war of the worlds/jeff wayne - war of the worlds - 05 - thunder child.mp3

/mmc:1:/music/jeff wayne/war of the worlds/jeff wayne - war of the worlds - 06 - the red weed (part 1).mp3

/mmc:1:/music/jeff wayne/war of the worlds/jeff wayne - war of the worlds - 07 - the spirit of man.mp3

/mmc:1:/music/jeff wayne/war of the worlds/jeff wayne - war of the worlds - 08 - the red weed (part 2).mp3

/mmc:1:/music/jeff wayne/war of the worlds/jeff wayne - war of the worlds - 09 - brave new world.mp3

/mmc:1:/music/jeff wayne/war of the worlds/jeff wayne - war of the worlds - 10 - dead london.mp3

/mmc:1:/music/jeff wayne/war of the worlds/jeff wayne - war of the worlds - 11 - epilogue (part 1).mp3

/mmc:1:/music/jeff wayne/war of the worlds/jeff wayne - war of the worlds - 12 - epilogue (part 2).mp3

As you can see, it’s all stored on the uSD slot.

As you asked, here’s my playlist creation code in Borland Delphi 5:

DriveLetter := FuzeStatus.Internal.DriveLetter;



SlotLetter := FuzeStatus.Slot.DriveLetter;



SaveList := TStringlist.Create;



For Idx := 0 To PlayList.Count -1 Do Begin



Str := PlayList[Idx];



Idx2 := 1;



While Idx2 \< Length(Str) Do Begin



If Str[Idx2] = '\' Then



Str[Idx2] := '/';



Inc(Idx2);



End;



If Str[1] = DriveLetter Then



Str := '/mmc:0' + Copy(Str, 2, Length(Str))



Else



Str := '/mmc:1' + Copy(Str, 2, Length(Str));



SaveList.Add(Str);



End;

 For each playlist item, get the filename. Then convert to unix format paths. Then replace drive letters with the proper assignments. At the end, you have a playlist in the SaveList stringlist. You may or may not find that useful!

Any more questions, just ask - but there should be everything you need up there.

D. 

Message Edited by Dunny on 09-06-2009 12:14 AM

Oh, thank you very much!

One last question: the .pla.refs file has to have DOS line endings, I assume, right?

I’ll start implementing this right now :slight_smile:

Yes, DOS CR+LF endings are a must. Glad to be of help!

Question - are you going to include ID3/Vorbis/WMA tag editing?

D.

Tag editing is not planned, as I think there are already very good programs for that (see easytag). But it wouldn’t be hard to implement, if there’s demand of it.

  I’ve downloaded and tried YAPL v.04 and v.03 and can’t get them to work. I am running Vista, and have installed the lastest firmware on my 4 gb Fuze due to the horrible sound quality when I first purchased it. My Problem with YAPL started with V.03 not recognizing the tracks on my Fuze, it did however recognize that it was 81% full. So I tried v.04 and the same thing… Now when I start either version and then plug in my Fuze, it freezes…Oh and now its not even recognizing my 8gb miniSD card anymore. Any help with my issues with YAPL will be greatly appreciated… Thank You.