Audio recording is still being tested and may not perform as expected.
Have you used it?
I'm a bit worried that the recording function has the following comment:QuoteAudio recording is still being tested and may not perform as expected.
How long do you want to record for?Seen this https://nootropicdesign.com/audiohacker/
Key question, because if it's possible to retrieve the samples; then it should be no problem to save the entire recording into a SD card as a WAVE file.
I also like the DAC feature, it should give a "cleaner" audio output than the PWM the Arduino offers.
if you scale them with resistors in a 1:256 ratio.
Its possible to use two 8-bit PWM channels together to synthesize 16 bit output, if you scale themwith resistors in a 1:256 ratio.
You can also use sigma-delta noise-shaping to drive a high speed, low-resolution PWM channel to give veryhigh effective number-of-bits.
Note both the resistors have to have a tolerance of better than 0.39% for this to work.
I know TMRpcm can play 16-bit mono audio, but I never tested it because I had no idea of the resistor values. For my particular setup, I think 200 ohm for the high byte and 51K for the low byte should do the trick... right?
That sounds like some DSP, which I think an AVR doesn't have enough horsepower to pull that off at high sampling rates.
acc += sample ; acc2 += acc ; top = acc2 >> 24 ; long feedback = ((long)top) << 24 ; acc -= feedback ; acc2 -= feedback ; OCR2A = top + 0x80 ;
Welp... guess I can't get the theoretical sound quality anyways. I mean, even 1% tolerant resistors are either rare or more expensive to get (but most likely both at the same time).
The reason it's so hard is that an Arduino was never designed for audio recording.You could use a Teensy with the PJRC Audio library. It handles all low-level buffering and DMA for you.Pieter