The "bar of soap" is a research project by Brandon Taylor and Michael Bove of MIT and was presented as a work-in-progress at CHI 2008.
Their idea was to make a handheld device that could recognize the manner in which it is being held so that it can enter the right mode of operation. They built a prototype that, for a single user, was 95% successful at recognizing five different types of grasp (pictured below) — remote control, PDA, camera, game controller and phone.
This prototype used 24 capacitive sensors on its faces and a machine learning algorithm for training. They’ve built a subsequent prototype that has 72 capacitive sensors and an accelerometer.
You can read more about it at their project page. You can download the paper here if you’ve got an ACM membership: The bar of soap: a grasp recognition system implemented in a multifunctional handheld device.
This was reported on a few gadget sites back in December as well.