How can interface 2 external stereo microphone in matlab with the help of one microphone jack and other USB ports ?

4 Ansichten (letzte 30 Tage)
I want to record simultaneously using two stereo microphone. Thus it will be total 4 channel recording which I want to start and stop and automatically store in matlab. I have zoomh4n setup but can't able to workout the interfacing.

Antworten (1)

Walter Roberson
Walter Roberson am 27 Mai 2016
You are not going to be able to synchronize the signals with that setup.
USB is a shared bus that works in a master/slave relationship. The master (controller) asks each device on the bus in turn whether it has any data available, and each one just answers "Yes, this much:" or "No" or "Just this small little bit I have included". The master totals up the Yes's and decides on priorities and then goes through each of them and says "Okay, you, send me this amount of data", gets just that much back, then goes on to the next in turn. Even if there is only one device attached to the USB controller, the one device never gets full-time access and has to go through this "Do you have anything?" "Yes" "Okay send some" "Here it is" cycle.
Notice that each time a block of data is transferred. The data received is not time stamped (not unless the sending device includes time stamps), and as the program does not get any information about exactly when the device was polled, the program cannot tell how long the data was waiting. And of course on a multi-tasking system, the program might have been suspended for an indefinite period after the data was received by the controller -- to run anti-virus during heart surgery for example.
The microphone jack, on the other hand, does not have this master/slave relationship. But it does have difficulty with interrupt latency. If you have a good sound card and you use the right parts of MATLAB, you can reduce that by using ASIO drivers (which gets you to about 11-12 ms latency, best case.)
Coordinating these two very different sources is going to be difficult. And knowing the relative timings can be crucial -- for example if you are doing sound localization then you really have to know how long the processing path is for each device.
For these kinds of reasons, if you are working with multiple sound sources, it is recommended that you do A/D signal conversion of all of them in a single A/D card that implicitly synchronizes its channels, so at least you get relative synchronization. Better yet is to use an A/D card that time-stamps so you can make attempts at absolute synchronization as well.
  2 Kommentare
Sanjeev Kumar Singh
Sanjeev Kumar Singh am 1 Jun. 2016
Bearbeitet: Sanjeev Kumar Singh am 1 Jun. 2016
Thanks for your response. Owing to the synchronization issue Now I'm using the 8Pre Motu Sound card which has 8inputs and 2 outputs. But the problem is following
daq.getDevices
ans =
No data acquisition devices available.
Click here for a list of known vendors.
Click here for troubleshooting tips.
>> audiodevinfo
ans =
input: [1x7 struct]
output: [1x5 struct]
In-spite of input and output channels being available why daq.getDevices is saying no Data acquisition device available?
Walter Roberson
Walter Roberson am 2 Jun. 2016
The Motu cards appear to have been supported only on the 32 bit "Legacy" interface. It is not possible to interface to them using a 64 bit version of MATLAB or using any of the session-based interfaces.
In an old discussion that mentions Motu, I see one of the Mathworks employees indicating that the DAQ toolbox [at that time] supported only two input channels on audio boards. I do not know if that limitation was retained.
I suggest that you have a look at using ASIO drivers and the DSP toolbox; see http://www.mathworks.com/help/audio/gs/real-time-audio-in-matlab.html

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Communications Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by