<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p></p>
<p lang="en-US" style="margin-bottom: 0in">May be this helps.</p>
<p lang="en-US" style="margin-bottom: 0in"><br>
</p>
<p lang="en-US" style="margin-bottom: 0in">Pd's block size in preferences controls the actual ASIO buffer for the sound card.</p>
<p lang="en-US" style="margin-bottom: 0in"><br>
</p>
<p lang="en-US" style="margin-bottom: 0in">For more clarity on this use asio4all, when changing Pd's block size that reflects on the actual ASIO used buffer.</p>
<p lang="en-US" style="margin-bottom: 0in"><br>
</p>
<p lang="en-US" style="margin-bottom: 0in">(Pd's pref blocksize is ONLY for ASIO and has nothing to do with your patch blocksize)</p>
<p lang="en-US" style="margin-bottom: 0in"><br>
</p>
<p lang="en-US" style="margin-bottom: 0in">Try Pd's pref blocksize to 256.</p>
<p lang="en-US" style="margin-bottom: 0in"><br>
</p>
<p lang="en-US" style="margin-bottom: 0in">After that check the current scarlett ms numbers.</p>
<p lang="en-US" style="margin-bottom: 0in"><br>
</p>
<p lang="en-US" style="margin-bottom: 0in">Did it change? And is now controled by Pd?</p>
<p lang="en-US" style="margin-bottom: 0in"><br>
</p>
<p lang="en-US" style="margin-bottom: 0in">This may require restarting Pd and possible restart of the soundcard.</p>
<br>
<p></p>
<p><br>
</p>
<div id="Signature"><font face="Courier New, Courier, Monospace" size="2">Mensaje telepatico asistido por maquinas.</font>
</div>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Pd-list <pd-list-bounces@lists.iem.at> on behalf of Christof Ressi <christof.ressi@gmx.at><br>
<b>Sent:</b> Monday, February 20, 2017 11:24 PM<br>
<b>To:</b> pd-list<br>
<b>Subject:</b> [PD] Pd + ASIO</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi, <br>
<br>
I've started porting a Pd project to C++ and I'm working with the RtAudio library to interface with my soundcard (Focusrite Scarlett 6i6). There I noticed that I get a *much* better performance than in Pd regarding audio IO. I can play several thousand sawtooth
 tones with a blocksize of 1 and a buffer size of 64 samples (~ 1ms in my ASIO settings) and still get a clean and stable output on my Lenovo L440 laptop. In Pd, on the other hand, I get dropouts on a single testtone when I put the ASIO latency down to the
 same value. The 'delay' setting in Pd is 20ms - which is quite generous - so for me it's clearly an IO problem. I don't know if the reason is Pd or rather portaudio, though.
<br>
<br>
The Focusrite Scarlett interfaces are 'special' in a way that they only let you choose a latency in ms, which is pretty annoying in some circumstances.
<br>
<br>
I noticed some things when playing around with RtAudio:<br>
<br>
If you requeste a buffersize (via RtAudio::openStream) which is *smaller* than the current latency set in Scarlett MixControl (in ms), it will pick that latency instead and you get strange buffersizes like 442 samples (~ 10 ms). If your requested buffersize
 is *greater*, you get this very buffersize.<br>
<br>
Regarding performance: choosing 1 ms in MixControl and requesting 64 samples via RtAudio works beautifully, but in Pd I cannot achieve any decent and stable IO with the same latency setting.
<br>
<br>
I don't know if I'd go so far and say that ASIO is broken in Pd, but on some soundcards it's definitely not working well. I have the suspicion that Scarlett's odd latency setting might be the culprit. But I remember that I also had bad results with an RME babyface.
 I have to check again, though.<br>
<br>
Does anyone have more insight in how Pd communicates with portaudio when using ASIO? How is the ASIO buffersize being handled? What are your experiences with latency settings for Pd + ASIO?
<br>
<br>
Christof<br>
<br>
_______________________________________________<br>
Pd-list@lists.iem.at mailing list<br>
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" id="LPlnk716238" previewremoved="true">
https://lists.puredata.info/listinfo/pd-list</a><br>
</div>
</span></font></div>
</div>
</body>
</html>