Thursday, January 27, 2011

Mac Keystrokes

That's right, this is a Mac article. Sorry, Windows users, you'll have to wait until next week.

There are a number of useful keystrokes that you might have already heard about, but maybe a few you haven't, or maybe you know them but just don't use them that much. This is a cry for help. I am a keystroke. My name is command-tab. Please use me. I'll make your life so much better. I promise.

Go ahead, try command-tab. Hold the command key (aka the Open Apple key) and hit tab once. A list of icons pops up. These are your currently running applications. Keep holding command and then hit tab repeatedly until you get to the application you want to switch to. Then release. Ahh.

Other useful keystrokes include:
command-spacebar : search (Spotlight)
command-z : undo
command-x : cut
command-c : copy
command-v : paste
command-s : save
command-p : print
command-q : quit


Monday, January 24, 2011

One-Hit Wonderful

Good new songs are coming out all the time. A number of years ago I heard the Lilys' "With Candy" (2006) on Pandora. The song is a loosely organized beautiful mess. The drums during the verses never seen to line up where you think they should, and then the jangly guitars and lilting synth pads and vocals float above the chorus. The hipsters behind the counter mocked me subtly for buying the album, but I was undeterred. It turned out they were right. The album, I am sorry to say, was terrible.

This isn't the first (or last) time this has happened. Remember Peter Bjorn & John's "Young Folks" single? Catchy beat, haunting whistle solo, the song, though overplayed, was a masterpiece. But the album stank. I had a similar disappointing experience after hearing Clap Your Hands Say Yeah's "In This Home on Ice" (2005), and Bear In Heaven's "Lovesick Teenagers" (2009). Why is it that some bands can create a great song, but not a great album?

This past year, two songs stood out to me as dramatically better than the albums they came from: "Pumped Up Kicks" (2010), by Foster The People, and "When I'm With You" (2010), by Best Coast. "Pumped Up Kicks" begins with a simple yet seductive bass line, joined by tin-can vocals and a a chorus that goes:

All the other kids with the pumped up kicks
you'd better run better run
faster than my bullet

Best Coast's 2010 Crazy For You is probably the best album on the list, but overall it pales in comparison to the quality of the single, "When I'm With You." Bethany Cosentino's far away yet emotionally present vocals repeat the lines "When I'm with you, I have fun" almost to the point of insanity, but it works. This song draws you in to its own world of oozing cutesy sentiment with a rock timelessness that could only have been created now. Just don't buy the album before listening to it.

Click here to listen to the tracks mentioned in this article.


Thursday, January 20, 2011

The Joy of Search

Search is one of the most basic functions your computer provides. You often want to find a file you were working on, or a web page, or an email. Where computers fail is at integrating all of these search functions into one easy-to-use program. Google dominates internet search, whereas searching for local files is governed by your operating system, but what if I want to do both at once?

On a Mac, the local search feature is known as Spotlight. Click the magnifying glass in the upper-right corner of the screen, or simply press command-spacebar. Then start typing. Find recently opened documents, definitions for can even type "2+2" and "4" appears. Documents are searched both by file name and by contents, so if you forgot what you named a document, you can still find if only you can remember some of the words inside the document. Search results display as you type. Just click a result once to open it. (You can also press the up and down arrows and then return to choose a result.) Mac users: if you're not using Spotlight now, or not frequently, it's time to change your habits! Use it to open applications, rather than the Dock. Don't worry about where you saved your document, just Spotlight it! You'll see your efficiency go up the more you use Spotlight.

However, what if I also want to search the web, my Gmail, and my Google Docs? Currently, there's no way to do this. There is a cute little program you can download called Google Quick Search Box, which seems like it would be just the thing, but sadly, it isn't. Rather than showing you search results immediately, you can double-click to launch a Google search in your web browser. That's hardly faster than just going to the web browser and searching. Also, it doesn't integrate Gmail and Google Docs. Ugh. Come on, Google, give us what we want!


Tuesday, January 18, 2011

Electroencephalography, Eye tracking, and Robot Suits for Paraplegics

Assistive technology for paraplegia, locked-in syndrome, and other diseases which affect mobility is far behind where it could be. A Japanese company, Cyberdyne, has designed the HAL Robot Suit to help address this problem. Unfortunately, their Robot Suit only solves half of the problem. It senses the electrical activity in your limbs in order to know when to move, but if you can't move your limbs, that's no help at all. Another thing that immobilized people would very much like to be able to do is speak, and I shall consider this capacity as well.

Control Methods
Two methods for controlling a robot suit and speaking are: eye tracking, and EEG (electroencephalography). In eye tracking, a camera looks at your eye and figures out where you're looking. It's something we humans do all the time without any particular effort. We've evolved to be good at this, because it enables us to figure out what someone else is thinking about or intending to do. This technology is already being used to create assistive devices which enable immobilized people to speak by looking at words on a screen. But the technology is imperfect, and it is not being used to control robot suits. A system could be devised in which the patient uses video goggles instead of a fixed computer monitor. The patient could then look to a corner of the screen to switch between speech and movement modes. He or she could look at words to generate sentences to be spoken, or else look at areas of the world in order to tell the robot suit to locomote there.

The second proposed method for controlling a robot suit and generating speech is EEG. A shower cap filled with electrodes is placed on the head, and the electrical fields generated by brain activity are measured. This could be even more promising a method than eye tracking, as it holds the promise to literally read one's thoughts and transform them into actions. But there are several problems with this approach. First, we don't yet know enough about how EEG signals correspond to particular thought patterns. What's more, EEG isn't very sensitive to the particular region of the brain that the electrical activity is being generated from. How can these problems be overcome.

