Sei sulla pagina 1di 5

DSPProject

SorinGeorgescu1232E

DSP PROJECT

DSPProject

SorinGeorgescu1232E 1. INTRODUCTION This MATLAB script can be used to edit a loaded or recorded mono audio data. The processed data can be saved as wav or mat. 2 MAIN MENU 2.1 MENU "FILE" 2.1.1 "LOAD FILE" load the audio data to memory "Load WAV file" load the audio data from a *.wav file ! if the wav file contains a stereo data, it will be automatically converted to a mono one. "Load MAT file" load the audio file from a *.mat file (the audio data should be stored in variable y and the sampled frequency in variable Fs) "Load data from MATLAB workspace" load the data opened manually before in the Matlab workspace (the audio data should be stored in a global variable y and the sampled frequency in global variable Fs) "Record from MIC" record a sequence from MIC source. the program ask you to enter the length of the sequence (in seconds) and the sampling rate

2.1.2 "SAVE FILE" save processed data. if no filter or effect was applied, the processed data is identically with the original one "Save as MAT" save processed data as a *.mat file. (the audio data will be stored in variable y & the sampling frequency in variable Fs) "Save as WAV" save processed data as a *.wav file. the audio data is saved as a 16bits one by default

DSPProject

SorinGeorgescu1232E 2.2 MENU "COMMANDS" 2.2.1 "Play" "play the original signal" you can listen the original signal if no file is loaded, you will receive an error message "play the processed signal" you can listen the processed signal if no file is loaded, you will receive an error message 2.2.2 "Show amplitude/time" "original signal" display the normalized amplitude vs. time of the original signal if no file is loaded, you will receive an error message "processed signal" display the normalized amplitude vs. time of the processed signal if no file is loaded, you will receive an error message 2.2.3 "Filter the signal" filter the processed signal using the filter designed before. Because is filtered the processed signal (when a signal is loaded is identically with the original one), we can more filters or effects on the same signal. if no filter is designed or no file is loaded, you will receive an error message 2.2.4 "FFT" "show original signal fft" shows the frequency components of the original signal using the Fourier transforms if no file is loaded, you will receive an error message

"show processed signal fft" shows the frequency components of the processed signal using the Fourier transforms if no file is loaded, you will receive an error message

DSPProject

SorinGeorgescu1232E 2.2.5 "Spectrogram" shows how the spectral density of the signal varies with the time the vertical axis represents the frequency & the horizontal represents the time "show original signal spectrogram" shows the spectrogram of the original signal if no file is loaded, you will receive an error message "show processed signal spectrogram" shows the spectrogram of the original signal if no file is loaded, you will receive an error message 2.2.6 "Effects" you can apply a series of effects on the processed signal "fade in" audio effect that gives the impression of a steadily increasing volume you can set the effect duration, the start time is the beginning of the audio signal. "fade out" audio effect that gives the impression of a steadily decreasing volume you can set the effect duration, the end time is the end of the audio signal. "normalization" audio effect that uniformly maximize the audio amplitude so that the maximum level of the signal reach 0db "Amplify and hard limiting 0 dB" you can amplify the signal with any amplitude (in dB) and limits the signal to 0dB. If the amplification higher that the recommended level, can occurs distortions of the signal "Change sample rate" resample the signal to a new sample rate. "Remove from the beginning" cut a portion of a given length (in seconds) from the beginning of the signal "Remove DC component" remove the DC component ( mean[signal] ) from the audio data. is very useful on recorded data.

DSPProject

SorinGeorgescu1232E 2.3 MENU "FILTER" 2.2.1 "Design filter" Here you can design your desired filter using the available options & input windows. Every item has a description, you just have to place the mouse icon over it for more than 1 second. After pressing the "Design the filter" button, it will start the filter coefficients computation, in the end a new window will be opened & the magnitude response of the filter will be displayed. You can use "Analysis" menu to change the displayed figure: o o o o o o Magnitude Response Phase Response Pole/Zero Plot Filter Coefficients Step Response Impulse Response

For some filters: o o o o o IIR butter IIR cheby1 IIR elliptical FIR1 window kaiser FIR Parks-McClellan

the program computes the minimum filter order so that the filter can meet the given parameters (such as f1 f2 tb rp rs). For these filters if you leave the "Order" input blank or with a non valid input, the program will auto- fill it with the minimum order. After the filter is designed, you can use it to process the audio signal. ! When an audio signal is loaded, it will automatically change the filter Fs to match the audio one

Potrebbero piacerti anche