Log in

View Full Version : Gapless Music Playback On Your Pocket PC


Ed Hansberry
10-04-2004, 03:00 PM
If you don't know what gapless playback is then you probably don't have any CDs that require it. There are some CDs and genres of music that require it. Basically, the CD is one long track but it is divided into several "songs." There is no break between them though and you really can't listen to them in any order other than how they were put on the CD. The track listing may be for convenience, but it really isn't necessary. You can <a href="http://www.pretentiousname.com/mp3players/">read more on gapless playback here</a> if you want to get more technical about it.<br /><br /><img src="http://www.pocketpcthoughts.com/images/hansberry/tips/gapless/gapless-listening.gif" /><br /><br />When Windows Media Player on your desktop, as well as most ripping programs, rips the CD, it creates a separate WMA, or MP3, file for each song. On your desktop, this isn't a problem as WMP supports gap-less playback. You won't be able to tell when it moves from one track to the next. Your Pocket PC is a different matter.<!> There is a light pause between songs, something that you can't tell 99% of the time since each song on most CDs stands on its own. When playing back these continuous CDs though, the gap is unnerving to say the least and can totally ruin the CD for you.<br /><br />So I am going to show you how to create a gapless WMA file using software included on every Windows XP machine sold. For my example, I will be using Windows XP, Windows Media Player 9 (also works with the newer WMP10) and Windows Movie Maker 2. The latter two are available as free upgrades for Windows XP from <a href="http://windowsupdate.microsoft.com/">Microsoft's Windows Update site</a> in the "Windows XP" section, right below the "Critical Updates" section. I understand that there may be third party alternatives for doing this and I recommend you investigate those if you will do a lot of this. I currently have two CDs I am interested in doing this for and installing extra software for something I will hopefully only do once for each of these two CDs seems like overkill.<br /><br />First, rip your CD. I recommend re-ripping it for this even if you already have it on your hard drive, but turn up the copying bitrate to the new "Windows Media Audio Lossless" format, which will require up to 500MB per CD. Some of you may already be using a lossless format for your PC audio needs. If so, you can start with files already on your hard drive.<br /><br /><img src="http://www.pocketpcthoughts.com/images/hansberry/tips/gapless/gapless-highbitrate.gif" /><br /><b>Figure 1:</b> Rip your music at the highest bitrate possible. This is in the Tools|Options dialog box in Windows Media Player.<br /><br />The reason you need to do this is your music will get downsized at least one more time before it makes it to your Pocket PC, maybe twice, so the higher you start with, the better. Also note I have disabled the "Copy protect music" box, also known as "Check me and you'll hate it because sometime down the road the music you rip will be unplayable" box. If this is copy protected with a DRM license file, you may not be able to continue. Finally, pay attention to the folder this is going to be stored in. You'll need to know that in a few minutes. Windows Media Player generally records it in the folder listed in Figure 1, then in a subfolder with the artist's name, then the CD name, then the tracks below that. I am going to do this with David &amp; Diane Arkenstone's "Echos of Egypt" CD, so my music will ultimately be in <b>E:\My Music\Diane &amp; David Arkenstone\Echoes of Egypt</b>.<br /><br />Now that you have ripped this music, you are ready to concatenate it, or make it one long track. Start Windows Movie Maker 2. Select the "Import audio or music" link, as shown in Figure 2.<br /><br /><img src="http://www.pocketpcthoughts.com/images/hansberry/tips/gapless/gapless-importmusic.jpg" /><br /><b>Figure 2:</b> Import your newly ripped music into Windows Movie Maker.<br /><br />Next, navigate to the folder your CD was ripped to and select all of the songs then press the "Import" button.<br /><br /><img src="http://www.pocketpcthoughts.com/images/hansberry/tips/gapless/gapless-importmusicfiles.jpg" /><br /><b>Figure 3:</b> Selecting the songs to import.<br /><br />Once they are imported, you should be looking at a window similar to Figure 4. It shouldn't take but a few seconds to import an hour's worth of music. This CD only has 5 tracks total, each 10-15 minutes long. You may have more.<br /><br /><img src="http://www.pocketpcthoughts.com/images/hansberry/tips/gapless/gapless-importedmusic.jpg" /><br /><b>Figure 4:</b> Your music files in Windows Movie Maker 2.<br /><br />Now, click and drag all of the music down to the timeline in Windows Movie Maker to the Audio/Music row. You may need to click the "Show Timeline" button mid-way down the screen if the Storyboard is being shown.<br /><br /><img src="http://www.pocketpcthoughts.com/images/hansberry/tips/gapless/gapless-timeline.gif" /><br /><b>Figure 5:</b> Joining your files<br /><br />You can drag them around in the timeline to make sure they are in the right order. Now you are ready to create your single WMA file. Be very careful that they don't overlap at all in the timeline or you'll get an ad hoc crossfade. Select File|Save Movie File in Windows Movie Maker 2, select My Computer and click Next. Name the file and select the folder you want to save it in. I just leave it in the My Videos folder. I am going to delete it later anyway.<br /><br /><img src="http://www.pocketpcthoughts.com/images/hansberry/tips/gapless/gapless-savefile.gif" /><br /><b>Figure 6:</b> Saving the "movie" file - it will really be a WMA audio file.<br /><br />Select the "Best Fit To File Size" option. WMM2 will automatically pick the biggest file size it is capable of generating. Selecting any other choices will cause the file to be smaller, which may not be desirable. When Windows Movie Maker is done making the file, check the "Play movie when I click finish" box and press the "Finish" button. You will now be able to listen to the long single file in Windows Media Player.<br /><br />Now you are ready to transfer the CD to your Pocket PC. If you are ok with the larger file and your ears are more discerning, you can manually copy the file over to your Pocket PC at this point. If you need to save some space or if you are like me and ok with 64kb-128kb bitrates, you can dock your Pocket PC and let Windows Media Player shrink the file for you. Select Tools|Options to get the Options dialog box shown in figure 6 below.<br /><br /><a href="http://www.pocketpcthoughts.com/images/hansberry/tips/gapless/gapless-savetodevice-lg.jpg"><img src="http://www.pocketpcthoughts.com/images/hansberry/tips/gapless/gapless-savetodevice-sm.jpg" /></a><br /><b>Figure 7:</b> Configuring Windows Media Player to transcode your file to a smaller format for your Pocket PC.<br /><br />Now simply let Windows Media Player transfer the file to your Pocket PC. It will first go through a transcoding process and then will do the actual file transfer. Be patient as it is a huge file and will take even the fastest PC a few minutes to convert.<br /><br />That's all there is to it! Hopefully in the future Microsoft will allow for true gapless playback in the Pocket PC version of Windows Media Player which will eliminate the need for these steps. One benefit to this though is the playlist is simple - one file. There is no need to worry about getting the songs in the wrong order. :)

