I have 2 xbee pro’s laying around just waiting for me to finish my handheld and chair. I was wondering if it would be possible to send sound between them in almost real time? example: I plug this device into any headphones port(my computer) and then I get an email (which is set to make a sound) and I am sitting in my chair ( with a 12" subwoofer in the back), and I want to chair to make the email sound, or if i play a game, the noises can get transfered to the chair and get played without to much of a delay.
Is this possible, or is there something out there better suited? The reason I want to use the xbee’s is because I plan on having my handheld communicate with my computer and a sensor station, and I would like to use what I already have instead of new.
The project you’re describing doesn’t need to send sounds wirelessly. You store the sounds in digital form on the receiver side (the chair), and you send a code that represents the sound you want to play. The transmitter sends a “21” and the receiver says “okay, I’m receiving 21 - that means play the ‘mail’ sound”. It signals a .wav player to play that sound, and you’re done.
That’s FAR simpler than sending sounds through the XBee link. You’re just transmitting and receiving one byte - the code (well, probably also some kind of header bytes telling the receiver that there is a command coming in, so maybe three or four bytes). Sending sound involves accurately sending thousands and thousands of bytes of information.
There’s no reason at all to try to send sound if this is what you’re trying to accomplish.
The hard way would be to get a DSP to sample the sound signal and then send the samples through the wireless link and then convert it back to sound and play it…
Yes, that DSP thing is how to send the sound wirelessly, and yes, it’s the hard way.
If you had no idea in advance what sounds were going to need to be played, you might have to do that, and conceptually it would be pretty straightforward. But in implementation, you’d have a heckuva time getting things working in a way that you found satisfying and reliable, and a fair amount of expense. It’s WAY easier to store the sounds at the point at which they’re produced, and just send trigger signals. You could have that working tomorrow for only about $100, I imagine.
Ok, so heres another question concerning this. Would it be possible to send an mp3/wav file and have the other end recieve it and put it together again? I know that it would be a matter of dissasembling the file, sending it, and the reassembling it on the other, but can it be done?
Sending an mp3 file or wave file is possible. Since all the DSP way is doing is converting analogue sound to digital samples, you already have that step done if you use a wave file. again, you need to convert the file back to soundwaves using either a DAC or something similar. also, you shoud be able to send the sound file bit-by-bit…
furthermore the file needs to be transmitted completely before you play it or else the filesystem will do strange things I believe.
another option would be to have your transmitting side to send a single sample and then have the receiving side play it at once. if you can send the data with satisfying speed, you can ‘stream’ the sound. (adding a buffer to this setup would be easy i think)
Sending near real-time audio over a 250kbps wireless connection will require some form of compression or another, so you won’t be able to get “crystal clear” audio. Though there are good codecs out there that will give you pretty good sound quality.
Just a quick thought to ponder, it may work to stream a MP3 file over the wireless link from a computer, then on the Rx end you can interface it to an MP3 decoder IC (probably with a micro controller and some glue-logic in between)… That way you get the benefit of a good codec without having to mess around with decoding it yourself… If you try it, I’d be interested to see how it turns out.
Well here are a few of my plans that i want to experiment with, first one is that I want to take a straight mp3 file and transmit it from my computer to a propellor which will save it to an usd card, then i can just send commands to play a certain file. If a file is not in the directory, then the propellor will send a command back and the computer will send over the file. I have several usd cards around here and I think that with a few of the adapters and some programming than i could make a solid state harddrive type thing.
My other thought is to just settle with music playback and buffering a song with the help of an usd card and then playing it while another core of the prop is buffering the next song in a different sd card, then when the first song is over, the next song can play and this would flip flop back and forth thats the beauty of an octo core processor i guess.
let me know what you think, do you think i could transfer a song fast enough to play one and then another and flip flop like that or would it take more than one song period to transfer a song?