Real Time Audio

I want to acquire data from soundcard, filter it and send it back to the soundcard.. Sampling frequency is 44100Hz and filter is a cascaded notch filter.. I have tried various combinations of the TimerFcn and SamplesAcquired Fcn and the best possible latency is around 300ms.. And can the data which is taken as a chunk of samples and filtered separately each chunk by chunk using the 'filter(Hd,x)' command be applied as a continuous streamed data to the filter and take continuous output from it ?? Is any such functionality available ?? How can i make this system as realtime as possible ??

답변 (1개)

Daniel Shub
Daniel Shub 2012년 4월 5일

0 개 추천

This question has been asked and answered a number of times.
> < <http://www.mathworks.com/matlabcentral/answers/13761-streaming-sound-in-realtime> href=""<http://www.mathworks.com/matlabcentral/answers/3858-simultaneous-recording-and-reprodction-of-a-file-in-matlab</a>> href=""<http://www.mathworks.com/matlabcentral/answers/13146-can-we-access-the-audio-while-recording-online-using-matlab</a>>
For playing dynamic stimuli see href=""<http://www.mathworks.com/matlabcentral/answers/14108-real-time-sound-loop-playing</a>>
The summary is that with standard MATLAB it is difficult. The DAQ toolbox on Windows gives you a fighting chance. Your best bet is to go with a port audio implementation. I suggest psychtoolbox.
Assuming a reasonable computer and filtering, port audio should let you get close to 10 ms latency with only an occasional dropped frame.

카테고리

도움말 센터File Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

태그

질문:

2012년 4월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by