Darius Wey
10-04-2004, 03:22 PM
Nice guide. There are a lot of other programs out there that do this kind of thing though.

I agree with you. I really hope there will be true gapless music playback in the near future, and we will not have to rely on one file to give us what we want. I hope WMP10 (PPC) shows promise. *Still Dreaming* :D

dmy
10-04-2004, 05:07 PM
So much work for gapless playback...... wow.

Also, using a "lossless" compression that is "mathmatically lossless" isn't really lossless... you will lose something somewhere.

Can I suggest a couple of alternatives??

Easy CD-DA Extractor: http://www.poikosoft.com/
Not free, but will extract your CD's far easier than WMP will, it'll also extract an entire CD to one file if you'd like, and in any one of dozens of formats. If you wanna go true lossless, extract to FLAC or APE.... then use the built in converter to convert to MP3 or better yet, OGG-Vorbis (better sound with better compression generally speaking than MP3). I personally have my entire collection (including the CD used in Ed's example) ripped to FLAC, and then I convert the lossless to OGG for my pocket PC, low-bitrate MP3 for my wife's portable player, and high-bitrate MP3 for my home audio system. When a new release of OGG came out a few weeks ago with the exellent aoTuV enhancements, I updated EZ CD-DA, and set it off re-converting my entire collection of OGG.

