[sdiy] Wave table interpolation
rsdio at audiobanshee.com
rsdio at audiobanshee.com
Mon Nov 13 23:11:29 CET 2017
Ah, but can the '413 handle 8-channel TDM? I haven't scanned the ST data, but I've certainly seen ports limited in bit depth or channel count in such a way that made things difficult. The 42x may have the exact same TDM peripheral as the 41x, or it may have an expanded peripheral with more flexibility.
Brian
On Nov 13, 2017, at 9:42 AM, Tim Ressel <timr at circuitabbey.com> wrote:
> The '413 can do TDM according to the reference manual.
> --tr
>
> On 11/13/2017 9:20 AM, Mikko Helin wrote:
>> For PCM1681 and it's 8-channel TDM interface you will need some STM32F42x part at least. (427)
>>
>> --Mikko
>>
>> On Mon, Nov 13, 2017 at 5:32 PM, <paula at synth.net> wrote:
>> <cough>
>>
>> 256 Kbyte of SRAM
>>
>> http://www.st.com/en/microcontrollers/stm32f412ve.html
>>
>>
>> Still, that's quite a chunk of RAM.
>>
>> Paula
>>
>>
>> On 2017-11-13 15:08, Tom Wiltshire wrote:
>>> 100MHz?! 256mB RAM?! Easy life!! That’s no limitations at all. <insert
>>> Monty Python's Yorkshireman paraphrasing here>
>>>
>>> Yes, you could certainly make linear interp work well in such a situation.
>>>
>>> You’ve got multiply instructions and probably multiply-accumulate too,
>>> so linear interp is only a couple of instructions and you don’t have
>>> to worry about whether it’s powers of 2 or not (although that does
>>> always seem to make life easier…)
>>>
>>>
>>> On 12 Nov 2017, at 22:50, Tim Ressel <timr at circuitabbey.com> wrote:
>>>> 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
>>>>>
>>>>> 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!
>>>>
More information about the Synth-diy
mailing list