Archive for January, 2009

Music Appreciation Project of the Week

Friday, January 30th, 2009

After a conversation with Zach, I’ve started listening to some of the longest tracks in my music library. The ten longest pieces, discounting spoken word:

  1. Steve Reich – Music for 18 Musicians (56:31)
  2. Jethro Tull – Thick As a Brick (43:28)
  3. Terry Riley – In C (42:01)
  4. John Coltrane – [Ascension] Ascension – Edition II (40:57)
  5. Dan Deacon – A Green Cobra Is Awesome Vs. The Sun (40:55)
  6. John Coltrane – [Ascension] Ascension – Edition I (38:30)
  7. The Polyphonic Spree – [The Beginning Stages Of...] A Long Day (36:31)
  8. RRI Gamelan – [Klenengan Sessions of Solonese Gamelan I] Gendhing Krawitan (31:26)
  9. Karlheinz Stockhausen – CarrĂ© (30:50)
  10. Ravi Shankar – [Three Ragas] Raga Jog (28:21)

On Collecting and Visualizing Personal Data Online

Friday, January 30th, 2009

When going through my “to be read later” list recently, I came upon designer Nicholas Felton’s 2008 Annual Report, courtesy of Swiss Miss:

feltron1

The Report is a beautiful visualization of a year of living; it chronicles everything the author saw and ate, everywhere he traveled, and more. Some of my favorites are a histogram of miles walked per day, and the map/timeline of significant events during the year. This project, in its fourth year, has taken personal data logging to a level I had never before even considered. Imagine Last.fm applied to everything.

Turns out Mr. Felton has a side project, Daytum, which is, in its own words,

a home for collecting and communicating your daily data. Begin tracking anything you can count and display the results immediately.

Example user page here. Unfortunately, Daytum is still in private beta so while I patiently await my invitation, all I can do is comment on the publicly visible part of it. Again, it’s in private beta so I assume most of my concerns will be addressed in due time but a few first thoughts:

  • The design of the user page is pretty good, but there isn’t yet any customizability as far as I can tell (other than picking a color). I’m pretty picky with my information graphics, so I’d like as much control as possible with the look and feel of the page.
  • I noticed that the graphs are being generated dynamically using the Google Chart API. I had never seen this before, but it sure is an easy way to get a quick graphic on a site. I’ll have to remember it…
  • Naturally the key to this site is for the users to be continuously keeping their data updated. If you don’t update your blog for a week or two, your readers may be sad but you can pretty much pick up right where you left off. If you neglect to add your last three meals to your Daytum page, the dataset will be forever tainted. Last.fm integration helps for music data, but as far as I know there aren’t any web services that automatically Twitter how many hours you’ve slept (although that gives me an idea…)
  • I don’t know if the logged-in user view allows you to see your raw data (I assume so, at least in some form) but it would be cool to be able to export it if you want to be able to do more advanced visualization/analysis. But maybe that’s just me.

This simple idea is pretty interesting, and it could be the next logical progression after a year where microblogging goes mainstream and everyone knows who Nate Silver is. And I’ll conclude by coining a term for this trend: Factoblogging. You heard it here first.

Speaking of Panoramic Photos…

Sunday, January 25th, 2009

Pano

I don’t really like just linking to the stuff that’s bouncing around the internet, but if you haven’t seen the panorama of President Obama’s inauguration, it’s really worth checking out. Gigapan is a company that sells a motorized gizmo that can take panoramic photos with any camera ($279, not too bad considering the cost of most pro photo gear). They also make stitching software and have a website where users can share their photos. They use the “Google Maps” interface of click+drag and scrolling to zoom, which makes it pretty fun to explore these insanely high-resolution photos.

I was reminded of the first photo like this that I saw, the gigapixel composite of Bryce Canyon, Utah that made the rounds on the internet quite a few years ago. The inauguration landscape could not have been captured with the old technology because that scene, like soylent green, was composed almost entirely of people. Modern stitching software makes decisions on where to sharply cut photos and where to use more gradual transitions. These algorithms weren’t as advanced in 2003 when the canyon photo was made, but it didn’t matter since there was virtually no movement as the panorama was being taken. As soon as you throw people into the shot, you find yourself with disembodied heads, people with excess limbs, and other grotesque forms. Gigapan’s software did a remarkable stitching job, but there are still some anomalies. My favorite is the four-armed sound engineer (if you can find him) because I’ve often thought that the additional appendages would make mixing much easier.

A Wiggly and Sustainable Protien Source

Saturday, January 24th, 2009
Delicious...

Delicious...

I recently came across this article about some scientists who propose farming silkworms on future long-term space missions as a better food source than other animals.

