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] ).<div><br></div><div>In my approach I used gesture templates, but since all you want is &quot;tapping&quot; (or claping) you are just looking for &quot;peaks&quot; in amplitude analysis. So:</div>

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

<div><br></div><div><br></div><div>Now &quot;<meta http-equiv="content-type" content="text/html; charset=utf-8">attack detection&quot; in PD can be performed in various ways, one cool way is to use bonk~ to detect attacks (see Miller&#39;s paper in [2]) or on a simpler level you can analyse the signal manually with env~.</div>

<div><br></div><div>Computing the &quot;tempo&quot; 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&#39;s a patch here in the list that does that, I remember talking about that here.</div>

<div><br></div><div>The final stage is simple, &quot;Sending the OSC&quot; 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. </div>

<div><br></div><div>About building and shipping the OSC message</div><div><br></div><div>[1] <meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://dl.dropbox.com/u/7329207/PedroLopesDTW-based_RecOPad2010.pdf">http://dl.dropbox.com/u/7329207/PedroLopesDTW-based_RecOPad2010.pdf</a><br>

[2] <a href="http://www-crca.ucsd.edu/~tapel/icmc98.pdf">http://www-crca.ucsd.edu/~tapel/icmc98.pdf</a></div><div>[3] <a href="http://puredata.info/Members/jmmmp">http://puredata.info/Members/jmmmp</a></div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>

<br></div><div>hope this helps,</div><div>Pedro<br><div class="gmail_quote">On Wed, Dec 1, 2010 at 5:55 AM, Paul Winchester <span dir="ltr">&lt;<a href="mailto:pww35@cornell.edu">pww35@cornell.edu</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi All,<br><br>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.<br>


<br>Thanks.<br><br>
<br>_______________________________________________<br>
<a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Pedro Lopes (MSc)<br>contact: <a href="mailto:pedro.lopes@ist.utl.pt" target="_blank">pedro.lopes@ist.utl.pt</a><br>website: <a href="http://web.ist.utl.pt/Pedro.Lopes" target="_blank">http://web.ist.utl.pt/Pedro.Lopes</a> <br>


</div>