<html><body><div style="color:#000; background-color:#fff; font-family:tahoma, new york, times, serif;font-size:10pt"><div><span>Thanks very much for the hints, I will try all of them.</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: tahoma, 'new york', times, serif; background-color: transparent; font-style: normal;"><span>Actually, I did see a couple of messages about exceeding +/- 1.0....</span></div><div><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">  <div style="font-family: tahoma, 'new york', times, serif; font-size: 10pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Perry Cook &lt;prc@CS.Princeton.EDU&gt;<br> <b><span style="font-weight: bold;">To:</span></b> Ted Stockwell
 &lt;emorning@yahoo.com&gt; <br><b><span style="font-weight: bold;">Cc:</span></b> "stk@ccrma.stanford.edu" &lt;stk@ccrma.Stanford.EDU&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, August 30, 2013 5:41 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Stk] Pops and Crackling on Windows<br> </font> </div> <div class="y_msg_container"><br>Hey Ted,<br><br>I'm doing some STK on RPi already!&nbsp; It works quite well if you<br>pay attention to how much computation you're asking for at<br>any given time.<br><br>Since it happens the same way at the same instant, it could<br>be clipping for some reason.&nbsp; The CPU spiking might be <br>something inside STK checking for exceeding of +/- 1.0.<br><br>I'd try changing the gain (downward) just a bit.&nbsp; This could <br>be done in a variety of places, including right in the main <br>program.&nbsp; Find a nice place where the Instrument.tick() method<br>is being called, and
 multiply that times your test gain hack.<br><br>Something like:&nbsp; dac.tick(myRev.tick(0.5*myInstrument.tick())));<br>where you add in that 0.5.&nbsp; <br><br>Another thing to try would be to run the demo with the GUI<br>and see if things click any.&nbsp; Wish I could help more.&nbsp; <br><br>PRC<br><br>On Aug 30, 2013, at 2:59 PM, Ted Stockwell wrote:<br><br>&gt; Hi All,<br>&gt; <br>&gt; I'm a programmer that is totally new to sound synthesis and STK.<br>&gt; I've built the demo project on Windows XP, I'm playing with it, and I have some questions... <br>&gt; <br>&gt; When I play a SKINI file in realtime I hear a lot of pops and crackling/buzzes at specific times in the sequence (demo Clarinet -or -if scores/bookert.ski).<br>&gt; The pops and crackling always happens at the same points in the sequence.<br>&gt; I've noticed that my CPU usage tops out when the crackling starts (BTW, I have 3.4 Ghz Pentium 4 CPU).<br>&gt; If I generate a .wav file
 instead and play the .wav file then I don't hear any crackling (demo Clarinet -if scores/bookert.ski -ow clarinet.wav) .<br>&gt; I figure the issue must be related to the realtime synthesis of the sound (but I suppose it could be the actual playing of the sound).<br>&gt; <br>&gt; I've tried increasing RT_BUFFER_SIZE from 512 to 4096 but that made no difference.<br>&gt; Can anybody suggest a remedy?<br>&gt; My ultimate goal is too use STK on a Raspberry Pi so I'll need to understand/solve this issue in order to be comfortable moving forward.<br>&gt; <br>&gt; Thanks in advance,<br>&gt; <br>&gt; -ted stockwell<br>&gt; <br>&gt; <br>&gt; PS: I've ordered a copy of Real Sound Synthesis for Interactive Applications but I haven't received it yet, so I don't understand how any of this stuff works :-).<br>&gt; <br>&gt; _______________________________________________<br>&gt; Stk mailing list<br>&gt; <a ymailto="mailto:Stk@ccrma.stanford.edu"
 href="mailto:Stk@ccrma.stanford.edu">Stk@ccrma.stanford.edu</a><br>&gt; <a href="http://ccrma-mail.stanford.edu/mailman/listinfo/stk" target="_blank">http://ccrma-mail.stanford.edu/mailman/listinfo/stk</a><br><br><br></div> </div> </div> </blockquote></div>   </div></body></html>