freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

matlab程式設(shè)計入門篇音訊讀寫、錄制與播放(audio-文庫吧

2025-09-08 15:26 本頁面


【正文】 les: 317953 Duration: Title: 39。02_至少還有你 39。 Comment: [] Artist: 39。林憶蓮 39。 BitRate: 128 MATLAB 程式設(shè)計入門篇:音訊讀寫、錄製與播放 Scaling of Audio Signals by “audioread” ? Internal data types of audio signals in a file (音訊檔案內(nèi)部儲存方式 ) ? 8 bits ? uint8, [0, 281] ? 16 bits ? int16, [215, 2151] ? MATLAB?s method to scale raw audio signals to the range [1, 1] ? 8 bits ? (y128)/128 ? 16 bits ? y/32768 ? Verification of MATLABs? scaling ? ? difference = 0 fileName=39。39。 [y, fs]=audioread(fileName)。 info=audioinfo(fileName)。 nbits=。 % y0 是原先儲存在音訊檔案中的值 y0=y*(2^nbits/2)+(2^nbits/2)。 difference=sum(abs(y0round(y0))) Original audio signals in integer MATLAB 程式設(shè)計入門篇:音訊讀寫、錄製與播放 讀取雙聲道檔案 ? audioread 可以讀取雙聲道或立體聲( Stereo)的音檔,此時傳回的變數(shù)具有兩直行,每一直行代表一個聲道的音訊。 ? fileName=39。39。 [y, fs]=audioread(fileName)。 % 讀取音訊檔 sound(y, fs)。 % 播放音訊 left=y(:,1)。 % 左聲道音訊 right=y(:,2)。 % 右聲道音訊 subplot(2,1,1), plot((1:length(left))/fs, left)。 subplot(2,1,2), plot((1:length(right))/fs, right)。 0 0 . 5 1 1 . 5 2 2 . 5 3 3 . 5 41 0 . 500 . 510 0 . 5 1 1 . 5 2 2 . 5 3 3 . 5 41 0 . 500 . 51聲音會在左右喇叭游移! MATLAB 程式設(shè)計入門篇:音訊讀寫、錄製與播放 Read Stereo Audio Files ? “audioread” can also read stereo audio files. The returned variable has two columns representing two channels of audio signals. ? fileName=39。39。 [y, fs]=audioread(fileName)。 % Read sound(y, fs)。 % Playback left=y(:,1)。 % Left channel right=y(:,2)。 % Right channel subplot(2,1,1), plot((1:length(left))/fs, left)。 subplot(2,1,2), plot((1:length(right))/fs, right)。 0 0 . 5 1 1 . 5 2 2 . 5 3 3 . 5 41 0 . 500 . 510 0 . 5 1 1 . 5 2 2 . 5 3 3 . 5 41 0 . 500 . 51Moving sound source between two speakers! MATLAB 程式設(shè)計入門篇:音訊讀寫、錄製與播放 讀取部分音檔 ? 如果音檔很大,無法一次讀入記憶體,我們也可以使用 audioread 來讀出音檔的一部份,例如: ? [y,fs]=audioread(39。39。, [4001 5000])。 % 讀取第 4001至 5000點 figure。 plot(y) 0 100 200 300 400 500 600 700 800 900 1000 0 . 1 5 0 . 1 0 . 0 500 . 0 50 . 10 . 1 50 . 20 . 2 5可看到明顯的基本週期! MATLAB 程式設(shè)計入門篇:音訊讀寫、錄製與播放 Read a Portion Only ? If the audio file is too big, we can read a portion from the whole file: ? [y,fs]=audioread(??, [4001 5000])。 % Read data points 4001 to 5000 figure。 plot(y) 0 100 200 300 400 500 600 700 800 900 1000 0 . 1 5 0 . 1 0 . 0 500 . 0 50 . 10 . 1 50 . 20 . 2 5Obvious fundamental periods! MATLAB 程式設(shè)計入門篇:音訊讀寫、錄製與播放 聲音訊號的播放 ? 一旦我們可以讀入音訊檔案,就可以對聲音訊號進行各種處理,例如增大或減小音量、提高或降低音高、消除雜訊等。 ? 要確認(rèn)處理後的聲音訊號是否符合所需,就要能夠把音訊直接透過接到電腦的喇叭播放出來,本節(jié)就是要介紹如何使用 MATLAB 來進行音訊的播放。 MATLAB 程式設(shè)計入門篇:音訊讀寫、錄製與播放 Playback of Audio Signals ? Once we have read audio signals, we can perform all kinds of processing, such as volume modification, pitch scaling, noise reduction, etc. ? To verify the result, you need to play the audio via speakers, as shown in the following examples. MATLAB 程式設(shè)計入門篇:音訊讀寫、錄製與播放 播放聲音 (1/2) ? 一旦 MATLAB 讀入音訊資料,並將之設(shè)定成工作空間中的變數(shù)後,我們就可以使用 sound 指令來直接播放此變數(shù)。 ? 播放單一聲音 ? ? 同時播放兩種聲音 ? load % 載入音訊 sound(y, Fs)。 % 播放音訊 [y, fs]=audioread(39。39。)。 % 載入音訊 sound(5*y, fs)。 % 播放音訊 load % 載入音訊 sound(y, Fs)。 % 播放音訊 sound的播放模式為「非同步播放」! MATLAB 程式設(shè)計入門篇:音訊讀寫、錄製與播放 Playback (1/2) ? We can use “sound” to play audio signals that has been read and stored as a variable in MATLAB?s workspace. ? Audio playback ? ? Simultaneous playback ? load % Load audio sound(y, Fs)。 % Playback [y, fs]=audioread(39。39。)。 % Read audio sound(5*y, fs)。 % Playback load % Load audio sound(y, Fs)。 % Playback Playback mode of “sound” is asynchronous! MATLAB 程式設(shè)計入門篇:音訊讀寫、錄製與播放 播放聲音 (2/2) ? 若要控制聲音的播放模式,則必須採用功
點擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1