…[T]he insects breed quickly, require little space and water, and generate only small amounts of excrement, which could serve as fertilizer. Plus, silkworm pupae are mostly protein, the team reported, and when it comes to essential amino acids, they contain twice as much as pork does and four times as much as eggs and milk. Even the insect’s inedible silk, which makes up 50% of the weight of the dry cocoon, could provide nutrients: The material can be rendered edible through chemical processing and can be mixed with fruit juice, sugar, and food coloring to produce jam, the researchers reported.

They don’t discuss the more general possibility of silkworms as a food, except to mention that silkworms are sometimes already eaten in China. I see more far-reaching implications, as a lot of people who are vegetarians or semi-vegetarians for environmental reasons might be willing to eat silkworm pupae if they can really be raised using so few resources.

Unfortunately, silkworms do not have an entry in the USDA’s nutrient database, but I did manage to find a few firsthand accounts of tasting silkworms. Two of the accounts involved eating the silkworms straight from the can from which they come, brined, but I’m not so sure that’s how they’re supposed to be consumed. Neither of the reviews were particularly favorable. (Example quote: “This was like chewing on tiny bones. The good news is I was immediately distracted by the unexpected squirt of briny liquid that shot out into my mouth.”) Perhaps they just need to be prepared properly. The next article I found described the author making a pizza with the pupae, which apparently turned out no better than eating them straight. Damn our stodgy western palates.

Photo courtesy

Photo from Bert Christensen's Weird & Different Recipes

Finally, I found the simple preparation that I felt would best suit the silkworms. A seemingly authoritative website, “Bert Christensen’s Weird & Different Recipes,” recommends simply frying the worms in oil (see photo). The recipe submitter notes:

(The silkworms) tasted pretty good. You have to remove the midgut which is the only recognizable organ in the whole pupa. I suspect that the pupae were in a diapause stage, therefore all the rest of the adult tissue was not formed yet. The texture was sponge-like. Slightly salty. Lots of fat. Presumably very nutritious.

Looks delicious to me. Next time I’m at the Asian grocery store, I’m keeping my eyes peeled for a can of silkworm pupae. This is the future of food, people.

Passive Footswitch to MIDI Using Your Soundcard

Tuesday, January 20th, 2009

So a few months ago I scavenged some footswitches from the secret electrical engineering department free stuff room. I didn’t really have a plan for them, so I terminated them with 1/4″ plugs forgot about them.

Footswitch

Then the other day I read about some software that MOTU is coming out with called Volta. It converts digital (MIDI, etc) control signals to analog control voltage for interfacing computers with analog synth gear. The cool, elegant part about it is that it does this by using your existing hardware. If you have a multichannel audio interface, which MOTU just happens to sell, the audio outputs become general voltage outputs using Volta.

This got me thinking that it would be pretty easy to do the opposite: I could use the inputs on my (coincidentally MOTU-brand) audio interface to hook up a footswitch to my (Windows) computer. Since the switch is just a passive momentary switch (short circuit when pressed down, open otherwise) I would need a voltage source in series with the switch to provide a signal that could be detected by the sound card. Most audio interfaces have a DC-blocking highpass filter on the input to protect it from stupidity-based damage. Because of this filtering, the digital signal doesn’t look how one might expect. A back-of-the-envelope sketch illustrates:

The effect of the DC blocking filter

The effect of the DC blocking filter

The first step was to install a battery inside the footswitch. Since there would be virtually no current drawn from the battery, I elected to install the battery in a moderately permanent fashion, soldering wires directly to the terminals and hot gluing the battery in place. Note to potential future employers: this is not representative of my overall regard for safety, it’s just a weekend project and I didn’t have any battery clips around.

Don't try this at home, kids

Don't try this at home, kids

Inside the case with battery installed

Inside the case with battery installed

I reattached the top half of the case and plugged it into one of the line inputs on my sound card. I tested it out and it worked exactly as expected. Note that I installed the battery backwards so the ‘on’ pulse is negative instead of positive:

fullscreen-capture-1172009-41841-pm

Switch depressed for ~2 seconds, then for a fraction of a second

With the hardware side finished, I had to decide the best way to control music software with the footswitch. I settled upon converting it to a MIDI note event. I installed Maple Virtual Midi Cable, a tiny piece of software for Windows which provides virtual MIDI ports for sending data between programs. Then, I built up a patch in PD to convert the positive and negative pulses to MIDI. This was my first foray into PD, so I’m sure there’s some trivial way to implement this that I didn’t know about.

PD code to convert analog data to MIDI

Convert soundcard input to MIDI. Links to pd file.

And that’s it. As I implemented it, it takes the input from the third channel of the sound card and outputs a MIDI note on when the switch is depressed and a note off when it’s released. Note that a velocity of zero is the same as a note off message. This patch could be easily parallelized by duplicating it and changing the ADC channel and MIDI note numbers.

