Recording output of stereo cable for latency measurement

1 view (last 30 days)
Hi there,
I have a normal stereo aux cable plugged into the audio input jack. The stereo cable comes from another sound stimulator that produces sounds and sends triggers. The stereo cable contains information of the audiosignal in one channel, and information of triggers in the other channel.
Now I need to measure the latency and jitter of the audiosignal and trigger pulses and ideally I would want to visualise the audiosignal and trigger pulse in a top and bottom graph.
Is there a way to measure and visualise the signals of a stereocable input in Matlab?
  9 Comments

Sign in to comment.

Answers (1)

Anton M
Anton M on 10 May 2022
Thank you both, the following worked for me very well!
Fs = 44100 ;
nBits = 16 ;
nChannels = 2 ;
ID = -1; % default audio input device
recObj = audiorecorder(Fs,nBits,nChannels,ID);
recordblocking(recObj,300);
MyRec = getaudiodata(recObj);
FirstCh = MyRec(:,1);
SecondCh = MyRec(:,2);

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!