Analog to digital conversion

29 Dec 2010

Hi,

After a conversion has happend what form am I then dealing with..

 

will the digital audio be in a pulse code modualtion form or a binary numeric form.

 

thanks.

29 Dec 2010

is that binary you say, oh thank you so much...

 

oh you say PCM is a similar to a uncompressed wave file, really??

29 Dec 2010

Hi Philips,

Not sure if this is quite the question you asked, but when using AnalogIn, the value returned is a normalised representation of the voltage at the pin. See:

If you use the read() method, it is a floating point number between 0.0 (0v) and 1.0 (3.3v). If you use read_u16(), it is an unsigned binary number between 0 and 2^16-1 representing the same range. So your first guess is correct.

Hope that helps,

Simon

29 Dec 2010 . Edited: 29 Dec 2010

Hi Simon,

I am trying to figure out the steps I need to take to use the adc of the mbed to record my voice and then store the file on my pc.

been pretty new and no college education with micro controllers is pretty hard tho:)

Can you maybe outline the steps I will need to do for me to acheive my goals.

how many different Binary forms are there?

I was thinking I could use the RPC and .net visual C# as one way of encoding the digital data

I know It could be done with java and matlab, well I have alot ways I think this could be done, but making something reality seem to be pretty hard at the moment

 

But I need to understand the basics of how I go about doing this, I would sooner not have to spend any more money, because the mbed or two can more than handle everything I want to do

 

As in encoding audio and decoding audio, but I am still not sure of the of the steps I need to take.

30 Dec 2010

It depends on what exactly you want to do. You can save that binary data (a form of PCM) to PC using USB or LocalFileSystem ( limited to 2M) and then convert this file to a known format like wav or even mp3. Another way is to use mbed capabilities to convert this data into wav or mp3 and only then to copy to  PC the sound file.

The second way is better because you save time by having sound file already prepared and because a compressed file leaves more room on the storage device. (SDcard, USBdrive etc) There are many algorithms for compressing sound begining with ADPCM and finishing with MP3. For human voice one of the best compressing algorithms (quality/size) is GSM 6.10 used in mobile telephony.

You need to study sound file specs (wav, mp3), compression algorithms, use of filesystems for SDcard or USBdrive. I think that a first good step is to try to make your first wav file (PC compatible) on mbed and only then to try compression if you need.

   

31 Dec 2010 . Edited: 31 Dec 2010

 

user Not Important wrote:
It depends on what exactly you want to do

I want to do lots of things, I have many task projects ideas I would like to use the mbed for, all to do with audio:) I think maybe I have took on one of the most complex things to do

 

 

user Not Important wrote:
You can save that binary data (a form of PCM) to PC using USB or LocalFileSystem ( limited to 2M) and then convert this file to a known format like wav or even mp3

Ok still not %100 clear on what PCM is, I thought it came after Binary data but it looks like it just depends on what libs are on the mbed. By default now what Binary forms do have availble to me with the Mbed could somebody please tell me.

 

I think http://mbed.org/cookbook/DotNET is a big must do, because we can use the pc laptop as a dsp, also would like to get the mbed working with audacity:) lol hahahh

 

user Not Important wrote:
Another way is to use mbed capabilities to convert this data into wav or mp3 and only then to copy to PC the sound file.

 

I have to add my own code or libs to convert to wav right, mbed does not come with any wav files, yeah madplayer is cool shows what can be done.

 

 

user Not Important wrote:
The second way is better because you save time by having sound file already prepared and because a compressed file leaves more room on the storage device. (SDcard, USBdrive etc) There are many algorithms for compressing sound begining with ADPCM and finishing with MP3. For human voice one of the best compressing algorithms (quality/size) is GSM 6.10 used in mobile telephony. You need to study sound file specs (wav, mp3), compression algorithms, use of filesystems for SDcard or USBdrive. I think that a first good step is to try to make your first wav file (PC compatible) on mbed and only then to try compression if you need.

Yeah I would like to see or make  loads of algorithms for the mbed, sdcard and a usbdrive is a good starting point altho http://mbed.org/cookbook/DotNET would work. I need a demo for the mbed lol, I have looked at a couple of products and none seem to focus on input conversion, only output and mp3 wav out conversion:(