{photo href=”http://www.flickr.com/photos/chancesend/353443940/” title=”The Musical Blackboard” src=”http://farm1.static.flickr.com/166/353443940_91454b7637_m.jpg” width=”240″ caption=”The prototype of the Musical Blackboard hacked Casio keyboard”}
Introduction
The virtual musical blackboard is an alternative musical interface device. Specifically, the blackboard serves as a "glitch interface" to a Casio MT-401 synthesizer.
{photo href=”http://www.flickr.com/photos/chancesend/353443692/” title=”Blackboard schematics” src=”http://farm1.static.flickr.com/136/353443692_88a3d241e7_m.jpg” width=”240″ caption=”The Musical Blackboard schematics (Note: The PIC Microcontroller includes all of the helper circuitry given by the CUI design by Dan Overholt)”}
- {extlink href=”http://www.create.ucsb.edu/~dano/CUI/” linktext=”Dan Overholt’s CUI microcontroller”}
- Download the C source code and MPLAB project file
- See the blackboard in action (Quicktime MP4 video) [No longer available -RA]
Concept
{photo href=”http://www.flickr.com/photos/chancesend/353443760/” title=”Casio MT-240″ src=”http://farm1.static.flickr.com/162/353443760_f975f8c419_m.jpg” width=”240″ caption=”The Casio MT-240 Keyboard” float=”left”}The original concept for the system came from an initial exploration of the circuitry of the Casio MT-401 keyboard. It was initially thought that because the keyboard is digital in its sound production, there would be limited opportunities for "circuit bending", a procedure traditionally reserved for analog systems.
But in the process of probing the system, it was discovered that shorting various pins on the memory chip together produced a variety of digital noise effects.
From this discovery, the abstract blackboard interface was conceived. Because the digital noises produced from the memory pin shorting were loud and abrasive, it was reminiscent of the sound that fingernails on a blackboard produce.
{photo href=”http://www.flickr.com/photos/chancesend/353443847/” title=”Casio MT-240 circuit board” src=”http://farm1.static.flickr.com/135/353443847_3d11a32aae_m.jpg” width=”240″ caption=”The Casio MT-240 circuit board” float=”left”}Now, it just so happens that the main keyboard PCB contains an unused 40-pin chip slot (presumably for debugging early in-house system prototypes). Using this, we will be able to interface with the keyboard in whatever fashion we want.
Design
Shorting various pins on the memory chip together produces a variety of digital noise effects
There are several ways to replicate the effect of shorting memory pin chips. One of the simplest would be to connect all 40 pins to an external microcontroller. The microcontroller could pull individual pins high or low. However, this method does not allow us to short individual memory pins together. Nor does it replicate the analog nature of physically attaching electrodes to memory pins.
Thus, we will construct a 40-pin parallel analog switching circuit. The logic is simple: A serial stream of digital bits gets converted to a 40-bit parallel signal. These lines each control the enabling of an IC analog switch. The inputs to each of these switches are wired to a common point, so that an enabled switch will connect the corresponding memory pin with all other pins currently switched on.
Sensor design
{photo href=”http://www.flickr.com/photos/chancesend/353443920/” title=”Pressure sensor prototype” src=”http://farm1.static.flickr.com/131/353443920_a3d7f9bf6a_m.jpg” width=”240″ caption=”The prototype of the capacitive pressure sensor” float=”left”}In order to realize the blackboard metaphor, several different types of sensors were considered. The original goal was to construct a sensor that could detect a range of different gestures from a large surface. However, the complexity of the interface needed to remain low because of the limited time available for the project.
After much research, it was decided that a capacitive sensor would be the ideal method to gather input from the blackboard. Capacitive sensors can be found in many touch-sensitive lamps and radios, because they are cheap and relatively simple to produce.
However, most touch-sensitive switches are of the simple on-off variety – definitely not enough input variation for the kind of interface we need. So a pressure- and velocity-sensitive version was adapted from a circuit by John Simonton.
Construction
{photo href=”http://www.flickr.com/photos/chancesend/353443655/” title=”Blackboard prototype” src=”http://farm1.static.flickr.com/161/353443655_56b7d08bd7_m.jpg” width=”240″ caption=”The prototype of the physical blackboard” float=”left”}The construction of the physical blackboard interface proved to be fairly simple. A wooden frame was constructed to hold a piece of scrap sheet metal. The unit was then soldered to a lead attached to the capacitive sensing circuit.
{photo href=”http://www.flickr.com/photos/chancesend/353443732/” title=”Digital hacking logic” src=”http://farm1.static.flickr.com/158/353443732_6df6872498_m.jpg” width=”240″ caption=”I actually squeezed this whole mess into the Casio keyboard itself!” float=”left”}The construction of the interface between the keyboard and the microcontroller proved to be a bit more labor-intensive. The sheer number of pins on the keyboard memory chip meant that a large Serial-In Parallel-Out (SIPO) latch circuit was needed to provide 40 outputs necessary from the microcontroller.
Testing
With a large circuit comes a large debugging task. Though the initial design was theoretically simple, all circuit projects have unforseen problems.
The first problem occured when attempting to power the interface from the keyboard. For some unknown reason, the keyboard would not start up correctly if it was powering the interface on its own power. Thus, the system needed to provide its own power, in the form of a USB cable from the PIC microcontroller board.
Beautification
With so much circuitry, it was difficult to find a way to integrate the project into the keyboard. Ideally, the entire interface save for the physical blackboard would be contained inside the keyboard. But this has two problems:
- Without designing a custom PCB, the circuit area of the entire project is too large to fit in the space available in the keyboard
- Though the initial hope was to power the interface from the keyboard, doing so introduced unforseen problems related to the capacitive sensor.
So, the PIC microcontroller and the sensing circuitry were fitted into an external housing, while the interface between the PIC and the keyboard were fit into the keyboard housing. A 5-pin ribbon cable is all that connects the two units.
Results
Through much testing and trial changing the code, an algorithm was devised that produced a fairly extensive range of glitch sounds when the blackboard was touched. Much of the trial had to do with how the pressure/velocity data from the blackboard was translated to the memory pins, and how fast the system updated its readings. But with suitable values, the system retains much of its "analog pin-swiping" sound it exhibited originally.
It was initially thought that the capacitive sensing circuit would produce unstable results, causing glitches in the system when not being touched and not activating when touched. However, the sensor is suprisingly stable. This has quite a bit to do with the "noise gate" coded into the software: No input was transferred to the memory pins until the pressure of the sensor climbed above a certain threshold.
Final Words
Though the actual design changed quite a bit from initial concept to final prototype, the end product was remarkably similar to what was envisioned. Next time around, more care needs to be taken to ensure all construction is resistant against damage. Things such as proper connectors, proper housing, and proper power need to be addressed in order to build a second, better prototype.