Archive for the ‘Diary’ Category

Once upon a time there were two friends, a cricket and a millipede. The cricket admired the way his friend, Illacme Plenipes, could move forward with with such grace, with such coordination of her 700 legs. And the millipede admired the singing of her friend, Gryllus Rubens. One day Gryllus asked Illacme, “How do you do it? Which leg do you move first? How do you keep the rhythm?” Illacme had never thought about these things. But it seemed like an interesting question. Motionless, she thought for a a while, and then said, “Well, I think I do it like this …”. And there she remained in place, unable to move a single leg, or even the tip of her antennae. Night fell. It was not until Gryllus began to sing that the spell was broken and Illacme, the millipede, was able once again to creep along the damp earth.

An extract from my unpublished manuscript, “Lessons and Parables”

Song of Gryllus rubens


Read Full Post »

Two days ago I started reading James Gleick’s new book, The Information. I don’t know what the critics think, but it has met my two most important criteria: It held my attention; I learned something new. And a third, good prose style — efficient if not poetic — is also satisfied. So here is today’s little gem from the book: Talking Drums. The first, brief report of these to the European public was by Francis Moore in 1730, who navigated the Gambia River on a reconnaissance mission for the slave trade. A century later, Captain William Allen, on an expedition up the Niger River, noticed more. Speaking of his Cameroon pilot, he wrote:

Suddenly he became totally abstracted, and remained for a while in the attitude of listening. On being taxed with inattention, he said: “You no hear my son speak?” As we had heard no voice, he was asked how he knew it. He said, “Drum speak me, tell me come up deck.” This seemed to be very singular.

Singular it was indeed! It was not until the publication in 1949 of The Talking Drums of Africa, by the missionary John Carrington, that non-Africans understood and deciphered the drummers’ code. Carrington realized that drummers could quite communicate complex information — “birth announcements, warnings, prayers, even jokes” — over long distances through a specialized tonal language. It was a language that was nearing extinction just as its secret was uncovered.

I don’t want to take away your reading pleasure, so I will leave you with these (1) the drummers had developed an amazingly sophisticated system of disambiguation and error correction that allowed them to communicate complex sentences using only two tones, (2) A man from the Lokele village, where Carrington lived for many years, had this to say about him:

He is not really European, despite the color of his skin. He used to be from our village, one of us. After he died, the spirits made a mistake and sent him off to a far away village of whites to enter into the body of a little baby who was born of a white woman instead of one of ours. But because he belongs to us, he could not forget where he came from, and so he came back.” The man added, “If he is a little bit awkward on the drums, this is because of the poor education that the whites gave him.

Postscriptum. As a fun little programming exercise, JC and I worked up something to transform text to an imaginary musical language. Below is the text and the “music.”

Hey man, look at the sun!
Hey man, it keep us warm!
It grow our our food,
It keep us warm.
Hey man, look at the sun,
And feel it be warm on your face!!

Hey man, look at the sun!

For the source code for converting text to music, if you are interested in such things, see our github repository. It is part of our sf2sound project. The most relevant files are talk.py and talk.sh.

NOTES. The transformation of text to “music” effected by talk.py encodes vowels as quarter notes — a = do, e = re, i = mi, o = fa, u = sol. Consonants are encoded as a pair of eighth notes, e.g., p = do re, b = re do. All the plosives are encoded as a major second, unvoiced ones rising, the voiced ones falling. In general, members of a phonetic group — fricatives, liquids, etc. — share some musical feature, e.g. the same interval. Spaces and punctuation marks are coded by a short melodic fragment. See the code for talk.py for further information.

Read Full Post »


The above is a visual representation of the opening measures of Muzio Clementi’s sonatina, Op 26, No1 as rendered by sf2sound — a kind of command line synthesizer that takes a stream of solfa symbols as input. This is homework for an eventual ear-training program. In any case, here is the audio file:


