Tuesday, April 27, 2010

Final Project: Giant Mixer (cont. 3)

And so this (plus the computer) is what I finally came up with: two transceivers, two speakers and one contact microphone, all in tupperwares.

ALL TOGETHER



The way they are connected is as follows:
1) The contact microphone picks up the sound of a chair being dragged and sends this via a blue tooth transmitter to the receiver connected to the input of the computer.
2) The two transceivers send their signal strength value via Xbees to the third Xbee connected to the usb port of the computer.
3) Processing uses the values received from the Xbees and maps it onto the volume and pan control of the sound received from the microphone.
4) An audio interface, also connected to the computer, outputs the result of Processing and sends it to the two speakers via two blue tooth transmitters.

Initially I had thought to make the two transceivers stationary; attached onto walls so that the movement of the only movable transceiver in the room -- in relation to the wall-- would cause the change in volume and panning. However, I decided to make all of them movable. This decision was a result of finding out the fact that because the one Xbee (A) used the other Xbee (B) in order to transmit its signal strength to the Xbee attached to the computer (C), the change in position of A inevitably affected its distance from both B and C, and thereby changed both parameters simultaneously. This made me rethink of the above initial idea because there was no point in making the transceivers stationary if the changes that occur when moving the only movable one would not be so apparent -- and that was precisely what was going to happen if moving one affects both parameters.

Making everything movable meant less control, but on the good side, more freedom of choices. Now that everything can be moved, I could for instance move the panning not only by changing the position of the transceivers, but also by manually moving the speakers around.

Another important consequence brought about from this change is perhaps that feedback between the microphone and the speakers occurs more frequently (I would need to make another input device which uses normal microphones instead of contact microphones). Using this feedback would then solve the present issue of the sound source being available only when the chair to which it is attached is being moved and not the others -- meaning when the sound source is available, simultaneous changes in parameters is not.

I would still need to work on this system before I can actually perform it live, but the components are there, and I have a clear view of in which direction I should proceed.

Final Project: Giant Mixer (cont. 2)

After finishing the transceivers, I also needed to make an output: speakers (two for the panning), for which I took apart an old amplifier/speaker and reset it into a similar tupperware as the transceivers...

SPEAKER A







SPEAKER B




... and an input: a sound source, for which I wanted to use the sound that the chairs themselves make when being dragged, so I placed a contact microphone on the lid of another tupperware:

MICROPHONE


Final Project: Giant Mixer (cont)

A








B





Friday, April 23, 2010

Final Project: Giant Mixer

For my final project, I wanted to make a series of devices that would be attached (clandestinely!) to audience's chairs in a concert venue. My idea was to make a giant mixer, so to speak: the devices would calculate the distance between each other and the resulting values would be mapped to volume and pan control. The performance would consist in me dragging the audiences/chairs around changing their spatial position and mutual distance, thereby affecting the output sound.

Following the previous project (accelerometer random melody generator), I decided to use Xbees again, this time focusing on their ability to read each other's signal strength which is relative to mutual proximity. Because the parameters I wanted to control were two (volume and pan), I figured I need at least three Xbees -- the distance between A and B will control volume; B and C will control pan. I had some initial struggles with setting up the Xbees which turned out to be an issue of firmware update. After that, I managed to read the signal strength between two Xbees in Processing.

Adding the third presented difficulties. I could not figure out how the signal strength of two Xbees, neither of which is connected to the computer, could nevertheless be read in Processing. I consulted with Tom Igoe who suggested me to read the pwm i/o pin which outputs the signal strength as pwm waveform and -- after smoothing it through a rc filter -- input this into the same Xbee's analog input. I tried this and it worked. Now the Xbee attached to the computer was reading two signals: one was the direct signal strength from the second Xbee, and the other was indirect signal strength of the third converted into an analog signal on the second.

These are the three Xbees at this point:





Friday, April 2, 2010

Project 2: Accelerometer Random Melody Generator

For my second project I wanted to make something that accompanies my photoresistor instrument I made for the first project. I focused on the role of my hand holding and moving the light fan, and decided to use that as an input to trigger and control further sound production.

