The Data Arena has a 16-channel audio system that is used to support the 3D data visualisation. We want to provide an insight into the possibilities of MATLAB’s Audio Toolbox and how we use it in the Data Arena.
MATLAB automatically recognizes input and output devices, each assigned with a unique device ID. A list of all devices is available via the audiodevinfo command
info = audiodevinfo
The audio system in the Data Arena is driven by PULSE and identified by MATLAB with device ID 3.
As first step, we have to create an audioplayer
object that takes the signal seq
, the sample rate FS
in Hz, the number of Bits per sample nBits
and the device ID devID
as arguments.
FS = 44100; nbits = 24; devID = 3 % PULSE driver player = audioplayer(seq,FS,nbits,devID);
The signal seq
is a matrix of floating-point values, with the number of channels as columns.
The audio sequence is played by calling a player
play(player);