This is my situation:
A circle with a diameter of approximately 6m with 6 monitor speakers on the ceiling. It’s not a surround system, but i will be used for spatial sound positioning, that part’s working fine.
This is my problem:
I want to be able to detect the exact location of the people entering the circle. I know this can quite easily be done using motion tracking / camera’s. I even considered LIDAR (laser tracking system). But i wanna solve this using piezo sensors. As i not only want the location of the people, but also wanna use the ‘rhythm’ of the footsteps of the people.
Can somebody help me on my way? Maybe a example patch?
I’m aware that this can be done (http://tangible.media.mit.edu/projects/pingpongplus/) which is more or less the same thing. But I can’t seem to figure out HOW to program this in Max/Msp as I’m quite new to programming.
Any help or suggestion would be much appreciated!
At first glance I think this would be very tricky if you want to track more than one person—how would you be able to distinguish between them? To ensure that your three distances are referring to the same person? Not sure that could be done.
If it’s just one person, you might be able to do it with triangulation. Each distance is a radius of an imaginary circle around the piezo, where they intersect is your person. Or something like that… :)
..and would force-sensing resistors be a better application? You could easily cobble together an [expr] with preset conditions, maybe using [split] as well, to determine proximity to sensor X, Y or Z. Three incoming values, if X > Y+Z; if Y > X+Z; if Z > X+Y. I’m not in front of Max right now, so this is just off the top of my head.
I’m also making some research about this, I found a interesting project dealing with the arduino directly and check position in the space.
I start making some sketchs in Max, but already got stuck in how to calculate the delay value between 2 mics. I know from the amount of amplitude in which side the source is coming but could not figure how the system can work exactly.
Depending on the accuracy you need you may need to use Gen~. As I understand it you need to calculate the time it takes for the sound to get to each piezo and then do some maths! Depending on your audio setup Max receives the audio data in packets equal to your buffer size.
So if your sampling rate is 44,100 and your buffer size is 256 you get approx 172 packets a second. So your time resolution is about 6ms.
This might sound quite fine but the speed of sound is quite fast. 3,500 m/s through wood or 343 m/s through the air.
So depending on if your piezos are surface mounted or not in 6ms sound can travel 18m through wood or 1.8m through the air.
Clearly in a 6m space this isn’t accurate enough. So you need to work at a sub buffer rate.
Gen allows you to do this, allows you to work with the individual samples within the buffer so you can theoretically make the above 256 times more accurate. A sampling rate of 44,100 could give you accuracy to within 8cm through wood or about 0.8cm through the air!
All this could well be wrong but I look forward to being corrected!
I’m sorry to say I never followed this up (not yet anyway) but maybe these will help:
I did some quick preliminary experiments using gen~ to measure position between 2 mics in air, it looked quite promising and was fairly accurate.
Leafcutter, got any code worth sharing at this point? Given the significant difference in sound transmission speed between gases and solids, this may not be a good indicator for the original poster, unfortunately. I’ll be interested to see what comes of this, hoewver…it could be very useful.
On the other hand, perhaps the OP can divide the original problem into two solutions: one for position tracking and one for getting the walking rhythms.
Here follows a patch that calculates the time difference between two received signals coming from an identical source. I’ve used it with a stereo microphone setup (AB not XY!) but it could be extended to a setup with three or four microphones to calculate the exact xyz position of a sound source in space.
The patch calculates the correlation function between two signals and looks for the peak in the function.
The patch only works when the direct signal is louder then the reverb.
I’ve originally made the patch in max 4 and did the peak detection in max. Nowadays it makes more sense to do this with gen~.
----------begin_max5_patcher---------- 3236.3oc6cs0jhhjE9YqeED9XO10PdiLYeXiX+QrO0wDUfZpESofKfU2SOw3 u8EHAEUtbRJLazt6NhRED3vW9ctlGR+6mlLcd32jwSs9WVewZxj+9oISx2T1 FlT74IS258sEa7hy+ZSCjeMb9eNclZWIxukju4MgdK2JiisX11OWt2W8WtTF jseTwV14kr3U+f0uDIWjntrTL5Y6YVH6r+53l+d9y1V+QwgDreqevFYRb0yi +x7qZpj7YjMp75sJLHIvaqLee+mHeuMSOcRB2mb4YQsoj+ZmTIJSmd7plcph 8+d9NRkorM9OO8T1elMP.ERKTBUfL4nDi2CTx9dBk9sSvScTFV18uaNugfel 0FVfuFKbcGLnvOHwjbFa8zrxgIJomTFWwnjwreqLXemjCGgRcwV+aaV22167 hR2dhL5EYf27M4eC6ZgDRaLmYoHyrVPmRgKQtsvF8z3zKpLL6n15uH6kXYx9 cYuYV1eBB8ikYu4q9Iul85R4Fu+J+64uc+FuD+vTVyezCXeQ31TfO4Jt4oyq U3Jq7KmU1E2ZmevaV4xikWrUb39nExVF1HjbFJUMfIDvF2VEsddN3eBrpLRh 0k.aOXrzFgq7wOqzAOK+fc6Sl1oIeEh3RFB.w9GGfzf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