Sunday, 25 April 2010

C-P-Useless


Probably bought this on myself through a desire to saturate the viewer with video and audio! BUT if i run 3 max patches, 2 HD videos, 1 SD video, 5 samples and Module 8 together for some reason my MacBook Pro cannot handle the strain on its CPU......odd that :D Oh yer, i missed out constant serial communication....

OK, so the main issue is the HD heartbeat video. Standard playback is fine but I've found that continually changing the playback rate causes saturation of my laptops memory. This causes the video to jitter.

Luckily the problem has actually prompted me to think about how i am going to present the 3 different videos in my piece. The heartbeat video, the countdown video, and the live webcam feed. Ideally i need to present each video on a different screen and run in fullscreen (utilising presentation mode through the p-list editor on Max/MSP). I can only really do this by using either 2 external screens on one laptop (where i only have 1 video out so would require a splitter) or use 3 separate machines.

The latter is the solution i have gone for taking account of the performance issues. To solve, i found a way to send Max/MSP messages over a wireless LAN to control each videos playback from a master computer. Once i set up a new network using my Macbook as a host it worked perfectly within minimal lag-time.


HRMI interfacing


Have been using the Polar HRMI device for a while now.

Advantages
Accurate beat for beat sampling of your pulse rate
The ability to be accurately sampled by the Arduino

Disadvantages
Difficult to interface into Max/MSP through conventional methods
Requires close proximity and parallel alignment to the polar strap transmitter to work reliably

The HRMI interfaces with the Arduino micro controller through I2C protocols. Theses protocols rely on code within the Arduino environment to interpret the values (including averaging and smoothing) from the HRMI module. In this context i want to use raw heart rate data and manipulate it within Max/MSP therefore i have no need to utilise the averaging sections of the HRMI board. I found it more accessible to simply tap the output from the receiver part of the module giving a raw information from the transmitter in the form of small voltage pulses whenever a heart beat is received.

Photobucket

Averaging stages within Max
Once the values were sampled through the Arduino's digital inputs I producing a patch that created a running average of the last 4 values. I did this because although the heart speeds up and slows down quite erratically on a consecutive basis, it is difficult to perceive this unless you have a while to become accustom to a particular range. Using an averaging method, the outcome exhibits a typical heart rate across, say 5 seconds, where the value meanders around a central point. When the heart is stimulated the effects are more obvious as it rises quite quickly and falls a little slower then it normally would. In the context of my heart visual this allows the viewer to see that a change has occurred, giving them time to engage with what is happening.

Wednesday, 7 April 2010

Decode Digital Sensations Exhibition, Victoria and Albert Museum


Photobucket


Last week i went down the the V&A museum London to have a look at Decode, The digital design sensations exhibition, to try and get a bit of inspiration for future work, final projects etc. Heres a few of the pieces i thought were interesting.

Photobucket

Dandelion, by YOKE. This one is part of the interactive section. It uses IR detection and positioning to blow the seeds off a dandelion and almost like using a hairdryer, blow them around a virtual garden. It is extremely realistic and accurate.

Photobucket

Opto-Isolator, by Golan Levin. A mechanical eye that mirrors the viewers gaze. I like this because of its responsive nature. It opens up an intimacy unlike that of the other pieces.

Photobucket

Dune, by Daan Roosegaarde. This piece responded to you through a field of rods lighting up and insect like clicks as you passed beside it. It did not seem to respond as well as it probably should have though. No idea why.

Photobucket

Flight Patterns, by Aaron Koblin. I liked this because of it was one of the better visualisation pieces. It uses an averaged daily flight plan data to draw what is essentially the outline of the US. It also displays the time and number of flights in the air showing the very calculated nature of air transit and also commenting on mans intervention with the sky.

The visit definitely got me thinking about what different approaches i could take in my final project. A lot of the work was heavily coded and used bespoke programs (usually C++ based). I'm clearly going to have to think about spending some time in processing or Python....ouchh...

Food for thought.

Serial communication follow up


I have pretty much figured out now that the combination of Arduino analog sampling, some scripting within the microcontroller, serial communication, and max interfacing yields significant lag. Even with changing baud rates there is no getting away from the rounding errors which occur from the two stage sampling process (one at the Arduino board, and the other from max). This essentially means that the setup will only deliver averaged heart beat values where the data errors increase the faster the heart is beating.

Variables:

1. Method of communication is Serial. Does the information captured from the BVP device need to go to MAX straight away?
// Yes, i cannot do the signal conditioning out of the MAX environment. It would also be incredibly difficult to achieve using script within the Arduino programming environment.

2. Change the microcontroller?
// Possibly, although a change like that would basically be a back to basics scratch meaning i would have to interface a different microcontroller with MAX/MSP and figure out its programming language. After all this it may not be any faster as baud rates are set within the serial protocol.

3. Change the method of microcontroller capture?
// This refers to digital sampling rather then analogue. This is much more reliable and faster yielding greater accuracy. I tested this out by combining a switch with the 3.3V output from the Arduino. I noticed that no matter how rapidly i pressed the switch i got accurate unrounded heartbeat values exceeding 300 bpm. This however was a direct relationship between the Arduinos power supply and its digital inputs with no electronics slowing things down.

//This does mean however that if the HRMI (heart rate monitor interface) device delivers a 3v pulse then i should be able to achieve accurate readings. The issue here is whether the microcontroller will 'see' the 1ms pulses as they are extremely short. Another output on the HRMI gives a 6ms pulse. This may be more useable. Awaiting delivery.

4. Use the HRMI to produce a graphical display outside the MAX environment and use the result to affect MAX.
// For example. Have the HRMI produce a flashing light accurate to the pulse rate and sample that using a LDR. This of course would have to use the analogue inputs of the Arduino so may not be any better. The other option is to try and build a digital switch of some kind. The issue with all these ideas are that i cannot intergrate the Maxuino (digital and analogue pin to Max interface) with any scripting i would need to control the HRMI through the microcontroller.

I have however seen application in processing that use an Arduino and the HRMI to produce an accurate bmp reading over serial communication. Perhaps using that application i can use OSC (open sound control) to relay the readings to Max. For this however i think i would need a little help.

Time is pressing.