Archive

Archive for the ‘Technology’ Category

There’s Music All Around

May 16th, 2005

That is, if you have a new iPod Shuffle.

I have a discman — a very nice one. It was offered to me by the members of my old workgroup before I left for France, and I use it all the time. It’s fixed beside my bed for night-time snoozing melodies.

Nope, it’s been years since I’ve walked around with music playing in my ears. Then I realized that my mobile phone (which is better than your mobile phone) was capable of functioning as an MP3 player. So I bought a cheap SD card, loaded it up and had music.

Hours that would have been filled with metro coughing, screeching and ringing are now filled with the likes of:

Caribou – The Milk of Human Kindness: Dreamy, driving Canadian electronica that you can tap your toes to.

Squarepusher – Ultravisitor: Experimental jazz-influenced noise music that you can push a nail file under your toenails to.

INXS – Kick: Revisited from the grand old years, they sound more together and yet more human than they did in junior high. In those years, I remember dancing to INXS with a really nice girl — she leaned over and commented “you don’t listen to this type of music much, do you?” I don’t know what that was supposed to mean, but years later when I got a car, we cruised around the city for hours listening to INXS.

Green Day – American Idiot: Like the Scissor Sisters, this is an album that sat around unlistened to for ages — then burst into one of my favourites of the day. It’s a rock anthem to apathy and manipulation.

Jack Johnson – In Between Dreams: He used to be a pro-surfer, and he has a lazy, laid-back folk style. A bit bluesy, but in a good-natured and cheerful way. Like The Beach Boys, this is music for optimists and can be a bit too sweet. Unlike The Beach Boys, it doesn’t completely suck, constantly and across epochs.

Feist – Let It Die: It sticks to the inside of your mind. That’s not a judgment about whether she’s good or bad, talented or irritating. But she sticks and will not be scraped off.

Anyway, to get back on track, my mobile phone is much better than your mobile phone. For Roggles P. Naysayer, who claims that not having a phone is better — I can boast that my phone only receives calls half the time, if I did a soft reboot recently. And to make up for it, it sometimes makes calls that I didn’t even know needed making!

One of the only disadvantages of having such a genius master-of-all-trades device is it’s size. I can’t run with it. So I bought an iPod Shuffle.

This is a little device, slightly larger than a USB key or a pack of gum. It looks delicious, but must not be eaten. It weighs but a pittance, and it plays music — oh sweet music! — that comforts me in my travails.

The disadvantage is that you must use iTunes to manage the little bastard, even though it functions otherwise like a USB data key. Also, it doesn’t have a screen, which didn’t bother me at first. However, given that I have a terrible memory for music, this means that I will never know who’s playing when I autofill.

Autofill is auto-awesome, however. I plug the thing into my computer, and it automatically fills it with random music, taking into account my ratings (if I’d ever bothered to rate something).

In conclusion, I posted a travel log about Amsterdam on my other blog, and you should go read it.

Tin Foiled Technology

On a serious note…

April 5th, 2005

For the first time, I’ve found a Firefox theme that is more efficient and aesthetic than the default. Pimpzilla is the second best reason to move to Firefox from the old and decrepit Internet Explorer.

Not being an idiot remains the best reason, however.

Tin Foiled Technology

The Intolerant Sceptic: Return Receipts

February 21st, 2005

With that there “email” that kids are yammering on about, there’s this feature called Return Receipts.

That is, some email messages are specially marked as “return receipt requested”. When they arrive in your inbox, and you go to read it, a little dialog pops up to ask if you want to send a notification that you’ve read the email.

At least that’s the default behaviour. You can also configure your mail client to automatically send these notifications, or ignore them altogether.

They aren’t very widely used. And all of a sudden, I seem to be getting “return receipt requested” messages from all over. It adds up to an extra button click for each message.

I doubt that you have a good reason for turning on Return Receipts. Your messages aren’t any more important than any others, even if it strokes your ego to be assured that I’ve bothered to read them. You are likely officious, out-of-touch, and surprisingly unhelpful.

