[Stk] Plucked instrument issue on iOS

Gary Scavone gary at ccrma.Stanford.EDU
Fri Mar 8 06:16:49 PST 2013


Hi Hector,

If the note is out of tune, then there must be a problem with the delay line length.  That is, it should not matter whether, or in what way, the delay line is filled with noise (though if the delay line is not filled with noise, it may not produce any sound because it won't have much energy left inside).  This code is fairly old and we haven't noticed any problems over the years, so perhaps you are using it (updating the control parameters) in some way that was not expected.  How are you changing the plucked note number or frequency?

Regards,

--gary

On 2013-03-06, at 4:38 PM, Hector Urtubia <urtubia at mrbook.org> wrote:

> Hi All,
> I'm having issues with the Plucked instrument on iOS where sometimes notes get completely out of tune.
> I took a look at the Sitar instrument, which uses a similar algorithm and doesn't show the same issue and I isolated the problem to the following lines on the "pluck" method of Plucked:
> 
>   for ( unsigned long i=0; i<delayLine_.getDelay(); i++ )
>     // Fill delay with noise additively with current contents.
>     delayLine_.tick( 0.6 * delayLine_.lastOut() + pickFilter_.tick( noise_.tick() ) );
> 
> 
> If I don'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.
> Any ideas?
> Regards,
> 
> Hector
> _______________________________________________
> Stk mailing list
> Stk at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/stk




More information about the Stk mailing list