[sdiy] Wave table interpolation

Tim Ressel timr at circuitabbey.com
Sun Nov 12 23:50:49 CET 2017


I meant clean code-wise  :-)

Target sample rate is 192KHz. TI makes a super cool 8 channel audio dac 
PCM1681. Target proc is the STM32F412VET6, cortex M4, 256 mB ram, 100MHz.

So you think I can get away with linear?  That would make the interop 
code simple. Since I am filling in 256 points in between samples the 
math is all powers of 2.

-t-i-m-b-o-

On 11/12/2017 11:28 AM, Richie Burnett wrote:
> Linear interpolation isn't particularly clean (it isn't band-limited) 
> but can work adequately if you oversample the data in the wave tables 
> first, and/or use a sufficiently high playback sample-rate like 
> 96kHz.  In the case of the former, if the data in the wavetables is 
> already oversampled considerably, then linear interpolation between 
> the points isn't such a bad approximation.  And the latter gives space 
> for the images from the imperfect interpolation to go, before they 
> alias back into the audio band where you will hear them...
>
> If you run your playback at 48kHz, then the demands on the 
> interpolator are very stringent.  It should be flat out to 20kHz or 
> thereabouts, and then be something like 80dB or more down by 28kHz if 
> you aren't to hear aliasing back into the audio band below 20kHz.  
> That's only 8kHz of transition band for the interpolating filter to 
> work it's magic.  However, doubling the playback sample rate to 96kHz, 
> means that you've got all the space between 20kHz and 76 kHz for the 
> interpolating filter's transition band.  That's 7 times as wide, for a 
> mere x2 oversampling during playback, so the demands on the 
> interpolating filter are greatly reduced!
>
> -Richie,
>
> -----Original Message----- From: Tim Ressel
> Sent: Sunday, November 12, 2017 6:56 PM
> To: SYNTH DIY
> Subject: [sdiy] Wave table interpolation
>
> Hi,
>
> Another fun one. I've been looking at the WaveEdit software. It looks
> like it produces waves that are 256 samples by 16 bits. Obviously you'll
> want to interpolate between the samples. Linear interpolation works and
> is cheap but is brute force and causes lots of distortion. I've looked
> at cubic interpolation. Is that a viable approach? My app needs 4 tables
> live at a time so I can interpolate (linearly) between them, so this all
> has to happen on the fly. Cubic looks a bit math intensive.
>
> Thanks!
>

-- 
--Tim Ressel
Circuit Abbey
timr at circuitabbey.com




More information about the Synth-diy mailing list