Category Archives: Uncategorized

iTunes U podcasts on Android

In the giant ledger that weighs up the pros and cons of the Internet for humanity, one of the unalloyed virtues is the easy availability of world class lecture series you can watch or hear for free.

(Thank you especially to Stanford, I’ve enjoyed relativity and convex optimization recently, as well as Andrew Ng’s machine learning course.)

Recently I’ve been interested in game theory, but annoyingly the Yale site only gives an iTunes U link like this:

But I don’t have an iPod, do I have to mess around with hulking great mp3 files separately? Ah-ha, no. You can change “Browse” to “Feed” like this in the URL to get an RSS feed:

… which you can subscribe to with Google Listen.

I like to use a URL shortener such as to save me typing all that into my phone, getting it down to

Energy and the economy

Via FT Alphaville an interesting but scary article on Energy is everything by Michael Lardelli.

He considers the embedded energy value of each dollar and looks at the world economy in terms of money supply as well as in energy production terms. His thesis is that the world economy has actually been contracting since 2005, as net energy output falls – economic growth since then was effectively a monetary illusion.

So if economic growth is energy constrained, why doesn’t the price of oil go up, incentivizing energy producers to extract more and increase energy output? Lardelli argues that as we use up easily available resources the remaining energy supplies themselves require more energy to extract. Energy becomes simultaneously scarce and unprofitable.

Once energy is in decline the recent pervasive economic lie that everyone can become wealthier can no longer be sustained. Now one person’s increased wealth can only come at the expense of another person’s worsened poverty. Actually, it is worse than a zero sum game since the economy is not just failing to grow – it is actually contracting at the same time as the number of consumers (population) is expanding.

So now what do we do?

(Reminds me of the ideas in novel The Burning by Thomas Legendre.)

Multiple modes for mxml and Actionscript in Emacs

Flexing in Emacs again… Emacs 22 supports the entertainingly named MuMaMo mode which allows support for Multiple Major Modes. This is useful for editing MXML files that mix XML markup with Actionscript.

I am using MuMaMo together with actionscript-mode and nxml-mode with this definition in my .emacs:

(defun mumamo-chunk-mxml-script (pos min max)
"Find ... , return range and actionscript-mode."
(mumamo-quick-static-chunk pos min max "" "" nil 'actionscript-mode nil))

(define-mumamo-multi-major-mode mxml-actionscript-mumamo-mode
"Turn on multiple major modes for MXML files with main mode `nxml-mode'.
This covers inlined Actionscript."
("MXML Actionscript Family" nxml-mode

(add-to-list 'auto-mode-alist '("\\.mxml$" . mxml-actionscript-mumamo))

Strange paths

Don’t read this blog, go and read Strange Paths instead. Beautiful animations and discussion on aspects of “Physics, computation, philosophy”.

Non-negative matrix factorization and music

Amongst the work I did during the EASy MSc at Sussex was this 2005 paper on non-negative matrix factorization (NMF) applied to sound analysis.

I’d become fascinated with the information theoretic ideas about perception and redundancy originated by people like Horace Barlow, and particularly their application to sound by researchers like Paris Smaragdis. I’d originally been interested in ICA but Smaragdis and others were starting to apply NMF to sound around that time.

The basic idea of the paper is: the brain is able to analyze distinct sounds from the jumbled mixture that hits our eardrums because audio signals generally have structure, musical audio particularly so. If you take a time-frequency transform like a spectrogram of a piece of piano music, you find that it has approximately:

  • A sparse representation: each note has a characteristic frequency profile. The complete spectrogram is made by scaling and adding all the notes playing simultaneously. In the bases of all these profiles, the sparse representation consists of the activation levels of each notes.
  • Scaling invariants: scaling a vibrating system physically up or down is equivalent to translation in log-frequency.

NMF is a way of obtaining a low-rank approximation of a matrix as a product of two others, subject to the constraint that all the elements have to be positive of zero. Amazingly, this simple assumption is enough to discover all kinds of useful structure, including the separation into spectral bases like that in a spectrogram.

Left to its own devices, straight NMF on the piano spectrogram piece would likely approximate the spectral profiles of each note, but in no particular order. The additional step in this paper is to further require there to be only one profile, log-frequency translated – and this is indeed enough to get you recognizable notes.

There is an enormous and booming literature on sparsity in signal processing in areas like compressed sensing – Nuit Blanche blog is a good place to find out more.

Evolutionary and Adaptive Systems

Synchronicity… a sudden convergence of interesting links have got me all nostalgic.

It all sent me back to the fascinating year I spent in 2004/05 doing the Evolutionary and Adaptive Systems MSc at the University of Sussex.

This wonderful inter-disciplinary course brings together researchers in computer science, biology, creative systems and even a little philosophy. Pretty much everything was fair game for study, from robot ants spreading glow in the dark pheromone trails; neural networks made of actual buckets of water; to evolved passive-dynamic walking legs with fourteen knees.

I mean to go back through the work I did at Sussex and see what’s interesting enough to post here, starting with my dissertation on NMF.

Wild things

I made this absolutely ages ago but it’s my favourite musical creation. Storytelling, animal noises and wild rumpus – Wild Things MP3.