One of the challenges has been in shaping the waveforms of the individual notes so that they fit together without making annoying pops. A simple exponential decay did not work, although that is good for making the sound more or less percussive. What I discovered is that (at a minimum), one has to shape the attack and release of the note. For the moment I have done this by shaping the wave form with a simple quadratic function.

I’ve been experimenting with various settings and algorithms in order to get a better or more interesting sound. The sound file you hear is slightly more complex than the other ones I have posted. In previous version the sound was either (1) an exponentially damped sine wave, or (2) the former with some kind of shaping of the amplitude profile as mentioned above. In the current version, higher harmonics are mixed with the fundamental tone. Here is the code snippet of quad2samp where the mixing occurs:

// Form the sine wave and add harmonics to it
samp = sin(W*phase);
samp += -0.4*sin(2*W*phase);
samp += +0.2*sin(3*W*phase);
samp += -0.1*sin(4*W*phase);

I’ve observed an odd but likely well-known phenomenon (or is it an illusion?). When the sound consists of a shaped sine wave, i.e. no (deliberate) harmonic mixture, I find it painful to listen to it, even at relatively low volumes. Painful in the most elementary sense of the word, not because the poor artistry of sf2sound! When I mix in higher harmonics in some degree, the (physical) pain diminishes. I suspect this because the acoustic energy in the first instance is concentrated near a single frequency, so a small number of hair cells in the inner ear are overstimulated. When the same energy is spread among the various harmonics, albeit in unequal proportions, it is also spread over more hair cells, so that individual cells are not overstimulated. Perhaps someone who really knows what is going on can comment.

I’ll close with one more image — a close-up shot that shows how the wave forms from two adjacent notes join smoothly. The jaggedness of the sound wave reflects the addition of higher harmonics to the sine wave representing the fundamental tone.


Sonatina: close-up

Read Full Post »

Immense destruction

Immense destruction

There are no words for this. Move slider to left and right to see more/less of before/after. HH

Read Full Post »

Ever since I blogged about the eruption of the volcano under the Eyjafjallajokull glacier, my American friends have teased me about the mouth-twisting words in my country’s old and so-beautiful language. As a public service, I offer them this pronunciation link. See the second audio player on this NPR web page.

Eyjafjallajokull: Post 3 | Post 2 | Post 1


Read Full Post »

The internet I want

Yesterday I went to see a friend, a retired history professor, who is still active in publishing scholarly articles. She wanted to show me a short film clip on YouTube. Not more than a minute and a half long, we waited six minutes for it to download. Enough time to finish a cup of coffee and taste the excellent cookies that she had prepared. And enough time to reflect on the connection at our office, in the heart of Cambridge, Massachusetts. It is better, but it can take hours to download a four-gigabyte software install package. Amazing! And here comes the kicker:

   High-speed internet in Hong Kong

The internet connection I have

The company referred to in the article is offering 1000 megabit per second service for $26 per month! According to my computations, that means that I could download a 7.5 gigabyte file in one minute. Now that would make a difference in our productivity at the shop. Or think of my friends who work with video and have to transfer large files.

A comparison in the article: Verizon offers a “high-speed” connection of 20 megabits per second service for $144.95 per month/ Whoa!! More than five times as much money for a connection that is 50 times slower!

If this were April Fool’s Day, I could relax. This is just a joke. But it is the beginning of March. Perhaps I should move still further west, to Hong Kong. I hear that the food is excellent!!



Read Full Post »

When I was recovering from a serious coding binge back in Iceland, long walks along the seashore and playing the piano were the two things that saved me. Since then, I’ve tried to lead a more balanced life: no coding after sundown, a mix of activities — reading, walking, seeing friends, hanging out at the neighborhood bar, cooking, playing music. The point is to do several things, not just one — one terrible thing that swallows up both the day and the night, demanding your full attention for five, ten, fifteen, twenty hours at a stretch until you finally lie exhausted, shipwrecked in the dawn, clinging to the foot of the bed as if it were a lifeboat, the mess of dishes and books piled high, crowding the sacred space before the altar of the computer.