The only reason I don’t automatically ignore them is that I find a small, childish pleasure in clicking “No”. I do NOT want to inform the sender that I have read their email.

Return Receipts is entering my list of pet peeves. No hoorays for return receipts. I hate them.

Tin Foiled Technology

My Playlist, My Friend

February 11th, 2005

Hooray for everything!

That being said, here’s a practical way to create a playlist for your favourite music player. Imagine that you’ve placed a collection of MP3 tracks in a folder at “f:\Various\17 Songs About a Girl”.

1. Open a command prompt. This can be found by clicking on the Start menu, menu Programs, submenu Accessories.

2. Type the following into the scary dark window:

f:
cd \Various”17 Songs About a Girl”
dir /b /on *.mp3 > playlist.m3u

3. Now you can double click on the file playlist.m3u, or drag-and-drop it into the music player and all of the songs will be loaded in one shot.

4. Advanced You can edit the file playlist.m3u in any text editor, including Notepad (or something more civilized). This is a good way to exclude or add songs, or change their order.

If it doesn’t work, try rebooting twice and call me in the morning.

Tin Foiled Technology

More About Syndication

February 9th, 2005

I’ve mentioned the fascinating world of syndication more than once.

You may not have believed me at the time. Here are some interesting things that I’ve been doing with syndicated feeds, however:

1. I have an account at last.fm. You can normally see the last tracks to which I have listened.

2. I use flickr.com to store photos that I want to have available on the web. You can see my photostream here (all the photos that I’ve uploaded appear here).

3. I’m a megalomaniac, endlessly fascinated by myself. I’m also insanely jealous of others that call themselves by my name. I keep tabs on photos of them.

4. On the same lines, I’m curious who is dropping my name these days. I use feedster.com to keep track of that.

5. I use gmail.google.com as my main webmail provider at the moment. I can be notified of new messages using a feed. (Note that this only works if I’m logged into gmail on your computer).

So, are any of you using syndicated feeds for anything?

If you are using Firefox, you can take advantage of Sage. It literally takes three seconds to install. I’m not kidding. Then all you need to do is restart your browser, click on Tools/Sage and start adding feeds.

If you are not using Firefox at this point, well… just don’t let me know.

Tin Foiled Technology

The Inqualified Scientist: Frequency Domain

February 1st, 2005

This is a follow-up to my previous post.

I described how sound can be digitized and put on an audio CD. In short, the numbers on the CD exactly describe the motion a speaker membrane needs to vibrate in order to reproduce the sound. Theses numbers are physically stored as miniscule pits burned along a spiral track around the CD, and 1,411,200 of these pits need to be read every second in order to reproduce CD quality sound.

This is also known as the bitrate, usually expressed for music in thousands of bits per second (kbps). Thus, the raw audio data on a CD supplies about 1,400 kbps.

The audio CD standard uses raw data (which means uncompressed and untreated) because when the standard was being developed, it was less expensive to create consumer devices without powerful processor to decode compressed audio data.

Today, the cost of microprocessors have decreased sufficiently that my discman can read compressed (MP3) music — but still at a price. It consumes three times the power compared to reading standard audio CDs.

So why do we compress music? Simply for storage reasons — instead or requiring 1,400 kbps, we can get reasonably equivalent results in a tenth of the bitrate. This means that for every uncompressed album that you store on your hard drive or MP3 player, you could have stored ten compressed albums.

So how do we compress music? First, we’ll visit another mindblowing concept — the frequency domain.

Phillip Glass’ famously composed a four minute song with nothing but silence. If you put this song on a CD, your stereo will continue to read 1,400 kbps from the disk, for a total of 46 megabytes. All of those numbers will, however, be zero. Zero, zero, zero.

You could recreate the entire track exactly with the following statement: 274 seconds of silence. I’ve compressed the song from 46 megabytes to two dozen letters without losing any information at all.

That’s a trivial example, and here’s another. I’ve composed a song that started an infinitely long time ago and will continue forever. It’s just a single pure tone, a wave that oscillates 440 times a second and never stops. I call it Fonzie.