Another alternative is AudioGrabber: http://www.audiograbber.com-us.net/
It's another one that makes extraction painless and easy, and does full CD's as a single file if you so desire. It doesn't however do conversion from one format to another, but it is FREE.

As for gapless playback.... well.... I don't bother with all the hassles of piecing them back together or ripping the entire CD to one file. I just use a player that supports gapless playback.

Cheers,
D.

jeffmd
10-05-2004, 04:38 AM
dmy, its lossless. Think pkzip and rar.

This isnt gapless playback.. this is cutting and pasting multiple audio tracks together.

has anyone here used pocket player by conduits? I dont have wma files to test it, but is supports ogg/mp3/wma and gapless as well as crossfading (I never tire of this effect on non gapless music). Combined with winamp skin support, a good EQ, and uses the MAD mp3 decoder (a code base that strives for the most highest precision mp3 decoding) I think its the best music player for pocket pc.

Darius Wey
10-05-2004, 05:09 AM
Pocket Music also supports crossfading to make it seem like gapless music playback is employed.

However, it would still be nice to see an effort being made by Microsoft to make native support for gapless music playback present in Windows Media Player for the Pocket PC.

dmy
10-05-2004, 04:03 PM
dmy, its lossless. Think pkzip and rar.

PKZip and RAR are lossless, even Microsoft admits that WMA Lossless is "mathematically" lossless (heh..... see figure 1 in the original article, the screenshot even says it). Yes, I'm aware that "mathematically lossless" is close enough for 99% of the music and people out there... but be aware that there is some music out there that does not pass an inversion comparison test with WMA Lossless, and therefore it's not truely lossless in all cases.

But I digress....

This isnt gapless playback.. this is cutting and pasting multiple audio tracks together.

True, and I think the original author was trying to reconstitute a whole-CD file, and on that particular CD it's a wise thing to do.... many live recordings need the same thing. A large point of the point I was trying to make is that there's easier ways of doing it.


has anyone here used pocket player by conduits? I dont have wma files to test it, but is supports ogg/mp3/wma and gapless as well as crossfading (I never tire of this effect on non gapless music). Combined with winamp skin support, a good EQ, and uses the MAD mp3 decoder (a code base that strives for the most highest precision mp3 decoding) I think its the best music player for pocket pc.
That's all I use.... and you're right.... it is the best music player for a PPC. The only thing I'd add is that support from Conduits is the best.

D.

Brad Adrian
10-23-2004, 12:34 AM
Whenever I put together files like this, though, and try to listen to them, the fast-forward function doesn't work. That makes it pretty hard to resume listening to a track from the same spot I left off.

Is there some way to fix that during the processing?

Brad Adrian
10-23-2004, 01:14 AM
Never mind. For some reason, on my player, the fast-forward function doesn't work with WMA files. But, when I further convert them to MP3s, it works fine. Now, with the audiobooks I've ripped I can stop in the middle, then fast-forward back to the same spot the next day.

Now, if anybody knows WHY the fast-forward doesn't work with WMA and can explain it to me, I'd be interested in learning that.

Ed Hansberry
10-25-2004, 03:26 PM
Never mind. For some reason, on my player, the fast-forward function doesn't work with WMA files. But, when I further convert them to MP3s, it works fine. Now, with the audiobooks I've ripped I can stop in the middle, then fast-forward back to the same spot the next day.

Now, if anybody knows WHY the fast-forward doesn't work with WMA and can explain it to me, I'd be interested in learning that.
It does, but you have to let WMP create the WMA. I've had external utilities create the WMA file and there isn't enough info for the PPC WMP9 player to do fast forwards. No clue why. :?:

