In this thread
Beau Schwabe posted code
for a Phase modulator for the Demo board that digitizes the microphone, then "modulates the samples over the desired synthesized frequency generated on CTRB."
I'm using a Quickstart board though, and therefore no real microphone so .....
I tried to modify the code, adding a "fakeMic" routine that would supply the microphone pin (9 ??) with the
samples from an 8bit /11_025 sample rate .wav file.
But I'm just getting "white noise" output.
is started in a new cog :
I changed the "bits" constant from 11 to 8, but it still doesn't work.
I also tried the "fakeMic" routine with both a delay (simulating an 11K sample rate) and without, and both just yield
Is the "fakeMic" spin code too slow ?
SampRate = 11_025
PUB fakeMic |p,time,x
dira~~ 'pin the ADC routine thinks the microphone is connected to (demo board)
x := clkfreq / SampRate
p := @wav1 + 44
time := cnt
repeat while p++ < @wav1_end
outa := p
' wait to simulate sample rate
waitcnt(time += x)
wav1_end byte 0