Fonzie can’t be stored on an audio CD because it would take an infinitely large CD. You couldn’t use the graphing device from my first post because it would take an infinite amount of paper. You could excerpt it of course, but then it’s no longer Fonzie.

On the other hand, you can graph it another way. Instead of describing the sound wave with respect to time (and wasting paper), you can put all the possible tones that we can hear along the X axis, with the waves that oscillate slowly on the left (low frequency or bass tones) going to high frequency waves (treble tones) on the right. At exact 440 Hz, place a single dot at the volume you hear Fonzie. (440 Hertz is another way of saying 440 times a second).

Here we’ve taken an infinitely long song that goes on forever in the time domain and compressed it down to a tiny graph in the frequency domain, without losing a speck of information.

You’ve seen this type of graph before, in the equalizer of your stereo. The bars dance, showing the distribution of energy along the audible frequencies — a song with heavy base shows big bars on the left. If you were to play a morcel of Fonzie on your stereo, there would be a single, unmoving bar where 440 Hz is.

Obviously, my song Fonzie is very simple, regardless of the representation. However, changing your point of view of sound to the frequency domain is one of the most important concepts in analyzing and treating sound.

My song, Fonzie, is trivial to decompose into a single sinusoidal wave. Real noises, however, are much more complicated. Imagine that a special acoustic performance of Fonzie (abridged) is performed at Carnagie Hall, interpreted by the celebrated flautist, Henry Winkler.

When Henry plays the note on his flute, the sound he makes isn’t going to be a perfect wave. The graph of his performance in the frequency domain isn’t going to be a single point, but a steep hill centered around 440 Hz. This shape defines the characteristics of the flute sound. We can also expect little hills at 880 Hz, 1320 Hz and other multiples of 440. These are “harmonics” and are characteristic of most analog musical instruments.

My belch in the frequency domain won’t have nice and tidy spikes, which are characteristic of lovely tonal instruments. I imagine that it will be large and flat with a bit of energy in most of the audible range. This is characteristic of atonal instruments, such as percussion and distorted electric guitars.

One mathematical way to turn a signal in the time domain (such as the raw data coming off an audio CD) into a representation in the frequency domain (such as the display in the equalizer on your stereo) is to use the Fourier Transform. This formula provides a method to decompose any signal into sinusoidal waves and vice versa.

Mathematically, any signal or sound can be expressed as the sum of these pure waves. It’s somewhat of a paradox, however, since the sine wave is infinitely long and repetitive, and most sounds aren’t.

A newer branch of signal analysis proposes the decomposition of the time domain function into “wavelets” instead of sine waves. Where a sine function is like an constant wave along a long stretch of ocean, a wavelet is like ripples spreading out from a thrown rock — higher in the centre and gradually fading to nothing.

While wavelets have many interesting properties, the most important thing to take from this post is that a sound signal can be converted into another representation, and converted back without losing any information.

The fun comes from manipulating the signal in the frequency domain and seeing or hearing the changes in the time domain!

Should I go on?

Tin Foiled Technology

The Inqualified Scientist: Digital Music

January 28th, 2005

So did you hear the news? By “hear”, of course, I’m referring to the conversion of vibrations in the air or other conducting medium to electrical impulses in your brain. Outside of your ear (an appropriate sensor responsible for the conversion), this sound travels as waves of vibrations.

Imagine one of those humidity and temperature detectors in museums, where a needle records the current temperature on a moving strip of paper. Instead of measuring temperature, our device will measure the vibrations of the air — the needle will draw the movement of the air particles on very fast moving paper.

If I were to play a very pure tone, the paper would show a smooth wave — the needle would move up and down smoothly, faster for higher tones and larger waves for louder tones. If (more likely) I were to belch at the device, the sound wave I produce would look a lot more random and jagged. It would be relatively flat, or gently waving while I inhaled quietly, then a sharp burst with the attack of my belch decaying into a long and regular afterburp.

The shape the needle draws on the paper (often called a wave even if it isn’t smooth and regular like a pure tone) captures the sound I made. This is called a time-domain representation because the moving paper shows the intensity of the sound as time passes.

