1

I need to record an audio from my laptop and transform it from analog to digital then transfer it to another laptop in the same network to transform it from digital to analog and listen to the audio file normally.

I know that I should use the UDP function to connect between 2 laptops:

ipA = '192.168.1.1';   portA = 9090;  
ipB = '192.168.1.2';  portB = 9091; 

udpA = udp(ipB,portB,'LocalPort',portA);

fopen(udpA)

And the same on computer B. (Code from this post)

The problem now is that I can't use matlab to transform the audio to digital. And as I read here in this post, matlab cannot transform the audio from Analog to digital and we need a hardware to do that.

Is there a tool on matlab to resolve this issue ?

And if not, does this step by step project map correct:

  1. A/D device connected to computer A takes the audio and digitize it

  2. Matlab take the audio and transfer it to computer B using the UDP function

  3. D/A device tranform the audio to analog, and then the audio is ready to be listened on computer B

I don't want someone to do the project on behalf of me. But I need to know how to start and if my project map is correct. Matlab is the only obligatory tool to use in this project, and the other steps may be done by different ways.

Ahmad Ali
  • 61
  • 5

1 Answers1

0

The computer can only represent data (any data, not only audio) in digital format. Analog format is (e.g.) voltage in a wire, magnetic pattern on a magnetic medium, grooves in a vinyl record, etc. These cannot be represented inside a computer.

Once the audio is recorded, it is already in a digital format, since the computer's sound card converted it from analog the digital during the recording. So all you have to do is transfer the data from pc to pc, and listen to it. When you play it, the sound card again does its job, which is to convert from digital to analog.

Having said that, most builtin sound card have converters (A/D and D/A) which are not of high quality if you are doing professional audio. So you can buy an external sound card with better converters if you want - the sky is the limit, both quality- and $$-wise.

Itamar Katz
  • 9,544
  • 5
  • 42
  • 74