Warning: Invalid playback selection

5 visualizzazioni (ultimi 30 giorni)
Anonym
Anonym il 5 Dic 2020
Risposto: Shraddha Jain il 23 Dic 2020
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.

Risposte (1)

Shraddha Jain
Shraddha Jain il 23 Dic 2020
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)

Categorie

Scopri di più su Audio I/O and Waveform Generation in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by