<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">    I&#39;m new to this mailing list and STK. I think I have found the problem with regard to &quot;Pops and Crackling ...&quot; In the file &quot;demo.cpp&quot; there is a line that reads<br>
<br>  data.voicer = (Voicer *) new Voicer( 0.0 );<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I changed the 0.0 to 0.2 and the pops and crackling disappered. The pops and crackling seemed to be the result of the release time not being activated and the waveform had a &quot;discontinuity&quot; at the end of each note, and this seemed, sometimes, to carry over to the beginning of the next note.<br>
</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I hope this helps.<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Tom Gideon<br><br>...<br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Aug 30, 2013 at 10:18 PM, Ted Stockwell <span dir="ltr">&lt;<a href="mailto:emorning@yahoo.com" target="_blank">emorning@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:10pt;font-family:tahoma,new york,times,serif"><div><span>Thanks very much for the hints, I will try all of them.</span></div><div style="font-style:normal;font-size:13px;background-color:transparent;font-family:tahoma,&#39;new york&#39;,times,serif">
<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,&#39;new york&#39;,times,serif;font-size:10pt">
 <div style="font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif;font-size:12pt"> <div dir="ltr"> <hr size="1">  <font face="Arial"> <b><span style="font-weight:bold">From:</span></b> Perry Cook &lt;<a href="mailto:prc@CS.Princeton.EDU" target="_blank">prc@CS.Princeton.EDU</a>&gt;<br>
 <b><span style="font-weight:bold">To:</span></b> Ted Stockwell
 &lt;<a href="mailto:emorning@yahoo.com" target="_blank">emorning@yahoo.com</a>&gt; <br><b><span style="font-weight:bold">Cc:</span></b> &quot;<a href="mailto:stk@ccrma.stanford.edu" target="_blank">stk@ccrma.stanford.edu</a>&quot; &lt;<a href="mailto:stk@ccrma.Stanford.EDU" target="_blank">stk@ccrma.Stanford.EDU</a>&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><div class="h5">
 <div><br>Hey Ted,<br><br>I&#39;m doing some STK on RPi already!  It works quite well if you<br>pay attention to how much computation you&#39;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.  The CPU spiking might be <br>something inside STK checking for exceeding of +/- 1.0.<br><br>I&#39;d try changing the gain (downward) just a bit.  This could <br>be done in a variety of places, including right in the main <br>
program.  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:  dac.tick(myRev.tick(0.5*myInstrument.tick())));<br>where you add in that 0.5.  <br><br>Another thing to try would be to run the demo with the GUI<br>and see if things click any.  Wish I could help more.  <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&#39;m a programmer that is totally new to sound synthesis and STK.<br>&gt; I&#39;ve built the demo project on Windows XP, I&#39;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&#39;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&#39;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&#39;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&#39;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&#39;ve ordered a copy of Real Sound Synthesis for Interactive Applications but I haven&#39;t received it yet, so I don&#39;t understand how any of this stuff works :-).<br>
&gt; <br>&gt; _______________________________________________<br>&gt; Stk mailing list<br>&gt; <a href="mailto:Stk@ccrma.stanford.edu" target="_blank">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></div> </div> </blockquote></div>   </div></div><br>_______________________________________________<br>
Stk mailing list<br>
<a href="mailto:Stk@ccrma.stanford.edu">Stk@ccrma.stanford.edu</a><br>
<a href="http://ccrma-mail.stanford.edu/mailman/listinfo/stk" target="_blank">http://ccrma-mail.stanford.edu/mailman/listinfo/stk</a><br>
<br></blockquote></div><br></div>