Musical glass

# The Musical Glass

Team -
Ashwini Sukhdeve
Manisha Iyer
Shilpi Seth
Swati Asthana

### Hacking the Keyboard

We opened the keyboard using cross screwdrivers. We found two layers of transparent sheets with printed circuits on them and 106 flexible white buttons for each key.

We also found that the whole keyboard is operated just using a small 5”x3” PCB (printed circuit board), one side of which had about 30 small bars. When a key is pressed, the circuit is completed and the corresponding bar gives signals to the CPU through wires.

By trial and error we figured out the combinations using which different keystrokes are generated.

The Musical Glass

We wanted to check whether electronic circuits can be connected using water (since water is a good conductor of electricity). So instead of conventional designs, we designed a glass which gives musical notes when it is being filled with water.
There is a common bar, which acts as the master. Other bars need to be connected to the master to generate a key stroke. So to complete the circuit we connected the master to the bottom of the glass and the other bars at certain distances from the bottom. We found that the first bar acts as the master. Then we used 4th, 6th, 8th, 10th and 11th for the alphabets n, v, b, h and y respectively to complete the circuit.

As the water fills the glass, the circuit is completed for each bar and the corresponding musical note is generated. We wrote a small program in Processing[1] language to generated musical notes for each keystroke.

The Program

``````import arb.soundcipher.*;
import arb.soundcipher.constants.*;

SoundCipher sc = new SoundCipher();

float c = 57;
float d = 60;
float e = 62;
float f = 64;
float g = 67;

void setup()
{
size(80, 80, P2D);
}

void draw()
{
background(0);
stroke(255);
}

//FREQUENCY

void keyPressed()
{
if(key == 'v')
{
sc.playNote(c,100,0.5);
}
//c#
else if(key == 'n')
{
sc.playNote(d,100,0.5);
}

//d
else if(key == 'b')
{
sc.playNote(e,100,0.5);
}

//d#
else if(key == 'h')
{
sc.playNote(f,100,0.5);
}

//e
else if(key == 'y')
{
sc.playNote(g,100,0.5);
}
}```
```
Bibliography
page revision: 3, last edited: 12 Apr 2011 05:51