I’ve tried to keep this healthy routine, part of which is to meet with friends every Thursday to play music. We are so-so amateur musicians, but we have a lot of fun, and also a new “activity:” each of us brings an original composition to play, either individually, or as a group. Well, at the beginning we were pretty bad, but we have learned a lot, and we have had a lot of good times. One of the house rules is that after a piece is played, we all have to improvise on it. This way we all share in the embarrassment, the good musical moments, as well as the beer! I promise to post something of my own soon, since the last person to do so has to buy food and drink for the whole group. I am, however, taking the liberty of linking to a piece by one of the other players:

short piece for solo cello

There is more … this is just the first line of the piece:-)


Read Full Post »

I found the following link on a friend’s facebook page:

Where women of India rule the roost and men demand gender equality.

I highly recommend it: as field anthropology, as reportage from the domestic scene, and as food for thought. The thought for which this is food concerns the enduring Nature versus Nurture controversy. In particular, are the roles of men and women biologically determined, or are they socially conditioned? It is apparent to even the most politically correct that certain differences are biological. Women bear children, while men don’t. Men have, on average, much more muscle mass. But take another area. While men dominate professions such as violent crime and the design of video games, racing cars, and thermonuclear weapons, it has not been conclusively proved that this must forever be so. Do men do this because of the genetic codes they carry in their cells, or were they schooled to do so, however implicitly, at an early age? The further we move away from the obvious cases, the less clear the issue becomes. And confusion may set in at surprisingly close range, as shown by the article on the Khasi people referred to above. The unequal and subservient situation of Khasi men is so dire that one of them writes

Only mothers or mother-in-laws look after the children. Men are not even entitled to take part in family gatherings. The husband is up against a whole clan of people: his wife, his mother-in-law and his children. So all he can do is play the guitar, sing, take to drink and die young.

As Newton taught us, for every action there is an equal and opposite reaction. While the “equal” part probably does not apply in the human sphere, the general idea seems correct. Indeed, men of the Khasi people have organized themselves into the aptly named “Syngkhong Rympei Thymai” (SRT), a liberation movement whose goal is full equality of the sexes. Nature or Nurture? I don’t know.


Read Full Post »

As you, my dear readers well know, I began this blog-diary with some comments on the Eruption beneath Eyjafjallajokull glacier. We Icelanders are not nearly as self-expressive as my writing might suggest, but the move westward to a new frontier does strange things to the psyche. Anyway, I would just like to remark that one of the great side-benefits of this side-activity is the serendipitous discovery of all sorts of things, often through the comments of other bloggers. Today, for example, I learned about the Jazz scene in Umbria. Just imagine visiting there, eating and drinking at an outdoor restaurant, listening to music late into the night! Much earlier, on a totally different note, I learned about Camille’s sketchbook, a thoroughly wonderful art blog replete with amazing doodles, some in their original state, others treated to colorful digital processing. I just visited her blog again. It is delightful and highly recommended. How on earth did I find it? By accident! I had written a short piece Geometry and politics which contained an image of an amoeba. A comment from Camille, who also finds amoebas fascinating, for reasons quite different from mine, led me to her page. There is much more waiting to be discovered!


PS. If you think that the relation between politics and amoebas is a stretch, just take a look at those two pieces! [1] , [2]

Read Full Post »

A small change in our algorithm, just a tweak to four similar and adjacent lines of code, has made what for us is a big esthetic improvement in the “pieces” produced by our app. The change was in fact an accident that was meant to apply to a small part of the art engine, but which affected everything that is drawn. Local versus global, as they say in politics, mathematics, and computer science!

We’ve taken the caption for the frame below from the name of jazz standard. There is a wonderful recording by the Bill Evans Trio. Now if we could just permission to have this recording play along with little show produced by our app! That would be ever so cool. Alas, it will never happen.


Blue in Gree

Blue in Green

Read Full Post »

Older Posts »