Thursday 15 November 2012

UNDER THE OLD WHIFFLETREE

Dick Pountain/PC Pro/Idealog 214 11/05/2012

It all started when I was asked to write a preface for a new book on the history of Dennis Publishing, which required reminiscing about our start in the early 1970s. That triggered memories of the way we put magazines together back then:  type the copy on an IBM Selectric "golfball" composer, cut it up into strips with scalpels and stick it down on the page with hot wax. The smell of that hot wax and the machine-gun rattle of the IBM came flooding back.

That prompted me to look up IBM Selectric on this new fangled Web thingy, where I soon stumbled across a neat little video clip by engineer Bill Hammack (http://www.up-video.com/v/57042,ibm-selectric-typewriter-.html) which shows how that unforgettable sound arose, but more importantly explains that the IBM golfball mechanism contained a fiendishly cunning example of a mechanical digital-to-analog converter. The problem that needed solving was to rotate an almost spherical print-head around two different axes, to position the correct character over the paper - unlike older typewriters, this print-head moved while the paper stood still (as in all modern computer printers which it foreshadowed). Rotation control involved adding together two digital "signals", using four bits to specify the tilt and 22 bits to specify rotation around the vertical axis, which originated as depressions of keys on the keyboard and were then transmitted via cables like those used to change gears on a bicycle. The mechanism that performed this addition went by the glorious name of a "whiffletree" (or whippletree). Now I was hooked.

Googling for whiffletree produced a total surprise. This mechanism has been known since at least the Middle Ages, perhaps even in the ancient world, as a method for harnessing horses to a plough! It solves the problem of various horses pulling with different strengths, by adding together and averaging their pulls onto the plough. It's a "tree" in exactly the same way a directory tree is: each *pair* of horses is harnessed to a horizontal wooden bar, then all these bars get connected to a larger bar and so on (a big team might require three levels). The pivot links between bars can be put into one of several of holes to "program" the whiffletree's addition sum: if the lead horse is pulling twice as hard as the others, put its pivot at the two-thirds mark. Without a diagram it's hard to convey just how damned elegant this mechanism is.

As an aside, at this point I ought to tell you that my first ever brush with computing happened in the sixth-form at school in 1961, as part of a team that built an electronic analog computer from RAF surplus radar components to enter a county prize competition. It could solve sixth-order differential equations in real-time (for instance to emulate the swing of pendulum that travels partially through oil) and we programmed it by plugging cables into a patch-panel, like an old-fashioned  synthesiser or telephone switchboard.

In thrall to the whiffletree, I wondered where else such ingenious devices have been used, and that lead me straight to Naval gunnery controllers. Throughout WWII and right up into the 1970s, American warships were fitted with electro-mechanical fire control systems that worked on a principle not unlike the IBM Golfball. An enemy plane is approaching, your radar/sonar system is telling you from which direction, keep the anti-aircraft gun pointed in such directions that its stream of shells intercepts the moving plane's path. This problem was solved continuously in real-time, by gears, levers, cables and a few valves.

Ever since Alan Turing's 1936 seminal paper we've known that digital computers can imitate anything such mechanical or electrical analog devices can do, but sometimes there's little advantage in doing so. We used to be surrounded by simple analog computers, especially in our cars, and still are to a lesser extent. One that's long gone was the carburettor, which slid needles of varying taper through nozzles to compute a ferociously complex function relating petrol/air ratio to engine load. One that remains is the camshaft, whose varying cam profiles compute a similar function to control valve timing. A less obvious one is the humble wind-screen wiper, whose blade is actually attached via a whiffletree to spread the torque from the motor evenly along its length.

Just as my analog nostalgia was starting to wane, I turned on BBC 4 last night and watched a documentary about the Antikythera mechanism, an enigmatic bronze device of ancient Greek origin that was found on the sea-bed by pearl divers in 1900. Over fifty years of scientific investigation have revealed that this was a mechanical analog computer, almost certainly designed by Archimedes himself, whose rear face accurately calculated the dates of future solar and lunar eclipses, and front face was an animated display of the then-known-planets' orbits around the sun. It worked using around 70 hand-cut bronze gears with up to 253 teeth each. We're constantly tempted toward hubris concerning our extraordinary recent advances in digital technology, but once you've allowed for some four hundred years of cumulative advances in chemistry and solid-state physics, it ought to be quite clear that those ancient Greeks possessed every bit as much sheer human ingenuity as we do. And look what happened to them...

PUBLISH AND BE DROWNED

Dick Pountain/PC Pro/Idealog 213: 12/04/2012

A couple of years ago I became quite keen on the idea of publishing my own book on the Web. I got as far as opening PayPal and Google Checkout accounts and setting up a dummy download page on my website to see whether their payment widgets worked. In the end I didn't proceed because I came to realise that though publishing myself minimised costs (no trees need die, no publisher's share taken), the chance of my rather arcane volume becoming visible amid the Babel of the internet also hovered around zero, even if I devoted much of my time to tweaking and twiddling and AdSensing. What's more the internet is so price-resistant that charging even something reasonable like £2 was likely to deter all-comers. But perhaps the real cause of my retreat was that not having a tangible book just felt plain wrong. It's possible I'll try again via the Kindle Store, but I feel no great urgency.

