20-3 ��������������?

@ڭ̥iHŪJTɮסANiHnTiUسBzAҦpWjδpqBέCBTCnT{Bz᪺nTO_ŦXһݡANn⭵TzLsqzXӡA`NOnЦpϥ MATLAB Ӷi歵TC

Hint
t@Ӽ񭵰TkAONTƥgJTɮס]Шỡ^AAιq{]pLnBWindow Media Player ^ӼAo`OhF@DA·СC

be@`Aڭ̤wgDpŪTɮסA@ MATLAB ŪJTơAñN]wu@ŶܼƫAڭ̴NiHϥ sound OӪܼơCҦpG

Example 1: 20-TŪgBsP/audioPlay01.mload handel.mat % Jxs handel.mat ܼ sound(y, Fs); % 񦹭T

bWҤAnT y M Wv Fs ƥxsb handel.mat ɮפA@JANiHϥ sound OӼC

Hint
WzdҩҼ񪺭֡AOw@mɨȡnHallelujahA㪩ХѦťGuhttps://www.youtube.com/watch?v=URxQby3HtWYvC

ڭ̤]iHPɼحTApUG

Example 2: 20-TŪgBsP/audioPlay02.m[y, fs]=audioread('welcome.wav'); % JT sound(5*y, fs); % 񭵰T load handel.mat % JT sound(y, Fs); % 񭵰T

oɭԧڪuw{vMwuQȡvN|QPɼXӡAoؼ覡٬DPB]asynchronous^A] MATLAB ä|ݼ񧹲~U@ӫOAӬONTeĥdAߧYDPBaU@ӫOC

Yn MATLAB b񭵰TɡALʧ@A쭵T񧹲A~|AiLOBAoؤ覡٬PB]synchronous^CĥΦ覡Aڭ̥ϥθ audioplayerBplay playblocking OCڭ̥ݬݤ@²檺@TdҡG

Example 3: 20-TŪgBsP/audioPlay03.mload handel.mat % JT p=audioplayer(y, Fs); % ͼ񪫥 play(p); % 񭵰T

bWzdҤAڭ̨ϥ audioplayer ͤ@ӭT񪫥 pAMAϥ play OӼoӪC

Yn`ǼӭTAHFPBAiUCdҡG

Example 4: 20-TŪgBsP/audioPlay04.m[y, fs]=audioread('welcome.wav'); % ŪJT p=audioplayer(y, fs); playblocking(p); % 񭵰T load handel.mat % JT p=audioplayer(y, Fs); playblocking(p); % 񭵰T

bWzdҤAڭ̨ϥΤF playblocking OӹFPB`Ǽ񪺮ĪGC

U@ӽdҡAA|ť@ӦPBnAMAPťӫDPBnG

Example 5: 20-TŪgBsP/playSync01.m[y, fs]=audioread('welcome.wav'); p=audioplayer(y, fs); playblocking(p); % PB 1.0 tתT sound(y, 0.8*fs); % DPB 0.8 tתT sound(y, 0.6*fs); % DPB 0.6 tתT

ڭ̦bĤ@`LAnqOni_TӨMwA]ڭ̥iǥѾ_TjpӧܭqAҦpG

Example 6: 20-TŪgBsP/playVolume01.m[y, fs]=audioread('welcome.wav'); p=audioplayer(1*y, fs); playblocking(p); % 1 _TT p=audioplayer(3*y, fs); playblocking(p); % 3 _TT p=audioplayer(5*y, fs); playblocking(p); % 5 _TT

bWҤAڭ̳vW[_TA]XӪqN|VӶVjCnSO`NOGaudioplayer ] y ȬO V1 M 1 AWLoӽd򪺼ƭȡAWL|QIAAoɭԴN|X{u}v{HAŪ̥iHup=audioplayer(5*y, fs); playblocking(p);vӸոլݡC

Hint
bW@ӽdҤAMڭ̧_T[j5AOզť쪺qAèSPı[j5Ao]FHչ󭵶qPıäOMiTAӬOMTƦC

pGbɡAܨWvAN|ܾӭTɶסAiӼvT쭵CbUҤAڭ̺ɪWvAť쪺nN|VӶV֡BVӶVA̫X{nnG

Example 7: 20-TŪgBsP/playFs01.m[y, fs]=audioread('welcome.wav'); p=audioplayer(y, fs); p.SampleRate=1.0*fs; playblocking(p); % 1.0 tתT p.SampleRate=1.2*fs; playblocking(p); % 1.2 tתT p.SampleRate=1.5*fs; playblocking(p); % 1.5 tתT p.SampleRate=2.0*fs; playblocking(p); % 2.0 tתT

ϤApGCWvAť쪺nN|VӶVCBVӶVCA̫X{snG

Example 8: 20-TŪgBsP/playFs02.m[y, fs]=audioread('welcome.wav'); p=audioplayer(y, fs); p.SampleRate=1.0*fs; playblocking(p); % 1.0 tתT p.SampleRate=0.9*fs; playblocking(p); % 0.9 tתT p.SampleRate=0.8*fs; playblocking(p); % 0.8 tתT p.SampleRate=0.6*fs; playblocking(p); % 0.6 tתT

Hint
Ynվ㭵AάOվ㭵ANnyiζiBzAѩgTAbLC

pGڭ̱NniTWUAˡAť쪺n򥻤WO@˪AOpGeAˡAť쪺nNpPau˩vnAť_ӫܹOYإ~yAиոդUCdҡG

Example 9: 20-TŪgBsP/playReverse01.m[y, fs]=audioread('welcome.wav'); p=audioplayer(y, fs); playblocking(p); % 񥿱`Ti p=audioplayer(-y, fs); playblocking(p); % WUA˪Ti p=audioplayer(flipud(y), fs); playblocking(p); % eA˪Ti

Hint
Aѡu˩vnoӥ`neܡHլݬݡu˩@vΡu˩GvI

bi歵TɡATܼ y ƫAiHOUCXءG doubleBsingleBint16Buint8CpGܼ y O double ƫAAȴN V1 M 1 A_hWLN|QIC]y ƫAq`O doubleAܩLAơAjOtXOBӥ͡AӸ`AiѦҥO audiorecorder СC^

t@OO soundscAOiwﭵTܼƪƭȥi楿Wơ] V1 M 1 ^AAezAHF̦nĪGCҦpG

Example 10: 20-TŪgBsP/soundsc01.m[y, fs]=audioread('welcome.wav'); p=audioplayer(y, fs); playblocking(p); soundsc(y, fs);

bWҤAڭ̷|ť쪩uw{vAѩĪGΡAҥHqpC soundsc AĤGӡuw{vnNjhFA]MhFC

Hint
bvܤ譱AROO imagescC


MATLAB{]pGJg