I used an accelerometer to read the movement of my hand. This accelerometer was then connected to an Xbee radio transceiver which transmitted the reading values to another Xbee attached to the computer. The circuit is powered by a 9V battery via a 3.3V regulator. This is how it looks like:



Then I wrote a program in processing which produces random melodies by taking the values from the accelerometer (x-axis and y-axis) to determine 1) the range of pitch from which melody is created (increase in y-axis results in wider range) and 2) the velocity of melody (increase in x-axis results in faster tempo).

In order to attach the circuit onto my hand, I pasted a velcro fastener on the back of the breadboard:


And one strip to wrap my hands:


and this is how they go together:


I also made a spare using Arduino, because the Xbee version was sometimes unstable (I later found out that the problem was in the accelerometer -- It became stable when I changed it with a new one)

Tuesday, March 30, 2010

Assignment 2: Sensor Walk

I took a stroll around my neighborhood (clinton hill, brooklyn), paying attention to, and taking photos of sensors that I encounter with my digital camera. 

The first one I found just outside my house was a sensor light, which probably detects nearby motions and automatically turns on the lights when a someone passes under it. It might also have a light sensor to turn itself on when it gets dark, because it didn't seem to be working during the daytime:



I then crossed the street, where a traffic control box with a push botton was installed, which I hadnever noticed before because I had never seen anyone use it. 



then a telephone booth, with the usual dial buttons:



and another sensor light:



and doorbells, plenty of them:



Not much of extraordinary discoveries. However, as I turned around and headed home, I started hearing a faint sound of what seemed to me a recorded voice of someone. I looked around but there was no one talking. I kept walking but the voice seemed to follow me. I was puzzled. I stopped, listened again, and finally found out that the voice was coming out of the cellphone in my pocket. My walking had accidentally pressed the voice speaker button placed on the rear side of the phone, and activated its voice control program. So that was another sensor, which I had carried all along this sensor walk:



After returning home, I uploaded the photos I took from the digital camera to the computer. And at that moment I discovered yet another sensor (actually a bunch of sensors, including even a "face detector") that I had been carrying throughout my sensor walk without noticing its presence:


Wednesday, March 10, 2010

Project 1: Photoresistor Instrument

For sometime now, I have been very fond of this pen-type light fan, using it in performances to play guitars or xylophones,

















...or mandolines.

But I had never been able to utilize its lighting aspect, except as a beautiful luminous ornament that lights up the often dark spaces of concert halls. So for the first short project of my physical computing class, I decided to use what I have learnt so far and build an instrument which takes advantage of all the features of this light fan-pen. What I came up with is an instrument that uses photoresistors to make sound. It looks like this from outside:













and when you open the top lid, it looks like this:


The circuitry is pretty simple. It connects five photoresistors to the digital inputs of an Arduino via a breadboard. There is also a potentiometer to control the volume, a speaker which extends out from a hole in the lid, and 9v battery as the power source.

The program I wrote assigns a specific pitch to each of the photoresistors. Since there are five of them, I used a pentatonic scale.


The case is a cheap plastic box that you can buy in any 99c shop. I made five holes in its rear to stick the resistors out.










In order to control the sensitivity of the resistors (so that it won't start sounding every time the room light is turned on), I made little covers using a pencil eraser (using different colors for each resistor/pitch):



















And that's it!















The rhythm pattern changes according to the light pattern of the fan.

Overall it plays well, but the sensitivity of the sensors is still a problem. Although it is basically functional in a dark room, where the only light source is the fan, it becomes very unstable in other conditions. I attempted to adjust that by changing the threshold for each of the resistors in the program, but maybe distancing the holes in the case could be another solution.

Also, the next step would be to program the light pattern of the fan, which consequently determines the possible rhythm patterns. It would be like implementing the score into the instrument itself -- with different combinations of pitch pattern for the resistors, and rhythm pattern for the fan, one could obtain an instrument to which the overall structural boundaries of a piece is embedded, while still being open to improvisational possibilities