Hylas
11-30-2004, 09:54 AM
PKZip and RAR are lossless, even Microsoft admits that WMA Lossless is "mathematically" lossless (heh..... see figure 1 in the original article, the screenshot even says it). Yes, I'm aware that "mathematically lossless" is close enough for 99% of the music and people out there... but be aware that there is some music out there that does not pass an inversion comparison test with WMA Lossless, and therefore it's not truely lossless in all cases.

Do you have some evidence to back this up? Lossless audio compression isn't a new concept and compression rates of 40-60% are quite usual (for listenable music). I highly doubt that MS would screw this up.

Maybe you compared the .wav files on a binary level? Two files can contain the same audio content but differ in their meta information.

Ed Hansberry
11-30-2004, 02:04 PM
PKZip and RAR are lossless, even Microsoft admits that WMA Lossless is "mathematically" lossless (heh..... see figure 1 in the original article, the screenshot even says it). Yes, I'm aware that "mathematically lossless" is close enough for 99% of the music and people out there... but be aware that there is some music out there that does not pass an inversion comparison test with WMA Lossless, and therefore it's not truely lossless in all cases.

Do you have some evidence to back this up? Lossless audio compression isn't a new concept and compression rates of 40-60% are quite usual (for listenable music). I highly doubt that MS would screw this up.

Maybe you compared the .wav files on a binary level? Two files can contain the same audio content but differ in their meta information.
Lossless means lossless. "Mathematicially" isn't the same as "Statistically." ;) You can google for Windows Media Audio lossless and see several articles outside of MS's site that confirm it is a lossless compression technology, just like PKZip.

dmy
11-30-2004, 03:26 PM
Do you have some evidence to back this up? Lossless audio compression isn't a new concept and compression rates of 40-60% are quite usual (for listenable music). I highly doubt that MS would screw this up.

Maybe you compared the .wav files on a binary level? Two files can contain the same audio content but differ in their meta information.

No..... Inversion Mixing test: Rip to PCM WAV, make a copy of that WAV as WMA Lossless, convert the WMA Lossless back to PCM WAV. Use DBPowerAmp or Cool Edit 2 or the like to read in one of the WAVs, invert it, mix in the other WAV.... the result is not always silence (flat-line).. e.g. Not always lossless. I do find it interesting that you say:


compression rates of 40-60% are quite usual (for listenable music)


The way I'd normally read that is that if you get compression ratios of 40-60% that the music is listenable.... implying lossy? or am I reading that wrong?

dmy
11-30-2004, 04:04 PM
Lossless means lossless. "Mathematicially" isn't the same as "Statistically." ;)

Heh, and we all believed Bill Gates when he said that "... Microsoft software is inherently bug free...".

You can google for Windows Media Audio lossless and see several articles outside of MS's site that confirm it is a lossless compression technology, just like PKZip.

