Acquiring multichannel Audio data from M-Audio Profire 2626 using MATLAB

2 次查看(过去 30 天)
Hello, I have an M-Audio Profire 2626 multichannel Audio Interface. It uses the Firewire port for transferring the digital audio data (after amplifying, sampling and quantization) to the computer. Recording this multichannel audio data in Audacity is quite trivial. However I wanted to know as to how I can acquire that data in MATLAB?
Any suggestion is much appreciated.

回答(2 个)

Basilio Furest
Basilio Furest 2019-8-12
Have you or anyone resolved this? (for Matlab 2012b)
Generally, to access the required information (about your audio device) to monitor or use independent input/outputs from an audio interface, you use the function 'audiodevinfo'. This will give you a matrix where you can see the input/output channel/device IDs that have two lines assigned to them (e.g. Line 1/2) which you can later access by changing the gain idependently (e.g. for line 1 channelGain = [1 0]; for line 2 channelGain = [0 1]).
But I have the same issue as you, I am not sure if the use of a firewire makes the channel and line assignments ambigous, but the Profire 2626 audio device is considered as a multichannel device and it is not clear how to access each channel independently..

Basilio Furest
Basilio Furest 2019-8-15
I have found a solution to the problem and in the context of the way I am using the equipment. I am using the Profire 2626 to playback sounds through 8 independent speakers.
To access the input/output channels indpendently, you have to read the audio interface as an ASIO interface driver. The function 'audiodevinfo' reads the interface as a 'Direct Sound' driver, as a mutlichannel device, and does not allow access to different line channels e.g. Line1/2. Only matlab versions 2013-2019 (from what I can tell) have the package necessary to interact with ASIO drivers (that I can find..), I used matlab 2015b.
As a precaution, I edited matlab preferences such that it only reads sound driver cards as ASIO drivers. Then it's just a matter of getting acquainted with the 'dsp.AudioPlayer' function which allows you to create an object variable to interact with the audio interface, i.e. p = dsp.AudioPlayer. Then, changing p.ChannelMappingSource to 'Property' enables custom channel mapping through p.ChannelMapping, e.g. p.ChannelMapping = [1 2] will allow access to lines 1 and 2. In my set-up, I actually use separate instances of Matlab to access the different channels (for different reasons), so the mapping part is trivial; at least when I tried, using one instance only allows you to have only one dsp.AudioPlayer object and therefore you may not access the channels independently.
Also, depending on your file type, features related to the file, and employment requirements, you might have to change other parameters in the object. If not, you will experience data loss or system efficiency, resulting in unwanted effects to your data files as they are recorded and or played back.
  1 个评论
Harshavardhan Sundar
This was a long time ago but I found a neat solution based on a Matlab wrapper around portaudio called "playrec". I found it to be super useful, and extremely easy to deal with multichannel audio in Matlab in windows environment. I am not sure if playrec is still arounf but do take a look. There is a detailed instruction page on using it with ASIO driver and it can detect any audio device connected to it.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Audio I/O and Waveform Generation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by