All I need to do to play back the sound is to build a machine that scrolls through my belch paper and emits vibrations according to the intensity shown by the wave. This is the same principle behind the speaker on a record player, where the sound is stored in jagged grooves on a vinyl disc.

Going back to the device in the museum that stores daily temperature on a strip of paper, imagine that all the museums in the world want to share their results as part of ongoing research into the effects of temperature variation on their oldest works. Given that they are only connected by voice phone lines, how can they share the precise shape of the temperature waves?

A good answer is that they decide what precision is important to their research, then they read the results over the phone party line — at noon, it was 19.5 degrees, at one o’clock it was 19.6 degrees, at two it was 19.8 degrees, etc. The researchers at the other end can write the numbers down and sketch the approximate shape. The more precise the temperature readings (19.821 vs 19.8) and the more frequently they’re read (every minute instead of every hour), the more precise the sketch at the other end. The sketch can never exceed the original in accuracy, but using the same numbers, all of the museums can approximate the original wave sufficiently for their needs.

This is the difference between analog and digital. At one point, all of the data is coverted to numbers.

If someone were to convert my belch wave into numbers, they could get a reasonable accuracy by dividing the intensity (equivalent to the temperature) into 256 different levels, and taking readings 8000 times a second. BRAAP. This is equivalent to telephone quality sound.

A higher quality specification is to divide the height of the wave into 65 thousand levels (16 bits bits) and take readings 44100 times a second. Drop those numbers onto a laser-etchable substrate, and you have an audio CD.

Hooray for audio CDs! They’re a great source of high quality, raw audio data. Let’s do some calculations — 16 bits per sample, 44.1 thousand samples per second and 2 channels (don’t forget that stereo music is delivered to each ear) is about 1,411 thousand bits per second, or kbps (kilobits per second). This is the bitrate.

Note that 74 minutes (4440 seconds) at that rates is about 6.2 billion bits — or about 750 megabytes, which is about the amount of data we expect a standard CD to hold. The difference comes from error correcting codes and filesystem information on a data CD.

There you have it. Are you interested in learning why your MP3 files approach CD quality using one tenth the bitrate?

Tin Foiled Technology

Your Sidebar, Your Friend

January 18th, 2005

Apparently some of the mensch have been wondering how to add delicious content to their blog sidebar. The sidebar is that thing at the side of your blog, where you can put things that you want to be visible on all of your pages.

I’m going to describe how to put your New Years Resolutions into your sidebar. I broke it down into many steps, but it’s really quite simple.

1. Log into blogger. Normally you go straight to “Posting/Create” in order to serve us up some of your fascinating observations on life. This time, however…

2. Click on the Template tag. Hooray! There’s a whole page of Blogger code there, similar to HTML. You can just look at it as unintelligible crap if you like.

3. Copy and past the entire contents of unintelligible crap somewhere safe, such as a text document on your desktop. That way, you can always undo whatever you changed.

4. Back in your browser, open to the Template tag, look for some text similar the following:

<!– Begin #sidebar –>
<!– Sidebar –>
<div id=”sidebar”>

The code following this bit determines what goes in the sidebar.

5. Find something that already exists in your sidebar. For me, it was:

<h2 class=”sidebar-title”>Previous Posts</h2>

Even if you don’t know HTML, you can imagine how this corresponds to the header Previous Posts that is already in your sidebar. Your text may not be the same as mine.

For the HTML-interested, the <h2> tag says to treat the following text as a secondary header and </h2> indicates the end of this text. The class=”XXX” is there to give the web browser hints about the font and colour. Since this is header text, it is automatically given a line to itself.

5. Now here’s one of the best secrets of a software developer: find code that works and copy it. I suggest copy and pasting the text that you found earlier, changing “Previous Posts” to “New Years Resolutions!”.

6. Click on the Preview button. A new window pops up with your changes. Do you see the new header? Hooray for you! But I bet you’d like to see some stuff under the header as well.

