I have a problem with Matlab - I need to do the following :
Can you for example show a segment of MATLAB code for me?
So I assume you have some wav files ('Dave.wav', 'Nick.wav', 'Roy.wav', etc.). You have an excel file: Dave, Roy, Dave, Nick
And you want matlab to play (in this example), Dave.wav, then Roy.wav, then Dave.wav, then Nick.wav.
First, you need to read the xls file. I had trouble getting Matlab to do in; in principle, you can go file->import data, select the file, and then click 'generate code' on the next screen, and it will give you a function to import that kind of data. If it gives you an error, perhaps you can save the excel file as .csv instead, and repeat the same process.
Once you have a function importfile
, you can do:
importfile('filename');
and the data will appear in a variable (probably the same as the file name - I will call it 'data' from now on). then:
for i=1:numel(data)
s = wavread([data{i} '.wav']);
player = audioplayer(s, 22050);
play(player);
end