I'm not alone in this lack of enthusiasm: the fact that mainstream book publishers still vastly overcharge for their e-books suggests their commitment is equally tepid (I recently bought Pat Churchland's "Braintrust" in print for £1 less than the Kindle edition). I'm well versed in Information Theory and fully understand that virtual and paper editions have identical information content but, as George Soros   reminded us again recently, economics isn't a science and economic actors are not wholly rational. The paper version of a book just is worth more to me than the e-version, both as a reader and as an author. I really don't want to pay more than £1 for an e-book, but I also don't want to write a book that sells for only £1, and that's all there is to it.

As Tom Arah ruefully explains in his Web Applications column this month, the ideal of a Web where everyone becomes their own author is moving further away rather than nearer, as Adobe dumps mobile Flash after Microsoft fails to support it in Windows 8 Metro. It's precisely the sort of contradictory thinking that afflicts me that helped firms like Apple monopolise Web content by corralling everything through its walled-garden gate. The Web certainly does enable people to post their own works, in much the same way as the Sahara Desert enables people to erect their own statues: what's the use dragging them across the dunes if no-one can find them.

There's always a chance your work will go viral of course but only if it's the right sort of work, preferably with a cat in it (in this sense nothing much has changed since Alan Coren's merciless 1976 parody of the paperback market "Golfing for Cats" - with a swastika on the cover). The truth is that the internet turns out to be a phenomenally efficient way to organise meaningless data, but if you're bothered about meaning or critical judgement it's not nearly so hot (whatever happened to the Semantic Web?) This has nothing to do with taste or intelligence but is a purely structural property of the way links work. All the political blogs I follow display long lists of links to other recommended blogs, but the overlap between these is almost zero and the result is total overload. I regularly contribute to the Guardian's "Comment Is Free" forums but hate that they offer no route for horizontal communication between different articles on related topics. Electronic media invariably create trunk/branch/twig hierarchies where everyone ends up stuck on their own twig.

If the Web has a structural tendency to individualise and atomise, this can be counteracted by institutions like forums and groups that pull humans back together again to share critical judgments. Writing a novel or a poem may best be done alone, but publishing a magazine requires the coordinated efforts and opinions of a whole group of people. A musician *can* now create professional results on their own in the back-bedroom, but they might have more fun and play better on a stage, or in a studio, with other people. The success of a site like Stumblr shows that people are desperate for anything that can filter and concentrate the stuff they like out from the great flux of nonsense that the Web is becoming. The great virtue of sites like Flickr and SoundCloud is that they offer a platform on which to display your efforts before a selected audience of people with similar interests, who are willing and able to judge your work. Merely connecting people together is not enough. 

The billion dollars Facebook just paid for Instagram perhaps doesn't look so outrageous once you understand that it wasn't really technology but savvy and enthusiastic users - the sort Facebook wishes it was creating but isn't because it's too big, too baggy and too unorganised - that it was purchasing. It will be interesting to see how their enthusiasm survives the takeover. The Web is a potent force for democratising and levelling, but it's far from clear yet how far that's compatible with discovering and nurturing unevenly-distributed talent. If publishers have a future at all, it lies in learning to apply such skills as they have in that department to the raging torrent of content.

MUSIC MAESTRO PLEASE

Dick Pountain/PC Pro/Idealog 212 14/03/2012

I love music. By that I don't merely mean that I *like* music, and I don't mean that I write to a constant background of pop music from Spotify or the radio (on the contrary I can't write to music because I can't not listen so it distracts me). The kind of music I like is *good* music, by which I mean that ~1% of every genre that delivers the goods, that takes you away. It started in my teens with American rock and R&B (Little Richard, Chuck Berry, Bo Diddley), progressed through blues to jazz, then to classical (the links ran Charlie Parker to Bartok, back to Bach, then forward via Mozart, Beethoven and Schubert to Wagner, Chopin, Ravel, Debussy). Bluegrass, country, reggae, dubstep, Irish, Indian, just about anything as long as it's excellent. I play music too - guitar, bass guitar and dobro tolerably well, saxophone crudely - and I'm renowned among my friends for being able to extract a tune from any bizarre instrument I encounter, from conch shell to bamboo nose flute.

This being so, it's not surprising that over the years I've used computers to listen to music, to store music, to play music and even to compose music. As soon as I got a PC with a sound card I was writing programs, first in Basic, then in Forth, to play tunes on it, but perhaps because I play real non-keyboard instruments that aspect never really grabbed me - I've never owned a MIDI keyboard or other MIDI instrument. What did grab me was the challenge of trying to program the computer itself to generate sounds that might be accepted as music. Doing that from scratch is no mean feat because computers are completely without musical feeling, they have no sense of melody, harmony or rhythm, so you the human have to supply all that, one way or another.

The most obvious way is by creating an authoring platform that has the rules of some musical genre built-into it. There are dozens of sequencer-like apps available now that achieve this for various strains of dance music, since computers are really good at calculating complicated beat patterns. There's also Koan Pro, well-known to fans of Brian Eno (I'm not one), which provides an enormously complex grid on which you can compose abstract kinds of music by tweaking hundreds of parameters. I wrestled with it for some months many years ago, but something in its structure still lent everything I tried a regular, dance-like beat. My formative years were spent immersed in bebop, '60s free jazz and country blues, where beat is vital but flexible, springy, variable - Parker's lightning scales, Robert Johnson's frantic strums, a Danny Richmond drum flurry - and I wanted that sort of sprung-step feeling in my computer-generated music rather than a strict BPM metronome. 

