Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Whammo (2555)

  (email not shown publicly)


Journal of Whammo (2555)

Wednesday January 09, 2002
10:17 PM


[ #2026 ]

"And so you've got thirteen tens
And you take away seven and that leaves five...
Well, six actually
The idea is the important thing"
-- Tom Lehrer

Numbers. They've been on my mind recently, so I'm going to share some numbers with you.

I'll start with domain speculation, which the astute reader will quickly recognize as not being numerical. As anyone who orders pizza a lot knows, national chains tend to acquire similar phone numbers for their franchises. Domino's, for instance, migrates towards '3' and '0'. (Although I thought it used to be '4' and '5', I'm guessing '3' is for the number of pips on the domino.) Papa John's, on the other hand, tends towards '7' and '2' (-7272 being ideal, since it spells 'PAPA').

If you're in a community served by both chains, and have more than one prefix, try calling one of the numbers with another prefix. In more than one town I've lived in, a call to the local Papa John's number, but on the alternate prefix, has been answered by a Domino's who doesn't advertise that number.

I bring this up because my coworker in the cube across the aisle has -6660 as an extension. It was originally supposed to be mine, and I was quite disappointed (for the obvious evility rationale) when the installers got them backwards in the phone closet. But did I bathe in relief once we discovered how many folks cannot dial a phone number properly. The corporate help desk - the central number for all internal support, from "I can't log in" to "There's not enough toilet paper in the bathroom" - is on -6600, and the phone rings constantly.

Of course, the number six reminds me of another set of numbers that have no apparent value whatsoever. I stumbled upon these numbers about twelve years ago, in a math seminar. The gimmick to these numbers - there are two that are non-trivial - is that multiplying a number that ends in a particular string of digits by another number that ends with the same string of digits yields a product that ends in the same string of digits. 6 x 6 = 36. 76 x 76 = 5776. The proof, and determination of these numbers, are rather trivial, and I had, at some point, calculated them to a couple hundred thousand digits. What I want to know, do these otherwise useless numbers have a name?

I'm playing around with a different set of numbers tonight, in an attempt to quantify the quality of Vorbis and MP3. Of course, both of these techniques convert back to linear PCM, so any quantificaton would ultimately lay with the quality of the DAC used to produce the sound. That requires a lot more mathematical modelling than I'm willing to do, and still only indirectly measures the quality of the compression. So I elected to compute a relative scale, using the quality of the linear PCM as the baseline, rather than any original signal. This means my tests can roughly be reduced to a WAV to format to WAV conversion, with a comparison of the audio data before and after. Of course, the question then becomes how to you quantify error in linear PCM, for which I couldn't come up with a good answer. So I, in the traditional fashion, wagged it. Assuming the compression techniques would attempt to recreate the data, I meausred averaged first- and second-order deltas in the signal data - a compromise between accuracy and precision. Nowhere close to perfect, but enough, I hoped, to allow relative comparisons.

I did Ogg Vorbis, WMA, and both LAME and Fraunhofer-encoded MP3, at a variety of bitrates. I had to throw out 64 kbps Fraunhofer MP3, because it couldn't sample at 44,100 Hz. I defined my upper bound to be the results returned from randonly-generated white-noise. Upon doing the dual conversions, I knew I was already in trouble. Given that a WAV linear PCM file is a fixed-width/fixed-sample encoding, n seconds of data will result in x bytes of data. During my previous testing, Vorbis was able to reconstruct the exact number of bytes as the original sample, so I assumed that all encodings would. (After all, they should.) WMA at 64 kbps was just short, which I surmised was simply a lack of data to complete the last samples accurately. MP3s, though, were all over the place - short and long - and I was concerned that I was going to have some form of phase shifting that my linear comparisons weren't going to be able to handle. Sure enough, it looks like MP3 makes no attempt to reconstruct the original data, but simply attempts to reconstruct the original sound, which, as I stated above, I wasn't going to measure. So much for a meaningful comparison, then. (Quantitatively, not only did MP3s score practically the same at all bitrates with both codecs, but they scored the same as a completely different song with the same structure. Still, this means if you're looking for quality of recovery, vice quality of reproduction, MP3s may not be for you.)

Here are the numbers I got. Remember, these are simply relative measures. Low is good. High is bad.

  • Original data, no conversion - 0
  • Vorbis, 320 kbps - 1
  • WMA, 192 kbps - 5
  • WMA, 128 kbps - 14
  • Vorbis, 128 kbps - 43
  • WMA, 64 kbps - 68
  • Vorbis, 64 kbps - 235
  • Fraunhofer MP3, 128 kbps - 13,344
  • Fraunhofer MP3, 320 kbps - 13,378
  • Fraunhofer MP3, 96 kbps - 13,448
  • Different song, no conversion - 14,726
  • LAME MP3, 64 kbps - 16,347
  • LAME MP3, 128 kbps - 16,479
  • LAME MP3, 320 kbps - 16,599
  • Random white-noise, no conversion - 186,116

Local news is reporting over 700 traffic accidents today, due to the freezing rain that poured in and promptly froze. How I love life in the ice belt. I think, for safety's sake, I'll forgo ordering that pizza.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Probably they do; I forget what the name of the numbers was, but some mathematician or other noticed that his brother-in-law's phone number had some sort of property or other, and *named numbers with that property after his brother-in-law*.

    Just goes to show: You want to be immortal in mathematics, marry into the field.


    You are what you think.