[music-dsp] OSC problem on STM32F4Discovery
gwenhwyfaer at gmail.com
Mon Apr 9 13:35:04 EDT 2012
On 09/04/2012, robert bristow-johnson <rbj at audioimagination.com> wrote:
> i hadn't heard of this dev board before. at
> http://www.st.com/internet/evalboard/product/252419.jsp it says that the
> single unit prices is US$14.9 . is that right? that's nearly free.
They were giving them out free in the US for a while, I believe.
> regarding wavetable indexing, somewhere Julian must be converting float
> to int, no? i am still convinced that the correct way to implement it
> is with pure integer arithmetic. to implement a good NCO, you need a
> lot of bits in the phase accumulator. i might think that 32 would be
And therein, I suspect, lies the problem; the STM32F4 is a Cortex M4F
implementation, which means it has a single-precision FPU onboard - ie
only 24 bits of precision. I have a feeling that what's in evidence
here is just rounding error. Especially given that the problem only
manifests when the difference between the phase increment and a
multiple of the sample rate is really small.
More information about the music-dsp