1. Reverse Correlation
First we need to figure out which patterns of action and stimulation correspond to which patterns of brain activity. Clever scientists have begun this project, by showing different types of stimuli while recording with EEG. However, this approach is limited by the classes of stimuli that experimenters can think up, and neglects the importance of action. Another approach would be to expose test subjects to a barrage of stimuli, and have them perform a large set of actions, and then use reverse correlation, aka intersubject synchronization, to figure out which actions and stimuli correspond to which patterns of brain activity.

2. Genetic Algorithms
But how do we really know that these patterns of brain activity are for these patterns of action and stimulation? A novel way to test such claims is with a genetic algorithm. A genetic algorithm is a computer science technique, inspired by natural selection, for searching through a problem space for fitter and fitter solutions. Here's how this would work:

a. Begin with an initial population of noise images
b. Evaluate each image based on how strongly it elicits a particular EEG response
c. Fitter images survive and reproduce to produce a next generation of images
d. Offspring images are created by mating the fittest images of the previous generation, and mutations are allowed to creep in, to encourage evolution
e. Over time, the population of images evolves to look like the type of stimuli that that pattern of brain activity is for

Connecting the Dots
Having identified a set of EEG patterns that correspond to particular actions and sensations, we can then use these as control signals for moving a robot suit and generating speech. If eye tracking is used simultaneously, the control software might be able to have a pretty good idea of where the patient intends to move or what he/she intends to say.


Monday, January 17, 2011

Grooveshark: A Review

Sure you can use the internet to look at cute photos of puppies, or cats doing silly things. But some of us want to use it for something productive, like, um, listening to music. Grooveshark is a web site for listening to music online. It's currently the best thing out there, and I use it all the time, but it still kind of sucks.

Before I tout its features and criticize its flaws, let me begin by explaining why this review isn't a "shootout" between Grooveshark and its competitors (e.g., Spotify,, Pandora). Spotify requires a download, and twists your arm to pay them. requires an extensive login process, and Pandora is neither available outside the U.S., nor does it let you choose particular songs to play!

Grooveshark is the only one of the pack where you can go to the site, search for a song, and play it, all without logging in or downloading anything. You can easily create playlists of songs for a party or just to suit your mood. If you create a login, you can save your playlists for later. Finally, for the terminally lazy, you can turn the "Radio" on, and Grooveshark will choose songs for you to hear.

Grooveshark Radio
Radio is the most disappointing feature Grooveshark has to offer. I was listening to the Bee Gees, and then I put on a few Blondie songs, and then I put on Night Nurse off of Dean & Britta's L'Avventura (yes, that's my sister's band, and yes, they're good). I didn't feel like picking more songs just then, so I turned on the Radio in Grooveshark, expecting to hear more indie pop. Instead, I got Styx and Air Supply. Pretty comical really.

Pandora hardly does better. First of all, as previously mentioned, you can't search for and play a specific song. Second, the recommendations they provide are just as hilarious as Grooveshark's. Pandora hired a crack team of music experts to describe each song in their library in terms of major or minor key, tempo, instrumentation, and the like. Unfortunately, just because I'm listening to Miles Davis doesn't mean I want to hear some Kenny G. Actually, I haven't been able to use Pandora in awhile because I live in the Netherlands, and Pandora doesn't allow me to use it here, but that's not the end of the world. Grooveshark is way better.

How to use Grooveshark
When you first arrive on the site, you are presented with the option to search for music. Search for whatever you like, they probably have it. Now the situation gets slightly more complicated. There's a little arrow with a plus sign icon to the left of each track title. Click the song to add it to your playlist -- the song will now start playing automatically.

Ok, so now your song is playing. How do you search for and choose the next song to play? Click on the magnifying glass icon by the Grooveshark logo in the upper-left, and search. Once again, click the arrow with the plus sign to the left of a song to add the song to your playlist. Now that song will play next.

Now let's try the Radio. Where it says "Radio:Off" in the lower-right, click there and switch it on. Now the next song that plays will be chosen by Grooveshark. If you don't like it, you can always click the skip track icon in the lower-left. A lot to remember, you say? The interface becomes fairly easy to deal with after repeated use, but I agree, it is clumsy and imperfect. People of my parents' generation find even iTunes difficult to use, and Grooveshark is no iTunes.

Then why use it?
Because you can play all the music in the world for free. iTunes looks nice, but features win. There are a number of reasons to prefer Grooveshark. On iTunes, you have to buy the music before you can listen to it, and the selection is limited. There are radio stations, but they are not customizable. And what if you travel and you don't have your library with you? Other features include the ability to share playlists via email or Facebook, and the ability to upload your own mp3 collection and then access it from anywhere.

But the iTunes user interface is better. For this reason, I have designed a new user-interface for Grooveshark, and I hope that they use it, because I think more people would benefit from the site if they did.

Features of the Interface
•Easier to use search and playlists
•Search is always available, and doesn't require going to the search page
•Same thing with the current playlist
•EQ and Compression, and easier to use volume and control buttons
•Adding songs to playlists or playing them is now accomplished by a text link, obviating the need to learn Grooveshark's idiosyncratic icons

Other Features
These are features that should be added to Grooveshark, but are not obvious from the interface I designed.
•Quickly fade out when you skip a track, rather than cutting off abruptly
•Show the list of suggested next songs more than 1 song in advance
•Save and load playlists by clicking the "Playlists" header
•Sync the last beat of the current song with the first beat of the next song and do a quick crossfade (optional)


PS: Here is a Grooveshark link to some music that I've been recording for the past two years.