资源简介
本文的设计均衡器以MATLAB为开发平台,利用MATLAB的GUI功能,能实现对音乐的读取,播放,音量调节,分段频率调节,以及波形显示等功能,对数字信号处理有极好的演示。
代码片段和文件信息
function varargout = Equalizer(varargin)
% Equalizer M-file for Equalizer.fig
% Equalizer by itself creates a new Equalizer or raises the existing
% singleton*.
%
% H = Equalizer returns the handle to a new Equalizer or the handle to
% the existing singleton*.
%
% Equalizer(‘CALLBACK‘hobjecteventDatahandles...) calls the local
% function named CALLBACK in Equalizer.M with the given input arguments.
%
% Equalizer(‘Property‘‘Value‘...) creates a new Equalizer or raises the
% existing singleton*. Starting from the left property value pairs are
% applied to the GUI before Equalizer_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to Equalizer_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE‘s Tools menu. Choose “GUI allows only one
% instance to run (singleton)“.
%
% See also: GUIDE GUIDATA GUIHANDLES
% Edit the above text to modify the response to help Equalizer
% Last Modified by GUIDE v2.5 09-Jan-2014 08:38:37
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name‘ mfilename ...
‘gui_Singleton‘ gui_Singleton ...
‘gui_OpeningFcn‘ @Equalizer_OpeningFcn ...
‘gui_OutputFcn‘ @Equalizer_OutputFcn ...
‘gui_LayoutFcn‘ [] ...
‘gui_Callback‘ []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State varargin{:});
else
gui_mainfcn(gui_State varargin{:});
end
function varargout = Equalizer_OutputFcn(hobject eventdata handles)
% varargout cell array for returning output args (see VARARGOUT);
% hobject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
function button_Open_Callback(hobject eventdata handles)
stop(handles.timer1);
global n i stp x y fs C w fpath i N step w1 w2 w3 w4 w5 a b;
n=1;i=1;
[filename pathname] = uigetfile({‘*.wav‘ ‘All Image Files (*.wav)‘;‘*.*‘‘All Files (*.*)‘}‘Pick a wave‘);
if isequal(filename0)||isequal(pathname0)
return;
end
fpath=[pathname filename];
[yFs]=wavread(fpath);
Max=length(y);
if Fs==44100
y=y(1:4:Max);
end
w1=filter(10^(C(1)/20)*b{1}a{1}y);
w2=filter(10^(C(2)/20)*b{2}a{2}y);
w3=filter(10^(C(3)/20)*b{3}a{3}y);
w4=filter(10^(C(4)/20)*b{4}a{4}y);
w5=filter(10^(C(5)/20)*b{5}a{5}y);
w=w1+w2+w3+w4+w5;
x=audioplayer(yfs);
stp=0;
setappdata(handles.figure_Equalizer‘Max‘Max);
setappdata(handles.figure_Equalizer‘fpath‘fpath);
set(handles.schedule_Sld‘max‘100);
str=ConvTime(fix(x.TotalSamples/fs));
set(handles.time_End‘string‘str);
step=fix(x.TotalSamples/fs/4);
Info= strcat(‘正在
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 15844 2014-01-09 21:39 Equalizer.fig
文件 27064 2014-01-09 21:39 Equalizer.m
相关资源
- 线结构光中心提取算法matlab
- 基线解算的matlab源码
- 基于相位相关的图像平移检测算法m
- 指静脉处理代码
- SIMPLE算法Matlab代码
- 《无人驾驶车辆模型预测控制》书中
- 基于SIFT特征的图像配准MATLAB代码
- 多目标遗传算法matlab程序
- 布谷鸟算法的matlab代码
- MATLAB+背景减除目标检测+鱼头截取
- matlab实现文件读写波形处理,小波变
- RBF神经网络的训练 MATLAB源程序代码
- SMO_matlabfunction.rar
- agent蜂拥的实现matlab
- 如何自定义一个神经网络
- 万有引力搜索算法(Matlab)
- 标准差分进化算法多目标线性规划的
- matlab完整GUI 源程序免费
- matlab神经网络资料
- matlab,深度图转换三维点云,depthma
- matlab生成ply程序
- 测井曲线的MATLAB绘制
- 最大后验实现图像盲复原
- 小波变换 matlab程序
- SVM用于故障诊断的实现
- 基于遗传算法的投影寻踪模型Matlab源
- labview matlab 小波去噪
- 自适应控制算法-matlab编程实现
- 油位计仪表盘识别matlab代码实现
- 罚函数matlab实现
评论
共有 条评论