>I'm so sorry, but that's not very clear...
>I'm quite new in matlab, basically, I need to make sure the >file can be played randomly when i click the Play button in >the gui........
>possible to do that? [data, speed] = wavread(file1); samples{1} = {data, speed}; [data, speed] = wavread(file2); samples{2} = {data, speed}; [data, speed] = wavread(file3); samples{3} = {data, speed};
uicontrol('Style','pushbutton','String','Play Randomly', ... 'Units', 'normal', 'Position', [1/2 1/2 1/4 1/4], ... 'Callback', @(src, evt) wavplay(samples{ceil(length(samples)*rand)}{:}) );
 Signature "Beauty, like all other qualities presented to human experience, is relative; and the definition of it becomes unmeaning and useless in proportion to its abstractness." -- Walter Pater
|