Wakefield RISC OS Computer Club
Wakefield RISC OS Computer Club

The Club
About the Club
Mailing List
Get Involved
Events Diary
Find Us
Join Us
Contact Us
The Show
Wakefield Show
Members' Area
Free Ads

About this Site

[ WROCC Home » Meetings » Past Meetings » November 2012 ]

Mike Cook: Mixed Pi

November 2012 meeting – report by Steve Fryatt

November’s meeting saw a visit from Honorary Life Member Mike Cook, who had travelled across from the other side of the Pennines to show us a range of his latest hardware and software adventures. Although the Mac and Arduino still featured heavily in his work, the launch of the Raspberry Pi hadn’t gone unnoticed – eagle-eyed early visitors were able to spot a couple of the diminunitive computers on the table at the front before the meeting began.

The birth of Spoonduino

The first event that Mike had taken part in was the 2012 Beam Festival at Brunel University. He’d attended the event in 2011, taking advantage of their ‘Beam Bursary’ scheme to encourage newcomers to exhibit, and decided to return again this year. The festival itself is in June, but this time things got underway early with Beam Day in March: this featured a competition for original musical instruments, with the only requirement being that they had to have been completed within three weeks of the event.

When he learned about this a couple of weeks before, Mike decided to enter – despite not having just completed the construction of an instrument, or even being in the helpful position of actually working on one at all. The solution was the Spoonduino, based around a small – and hitherto unused – flightcase that came as part of a set in a Christmas present from his son.

The Spoonduino is so named because it is played by a dessert spoon rubbed over a square of conductive plastic from an anti-static bag. Mike realised that by putting voltages alternately horizontally and vertically across the plastic and then measuring the voltage on the spoon – via a wire connected to its handle – he could work out its position and convert that into a musical note. This could then be played via a speaker – salvaged from a Wakefield charity stall.

The literally-titled Spoonduino

The Spoonduino contains an Arduino to control all of the analogue to digital conversions and handle the loading and selection of sound samples. It was fitted snugly into the flightcase using neatly drilled and varnished wood: it seems that his milling machine is still seeing good use. By connecting the instrument up to a computer via a cable, it was possible to configure the sounds that it made – Mike showed us a piece of software running on an iPad to allow different waveforms to be designed for playback.

The Spoonduino proved popular at Beam Day, with Mike winning the competition and taking away the prize of a MIDI keyboard. He subsequently returned to the full festival, and was able to introduce yet more visitors to the instrument.

Musical sequencing

Alongside the Spoonduino at the meeting was another of Mike’s custom instruments: the RFID Sequencer. Most of us are probably familiar – at least by name – with a conventional sequencer: samples can be loaded in, then ‘pegs’ are placed on a piano-roll-like grid to cause them to be played back in the correct order at the correct places in a tune.

Having played with ideas such as the Hexome, which can perform a similar role as we were to see later in the evening, Mike came up with a way to turn the humble sequencer into an interactive hardware project. The result was a large varnished wooden box with an 8 × 4 grid of clear perspex studs arranged on its gently-sloping lid. The studs were lit from below by multi-colour LEDs, and were just the right size to fit into the holes in a set of RFID keyfobs (the kind of thing you might have on a key-ring to swipe in to a modern door-entry system).

As the fobs all contained unique codes, Mike allocated groups of them to different instruments and configured the sequencer accordingly. Fobs could now be hung on to pegs on the grid, and as the sequencer stepped through the eight columns in turn it would play the sounds associated with the ‘instruments’ hanging there.

The RFID Sequencer

Although RFID is a fairly common technology these days (many of us will be familiar with the aforementioned door entry systems, where a card or ID badge is held against a small box by the door, or with electronic bus passes or Oyster cards), the readers are usually kept well separated in RFID terms. Putting 32 of them into a confined space and then expecting to be able to read each device correctly is more of a ‘challenge’.

The technology behind RFID is fairly simple, at least in principle. The reader contains a coil, through which an alternating current is passed. When a card or keyfob containing a similar coil is brought nearby, a similar current is induced in that coil: this is enough to power a small chip embedded in the card. Once energised, the chip changes the loading on the card’s coil in a way that represents a stream of binary data: this in turn affects the loading on the reader’s coil and causes small fluctuations there which can be detected and read.

To make the sequencer work, Mike needed to be able to uniquely read each of the 32 possible fobs. His solution was a number of custom-made coils and some clever circuitry to filter the unwanted interactions. The design went through several revisions, as the photographs that he showed us made clear.

