Go Down

Topic: Sampling audio and streaming (Read 439 times) previous topic - next topic

Hello,

I've setup an Arduino to sample audio through the analogue input pin at a set frequency and am sending this 8-bit HEX sample out through the USB serial device. On the other end the samples are collected, combined and saved into a .raw file.

Have I misunderstood or should I be able import this into audacity as raw audio as unsigned 8 bit PCM with a custom sample rate.

The audio is being amplified and offset to be between 0-5v.

Thanks

DVDdoug

Quote
should I be able import this into audacity as raw audio as unsigned 8 bit PCM with a custom sample rate.
That should work.   With 8-bit mono you simply have a series of bytes, and about the only thing that could go wrong is mixing-up signed & unsigned values.

Oh...  The Arduino's ADC is 10-bits.  Did you scale-down to 8-bits?  (Divide by 4, or bit-shift left by 2?) 

If there is a problem, try DC (maybe 5V and 0V) or a very-low-frequency square wave.   Then, open the file with a Hex Editor and look at the bytes.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy