Hello, How can I convert the loaded audio object (myGui.player) to a numeric arr
ID: 2314659 • Letter: H
Question
Hello, How can I convert the loaded audio object (myGui.player) to a numeric array? (see the code below)
so I can quantize it later.
I tried ( getaudiodata) function but it did not work
Your help is highly appreciated..
The code I used it:
Fs = str2num(get(handles.Fs,'String'));
myGui=guidata(handles.figure1);
[file,path] = uigetfile('*.wav','Seleccione un archivo de sonido');
[x,fs] = audioread([path file]);
myGui.freqSam=fs;
myGui.datasound=x;
myGui.player=audioplayer(myGui.datasound,myGui.freqSam);
myGui.flag=2;
play(myGui.player);
pause(7);
myGui.freqSam=Fs;
myGui.datasound=x;
myGui.player=audioplayer(myGui.datasound,myGui.freqSam);
myGui.flag=2; play(myGui.player);
%%y = getaudiodata(myGui.player);
guidata(handles.figure1,myGui)
Explanation / Answer
use the same code
Fs = str2num(get(handles.Fs,'String'));
myGui=guidata(handles.figure1);
[file,path] = uigetfile('*.wav','Seleccione un archivo de sonido');
[x,fs] = audioread([path file]);
myGui.freqSam=fs;
myGui.datasound=x;
myGui.player=audioplayer(myGui.datasound,myGui.freqSam);
myGui.flag=2;
play(myGui.player);
pause(7);
myGui.freqSam=Fs;
myGui.datasound=x;
myGui.player=audioplayer(myGui.datasound,myGui.freqSam);
myGui.flag=2; play(myGui.player);
%%y = getaudiodata(myGui.player);
guidata(handles.figure1,myGui)
but change "getaudiodata" to "audioinfo"
the code might work.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.