7. Back in the template window, put the following text underneath the New Years Resolutions:

<ul><li>Eat more fast food.</li>
<li>Use a daily moisturizer.</li>
<li>Read more books.</li></ul>

Changing the text, of course.

For the HTML-interested, everything between <ul> and </ul> is considered part of an unordered list. The individual items in the list are separated using the <li> tags. Try changing the two ul to ol to get an ORDERED (i.e. numbered) list.

8. Click Preview and verify that everything is in order — I wasn’t too careful to specify exactly where to place these statements. You can figure it out by changing in the Template window and watching the results in Preview.

9. When everything is to your satisfaction, click on the “Save Template Changes” and “Republish”. Everyone wins!

Tin Foiled Technology

A Thousand Words

January 14th, 2005

Hey, suckers — apparently I type thousands of words a minute. When I put up the memorial pictures of Kerri dog, I used an interesting and exciting tool for putting images up on your blog.

The scenario is: I have a photo, and I want to touch it up, rotate it and put it on my blog.

1. Given that I’m a super hero, I have my own domain, so zap — I can photoshop it at home, upload it using FTP to my site and use the <IMG> tag to refer to it.

2. Alternately, I can photoshop it at home, use hello (an image-sharing program that automatically integrate with Blogger) and post it with a single click. Hooray!

The first alternative is probably the most flexible and stable. Unfortunately, it has many complicated steps and requires you to have photo editing software, and know how to use it. It also requires that you have access to a web host to hold your image.

The second alternative is fast, but still requires photo editing software, and it involves having the Hello client installed on your computer. And then the post it generates isn’t entirely to my satisfaction. See the post of me and Glenn for further study.

There’s one more alternative: Flickr. This is a website that stores and organizes all of your photos. Their free service should satisfy your needs, although it limits you to uploading 10 megabytes of photos a month.

3. I log into my free account at Flickr and upload my photo at full size. I use their web interface to rotate it appropriately. I click on the “all sizes” button, which lets me pick a size to publish and even gives me the HTML code to insert into my blog. I do so, and it works SO magically.

What are the hitches? Until you upgrade to a paying account, they will only let you organize your last 100 photos. Your other photos still exist, and you can view the links to them on existing blog entries, but you can’t change them.

What are the other benefits? Well, you can tag your photos with words to make looking for them easier. You can also associate a full description. You can mark your photos as private or public, and you can even publish a photostream, which is like blog syndication, but with your photos.

If you’re looking to share your recent photos with other people, this is a great way to automatically do it.

A neat feature is that they make all the most popular tags available with a neat interface.

Try it for photos on your blog today! It’s simple and fun for the whole family.

Tin Foiled Technology

My Mobile Phone is Nicer than Yours

November 17th, 2004

Yes, in fact, it is.

It’s my first mobile phone. It has quad-band GPRS, so it should work in Canada and Europe (although I doubt I’ll activate roaming).

It has a very nice and bright colour screen, which is bigger than the screen on your mobile phone. The screen is touch sensitive, and there are four ways to enter data using the stylus: Palm Graffiti (in which I am fluent), two sorts of Microsoft recognition, one which permits writing anywhere on the screen, and an onscreen keyboard. It also comes with a snap-on thumb keyboard which is surprisingly easy to use, and far superior to the stylus methods, especially on the bus.

Your mobile phone requires one hundred taps on the number pad in order to send a ten character text message. I can play games on the bus, send and receive email. I am a modern nomad, always moving and always connected!

I also have Bluetooth and Wi-Fi radio interfaces, so I can use it to browse the internet at high bandwidth at home or in Starbucks. I can install Skype on it, and use it to make free calls over the Internet. Can your phone do that?

If you don’t know the answer, let me help you out: no, your phone cannot.

My mobile phone is nicer than yours, unless you have the same mobile phone in which case it is equivalent.

If you have the same mobile phone but with more memory and the integrated camera, then remember that I’m being kicked out of my home for Christmas, my home phone and internet has been cut off, and thanks for rubbing it in, you jerk.

Tin Foiled Technology