The only downside to this simple method is that you can’t generalize it to continuous controllers like a knob or expression pedal. You would need to send an AC signal through the controller since the highpass filter doesn’t allow you to see small or slow variations in level, just impulses or quick steps. So I’ll leave that modification for another day.

Panorama-rama

Thursday, January 15th, 2009

A few panoramics I took in Israel. Click each image for a larger version.

Baha'i garden overlooking Haifa and the Mediterranean Sea.

Baha'i garden overlooking Haifa and the Mediterranean Sea.

Early Zionist cemetary near the Lebanese border

Early Zionist cemetary near the Lebanese border

Ancient Roman theatre

Ancient Roman theatre

The western wall in Jerusalem

The western wall in Jerusalem

All photos were taken with my trusty Canon PowerShot SD200 and stitched with Hugin.

Information Graphic of the Day

Wednesday, January 14th, 2009

energyflow

I came across this graphic today and it really impressed me. The sources of energy for the entire U.S. as well as for each sector, and the energy efficiency of each sector. It’s incredibly easy to pick out a specific piece of data you’re looking for, but the graphic is also browsable. There’s an incredible amount of data here, all represented graphically (line thickness) and numerically. The relationships among the data points are shown visually, making the graphic much easier to navigate than a table. There are two problems I have with the graphic, however:

  • It takes a small amount of thought to figure out which number corresponds to which line in the middle. This could be solved by tilting the numbers to lie along their corresponding lines.
  • In the scaled down version above, some of the patterns are a little distracting, especially the cyan and black natural gas pattern. I think it would still work if they stuck to solid colors, especially since it’s pretty clear which lines belong to each category.

These small issues aside, I really like this way of showing resource flows. Lawrence Livermore National Labs has a whole page of this style if you’re into it as much as I am.

Notes on Birthright Israel

Tuesday, January 13th, 2009
tsfat

The city of Tsfat

I returned a few days ago from a Birthright trip to Israel. Birthright is an organization that sponsors free ten-day trips to Israel for young Jews in an effort to keep “the next generation” connected to their Jewish roots. Somebody on my trip compared it to the timeshare business model, where the potential customer is given a free weekend stay in a timeshare condo in exchange for lending an ear to a salesman/hypnotist.

The Israel sales pitch was expertly crafted and delivered throughout the trip. Birthright outsources the planning and running of the trips to a handful of trip organizers. My group was run by Oranim, the largest Birthright organizer. The ten-day tour was bookended by two sessions with Shlomo “Momo” Lifshitz, the enthusiastic, pudgy Israeli who is president of Oranim. Momo has achieved something resembling cult status among the Birthright crowd, or, as he boasts, “Over 4000 friends on Facebook!” Momo is upfront about the motives of the Birthright program, and his message revolves around a few central ideas:

  • Young Jews are not as connected to their religion or to Israel as past generations.
  • Nobody has the right to “break the chain” of Jewish identity.
  • Marry Jewish and make Jewish babies.

Only one other part of the tour featured a comparable level of indoctrination: the so-called “Mega Event.” This was an outrageously extravagant production featuring pyrotechnics; several supposedly famous Israeli musicians; and 15-foot-tall LED screens in the shape of the number “200,000″ to celebrate the 200,000th Birthright participant, who happened to be a handsome Olympic swimmer. The auditorium was filled with about 2500 young Jews from around the world representing every possible level of enthusiasm. I was exhausted from simply watching the Brazilians, and opted for the reclining ovations popular among many of the American attendees. By some stroke of terrible misfortune, my group was chosen to go up on stage for a portion of the Event, standing behind one of the well-endowed philanthropists who support the Birthright program. So instead of spending the day in Tel Aviv as planned, we drove to Jerusalem to get talked at by a stage manager who explained to us how we were symbolic or something.

The view from the stage of the Mega Event

The view from the stage at the Mega Event

I was impressed with how well everything about the trip somehow fit into Momo’s message. I noticed that nearly everyone who talked to us, from the artist in Tsfat to the guy who did a session on the Israeli-Palestinian conflict, moved to Israel when they were in their 20’s or 30’s. I was also surprised–and grateful–that dozens of Jewish philanthropists and organizations are willing to bet millions of dollars on a pretty radical and forward-thinking idea: give these kids a chance to connect with their roots in a way they wouldn’t be able to do otherwise, and hopefully some of them will be inspired to overcome the forces of assymilation and keep the Jewish faith alive. The financial backers are fully aware that not every ~$5000 investment will result in a more Jewish Jew, and that’s the cool thing. I’d love to hear someone with more of a marketing mind talk about this scheme (I’m looking at you, Josh). Although its success is difficult to measure, it just might be crazy enough to work.