Very easy to do (i did a similar thing , where I used a microphone to create gestures to control an multitouch DJ application, see a small paper in [1] ).

In my approach I used gesture templates, but since all you want is "tapping" (or claping) you are just looking for "peaks" in amplitude analysis. So:

mic -> pd -> "attack detection" -> hit a bang that will set the tempo -> compute tempo in BPM -> build an OSC message and ship it to a port, where the ardour/DAW will listen.


Now "attack detection" in PD can be performed in various ways, one cool way is to use bonk~ to detect attacks (see Miller's paper in [2]) or on a simpler level you can analyse the signal manually with env~.

Computing the "tempo" is very easy, you just need to measure the time between to bangs. And convert that to BPM (beats per minute, thus 60 seconds). There's a patch here in the list that does that, I remember talking about that here.

The final stage is simple, "Sending the OSC" message, just see the help patch of the packOSC and other OSC-related externals, they supply examples. Also Joćo Pais, has so nice information on controlling Ardour via pd in here [3] and he has a patch for it. 

About building and shipping the OSC message

[1] http://dl.dropbox.com/u/7329207/PedroLopesDTW-based_RecOPad2010.pdf
[2] http://www-crca.ucsd.edu/~tapel/icmc98.pdf
[3] http://puredata.info/Members/jmmmp

hope this helps,
Pedro
On Wed, Dec 1, 2010 at 5:55 AM, Paul Winchester <pww35@cornell.edu> wrote:
Hi All,

I am working on a project in which I would like to have the tempo of a DAW (Ableton, FL Studio, etc) set by the clapping of an audience.  Not sure how to approach tackling the problem.  Any and all help is appreciated.

Thanks.


_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list




--
Pedro Lopes (MSc)
contact: pedro.lopes@ist.utl.pt
website: http://web.ist.utl.pt/Pedro.Lopes