How not to place a pressure mat! fringe foul-up

Leave a comment

The undercroft is a great place to put my interactive sculpture, but I knew I needed to replace my pressure mat as it had seemed quite worn out and unresponsive after my MA show, so I duly ordered a new one and feeling pleased I’d been organised put it in place and was gratified to see it work much more smoothly.

But on Monday night when I was rewiring my sound – it had only been playing in mono, but it hadn’t affected it too much in the echoey space – I noticed the new mat was not functioning properly, in fact I pretty much needed to jump on it to make it trigger the animation

As I wondered what on earth had happened I noticed a small tear in the cover and placing my hand over it discovered a sharp protrusion underneath, I looked under the cover in case a stone had got in, no, then I lifted the pressure mat to find this!wpid-dsc_0075.jpgBlimey…

no wonder the mat was being unresponsive this bit of piling that they would have used to reinforce the concrete had stabbed all the way through the mat and out of the cover as well…sheesh… so much for being organised and ordering a lovely new pressure sensor for the Norwich Fringe!

wpid-dsc_0079.jpg

look what it did!

wpid-dsc_0077.jpg

and out the other side…

What a proverbial pain in the rear end…

It’s so disappointing, but this is why I want to look at more gesture based control, I know that can still go wrong, but the physical mat doesn’t take to being used like this very well.

I ordered yet another mat from maplin which arrived this morning, so was able to install it for todays exhibition, it’s so pleasing when it works.

When I met up with Andy Logie the other day, we talked about the possibility of that type of control using a kinect, Andy seemed to think this was a possibility, but we both agreed that the technical coding side of these things just drove us potty!

MAX msp and the pressure mat switch – the hard part #maxmsp #pressuremat

1 Comment

After successfully wiring up the pressure mat and feeling very pleased as I have never wired anything, ever…

It was over to MAX msp, I dutifully read through the tutorials and they are great, max comes with at least 20 or so basic tutorials and these all have working ‘patches’ or files that you can open, look at, play with and alter to get a feel for making your own and understand the syntax it uses for processes.

There seemed to be many people using MAX, for audio, video and interactive projects, the forums were active and lively and I felt confident to start with my own patch.

What I needed to program was the starting video to play and loop until the pressure mat switch was activated and a second video plays until it’s end and then returns to the original video which is still looping.

Doesn’t sound too difficult does it, but I have been testing and trying on and off from the beginning of July to try and get this to work…

I have looked and googled and tried as many different search terms as you like to try and see if anyone else has ever used a pressure mat directly into a computer and MAX msp, but there is no-one out there, or no-one has ever written about it being successful, and last night I’d almost decided that it wasn’t possible, I couldn’t get it to loop and return and the pressure mat thing wasn’t working or hadn’t been successfully recorded anywhere, my idea for simple activity was looking doomed.

I had been able to find a number of people using an arduino to interface with MAX, but at this point I didn’t want to start with another purchase and more software to learn!

I also had doubts about the pressure mat itself, it had come with 4 wires… which ones made the circuit? No paperwork came in the box, I guess you’re supposed to know what you’re doing…

And of course I had wired it to the plug before checking the live circuit.

I had to find an expert… fortunately Phil, one of the MRC technicians was one of the people who had said that MAX was good in the first place for interactivity, so with promises of coffee and or cake (Earl Grey black for future reference!) I managed to get an hour with Phil.

We started with the patch that my husband and I (I’d even roped him in too!) had been co-working on the night before – him more than me as I was about ready to give up at this point – and Phil was kind enough to say we were on the right lines, but needed to input the videos differently, using a bang, or a button rather than reading in the file to loop or play it. Then he tackled the returning to the original video as we had one switching to another on a click, just not by reading the end of the video to trigger the return to video 1.

We had looked at the delay function, but Phil suggested using the pipe command, we had calculated the length of the clip with ‘length’ but this was giving an odd number, that when worked into the pipe function returned to the original video, yay!..but before the end of the clip had actually played. Phil then set about trying to work out the fps and miliseconds needed as the 2720 ‘length’ number was obviously wrong, as he was looking through some of the reference material, I saw a ‘duration’ function which listed as returning ms, just what we wanted, and when he put into the patch, it worked!

This was amazing, I don’t think Phil will realise just how brilliant it was to see this working, for me…

With that working, he turned to the pressure mat, of course the first thing he did was to check which was the live loop out of the four wires… it wasn’t the ones I had hooked up!

So if you ever buy one of these pressure mats from maplin, the active wires that make the contact loop are the two on the inside of the mat, they actually came with a bit of the plastic casing missing, but no diagram, so here’s one I made earlier!

matwires

The red wires make the active loop.

I connected the right wires up to the extended wires and we plugged the now working jack back into the microphone socket.

He put the adc~ code into the patch, but it didn’t register anything, so we looked at the audio input options and here we found it wasn’t on and it wasn’t defaulting to the correct input, so after a bit of jiggery pokery with the audio in on the control panel of my laptop we got a signal.

Phil had put in what looked like a volt meter in MAX so we could read the base voltage and see what it changed to when the mat was stepped on, then he added a greater than value, which would activate the change in state, this worked well, but when you stepped off before the video finished it would return to the looping video, not good as I wanted the whole video to play, so Phil added a ‘gate’ which closed the activation whilst the video was playing.

To put it bluntly Phil is awesome and it all now works, bar the fullscreen which I will sort when it’s actually on the mac I will use for the show as that is different between macs and pcs (I’m working on a pc for these tests)

So just in case you ever fancy doing something like this yourself, here is a screenshot of the patch!

maxpatch

and here it is working!!!!

MAX msp and the pressure mat switch – the easy part #maxmsp #pressuremat

Leave a comment

At the beginning of my final project I looked into a wide variety of ways of firing off animation dependent on the user interacting with the space, you could choose from Leap Motion, Xbox Kinect and various light and/or motion (PIR) sensors, but I plumped for a very simple (I thought) method, the humble pressure mat.

pressure-mat

I chose the pressure mat because I want a simple interaction, a foot press makes the animation play. The viewer looking closely at my sculpture, stepping closer to read the information label, creates a visual and audio reaction from the very space that they are in.

I was concerned that an electronic sensor, could get confused and react with the presence in the space, therefore never shutting off the switch… The mat makes a closed loop when stepped on and no matter how many people stand on it at once, it will only fire when newly stepped on, keeping it simple… on or off.

It had been suggested that  I use MAX MSP as my user interface in between the mat, the computer and the projector and could control video and audio in a wide variety of ways.

To get output from the pressure mat into the computer so that MAX can process it needed a single audio jack.

35mm-metal-stereo-plug

http://www.maplin.co.uk/p/35mm-metal-stereo-plug-fj99h

I also needed to order a longer length of wire as the pressure mat came with only 20cms of wire attached.

So with all of the hardware in place I rigged the pressure mat into the jack.

wpid-dsc_0073.jpg

the jack in pieces

wpid-dsc_0077.jpg

the two ends wired into the jack terminals, although the jack has three terminal points you only need the side two not the top ‘earth’ point.

wpid-dsc_0078.jpg

wpid-dsc_0079.jpg

and nearly back together with a small plastic insert to prevent accidental connection.

wpid-dsc_0080.jpg

all wired up.wpid-dsc_0081.jpg

This however was to be the easy part, programming in MAX turned out to be the hardest part…

to be continued…