at the moment I use a sample based I2S interrupt (44.1 16-bit stereo).
the alternative would be a direct DMA to feed the codec (all buffersizes
up to 0xffff are supported).
but for the moment i decided on latency free sample based calculations.
I've also got a state variable filter running on the board, which is
working fine.
julian
Am 09.04.2012 18:51, schrieb Nigel Redmon:
Interesting...my STM32F4DISCOVERY just arrive Friday...intending to make a
wavetable oscillator on it, fist thing...
Are you writing the wavetable to a buffer, then pulling from that at the sample
rate? if so, what size?
On Apr 9, 2012, at 6:28 AM, Julian Schmidt wrote:
Hello all,
I'm trying to get an oscillator running on the STM32F4 discovery board.
I'm sending my audio with 44100Hz via I2S to the onboard codec.
However I'm experiencing strange problems.
my code ist quite straight forward:
phase += phaseInc(440); // calculate the phase increment for 440 hz and add it
to phase
if(phase>= TABLESIZE) phase -= TABLESIZE;
return phase/TABLESIZE;
this should give me a non bw limited saw from 0 to 1.f
(I also tried it with an actual wavetable in use. a sine is played fine. but as
soon as overtones are added i get the fluttering)
My problem is that i get periodic amplitude modulations on the overtones about
2-3 times a second.
the root frequency amplitude is fixed, but the higher the overtone frequency,
the more it's amplitude drops every now and then.
this screenshot illustrates the waveform. the upper waveform has some ringing
on the discontinuity and the lower has not.
http://i.imgur.com/JyuEr.png (this image is taken from an inverted saw
wavetable. but the flutter is the same, no matter if i use a bandlimited WT or
output the phase counter directly)
the waveform oscillates between the upper and the lower image.
the amplitude flutter from the overtones is also frequency dependent.
at 439 and 441 Hz its not really audible.
so my tought is that is has to do with the wrap of the phase counter. but i
can't get my head around whats wrong.
any ideas where this change in overtone amplitude could come from?
cheers,
julian
--
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
--
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
--
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