I have 2 Arduino Due boards. Now, I want to get the audio from a GameBoy audio jack, sample it, and be able to transmit it over a slow link (~1-2kbps) to another Arduino, so it can be played it on a speaker connected there.
A few theoretical questions: what should my sampling rate be (considering the type of sound I want to transmit and the bottleneck of my link)? Also I assume I need to do some sort of post-processing on the Arduino side (PCM encoding?). If yes, is the MCU capable enough to handle everything in real time, and are there existing libraries to take care of that?
On top of these, do you see any reason why this could be difficult or challenging ? Am I missing something, or being too ignorant?
Lol. I have a .mid file of Bohemian Rapsody which is ~50kB and it's 7 minutes long. That's the quality of audio I'd expect to get. Don't forget I mentioned GameBoy
That's a MIDI file, not an audio file, isn't it? MIDI files don't contain the audio itself, just the list of notes, durations etc., so are going to be small files.
For audio, 64Kb/s is more like what you would need.
It is just an experiment. I am working on a project which involves visible light communication with color shift keying (CSK) and I thought that it might be a nice demo to be able to transmit sound - not voice or music necessarily, but something fun.
Uncompressed CD audio is: 16-bits X 44,100 samples per second X 2 channels = 1411kbps.
Ahigh-good quality MP3 is about 1/5th as much data. Music is still "pretty-good" at 128kbps depending on how picky you are. MP3 can go down to 8kbps but that's useless for music.
Of course if it's compressed it has to be decoded/decompressed and that takes some processing (more than a regular Arduino can do in real-time).
There are a couple of telephone standards that use 8 bits and 8kHz (64kbps) and non-linear PCM (uLaw or a Law). This gets you better quality than you'd get with a regular (linear) 8-bit WAV file but it's still only "voice quality".