Excellent point, Robert. (Another way to avoid it is to mask the index with 
0xff, if you want to keep the table 256, but not check for wrap in the 
mid-interpolation.)


On Apr 10, 2012, at 9:05 AM, robert bristow-johnson wrote:
> 
> now that i think of it, if you're doing linear interpolation and you forget 
> to add that extra repeated point at the end of the wavetable:
> 
> float wavetable[257];   // one extra point for doing linear interpolation
>                        // make sure that wavetable[256] = wavetable[0]
> 
> you will get a click every once in a while.
> 
> r b-j
> 
> On 4/10/12 11:54 AM, Nigel Redmon wrote:
>> Not alone, Emanuel.
>> 
>> "Clicks", especially 2-3 seconds apart doesn't describe aliasing—and looking 
>> at the spectral distortion seems to be a separate issue. Julian, does that 
>> still describe the problem you're hearing, after your recent code changes?
>> 
>> On Apr 10, 2012, at 6:40 AM, Emanuel Landeholm wrote:
>>> Hi,
>>> 
>>> Hm, am I alone in thinking that truncate interpolation shouldn't give
>>> clicks every 2-3 seconds..? How big is your table? There must be a bug
>>> in your table offset code, but I can't find it in the code you posted.
>>> 
>>> If you really have clicks that seldom, linear or higher interpolation
>>> will not help you.
> 

--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp

Reply via email to