<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>from the cmd line: -rt hig priority, -nrt low.</div><div><br></div><div>.hc</div><br><div><div>On Nov 14, 2011, at 9:44 AM, Vilson Vieira wrote:</div><br class="Apple-interchange-newline"><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">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 class="h5"><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. &nbsp;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'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 '-rt'<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. &nbsp; &nbsp; &nbsp;-Edsger Dykstra<br>


&gt;<br>&gt;<br>&gt;<br><br></div></div>-- <br><div class="HOEnZb"><div class="h5"><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">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">vilson@void.cc</a><br><br>((( <a href="http://automata.cc/">http://automata.cc</a> )))<br><br>((( <a href="http://musa.cc/">http://musa.cc</a> )))<br>
</blockquote></div><br><div>
<span class="Apple-style-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; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><br class="Apple-interchange-newline"><span class="Apple-style-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; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; 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 class="Apple-converted-space">&nbsp;</span>&nbsp; &nbsp; - Amy Smith</div><br class="Apple-interchange-newline"></span></span>
</div>
<br></body></html>