<div dir="ltr">Hi All,<div style>I&#39;m having issues with the Plucked instrument on iOS where sometimes notes get completely out of tune.</div><div style>I took a look at the Sitar instrument, which uses a similar algorithm and doesn&#39;t show the same issue and I isolated the problem to the following lines on the &quot;pluck&quot; method of Plucked:</div>

<div style><br></div><div style><div><font face="courier new, monospace">  for ( unsigned long i=0; i&lt;delayLine_.getDelay(); i++ )</font></div><div><font face="courier new, monospace">    // Fill delay with noise additively with current contents.</font></div>

<div><font face="courier new, monospace">    delayLine_.tick( 0.6 * delayLine_.lastOut() + pickFilter_.tick( noise_.tick() ) );</font></div><div><br></div><div><font face="courier new, monospace"><br></font></div><div style>

<font face="arial, helvetica, sans-serif">If I don&#39;t fill the delay buffer after changing the frequency, then the notes stay in tune, but then I have to modify the tick method where the timbre of the instrument is not the same at all.</font></div>

<div style><font face="arial, helvetica, sans-serif">Any ideas?</font></div><div style><font face="arial, helvetica, sans-serif">Regards,</font></div><div style><font face="arial, helvetica, sans-serif"><br></font></div>
<div style>
<font face="arial, helvetica, sans-serif">Hector</font></div></div></div>