Sampling GameBoy audio and transmitting it over a slow link

Yet another Arduino sound project. I'll be quick:

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? :smiley:

Thank you in advance!

You certainly will be missing something if you attempt to pass audio over a 2 kilobit/sec link. :roll_eyes:

The audio! :grin:

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 :rofl:

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.

Oh wow. I didn't know that. So for this low bitrates, transmitting sound is a lost case?

I think so.

Why are you trying to do this? Without mentioning Arduinos, what do you want to achieve?

You can buy Bluetooth dongles and speakers off-the-shelf that would do what you want, for example.

41WoOqckmBL.AC_SY580
31NKku6OCAL.AC_SY580

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.

Maybe you could transmit MIDI? That would need only a low bandwidth.

I think that, eventually, this is what I'll do. I read on papers that even with 32-CSK they achieved a maximum of ~10 kbps :confused:

Just a couple of reference points -

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".

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.