필터 지우기
필터 지우기

Is there automatic gain in audiorecorder or soundsc?

조회 수: 2 (최근 30일)
David Koenig
David Koenig 2013년 12월 19일
편집: David Koenig 2013년 12월 20일
I am collecting data using audiorecorder and playing it using soundsc. I collect for a fixed time - 10 seconds. I collect the results of striking individual piano keys one at a time. For the low (bass) keys that have a long sustain time I have no problem when I play the collected sound back using soundsc. However, on the treble keys that have short sustain times I get a growing loud background noise once the note has died away but 10 seconds has not elapsed. Is there some kind of automatic gain control going on with audiorecorder or soundsc that tries to amplify the background noise once the note has died away?
Here is the script that demonstrates the phenomena:
===============================
clear; close all
%===read a note from analog input
NBits=24; Fs=44100; NChannel=1; RecordLength=10;
recObj = audiorecorder(Fs, NBits, NChannel);
disp('press Enter to start the process and wait 2 s for red RECORD light')
pause; pause(2)
figPos=[ 1234 747 140 50]; fh=figure('Position',figPos,'color',[1 0 0]); % red light text(5,50,'Recording!!'); axis([1 100 1 100]); disp('!!!RECORDING IN PROGRESS!!! '); pause(.5)
recordblocking(recObj, RecordLength);
fh1=figure('Position',figPos,'color',[0 1 0]); % green light disp('End of Recording.'); pause(.5) close(fh)
y = getaudiodata(recObj);
Fs=recObj.SampleRate;
soundsc(y,Fs);
=================================
Thanks,
Dave

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by