Interface microphones using matlab
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
RAJKUMAR Palaniappan
el 18 de Abr. de 2012
Comentada: Walter Roberson
el 26 de Feb. de 2020
I have three microphones and i want to record the signals from the microphones simultaneously, is it possible in matlab?
i used the below mentioned program and i can acquire data from one microphone but im not able to get from all the three at the same time
clear all
close all
clc
AI = analoginput('winsound');
addchannel(AI, 1);
Fs = 8000;
set (AI, 'SampleRate', Fs)
duration = 20;
set(AI, 'SamplesPerTrigger', duration*Fs);
start(AI);
data = getdata(AI);
delete(AI)
10 comentarios
Respuesta aceptada
Geoff
el 20 de Abr. de 2012
Sorry mate, it looks like you are expecting the two-channel mic jack on your sound card to have three inputs.
Go and buy yourself a USB sound interface with 4 mic preamps.
The Alesis iO4 or Tascam US-600 are among the cheapest devices out there. Bonus is they will take a 5mm jack on all channels, since I assume you are not using professional microphones.
As for using only two microphones on one sound card, yes you should be able to do this. But you need to make a stereo splitter cable (or there may be something at your local electronics shop) which turns a single male stereo 3.5mm male jack into two mono 3.5mm female sockets (corresponding to left and right).
Plug that into your computer, and a mic into each of the sockets on the splitter. Then you should be able to at least record two mono channels (assuming that the mic input is stereo). You will, however, not have individual gain control on the two mics.
If you really do have more than one device, then you should be able to choose that device with your initial call to analoginput:
doc analoginput
It might not be 'winsound', and if it is, try the second parameter which selects the hardware ID.
Also, if you are using 64-bit MatLab, you need to read the documentation, which states that you can't use the analoginput interface.
5 comentarios
Walter Roberson
el 29 de Abr. de 2012
If you have a multi-channel NI DAQ, then Yes, the inputs could be synchronized.
Walter Roberson
el 26 de Feb. de 2020
Over the years I came across the fact that the standard Windows drivers for audio are two channels at most, so even if you could get a third channel in physically, that the drivers would not deal with it. The workaround involved using ASIO drivers (I am sure of this), and I cannot quite recall for sure whether using PortAudio drivers would work but I think so. Or use the data acquisition toolbox to talk to a multichannel A/D card.
Más respuestas (1)
Goz Qht
el 26 de Feb. de 2020
clear all close all clc AI = analoginput('winsound'); addchannel(AI, 1); Fs = 8000; set (AI, 'SampleRate', Fs) duration = 20; set(AI, 'SamplesPerTrigger', duration*Fs); start(AI); data = getdata(AI); delete(AI)
0 comentarios
Ver también
Categorías
Más información sobre Audio I/O and Waveform Generation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!