When people ask me for the definitive site for PPC information, I send em to Pocket PC Thoughts.... for the definitive Digital Audio site, I suggest Hydrogen Audio (http://www.hydrogenaudio.org) There you'll also find articles and tests that show WMA Lossless is in fact lossless, and others that show it isn't. Fact is that it is what Microsoft says it is: "Mathmatically Lossless". It can be shown to a mathmatical certanty that WMA lossless is in fact lossless. Note that there is also a mathmatical proof that .999999... (.9 repeating) is equal to 1. In principle, both are technically true; in practice, there are examples where it is not true.

Look.... I'm not MS bashing... if WMA Lossless works for you, by all means use it. I use another lossless format that works for me (not quite as good as WMA Lossless for compression, but more efficient CPU utilization, broader software support, and actual hardware support too).

Cheers,
D.

Hylas
11-30-2004, 07:42 PM
No..... Inversion Mixing test: Rip to PCM WAV, make a copy of that WAV as WMA Lossless, convert the WMA Lossless back to PCM WAV. Use DBPowerAmp or Cool Edit 2 or the like to read in one of the WAVs, invert it, mix in the other WAV.... the result is not always silence (flat-line).. e.g. Not always lossless.

I find this really hard to believe. A lossless audio codec should by definition never generate a difference in this test (the only exception to this rule, that I know of, is the codec used on DVD-Audio, that can fallback to a lossy-mode in extreme bitrate situations. But this is only for the sake of DVD-player drive speed limitations.)
WMA-Lossless would be quite different then from APE, FLAC, RAR, ...


I do find it interesting that you say:


compression rates of 40-60% are quite usual (for listenable music)


The way I'd normally read that is that if you get compression ratios of 40-60% that the music is listenable.... implying lossy? or am I reading that wrong?
As it is standard for every information encoding, it is impossible to reduce the size of every input. It is possible to generate special test cases that cannot be compressed by e.g. ZIP.
However, for musical information (things recorded by a microphone, synth., ...) the stated numbers usually apply. Classical music, and low volume music in general, is particulary suited for strong compression.

Nothing of this has anything to do with perceptual entropy encoding (lossy).

dmy
11-30-2004, 09:41 PM
I find this really hard to believe. A lossless audio codec should by definition never generate a difference in this test (the only exception to this rule, that I know of, is the codec used on DVD-Audio, that can fallback to a lossy-mode in extreme bitrate situations. But this is only for the sake of DVD-player drive speed limitations.)
WMA-Lossless would be quite different then from APE, FLAC, RAR, ...

But again, this is my point..... WMA Lossless is "Mathmatically Lossless" which is mostly, but not completely, lossless in all cases. Honestly the same can be said for Mpeg3 and 4, Jpeg, OGG-Vorbis, WMA Lossy or any other Lossy compression at suitably high bitrates... although likely higher bitrates than would be acceptable for typical use. At some point, the lossy-ness falls off to the point where it's Mathmatically Lossless. At this point, most data (music or otherwise) will decompress to waveform-identical or bit-identical compared to the original.... Most, but not all. APE, FLAC, RAR, Huffman-based (ZIP/RAR/etc) are all lossless, and WMA Lossless (by Microsoft's own admission) is Mathmatically lossless.

Now..... the real question is what does "Most, but not all" mean and is it really worth arguing. Honestly?? It don't mean much and it's not worth arguing. What..... we're talking fractions of a percent of artifacts in the data?? 2 or 3 bits out of place across hundreds (WMA9) or thousands (WMA10) of songs? Again.... nit picking (trust me, I'm a master nit-picker :lol: )

If it works for you, use it. I choose something different, and not because it's mostly lossless or not.... but for other reasons that work for me.


As it is standard for every information encoding, it is impossible to reduce the size of every input. It is possible to generate special test cases that cannot be compressed by e.g. ZIP.
However, for musical information (things recorded by a microphone, synth., ...) the stated numbers usually apply. Classical music, and low volume music in general, is particulary suited for strong compression.

Nothing of this has anything to do with perceptual entropy encoding (lossy).

That's a longer version of what I thought you said. The first time I read the part of the phrase "... (for listenable music)" it implies to me that you were starting to discuss perceptual transparency, which is usually reserved for personal evaluation of lossy compression. I didn't think that what you were saying, and thanks for confirming that.

D.

Hylas
12-01-2004, 08:59 AM
I don't get it. Do you claim, that there is a difference between "lossless" and MS' "mathematical lossless"?

Can you guide me to a thread at HA, where this is discussed? From what I read in the thread Which is the best lossless codec? (http://www.hydrogenaudio.org/forums/index.php?showtopic=29655), this fundamental flaw is not widely known.

(About lossy codecs: No, they never reach lossless quality, even at extreme high bitrates. This is by design, as the used fourier transformations are numerical operations and are thus not perfectly invertible).