DSP: Development Test Bench example code indexing error
이전 댓글 표시
So I tried this example code:
frameLength = 256;
fileReader = dsp.AudioFileReader(...
'Counting-16-44p1-mono-15secs.wav',...
'SamplesPerFrame',frameLength);
deviceWriter = audioDeviceWriter(...
'SampleRate',fileReader.SampleRate);
scope = dsp.TimeScope(...
'SampleRate',fileReader.SampleRate,...
'TimeSpan',16,...
'BufferLength',1.5e6,...
'YLimits',[-1 1]);
dRG = noiseGate(...
'SampleRate',fileReader.SampleRate,...
'Threshold',-25,...
'AttackTime',10e-3,...
'ReleaseTime',20e-3,...
'HoldTime',0);
visualize(dRG);
configureMIDI(dRG);
while ~isDone(fileReader)
signal = fileReader();
noisySignal = signal + 0.0025*randn(frameLength,1);
processedSignal = dRG(noisySignal);
deviceWriter(processedSignal);
scope([noisySignal,processedSignal]);
end
release(fileReader);
release(deviceWriter);
release(scope);
release(dRG);
It gives me the following error:
Array formation and parentheses-style indexing with objects of class 'dsp.AudioFileReader' is not allowed. Use objects
of class 'dsp.AudioFileReader' only as scalars or use a cell array.
Error in workbench (line 30)
signal = fileReader();
I can't figure out how to solve it, please help.
답변 (1개)
Merry Dai
2018년 5월 14일
0 개 추천
the problem that I meet is below

카테고리
도움말 센터 및 File Exchange에서 Applications에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!