Archive for the ‘music’ Category

The MuT music tool

Thursday, February 11th, 2016

For 8088 MPH I wrote a tool to convert Amiga MOD (module) files to the format required for playback with the 4.77MHz 8088 PC speaker 4 channel playback routine. The MOD file solution never felt quite ideal to me because the playback routine has some possibilities (like SID-style ring modulation) which can't be expressed in a MOD file and there are also a lot of things you can do in a MOD that won't really work with my player, so if I make it easy to try arbitrary MODs with the player, people are likely to try MODs that don't come out very well and conclude that the player is rubbish.

What I really wanted was to write my own tracker designed specifically for the player routines I had written (and some variants that I might want to write). But writing a whole tracker is a big project - particularly the GUI (GUIs take ages and aren't the most interesting things to program).

So I started thinking: what's the simplest piece of software I could write that a musician could use to compose music for this player? What about a command line tool - a sort of compiler which accepts text files as input and generates binary music data in the appropriate format (or indeed various formats) as output? This isn't entirely unprecedented - there have been various tools for processing text files into music such as Grigasoft's "Polyphonic Music" and John Worley's "Clockwork Pianola".

This is the design I came up with - I'm calling it "MuT" ("music tool", pronounced "mute") for now - it can't seem to decide if it's a tracker, a musical instrument or a programming language.

Inside the text files we would probably want to have something similar to a more traditional tracker's pattern grid, with different channels arranged horizontally and time going vertically. Rather than using semantically-significant spaces and newlines (which cause all sorts of trouble) I think a nice way to do it would be for the musician to lay out the grid using the "&" character to separate voices (think "C & E" means a C and an E playing at the same time) and the "|" character to indicate a new time division (think "bar is a measure of time" though the "|" interval would usually be shorter than a musical bar, obviously). So an empty grid would look something like:

output =
     &     &     &     |
     &     &     &     |
     &     &     &     |
     &     &     &     ;

The spaces could then be filled in with notes:

output = sine@(
 C4 & E4 & G4 & C5  |
 C4 & E4 & A4 & C5  |
 C4 & F4 & A4 & C5  |
 D4 & F4 & A4 & D5  |
 D4 & F4 & B4 & D5  |
 D4 & G4 & B4 & D5  |
 E4 & G4 & B4 & E5  |
 E4 & G4 & C5 & E5  );

Leaving a space blank causes the note in the same voice in the previous division to continue, so this could also be written:

output = sine@(
 C4 & E4 & G4 & C5  |
    &    & A4 &     |
    & F4 &    &     |
 D4 &    &    & D5  |
    &    & B4 &     |
    & G4 &    &     |
 E4 &    &    & E5  |
    &    & C5 &     );

If you want to silence a voice, put a 0 in there instead of a blank:

output = sine@(
 C4 & E4 & G4 & C5  |
 0  & 0  & A4 & 0   |
    & F4 & 0  &     |
 D4 & 0  &    & D5  |
 0  &    & B4 & 0   |
    & G4 & 0  &     |
 E4 & 0  &    & E5  |
 0  &    & C5 & 0   );

One can also put different instruments into the grid:

output =
 sine@C4 & square@E4 & triangle@G4 & bell@C5  |
 sine@C4 & square@E4 & triangle@A4 & bell@C5  |
 sine@C4 & square@F4 & triangle@A4 & bell@C5  |
 sine@D4 & square@F4 & triangle@A4 & bell@D5  |
 sine@D4 & square@F4 & triangle@B4 & bell@D5  |
 sine@D4 & square@G4 & triangle@B4 & bell@D5  |
 sine@E4 & square@G4 & triangle@B4 & bell@E5  |
 sine@E4 & square@G4 & triangle@C5 & bell@E5  ;

Instrument names are resolved per voice, and "." is (by convention) a sort of default instrument name, so this can also be written:

output =
 { . = sine; } .@C4 &
      { . = square; } .@E4 &
           { . = triangle; } .@G4 &
                      { . = bell; } .@C5  |
               .@C4 & .@E4 & .@A4 & .@C5  |
               .@C4 & .@F4 & .@A4 & .@C5  |
               .@D4 & .@F4 & .@A4 & .@D5  |
               .@D4 & .@F4 & .@B4 & .@D5  |
               .@D4 & .@G4 & .@B4 & .@D5  |
               .@E4 & .@G4 & .@B4 & .@E5  |
               .@E4 & .@G4 & .@C5 & .@E5  ;

One can make instruments in all sorts of ways. A few simple (chiptune-esque) waveforms are built into the program, or you can load them from a file:

bell = load("BELL.WAV")@s/440;

The MuT syntax is extremely flexible and rich enough to do just about any kind of audio processing, and hopefully it's also intuitive enough that it's not too difficult to figure out how to do just that.

What follows is a more technical and in-depth explanation, so if you're not a programmer or mathematician you might want to stop reading here.

Basically most MuT objects are functions from the real numbers to the complex numbers. Both the range and domain of these functions have units (some integer power of seconds - s) which are tracked by MuT so that it can distinguish between time-domain functions like sine@C4 and pure functions like sine.

There are various operators for acting on MuT objects:

+ - pointwise addition: output = sine@C4 + square@E4; sounds the same as output = sine@C4 & square@E4; but it has some different behavior in other ways - you can't do the "empty space means continue playing the same instrument in that voice" trick if you use + instead of & in your grid, and you can't use a + b as an l-value.

- - pointwise subtraction: same as + but the function on the right has its phase inverted.

* - pointwise multiplication (aka modulation). Also useful for volume envelopes.

/ and ^ - pointwise division and power respectively. Mostly for completeness sake, though they do have some uses especially for scalars.

[] indexes into a function, just like an array in C or Pascal. So sine[1] = 0.841.... When you put a function instead of a scalar inside the brackets, you (naturally) get function composition. So a[b][x] = a[b[x]].

{} allows execution of statements during the evaluation of an expression. This is handy for redefining instruments while inside the grid (see example above), or changing the tempo, amongst other things. The tempo (i.e. the amount of time covered by one "|" is set by the special variable division. So if MuT sees { division /= 2; } inside an expression, the following grid rows will be played at twice the speed (only durations are affected, not frequencies). The scope of any changes inside {} is the remainder of the statement in which it occurs.

@ - basis scale. This is where it gets really interesting. This is an operator only applicable to functions, not scalars (so unlike +, -, *, / and ^ it isn't found on calculators). Suppose you have a function f and a scalar x. Then (f@k)[x] = f[k*x]. So if f is a waveform then f@2 is the same waveform played twice as fast (and an octave higher). The @ operator also adjusts domain units if the right-hand side has a value which is not dimensionless. So, if f has a dimensionless domain (e.g. sine) then f@110*Hz (or f@110/s) will be a normal time-indexed waveform (i.e. a sine wave with a frequency of 110Hz). As I'm sure you can see this is a very useful operator for an audio program!

It gets better, though. Suppose we have a complex unit i = sqrt(-1); and we make f@i compute the Fourier transform of f. Surprisingly, I discovered (after defining it that way) that the mathematics of doing so work out very neatly - time scaling and Fourier transformations are closely related, mathematically - they are both Linear Canonical Transformations, and there's a nice mapping from complex numbers to LCTs which gives an (efficiently computable) meaning to f@z for any complex number z. Using f@i in combination with * allows us to do convolutions and therefore any linear filters you care to describe (high-pass, low-pass, band-pass, notch, echos, resonances, you name it). Using other complex numbers on the right-hand side of @ gives us inverse Fourier transforms and fractional Fourier transforms (the musical utility of which I know not, but I'm sure inventive musicians will find some interesting uses for it).

One can also use a function on the right-hand side of @, which will result in a different basis scaling for each sample in the output - i.e. for scalar x and functions f and w, (f@w)[x] = (f@(w[x]))[x]. That's how the first non-trivial example above works.

& - next voice operator. This just puts moves to the next voice, as we've seen above. It can also be used on the left-hand side of an assignment: (a & b) = (c & d); does the same thing as a = c; b = d;. This is useful for grouping values together into a compound object.

| - time sequence operator. c = a | b yields a for division followed by b for division. Functions in MuT repeat once they are complete, so if you evaluate c in a time sequence with a sufficiently long division, it'll sound like a | b | a | b | .... Similarly you can loop a division-long section of just one function by doing c = a | ;.

As with &, | can be used on the left-hand side of an assignment: (a | b) = c; assigns the part of c between 0 and division to a and the part of c from division to division*2 to b. So by using just assignment, the special division variable and the | operator you can make whatever edits to a waveform you like.

The comparison operators ==, !=, <, <=, >, >= work the same way as their C equivalents, yielding (in general) a function whose values are boolean (true, false) elements rather than numbers. These can be used with the ?: operator to combine two functions via a predicate.

The % operator has a couple of uses (which I might change to use different characters). On its own it gives the output from the previous voice in a voice set, which is useful for ring-modulation style effects (such as those that can be done by the SID chip and by my MOD player routine). If it comes immediately after a sequence, it yields a function which is the time-to-index mapping of that sequence. So (a|b|c)% is a function that is 0 from 0 to division, 1 from division to division*2 and 2 from division*2 to division*3. You can also change the time-to-index mapping of an l-value by assigning to this function. If the time-to-index mapping function takes a non-integral value at any point then the corresponding two elements of the sequence are mixed, so you can create fades and glissandos. Time-scaling the time-to-index mapping function will speed up or slow down the playing of that sequence without affecting the frequencies.

If you combine (via multiplication or basis-scaling) two functions which don't have the same domain units you end up with a compound object. When this compound object is basis-scaled, it'll move the dimensions of the compound object closer and leave other elements unchanged. So you can create an instrument by combining a waveform (dimensionless domain) and a volume envelope (time domain), and when this is time-scaled the scaling will change the frequency of the waveform part without speeding up or slowing down the volume envelope.

I'm contemplating a built-in function that will convert a waveform into a sequence so that it can be time-scaled without changing the pitch (or vice-versa) in the manner of a phase vocoder, but I haven't quite got all the details ironed out yet.

Arbitrary functions can be defined: e.g. major(x) = x + x@5/4 + x@3/2; will turn any waveform or function into a major chord using its input as the base note. If we allow functions to be recursive, then (by the Church-Turing thesis) MuT becomes a Turing-complete programming language (for better or for worse).

It's handy to be able to have libraries of predefined functions, instruments, values (note frequencies, intervals) etc. Executing an include statement will read in a file and insert its contents into the program at that point (much like C's #include directive). Conventionally, a MuT input file will start with include "standard.mut"; to include the predefined variables which come with the program, or include "pc_speaker.mut"; which does the same but also sets up special variables for the PC speaker output mode.

There's some more design documents (which are somewhat out of date but cover a few more dark corners) and the beginnings of an implementation on my github. Being a command-line tool, it's not terribly user-friendly but it probably wouldn't be hard for someone more GUI-oriented than me to slap a user interface on top of it. One fairly simple user-interface for this might just be a special text editor, which plays whatever object is under the cursor whenever a particular key combination is pressed (and which highlights the parts of the MuT program which are being used to compute the currently-playing notes). An interesting enhancement would be a little knob that appears whenever the mouse hovers over a numeric value; dragging this knob changes that numeric value in real-time, changing the currently playing sound if that value is involved in it.

Fractal waveform

Tuesday, September 27th, 2011

It would be really interesting to try to make a waveform that is fractal in nature, and actually sounds interesting and musical at whatever frequency you play it at. As you speed it up, some frequencies will go so high they become inaudible and new frequencies move into the audible range at the low end. In normal music, the pitches, effects, tempos and structures all happen at different timescales but in fractal music they would all interact with each other in interesting ways.

Waller's Torus: a four-dimensional musical instrument

Monday, July 5th, 2010

Consider the major and minor chords in Western music. There are 24 of them altogether (with the normal twelve-tone equal temperament tuning system usually used): one major chord and one minor chord for each of the 12 notes in the chromatic scale (A-G and 5 accidentals).

Each of these 24 chords consists of 3 notes. Pick one of the notes in the chord and throw it away, leaving two notes. Given these two notes, one can always find two chords (one major and one minor) which use those two notes. So given any major chord one can find three minor chords which share two notes with it, and given any minor chord one can find three major chords which share two notes with it.

That suggests that the 24 chords form a sort of network or graph, with vertices corresponding to chords and edges corresponding to pairs of notes. In three dimensions this network can be arranged on the surface of a torus (Waller's Torus). You can arrange the vertices in such a way that all the edges are the same length, but some vertices will have different sets of angles between edges than others.

In 4 dimensions, the symmetries of the network are more apparent - the vertices can be arranged such that each edge is the same length and all the vertices have the same set of angles between edges. The resulting object isn't a polychroron because only three edges meet at each vertex but it isn't a polyhedron either because it does extend into all 4 dimensions. The analogous figure in 3D would might be something like a star shape - if you draw it in 2D the inner points will be closer to each other than the outer points but in 3D you can arrange the points on the surface of a cylinder (sort of like the points one might find at the top of a paper party hat from a Christmas cracker). Here's what it looks like:

Using this figure, one could generate a nonlinear mapping from points in a 4-dimensional space to chords. Not just major and minor chords either - other chords are represented by points other than the vertices. At each vertex you can move in the direction of one of the edges to change the pitch of one of the notes. Since there are only three degrees of freedom in a chord (one for the pitch of each note) there is also a direction at each point in 4-space which leaves the chord unchanged as you move along it.

Screen aspect ratios as musical notes

Saturday, July 5th, 2008

Aspect ratios of televisions and computer monitors tend to be ratios of small integers. On my desk right now I have 3 monitors that are 4:3 and one that is 8:5.

Another thing involving ratios of small integers is musical intervals in Just Intonation.

C 1:1
C# 16:15
D 9:8
D# 6:5
E 5:4 5:4 monitors exist but are not common
F 4:3 the most common non-widescreen aspect ratio
G 3:2 3:2 monitors exist but are not common
G# 8:5 the most common computer widescreen format
A 5:3 5:3 monitors exist but are not common
A# 16:9 HDTV format
B 15:8

Vocalsynth

Sunday, June 29th, 2008

A fun toy would be a musical instrument with a microphone that can detect and modify pitch in real time. So if you sing an A but play a B it will transpose your voice up a tone. I understand such things are common in modern recording studios but I'm not sure if they work in real time (besides which, I don't think it would be too difficult to create such a thing from scratch).

Better still would be if it was polyphonic, so you sing a note, play a chord and hear a trio.

Shepard tones

Monday, June 23rd, 2008

If you arrange the musical notes C, C#, D, D#, E, F, F#, G, G#, A, A# around a circle (in that order), like this:

The resulting structure has some interesting properties. Firstly, each interval becomes a directed chord (in the geometric sense) on this circle, and transposition is just rotation.

The trouble is that because of octaves, this picture doesn't tell the whole story. If you go all the way around the circle you'll find yourself an octave higher (or lower) than when you started. Not all the intervals will sound alike as some of them will include an extra octave factor.

Unless you use Shepard tones.

Shepard tones have frequency components of the same pitch class in all octaves (tapering off at low and high frequencies according to a bell curve in log frequency space), like this:

They sound kind of like notes on a church organ.

The Shepard tones sound like musical notes but because the peak of the bell curve is always the same frequency, once you have progressed through a full scale you're back where you started instead of being up an octave. This can be used to create an auditory illusion of a pitch which sounds like it is continually getting higher (or lower), but is in fact looping.

It would be interesting to compose some music using Shepard tones. Another interesting feature of them is that all chords are identical to their own inversions. So in a number of ways Shepard tones drastically simplify music theory.

Another fun thing to do with Shepard tones is to leave the pitch class alone and vary the frequency that is at the peak of the bell curve. That way you can make a sound which continuously increases in frequency but which never seems to change pitch.

Background music for books

Thursday, June 12th, 2008

Normally when I read books I don't have music playing in the background as it's too distracting. But there have been occasions when (for one reason or another) I found myself reading a book and listening to music at the same time, and actually being able to concentrate on and enjoy both, particularly when the mood of the music seemed to fit the mood of the book.

It seems to me that this (with a bit of high tech magic) could be an entirely new multimedia experience - a system that plays appropriate music while you read.

It would be kind of difficult to implement, though, because everyone reads at different speeds and the speed isn't even consistent for a given person. So you'd need a computer program which can "recompose" music so that certain musical events can happen on demand. This isn't completely unheard of - I remember hearing about a roller coaster which had synchronized music which had to solve a similar problem (a roller coaster runs at different speeds depending on the mass of its payload.

Then you'd just need a system that could track your eyes to find out which bit of the book you were reading at any given moment.

Probably not possible yet but maybe in a few years.

Extending "The Elements"

Thursday, June 5th, 2008

Tom Lehrer's terrific song The Elements is unfortunately lacking in one respect - it is outdated as it does not include the elements discovered/named since the song was written.

Here is one attempt at bringing it up to date but I don't think just adding an extra verse fits well with the rest of the song. I wonder if it is possible to fit in the extra elements but keep the list format, perhaps at the expense of (part of) the last two lines. There is also some flexibility about where to put the "and"s - Lehrer doesn't use them consistently and even throws in an "also" in one place.

Cool stuff you can't find on the web

Saturday, November 3rd, 2007

Every so often, I think of something - perhaps a book, television programme or computer game - that I remember but that I have lost or have no record of. Usually when that happens, I turn to the web - a simple search and I have a massive amount of information on whatever it is in no time.

However, sometimes it doesn't work. For whatever reason, the collective consciousness has failed to remember some things. A few of these are recorded here, but since I'm relying on my memory, some facts may be inaccurate.


Fire was a computer game I used to have a copy of, but it was destroyed by the Dir II virus. You had to fly a helicopter through 8 levels, blowing up various things including hot air balloons, planes and a train (which constituted level 2). Then there were some levels over water, where you had to destroy boats, and some over desert, where you had destroy tanks and ground-to-air missile launchers. The really amazing thing about this game was the parallax scrolling - I'd never seen anything like it on the 8MHz 8086 I played it on. It had CGA and EGA graphics modes. The title screen (which took up most of the first of the two 360K floppy disks the game came on) was beautifully atmospheric, with the helicopter flying in front of the sun and stopping in the middle. Then there was this brilliant (and long) bit of sampled soundtrack. There was some documentation, but it was in French. When I asked Jim Leonard of Mobygames, he hadn't heard of it but said it sounded like a game by Loriciels. I found some screenshots for another Loriciels game on the web and the graphics did have a similar sort of style. I'd really like to play this again, but searching for "Fire" in the context of computer games is a somewhat futile exercise.

[Update!] - Fire wasn't by Loriciels at all but by New Deal Productions. I have found information about versions for the Amstrad CPC, Amiga and Atari ST, but still haven't found the PC version.

[Update!] - Found it! (at ibm5150.net). It can run from a hard drive in theory but the contents of the zip file need to be in the root directory for it to work. I seem to recall that to run it from 2 360Kb disks, the CGA and EGA directories need to be on disk 2 and everything else on disk 1. Start with "fire c" for CGA graphics, "fire e" for EGA graphics or "fire h" for Hercules graphics. The documentation also mentions "fire v" but that doesn't seem to work. This is probably because there's no vga graphics directory (it was also missing on the copy I had on floppies). The sampled soundtrack 52.7 seconds of 4-bit samples at 9.322KHz (1/384 of the NTSC colour burst frequency). DOSBox plays it fine in all 3 graphics modes, though needs to be slowed down a bit from the default - the game is CPU-speed dependent (unusually for a game made as recently as 1989).

For the most part the game is of very high quality but there are a few rough edges - apart from the VGA graphics problem already mentioned, the game seems too difficult to start with and then very easy once you get the knack of it. This, combined with its rarity, makes me wonder if the PC conversion was unfinished or unreleased.


I used to have a book which (like the "choose your own adventure" series) was divided up into sections, between about 1 and 5 per page. At the end of most of the sections there was a decision to make, with a section number for each choice. There were about 200 sections altogether, and many possible paths through the book. Every time I read it I came across sections I hadn't seen before. The book was also a competition - if you figured out it's secret you had a chance of winning a trip to Disneyland. The plot was that the land was dying, and you had to find a magic word to tell Steeleye the Raven so he could break the spell and restore the land. At one point in the book, you were falling and had to shout "Save me, Steeleye!", holding the feather he gave you at the beginning of the book, in order to get rescued. There were puzzles such as roman numeral codes and liar/truth-teller type things. There was a unicorn near the beginning who gave you a tear which emitted light. There was a talking tree near the end, and there might have been a swarm of bees somewhere. One character says "Deeds, not words" and tries to kill you. The book was published by Ladybird (it was that shape) but I don't remember what it was called or who wrote it.

[Update!] - I now know that the book is called "Steeleye and the lost magic" by Jason Kingsley, illustrated by Jon Davis and pubished in 1987. If anyone can help me find a copy I'd be very grateful to them!

[Update 2!] - I now have a copy of the book! It's a bit shorter than I remembered (only 117 sections) and a bit easier (I've solved it, I think, apart from one cryptic clue) but otherwise very much as I remember. I've scanned it so hopefully soon I'll find time to put it on the web (okay, it would be a copyright infringment, but since the book is out of print I'm sure there would be no harm in it.)

Links which helped me in my quest to find this book:
Demian Katz's Gamebook site - http://www.netaxs.com/~katz/game/book.htm
The Cheesypeas Ladybird book site - http://www.cheesypeas.demon.co.uk/ladybird
Sadly, both of these websites have since gone missing. Please let me know if you find them.


Comedy wordsmith and Splicer's disease sufferer Creighton Wheeler, who used to appear regularly on
Kevin Greening's weekend morning shows on BBC Radio 1, and now appears somewhat less regularly on Steve Wright's afternoon show on Radio 2.

[Update!] - The part of Creighton Wheeler is performed by Andrew McGibbon. Testbed made two shows about Creighton Wheeler in 2003 for Radio 4, called "Wheeler's Wonder" and "Wheeler's Fortune". Anybody know where I can get a hold of these? Apparently Creighton Wheeler has also appeared on Loose Ends.


Pickwick tell-a-tale tapes (in association with Ladybird books, Pickwick international and Moss Music) - brilliant audio books for children. I have "Treasure Island", "Swiss Family Robinson" and "Gulliver's Travels" but I'm sure there were many more. The voice acting and classical music were great.

[Update!] - Reader James pointed me to this website which is selling these tapes.

Along a similar vein, there used to be a magazine (I think) which came with a tape which had various childrens stories on it. The one I remember was "The thin king and the fat cook" but there were a few on each tape. I had a couple of tapes, but I've lost them now. Maybe they are still at my parents' house somewhere.

[Update!] - This is what I was talking about. Apparently I had "Story Teller 2" parts 5 and 16 and possibly also "Christmas Story Teller" part 2, because the titles Bored Brenda, Noggin And the Birds, The Snow Bear, The Inn Of Donkeys, Shorty The Satellite And The Brigadier, The Nightingale, Hugo And the Man Who Stole Colours, Mole's Winter Welcome, The Tale of the Little Pine Tree and Grogre and the Giant Nasher seem familiar. I remember very little about any of these except that (as I recall) some of them made me feel quite sad. And there was something about a picnic of bread, cheese and apples in one of them. And people getting swallowed up by a bog. Derek Jacobi's voice still makes me think of these stories to this day. It's quite possible that at least some of these tapes were chewed up by my tape player - it used to do that every once in a while (particularly when I stuck things into it - I was a little scientist).

[Update!] - I got a hold of a digital copy of all of the tapes and magazines, and they are just as good as I remember - extremely well done. I have been playing them for Alexander but he's a bit young for them at the moment. I look forward to the day when he is old enough to enjoy them. The one with the picnic was "The Snow Bear", and the sad one was "The Nightingale" (all these stories have happy endings, though). "Mole's Winter Welcome" still brings a tear to my eye.


The A Word A Day entry for 18th December 1998 reads:

Date: Fri Dec 18 00:04:27 EST 1998
Subject: A.Word.A.Day--straight-from-the-shoulder
X-Bonus: We see but dimly through the mists and vapors; \
 Amid these earthly damps \ What seem to us but sad, funeral tapers \
 May be heaven's distant lamps. -Longfellow (1819-1892)

straight-from-the-shoulder (strayt-fruhm-thuh-SHOAL-duhr) adjective

   Frank and forthright: straight-from-the-shoulder reporting.

   "A striking poem called Sequinned ends this way:
        Girl, don't you let that city get away.
        Lift it up, raise it up, slip your arms through
        and take it back to dance.
   This is poetry that speaks to us boldly, straight from the shoulder."
   Natalie Soto, et al., On the Shelf, Rocky Mountain News, 21 Dec 1997.

This week's theme: idioms.

Anyone know who this poem is by and where I can get a copy?

[Update!] My friend Claudine Burgos found the poem. Not on the web, though - by the old-fashioned technique of looking up the archives of the Rocky Mountain News and calling the library to find a copy. The poem is by Allison Adele Hedge Coke and goes:

    Don't tell me you couldn't reach down pick up
    the whole gleaming garment and wear it
    to fancy shawl dance back home. Dancing proud
    in a twenty -four- dollar trinket city.

    All laid out
    shimmering and shining on jet black world
    traffic lights, stret lamps, hot neons, cool fluorescents.

    Headlights
      	swim freeways electric

      	minnows, glittering eyelets on bridges
    bridges lacing up New York and Newark, separate
    sides of a sequined vest.  Borough lights trace out
    webbed wing

    butterfly design, no wasps- mosquitoes even.
    Something ready to fly off the whole metro stretch.
    Some cousin calling:

    Girl, leave your French braids right `cause
      	Cut Nose is goin' ta have it out with you
    Over snagging her sometimes half-side last night.
        She wants to take yoru prize and crown
  	from Red Nations Pow Wow-

    Her eyes painted sharp red at the corners,
    red as the landing light
      	on this plane's wing tip.
    Her plume high and straight, the Empire State,
    while yours falls
      	gently over your part.  But that vest-
    red, green, gold, silver sparkles,
    no one's got more brilliance.
    More elegant that bugle beads and embroidery,
    More stunning than satin and silk.

    Girl, don't you let that city get away,
    Lift it up, raise it, slip your arms through
    And take it back to dance.

The game Willy the Worm was written by a guy called Alan Farmer. Anyone know anything about this game other than what's in the documentation, such as where to obtain the editor, and what the author is doing these days? I'd be particularly interested to know if there was ever a "Willy the Worm II" or a "Pete the Pigeon" game.

[Update!] - A school friend of Alan's sent me some of his software:


I used to have a book called something like "20 Games for the BBC Micro". They were written in BBC BASIC mostly (although there was one - a board game - which was written partly in assembler). You had to type them in. The games included Hunchback, Monty Mole, a Star Wars game and some others I don't remember. How come you can't find downloadable copies of these games to run on an emulator?

[Update!] I since found out what happened to the book - I lent it to a friend of mine and forgot about it. I'll have to try to remember to get it from him next time I see him, and possibly reproduce some of the programs here.


Chris Evans used to do the breakfast show on BBC Radio 1, and every Friday he and his cohorts would sing "The Weekend Song" (or, possibly, "The Friday Song".) Some of the lyrics were "I want Spielberg to focus my camera / I want Versace to dress my dog...".

[Update!] - Someone sent me some more lyrics:

I want to live in a castle,
I want an ocean for a pond,
I want a jumbo jet just to get to work,
Because it always takes me far too long.

I want to skip in the sunshine,
I want to dive into the deep blue sea,
I want to buy an ice cream for the man in the moon,
Because he always shines his light on me.

I want Spielberg to focus my camera,
I want Versace to dress my dog,
I want a current account at the Jodrell Bank,
I want Niagara falls to flush out my bog.

We're all just a drop in the ocean,
And the world's just the size of a pea,
And like a meal for one, it'll soon be gone,
And it's all just a cliché for me.

Anyone got a recording?


"Das Verflixte Hundespiel" by Artus Puzzle. You had nine cardboard squares, and on the side of each square was half a dog (either a head or a tail). There were four different types of dog. You had to arrange the squares into a 3x3 matrix in such a way that the heads and tails matched up. It was very difficult! There are 9! x 48 = 23,781,703,680 different ways of arranging the squares but only 2 solutions. I eventually gave up and wrote a computer program to solve it.

[Update!] - Das Verflixte Hundespiel is still being sold here. Apparently it is Swiss. This isn't exactly the same version I had - the dog illustations on the version I had were different.

A friend of mine remembers having a British version - anyone know anything about it?

My then girlfriend (now wife)'s family bought me a similar puzzle which is even more difficult as it only has one solution. The box and website claim that there are "over 300,000" wrong ways to assemble the pieces but this is a gross underestimate (probably based on 9! = 362,880 permutations, which doesn't include orientations).

[Update!] - Commenter John requested the solver program and solutions. Here they are. It is currently set up to solve the card suits jigsaw version (I don't have the "Das Verflixte Hundespiel" puzzle to hand). It's not a particularly elegant way of coding it (18 nested loops for the tile choices and orientations) but it should be easy to adapt for similar puzzles. There is a project file for Microsoft Visual Studio .NET 2003 but the code is portable.


This one isn't for me, but for a friend of mine. Dave writes:

Several years ago, a band called Blind Melon did an acoustic set on a late-night ITV rock/metal show called "Noisy Mothers". Around a month later, the lead singer died of a cocaine overdose, after they'd only released two albums [they released a third posthumously]. I've been trying to track down a recording of that ever since I accidentally taped over it a couple of years ago, before I could transfer the VHS to digital... I'll be impressed if anyone in the world can track a copy down...

Can you help?

[Update!] here is one of the songs from the set.


Some years ago, I remember seeing several episodes of a TV show called "They Who Dare" on BBC2. Each episode was only 10 or 15 minutes long (might have been longer or shorter, I don't remember, but I'm sure it wasn't a full half-hour).

Each episode documented some dare-devil sport such as parachuting, hang-gliding or BASE jumping. One particularly memorable episode featured people jumping out an aeroplane and then parachuting down large holes in the ground. The holes themselves were formed by some unusual natural phenomenon, and were quite spectacular even without people parachuting down them.

Each episode was a real work of art - fusing music and beautiful landscape cinematography with the human drama of people who get their kicks from flying through these scenes in some dangerous fashion. It was so enthralling that I remember regularly finding myself realizing at the end of an episode suddenly realizing that I had actually been watching TV for the past 15 minutes and not actually performing these incredible stunts.

I'd love to get a hold of copies of all the episodes of this show, but have only found single, in-passing mention of it using Google.


Along similar lines, I remember hearing about a 5-minute BBC promotional film short featuring a Helicopter tour around the coast of Britain. I never saw it (except for highlights on Points of View but I remember people saying it was really amazing to watch. I have ever since been kicking myself for missing it.


What is this piece of music? I found it on an episode of This American Life but this piece isn't listed. It isn't on TAL's scoring tracks page either (I think - I listened to them all and didn't hear anything that sounded like it). The world needs a search engine where you can upload a piece of music and find out what it is.

[Update!] - Somebody pointed out that such services already exist - Shazam is one and I think there are several others. Unfortunately they all seem to need an SMS-capable mobile phone which doesn't really help me because I don't have one.

[Update 2!] - John Philips from Bath emailed me with the answer - the song is "At The River" by Groove Armada.


This one is a real long-shot, since there is almost nothing to go on.

There is a childrens book I remember reading as a child, but I remember almost nothing about it. I remember that I read it in the childrens' section of Goring library, and it may have been about some children going into space. I think it was (at least mostly) a picture book. I have a vague recollection of one of the illustrations being of something like this (possibly in the middle of a large room, possibly aboard an alien spaceship - though that could just be a mental picture I formed at the time). I don't know that I would even recognize it if I saw it. I do remember that I felt amazingly inspired by it at the time and I have a feeling it may have influenced my life greatly.

I recently visited Goring Library again for the first time in more than 19 years. It was very much like I remembered (though as one would expect it seemed smaller than I had remembered). Unfortunately (with the exception of some Meg, Mog and Owl books I had completely forgotten the existence of) all the books I that were around when I was a child seemed to have been replaced.

So to sum up, this book:

  • Was written for children
  • Has colour illustrations
  • Was published in the UK in 1988 or before
  • Has a science-fictiony sort of story, possibly involving aliens

Any suggestions about books that might fit these criteria?


From Ben Davis, via Dave:

Just wondering if anyone remember a game called 'Prunes' for the BBC computer?

I tried searching the Internet the other day, but amazingly the Internet seems to contain absolutely no knowledge of the game's existence. :/

I remember it well enough to remake it last night :) I'm just still getting to grips with the fact that it seems to be completely unknown to the world.

Screenshot: http://bdavis.strangesoft.net/prunes.png

You are "the last of the Giant Prunes", aka the white pixel leaving a cyan trail. You have to surround the "Giant Figs" (red pixels moving randomly and leaving a magenta trail), and then touch a blue-yellow flashing pixel, at which point any fully surrounded magenta regions turn green. Unfortunately there's no win condition (in mine or in the original), so you eventually end up with what resembles a cyan and green world map and nothing to do.

It's a pretty faithful remake. Apart from exact dimensions and timings and stuff like that, the only bits I couldn't remember were the scoring mechanism and the behaviour when a blue helper prune (which eats through fig trails for you) touches a flashing pixel. The sound effects are missing from my version, which is a shame since they had bags of character.

Executables (insert standard disclaimer here yada yada): http://bdavis.strangesoft.net/prunes.exe (DOS) http://bdavis.strangesoft.net/prunes-win.exe (Windows)

Source - compiles with Allegro on some other platforms like Linux and Mac: http://bdavis.strangesoft.net/prunes.cpp

Maybe I'll launch a full-scale investigation to find out who made the original game and make sure they know that they are awesome.

My suspicion is that this was never actually published anywhere - that it was just something coded by a secondary school student over a few lunchtimes (probably starting with the random walk used by the figs and blue things - I coded that up algorithm myself shortly after learning C), evolved into a game and possibly got passed around on disk. It has a Qix-like feel to it so may have been inspired by that. The simple graphics, the fact that it's not winnable and the fact that it's relatively easy to get to a stalemate situation all point to an unpublished, one person job. However, it would be interesting to track down the original version and/or it's author.

Musical toy

Saturday, April 28th, 2007

The new and more logical musical stave I proposed yesterday could also form the basis for a fun musical toy. It would consist of a set of bars of various lengths representing various intervals, with the length proportional to the logarithm of the frequency multiplier (so maybe 15cm for an octave, 8.8cm for a fifth, 4.8cm for a major third and so on) and a set of connectors into which one or more of these bars can be plugged.

Each of the connectors would have a button on it which, when pressed, makes a sound. One of the connectors has its frequency fixed at (say) 440Hz (or maybe is tunable with a potentiometer) - the frequencies of the other connectors depend on how far away they are from the fixed connector (which in turn depends on which interval bars are plugged in. The connectors are built in such a way that if two bars are plugged in to opposite sides, their ends touch.

The result would be a sort of "build it yourself piano keyboard" which would help children (and adults) learn about musical intervals and tuning systems.