<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Thank you very much !
<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Freitag, 22. Februar 2019 um 10:54 Uhr<br/>
<b>Von:</b> "Dan Wilcox" <danomatika@gmail.com><br/>
<b>An:</b> "Jakob Laue" <jakkesprinter@web.de><br/>
<b>Cc:</b> Pd-List <pd-list@lists.iem.at><br/>
<b>Betreff:</b> Re: [PD] Audio clicks with postgresql external</div>

<div name="quoted-content">
<div>My 2 (EUR) cents... :)
<div> 
<div>
<blockquote>
<div>
<div>Message: 2<br/>
Date: Thu, 21 Feb 2019 22:46:32 +0100<br/>
From: Antoine Rousseau <<a href="mailto:antoine@metalu.net" onclick="parent.window.location.href='mailto:antoine@metalu.net'; return false;" target="_blank">antoine@metalu.net</a>><br/>
To: Pd-list <<a href="mailto:pd-list@lists.iem.at" onclick="parent.window.location.href='mailto:pd-list@lists.iem.at'; return false;" target="_blank">pd-list@lists.iem.at</a>><br/>
Subject: Re: [PD] Audio clicks with postgresql external<br/>
Message-ID:<br/>
<<a href="mailto:CAOCG5Hx9uP7emPN3SoeGPPVAAiS07Wj4yH5eCn2sX09GT1Xfdw@mail.gmail.com" onclick="parent.window.location.href='mailto:CAOCG5Hx9uP7emPN3SoeGPPVAAiS07Wj4yH5eCn2sX09GT1Xfdw@mail.gmail.com'; return false;" target="_blank">CAOCG5Hx9uP7emPN3SoeGPPVAAiS07Wj4yH5eCn2sX09GT1Xfdw@mail.gmail.com</a>><br/>
Content-Type: text/plain; charset="utf-8"<br/>
<br/>
You could try:<br/>
- to launch a second instance of Pd from your init script, and communicate<br/>
via [netsend] / [netreceive]<br/>
- or to run this second Pd instance via [pd~]; this could be simpler to<br/>
implement (because you'll just use inlet/outlet to communicate), but I<br/>
don't know, even with -noaudio and -nogui flags, if it will avoid the<br/>
master instance to block.</div>
</div>
</blockquote>

<div> </div>

<div>On limited resource machines, if you have plenty of RAM, I would suggest running the postgres part of the project in a separate process using something like a python script. Then use OSC for the communication. This way, Pd will never block the audio while the postgres process blocks accessing the db. You can wrap up the project into a script which starts both pd and the python script in the right order. Even better would be to write it in C, but try something like Python first and stick with it if it works well enough.</div>

<div> </div>

<div>This approach worked quite well for me on my old wearable running a 500 Mhz Pentium 3 with 256 Mb RAM. One thing to do is to balance the process priority toward Pd by using "nice" to make Pd "no nice" and make the python script / postures access program "more nice."</div>

<div> </div>

<div>I'm a bit conservative and have never approached running *everything* in Pd partially because of this reason. I usually write separate IO programs which then communicate to Pd which does the audio and most of the creative "sauce" / mapping. The added benefit of this approach is that you can easy distribute things if/when you need to, such as expanding an existing installation to have say 10 clients and 1 server.</div>
</div>
 

<div>
<div style="color: rgb(0,0,0);font-family: Helvetica;font-size: 12.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;">--------</div>

<div style="color: rgb(0,0,0);font-family: Helvetica;font-size: 12.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;">Dan Wilcox</div>

<div style="color: rgb(0,0,0);font-family: Helvetica;font-size: 12.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><a href="http://twitter.com/danomatika" target="_blank">@danomatika</a></div>

<div style="color: rgb(0,0,0);font-family: Helvetica;font-size: 12.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><a href="http://danomatika.com" target="_blank">danomatika.com</a></div>

<div style="color: rgb(0,0,0);font-family: Helvetica;font-size: 12.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><a href="http://robotcowboy.com" target="_blank">robotcowboy.com</a></div>

<div style="color: rgb(0,0,0);font-family: Helvetica;font-size: 12.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></body></html>