Olivier (pyo&#39;s dev) responded offlist while I was busy writing a reply. I&#39;m posting what he has to say here for the benefit of the list.<br><br>For those interested (and to avoid hijacking pd-land), there is a pyo mailing list here: <a href="http://groups.google.com/group/pyo-discuss">http://groups.google.com/group/pyo-discuss</a><br>

<br>Pyo radio will be back up and running today for those who wondered.<br><br>Cheers,<br>jm<br><br>------Olivier&#39;s answer-----------<br><br>Hi Yvan,<div><br></div>Thanks for trying the pyo example! <br><br><div class="gmail_quote">

<div class="im">2011/11/1 yvan volochine <span dir="ltr">&lt;<a href="mailto:yvan.pd@gmail.com" target="_blank">yvan.pd@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>On 11/01/2011 04:23 AM, Jean-Michel Dumas wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It&#39;s great to see pyo make an appearance in this discussion. For<br>
completion&#39;s sake, here&#39;s the &quot;128 sine waves with random freq mixed down<br>
to stereo&quot; example written in pyo. I find it much more readable than either<br>
SC or cSound, but that&#39;s only a matter of taste i guess.<br>
<br>
Sine([random.uniform(20,20000) for i in range(128)]).mix(2)<br></blockquote></div></blockquote><div><br></div></div><div>A Csound example would use 128 lines or some simili-loop opcode. The best way should be to script Csound from python or lua...!</div>

<div class="im">
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



</blockquote>
<br></div>
indeed, pyo looks really cool, kudos ;)<br>
<br>
a couple of remarks with your example though.<br>
my sc example description was not 100% accurate:<br>
the random freqs have exponential distribution (ExpRand) and Splay does 
the stereo mix down but with a level compensation (equal power) so you 
don&#39;t blow up your ears/pa like in the above pyo example :p<br></blockquote>
<div><br></div></div><div>That&#39;s the cool thing with a pure python 
module, you can use any function in the random module... To be more like
 you SC example, the line should be:</div><div><br></div><div>a = Sine([100 * random.expovariate(0.5) for i in range(128)], mul=1./128).mix(2).out() </div><div class="im">
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
also, running this pyo line uses 25% of my Core Duo 1.83 while sc 
example uses 15% (and I&#39;m not running excellent Tim Blechmann&#39;s 
multicore-aware sound server supernova, just default scsynth)<br></blockquote><div>
<br></div></div><div>No doubt, SC is the best audio engine regarding CPU
 usage... With pyo, there is an overhead to deal with the Python Global 
Interpreter Lock (GIL). It makes python very safe but take some times to
 acquire and release before and after the audio callback. In the case of
 playing a bunch of oscillators, I would probably use OscBank which can 
compute hundreds of oscillators in a single loop, very efficient!</div><div class="im">
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
BTW, (getting a bit OT here) I have some questions about pyo.<br>
is there a way to use double precision ?<br></blockquote><div><br></div></div><div>from pyo64 import *</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<br>
$ &gt;&gt;&gt; from pyo import *<br>
$ pyo version 0.5.0 (uses single precision)<br>
<br>
for the Server to boot properly, I have to start jackd, then 
Server().boot() gives me an Error with PortAudio incorrect channels 
number (???), stop jackd, and then Server boots fine..<br>
it seems also that it segfaults easily.. no time right now but I&#39;ll make more tests some time...<br></blockquote><div><br></div></div><div>jack
 and portaudio don&#39;t really like each other! Portaudio won&#39;t initialize 
if jack is started. You can use pyo with jack by setting the Server&#39;s 
host:</div>
<div><br></div><div>s = Server(host=&quot;jack&quot;).boot() </div><div><br></div><div>Cheers,</div><div><br></div><font color="#888888"><div>Olivier</div></font><div class="im"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<br>
cheers,<br>
_y<br><font color="#888888">
<br>
-- <br>
<a href="mailto:yvan.volochine@gmail.com" target="_blank">yvan.volochine@gmail.com</a><br>
<a href="http://yvanvolochine.com/" target="_blank">http://yvanvolochine.com</a><br>
<br>
</font></blockquote></div></div><br><br>