Warning: Invalid playback selection
4 ビュー (過去 30 日間)
古いコメントを表示
I am working with the three primary types of filters; the low-pass filter, the high-pass filter and the band pass filter, and creating some effect-spectres of them.
I am getting a warning regarding my playback, which I do not quite know how to fix it. Pop-ups like an error. This is what the console prints:
Warning: Invalid playback selection. Playback will start at the beginning.
> In audioplayer/play (line 67)
In EffectSpectras (line 10)
And that's the code:
%'handel is a MAT-file which is shipped with MATLAB as an example
load handel;
% Volume
x = y/1; % Decrease volume
% Plays
player = audioplayer(x, Fs);
play(player,[1 (get(player, 'SampleRate')*10)]);
% Shows result
[Rows, Cols] = size(x);
Ylo = FDLowpass(x);
Ybd = FDBandpass(x);
Yhi = FDHighpass(x);
POVylo = PowerSpecFFT(Ylo);
POVybd = PowerSpecFFT(Ybd);
POVyhi = PowerSpecFFT(Yhi);
plot(1:Rows, POVylo)
title('The low-pass')
hold on
plot(1:Rows, POVybd)
title('The band-pass')
hold on
plot(1:Rows, POVyhi)
title('The high-pass')
Also my problem is that i want all 3 plots to be displayed separately, and preferably in one window where you can see all at once, or if that's not possible then where all 3 figure-windows will appear.
0 件のコメント
回答 (1 件)
Shraddha Jain
2020 年 12 月 23 日
Hi,
I understand that you are getting this warning when the play function is executed. This occurs because the stop index value (get(player, 'SampleRate')*10) specified in the arguments of play function exceeds the end index value of audio variable x.
To answer you question regarding displaying figures seperately, you can use the following code,
figure
plot(1:Rows, POVylo)
figure
plot(1:Rows, POVybd)
figure
plot(1:Rows, POVyhi)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Audio I/O and Waveform Generation についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!