Robot Guitar – bringing unseen data sources into the real world

robot guitar

Robot Guitar – bringing unseen data sources into the real world

In one of those moments when something, some image or concept can completely capture one’s imagination, as I idly wandered through the Japanese pavilion at World Expo 1988 in my hometown of Brisbane Australia, I saw a robot playing a classical guitar. And I was awestruck. In fact I still am. I mean, how clever are humans to create a system that plays with such high fidelity, and be perfect in doing so every single time? How?

That robot was really really cool. Even if it is true that a human creator put together the hardware and software in the right order to make it work. But it got me thinking. Was the robot just a tool, I wondered, like a simple guitar plectrum that a human has created and simply told what to do? Was it more than this, was it less than this? I was a teenager in 1988 and with the certainty of a teenager, I resolved then and there that both human AND robot guitar players were cool in subtle and perhaps not-so-subtle ways and yes, I promised myself that I’d have a go at building something like this one day.

As I learnt the guitar slowly over the years I often thought of this robot and wondered how it must compare to the infinitesimally more complex and unknown nuances that humans possess & invest into making music. Surely it would never come close to playing music with the unconscious & sometimes random, very human ‘things’ that we do. Spontaneous things, actions such as muting certain strings a tiny bit, or bending strings ever so slightly, or selectively just going full whack at it like my guitar hero Billy Bragg does. Maybe it’s all those little imperfections, the finger squeaks and educated mistakes that make an interesting piece of music – the mistakes that only a human can make properly.

Many years and much existential ponderings passed in this way, at the same time systems such as the Arduino and Raspberry Pi became prevalent, and electronics became more accessible than ever before. As a hobby, I began rediscovering my basic electronics knowledge, and as my confidence grew I realised that all this stuff was exactly what I needed to build that robot guitar I’d promised myself at Expo88. The elements were now coming together, as I’d always been more than a little hooked on the notion of bringing previously unseen and esoteric data sources into the real world in new and interesting ways. Then in 2014 I went to my first SIGGRAPH conference in Vancouver and was subsequently blown away by the creativity I found, I saw there that people were doing some very cool things and just…putting themselves out there. Just like that! I wish I’d found that conference years earlier.

Now, 27 years on from Expo88, all the ingredients are in place for the world’s first “Network Time Protocol accurate, Internet of Things connected, Big Ben chiming grandfather clock, firewall log playing, door chiming, guitar playing robot” thingy, all built by me!. Many were the busy nights and more than a few weekends spent working on this on-again off-again project, hacking together elements of music, computing, engineering, hardware, circuitry, art, lighting, cyber security, time, and working with all sorts of materials. I had to bring it all together.

For those who find all this as interesting as I do, I’ll briefly describe the journey, from an account of early prototypes such as the Firewall Tambourine – which was a pivotal stage towards bridging that gap between realtime data and realworld.

robot guitarrobot guitar

robot guitar robot guitar

robot guitarrobot guitar

robot guitarrobot guitar

robot guitarrobot guitar

[vimeo height=”HEIGHT” width=”WIDTH”][/vimeo]

[vimeo height=”HEIGHT” width=”WIDTH”][/vimeo]

[vimeo height=”HEIGHT” width=”WIDTH”][/vimeo]

[vimeo height=”HEIGHT” width=”WIDTH”][/vimeo]

   Design notes, final version

As it happens, it’s the final stage of the project where the two most important parts of the whole finally come together, these being the servo rig and the coding.

To begin, the servo rig needs to be just right. It has to be stiff enough so as not to move, whilst still allowing the pick to be adjusted up, down and sideways so as to position the tip of the pick just so; critically plucking just enough string whilst remaining at the right angle & depth so as to stay clear & not get stuck – or it would never pluck the string at all.

The picks themselves are real guitar picks which are bent so the pick point is parallel to the strings, with the relatively soft, rather than the harder picks being better for plucking the strings. The picks are affixed to the servo horns by a screw at the pivot and a small pin made from a piece of copper (from a cat6 data cable), which when inserted through the end of the horn and the pick, acts like a staple, thus making the servo and the pick one element. The servos are siliconed to small aluminium angles with slotted holes filed in the top to allow adjustment.

Another important part is the control architecture and getting the Pi and Arduino co-ordinating as intended, with each of these devices being better suited for certain tasks. For example, the Arduino is better at doing proper PWM (Pulse Width Modulation) which is required to control the position of servos, whilst the Pi offered a familiar Ubuntu/Python programming environment, wireless access for NTP and ssh, additional GPIOs and the flexibility to develop the code. The Pi is also used as a platform to write the Processing sketch which is then uploaded to the Arduino itself via the command line Arduino IDE ‘ino’. Communication between the Pi and the Arduino is done via a serial connection.

[sam id=”4″ codes=”true”]

One of the interesting tasks in the coding was that the system needs to keep track of the state of each pick (i.e. its location, is it to the left or right of the string) so it knows in which direction to move the servo. This element is programmed on the Arduino, which sets up all the picks at the initial state when the system initially boots, and then operates whichever servo the Pi asks it to via the serial connection, whilst (importantly) also updating a “pick state” array, storing the current position of each of the six servos, thus keeping state. This part took some coding and testing, but once done it was set and forget.

Other design aspects include LED lighting to illuminate the white picks with blue light. I used the waterclear type LED’s instead of the diffused type because I wanted beams of light to really illuminate the picks. I glued the LEDs under the breadboard and also underneath the Pi to give a nice glowing effect with no direct light source visible. At the last minute I also drilled a small hole in the Perspex slab the Arduino sits on and inserted an LED to see what it would look like, and I think it looks real nice!

Altogether there are six yellow manual buttons to operate and tune each pick up and down individually, and two more buttons to run pre-programmed routines. The six tuning buttons are monitored by the Arduino and the other two pre-programmed buttons are monitored by the Pi.

The main frame is made from stained pine, clamped together around the body of the guitar by means of threaded rods, while the foam padding serves to further protect the guitar. Furthermore, in terms of visual appeal I wanted the wiring, circuitry and mechanics to be raw, fairly tidy but definitely not hidden, so the viewer appreciates what goes on behind the scenes.

Finally, as my nephew rightly points out, the frets are in the substantial need of some robotic attention. I agree, however this is enough for now and yes, another maker project is added to the list…


Leave a Reply

Be the First to Comment!

Notify of