<div><br></div><div>Something regarding PD</div><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Bennett Smith</b> <span dir="ltr"><<a href="mailto:bennett.smith@music.mcgill.ca">bennett.smith@music.mcgill.ca</a>></span><br>
Date: 2011/5/18<br>Subject: [Mumt_grad] Fwd: PD<br>To: <a href="mailto:mumt_grad@music.mcgill.ca">mumt_grad@music.mcgill.ca</a><br><br><br><div style="word-wrap:break-word">Here's an opportunity for some interesting work:<br>
<div><br><div>Begin forwarded message:</div><br><blockquote type="cite"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium"><b>From: </b></span><span style="font-family:'Helvetica';font-size:medium">Jordan Deitcher <<a href="mailto:jordan@liminal.ca" target="_blank">jordan@liminal.ca</a>><br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium"><b>Date: </b></span><span style="font-family:'Helvetica';font-size:medium">May 10, 2011 10:39:59 AM EDT<br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium"><b>To: </b></span><span style="font-family:'Helvetica';font-size:medium">Bennett Smith <<a href="mailto:bennett.smith@music.mcgill.ca" target="_blank">bennett.smith@music.mcgill.ca</a>><br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium"><b>Cc: </b></span><span style="font-family:'Helvetica';font-size:medium">Mitchel Benovoy <<a href="mailto:mitchel.b@gmail.com" target="_blank">mitchel.b@gmail.com</a>><br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium"><b>Subject: </b></span><span style="font-family:'Helvetica';font-size:medium"><b>PD</b><br>
</span></div><br><div style="word-wrap:break-word">Hi Bennett,<div><br></div><div>We're looking for somebody to do the following. We were hoping that the guy who did our particle system would do this, but he can't right now. Here's what Mitchel wrote to him. Zack and Mike thought you might know someone who could do this. Would you be oh so very kind and let me know? Thanks.</div>
<div><br></div><div>Jordan<br><div><br><div><br></div><div style="word-wrap:break-word"><div><div><div style="word-wrap:break-word"><div><div><div><br></div><br>
<div text="#000000" bgcolor="#ffffff">
Hi Reuben,<br>
After consulting with a PD expert, we're going to change your
workplan slightly. Basically, you will not need to port your C++
code into PD Externals, as this might result in suboptimal CPU
scheduling. Instead, you should use PD purely as an interface to
control the particle system, which will be running in a different
thread. The communication between the particle system and the PD
interface should be done using Open Sound Control (OSC), which is an
efficient UDP communication protocol. The idea is use OSC to send
commands to the particle system (like changes in the parameters).
This is fairly easy to do: you need to implement an OSC handler in
your code that listens to incoming messages from the PD interface
that you will design.<br>
<br>
I suggest you familiarize yourself with OSC before you get started
on this (<a href="http://opensoundcontrol.org/introduction-osc" target="_blank">http://opensoundcontrol.org/introduction-osc</a>).
<br>
<br>
Here is what our PD expert had to say:<br>
<br>
===<br>
<span style="border-collapse:separate;font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px">So my
suggestion for the particle system / Pd thing is: Don't make a
pd external that contains an OpenGL rendering loop. It's
suboptimal because you'll need a non-blocking polling and/or
drawing mechanism. Pd expects to be in control of scheduling. If
you draw GL in the same thread, you'll get blockage of DSP
(clicky audio). If you draw GL in a separate thread, you'll need
mutexes or condition variables to tell Pd when it's allowed to
change the GL content (ie, between frames). This is tricky
scheduling, and not necessary for what you're doing.<br>
<br>
A better solution is to provide an control interface via
OpenSoundControl (OSC). ie, the particle system would be in a
separate process with a socket that listens to control messages.
You do a non-blocking poll of your sockets between frames. There
are lots of libraries (eg, liblo or oscpack) that you can use
for this.<br>
<br>
On the Pd side, I'd highly recommend using my [OSCrxtx] objects
for sending messages:<a href="http://code.sat.qc.ca/pdsheefa/trunk/src/OSCrxtx/" style="color:rgb(28, 81, 168)" target="_blank">http://code.sat.qc.ca/pdsheefa/trunk/src/OSCrxtx/</a><br>
<font face="Helvetica"><span style="border-collapse:separate;font-size:medium"><font face="arial, sans-serif" size="3"><span style="border-collapse:collapse;font-size:13px"><br></span></font></span></font></span></span></div>
</div></div></div></div><br></div></div></div><br></div></div>
</blockquote></div><br></div>
<br>_______________________________________________<br>
Mumt_grad mailing list<br>
<a href="mailto:Mumt_grad@music.mcgill.ca">Mumt_grad@music.mcgill.ca</a><br>
<a href="http://music.mcgill.ca/mailman/listinfo/mumt_grad" target="_blank">http://music.mcgill.ca/mailman/listinfo/mumt_grad</a><br></div><br>