There was nothing for it but to build my own, so in the early '90s I wrote myself a MIDI generator. In those days Turbo Pascal was my language of choice and so I read the MIDI spec, deciphered the file format and wrote myself an API that let me output streams of valid MIDI events from a Pascal program. Then I wrote a library of functions that generate phrases, loops, rhythm patterns and other music elements. One crucial decision was not to represent whole notes but to separate pitch, duration and volume so programs could manipulate them separately. There were mathematical transforms to reverse or invert a tune, in the manner of Bach or John Adams. I composed "tunes" by expressing an algorithm in a short Pascal program, then compiling and running it to output a playable MIDI file. One early effort was based on the first 2000 prime numbers (my excuse; I'd just read "Godel, Escher, Bach"). These early tunes are feeble examples of then-fashionable minimalism, multi-part fugues that no human could play, sub-Adams experiments in phase shifting, piano pieces like Conlon Nancarrow on a very bad day.

Windows killed off Turbo Pascal and though I always meant to re-write an interactive version (that is, cutting out the intermediate MIDI file) in Delphi, I never got around to it. Later I fell for the charms of Ruby and planned to write an interactive composing platform in that: I still have the Gem containing the necessary MIDI interface, but that never happened either. What finally revived my interest was meeting a young American muso who turned me onto SoundCloud.com, which does for music what Flickr does for photos, and reading Philip Ball's superb book "The Music Instinct" which transformed my understanding of harmony by explaining it at both physical and physiological levels.

I can write Turbo Pascal better than ever by installing its command line compiler as a Tool in the excellent TextPad editor. MIDI remains MIDI and tools for mangling it are ten-a-penny. My latest efforts are closer to free-form jazz, Gil Evans on horse tranquilisers rather than Philip Glass. If you liked Frank Zappa, or the theme music from South Park, you might be able to tolerate them: if you lean more towards Adele or Michael Buble then (Health Warning) they might make you ill. And anyone who mentions Tubular Bells is asking for a punch up the 'froat.

[Dick Pountain hopes that the way to Carnegie Hall is via a FOR..NEXT loop, but isn't holding his breath. You can sample the tunes at http://snd.sc/Aumzot]

SOCIAL UNEASE

Dick Pountain /Idealog 350/ 07 Sep 2023 10:58 Ten years ago this column might have listed a handful of online apps that assist my everyday...