Hans, thank you! We will try that.<br><br><div class="gmail_quote">2011/11/14 Hans-Christoph Steiner <span dir="ltr">&lt;<a href="mailto:hans@at.or.at">hans@at.or.at</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div style="word-wrap:break-word"><div><br></div><div>from the cmd line: -rt hig priority, -nrt low.</div><div><br></div><div>.hc</div><div><div class="h5"><br><div><div>On Nov 14, 2011, at 9:44 AM, Vilson Vieira wrote:</div>

<br><blockquote type="cite">How to set high priority for audio Pd instance and lower priority to the other instance?<br><br>All the best.<br><br><div class="gmail_quote">2011/11/14 Ricardo Fabbri <span dir="ltr">&lt;<a href="mailto:rfabbri@gmail.com" target="_blank">rfabbri@gmail.com</a>&gt;</span><br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for the replies.<br><br>problems solved by using 2 Pd instances, one for video, the other for audio, communicating via OSC on the same machine (or even different machines). The machine also had to have a better CPU as doing this on a slower dualcore laptop only fixed the audio, while the video got very slow. <br>




<br>best,<div><div><br><br>On Monday, November 14, 2011, Hans-Christoph Steiner &lt;<a href="mailto:hans@at.or.at" target="_blank">hans@at.or.at</a>&gt; wrote:<br>&gt;<br>&gt; I think generally, for gem + audio patches, people run two instances of Pd, one for Gem and the other for the audio.  The audio instance has realtime priority, and the Gem one does not.<br>




&gt;<br>&gt; .hc<br>&gt;<br>&gt; On Nov 13, 2011, at 10:17 PM, Ricardo Fabbri wrote:<br>&gt;<br>&gt;&gt; Hi,<br>&gt;&gt;<br>&gt;&gt; I am building instalations/instruments which control sounds<br>&gt;&gt; through the webcam, using a color detector that I submitted to this<br>




&gt;&gt; list a couple of days ago. Things work well, and I am just facing real<br>&gt;&gt; time/delay issues now.<br>&gt;&gt; When I try to generate sound with any pix<br>&gt;&gt; processing, I am getting jumps in the sound (like on/off sounds at<br>




&gt;&gt; about 5-20Hz). Turning off any pix processing, the sound is then back<br>&gt;&gt; to normal, even if I show the raw video from the camera on a gemwin.<br>&gt;&gt; By pix processing I mean anything with even only 1 pass through the<br>




&gt;&gt; image on the CPU. I am using a ps3eye camera, which makes things<br>&gt;&gt; better as it has a high framerate, but I still get interruptions in<br>&gt;&gt; the sound.<br>&gt;&gt;<br>&gt;&gt; Why is this lag in the sound? The image with the output of the pix<br>




&gt;&gt; processing doesn&#39;t seem to be moving any slower with or without sound.<br>&gt;&gt;<br>&gt;&gt; What are your experiences in trying to get gem pix processing, video,<br>&gt;&gt; and DSP to work in real time? My application is interactive, so that I<br>




&gt;&gt; really need the sound to be as smooth as possible. Here are some<br>&gt;&gt; factors I will investigate, let me know if they make any sense to you:<br>&gt;&gt;<br>&gt;&gt; - It could be just too much data, even a single pass on each pixel<br>




&gt;&gt; could be causing delays/jumps. I could downsample the image prior to<br>&gt;&gt; any pix processing<br>&gt;&gt; - The kernel is too slow in processing the video stream; I tried &#39;-rt&#39;<br>&gt;&gt; with no success<br>




&gt;&gt; - Perhaps there is a problem in Pd sound scheduling vs pix processing<br>&gt;&gt; - Perhaps its just the CPU. In fact, I used OSC to do the video on one<br>&gt;&gt; machine, send the parameters to a second machine which then processes<br>




&gt;&gt; the audio there. This effectively solved the problem. Question is, is<br>&gt;&gt; this due to CPU or to another factor?<br>&gt;&gt;<br>&gt;&gt; I would really appreciate hearing ideas from you, as I am new to this.<br>




&gt;&gt; Best,<br>&gt;&gt; Ricardo Fabbri<br>&gt;&gt; --<br>&gt;&gt; Linux registered user #175401<br>&gt;&gt; <a href="http://www.lems.brown.edu/%7Erfabbri" target="_blank">www.lems.brown.edu/~rfabbri</a><br>&gt;&gt; <a href="http://labmacambira.sf.net/" target="_blank">labmacambira.sf.net</a><br>




&gt;&gt;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; GEM-dev mailing list<br>&gt;&gt; <a href="mailto:GEM-dev@iem.at" target="_blank">GEM-dev@iem.at</a><br>&gt;&gt; <a href="http://lists.puredata.info/listinfo/gem-dev" target="_blank">http://lists.puredata.info/listinfo/gem-dev</a><br>




&gt;<br>&gt;<br>&gt;<br>&gt; ----------------------------------------------------------------------------<br>&gt;<br>&gt; Computer science is no more related to the computer than astronomy is related to the telescope.      -Edsger Dykstra<br>




&gt;<br>&gt;<br>&gt;<br><br></div></div>-- <br><div><div><br>Ricardo Fabbri<br>--<br>Linux registered user #175401<br><a href="http://www.lems.brown.edu/%7Erfabbri" target="_blank">www.lems.brown.edu/~rfabbri</a><br>

<a href="http://labmacambira.sf.net/" target="_blank">labmacambira.sf.net</a><br>
<br>
</div></div><br>_______________________________________________<br>
Pd-dev mailing list<br>
<a href="mailto:Pd-dev@iem.at" target="_blank">Pd-dev@iem.at</a><br>
<a href="http://lists.puredata.info/listinfo/pd-dev" target="_blank">http://lists.puredata.info/listinfo/pd-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Vilson Vieira<br><br><a href="mailto:vilson@void.cc" target="_blank">vilson@void.cc</a><br><br>((( <a href="http://automata.cc/" target="_blank">http://automata.cc</a> )))<br>

<br>((( <a href="http://musa.cc/" target="_blank">http://musa.cc</a> )))<br>
</blockquote></div><br></div></div><div>
<span style="border-collapse:separate;border-spacing:0px 0px;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br>

<span style="border-collapse:separate;border-spacing:0px 0px;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div>

<br></div><div>----------------------------------------------------------------------------</div><div><br></div><div>Looking at things from a more basic level, you can come up with a more direct solution... It may sound small in theory, but it in practice, it can change entire economies.<span> </span>    - Amy Smith</div>

<br></span></span>
</div>
<br></div></blockquote></div><br><br clear="all"><br>-- <br>Vilson Vieira<br><br>vilson@void.cc<br><br>((( <a href="http://automata.cc">http://automata.cc</a> )))<br><br>((( <a href="http://musa.cc">http://musa.cc</a> )))<br>