CodeSounding, Sonification of Source Code Structure

So much for only posting some links tonight.

I saw this project via Hacker News, which reminded me of two other recent stories. One I shared a while back was video of sonification of various sorting algorithms. The first sample at the CodeSounding project page sounds similar which is surprising to me. A sort algorithm only has a few dimensions of interest, mostly time and relative magnitude of elements being sorted.

The reason I am surprised by the similarity between some of the samples and the very simple sonic space produced from sorting is due to the other recent story, Jonathan Berger’s lecture (mp3 link) on TVO’s Big Ideas about the social ethics of music. In that lecture, he specifically presents sonification of data sets that have a deep social dimension, for instance the spread of the oil plume in the gulf. Berger is a composer so perhaps his work, which uses similar techniques, shows more of his hand as a maker. His finished work definitely is meant to be as evocative in the result as the original input.

However one of the things he said that stuck with me is how music, and sound more generally, is better than visualization for representing multidimensional data. I would expect code to open up much more fully using sonification than the CodeSounding samples represent. Maybe it just wants for a hacker/musician to do a better job mapping the interesting dimensional elements of source code into the sound scape.

Word of warning, I could not find any license information so I suspect it is all rights reserved. That and the fact it takes in Java class and jar files, being written itself in Java, may be a turn off. Or an inspiration for an open source project to do one better.

CodeSounding: computer generated music sounds from a source code structure

3 Replies to “CodeSounding, Sonification of Source Code Structure”

  1. Hello
    Just some clarifications:
    – CodeSounding is open source (GPLv3) – see Official source and binary releases include its text
    – CodeSounding sonifies the Java instructions, as they are triggered at runtime: so not the static source structure.
    – The sorting example is just a “standard exercise”; you can also sonify a multi-threaded Swing application – see for example

    The major challenges are 1) keeping realtime synchronization between instructions executed and sounds played, 2) how to “compress” the CPU speed into a meaningful rhythm, that is how to going from 2GHz to 44kHz.
    Of course, getting good audio samples is a hard work, and would well require a musician 🙂

    Finally, let me signal you the following links, I hope you’ll enjoy them:
    – data sonification is used at NASA as well, when analyzing space data:
    – the “Institute for Algorhythmics” ( sets a conceptual framework for these experiments

    1. Thanks for the info, especially the licensing. It was not clear to me that there was even a SourceForge project from the URL posted on Hacker News. It should have occurred to me to search for something like that.

      That multi-threaded code was more what I was expecting, and I suppose that makes the most sense. I wonder if sonification of parallel code could offer insight or help with debugging what are traditionally some of the hardest programs with which to work.

      I appreciate the challenges. I know a couple of musicians into the noise scene, I wonder if any of them would be interested in helping produce more musical samples? Clearly there are some conversations I need to strike up.

      Thanks for the additional links for further reading. The more I learn about this space, the more interesting it gets.

  2. I was forgetting this other link: the “Musical Software Metrics” project ( Its leit motiv is how to listen to the source code of an application in order to assess its design quality – where a “good designed code” means having good software metrics. I have not yet listen to it, but it “sounds” promising…

Leave a Reply

Your email address will not be published. Required fields are marked *