Despite the technical challenges, the end result worked well and Mike had taken it with him in September when he had travelled south to visit the Brighton Mini Maker Faire, taking place in one of the venues at the Brighton Dome. The “Grumpy Mike’s Arduino Gadgets” stand had proved popular, and given a new southern audience the chance to see his creations.

Musical patterns

On previous visits, Mike has talked about his Hexome project: a hexagonal grid of illuminated buttons that can be used for a variety of different interfacing tasks. One of its abilities is to act as a sound sequencer similar to the RFID Sequencer: buttons can be turned on and off, and then the computer can cycle round them and play the selected items.

Although hexagonal, the Hexome really consists of a series of concentric circles of buttons: a single one in the centre, then six placed in a ring around its six sides. The geometry results in three more rings, of 12, 18 and 24 buttons working outwards. If points in each of the rings are played sequentially, then these numbers mean that the four sets will get back into step after 72 cycles (as 72 is the first number to have the factors 6, 12, 18 and 24). This results in a musical pattern which does not repeat for 72 notes.

By varying the number of points in each ring, the numerical factors can be changed and new patterns created. Given how long it took to build the Hexome, doing this in hardware would be nearly impossible – however, it’s something that software is ideally suited to. Mike showed us a piece of software called a Polyrhythmic Sequencer that allowed an infinite variety of ‘Hexomes’ to be created and experimented with, using different numbers of rings and buttons. Mike wrote the sequencer in Processing – from www.processing.org – and it can be found on his website at www.thebox.myzen.co.uk/Mac_Apps/Processing.html

Mike’s Polyrhythmic Sequencer in action

It turned out that the RFID Sequencer could also be used to make similar kinds of pattern by adding different numbers of imaginary pegs to the ends of the rows. Although these couldn’t be used to make sounds, Mike pointed out that in practice whole sectors of the Hexome would often be left unused for this kind of work. We heard a selection of sequences: it was surprising just how rhythmic these apparently random groups of notes could be.

Two slices of Pi

To round off the evening, Mike had brought along a couple of Raspberry Pis. The small computer has a general purpose I/O connector similar to a user port along with an IIC bus, making it ideal for the kinds of project that used to feature in The Micro User’s Body Building Course series. It also comes with a selection of programming languages, including Python.

Mike had joined the Raspberry Pi forums, where he had started to contribute. His name was finally spotted by Liz and Ebon Upton who, it turned out, had both (independently) been fans back in the Body Building days, and a request was made to convert Liz’s favourite project to the new hardware. This turned out to be the Magic Wand from July 1989, featuring a strip of LEDs on a stick which could be waved around to create messages using persistence of vision. The original had used a mercury switch to detect the extremities of the wand’s travel, and new rules on dangerous substances looked like they could be a problem: fortunately, it turned out that Mike was OK so long as he didn’t sell the wands! Once complete, Liz blogged that it was like “having a rock star you worshipped as a kid re-write a song for you”.

Since then several of the projects have been ‘ported’, including the ubiquitous ‘steady hand game’ and an IIC Interface Board which featured a range of analogue input and output facilities. Using Linux on the Pi, Mike had been writing his control software in Python: although flexible, he commented that it was prone to timing glitches when the Linux multitasking took control away at crucial moments (although, to be fair, RISC OS is even worse in this respect unless multitasking is abandoned in favour of a simple single-tasking BASIC program).

A return to RISC OS

When RISC OS Open started to make builds of RISC OS available for the Raspberry Pi, Mike began to experiment with the familiar environment. The presence of BBC BASIC opened up the possibility of dusting off the original software from some of his projects, and one of the first to be looked at was the IIC Interface. It turned out that the desktop front-end that had appeared in Micro User worked fine on the Pi – or it had done on the pre-release builds of RISC OS. Foolishly Mike had upgraded to the official release version just before coming through to Wakefield and hadn’t tested things: when he tried to demo it, the software didn’t work correctly for reasons that we couldn’t diagnose on the night.

Despite this, we were able to see the Pi running RISC OS successfully with the now-official SD Card image. Mike said that he was looking forward to investigating its capabilities, so watch this space!

Previous October 2012
Artistic Lines in ArtWorks
Home December 2012
An Evening of Festive Fun

© Wakefield RISC OS Computer Club, 2002-2017 | Contact us

Valid HTML 4.0!