SlideShare a Scribd company logo
Task is to design a 10-band software
audio equalizer.
1/5/2017Audio Equalizer.............................................Hasham_Khan
 Open Matlab
 Using “ guide ” function create a new GUI
1/5/2017Audio Equalizer.............................................Hasham_Khan
 For 10 bands Audio Equalizer we need 10 sliders…
so select 10 sliders
1/5/2017Audio Equalizer.............................................Hasham_Khan
 After the completion of previous step your design will be like this ;
1/5/2017Audio Equalizer.............................................Hasham_Khan
 Define the values for each slider handles
• global stop C Fs;
• stop=1;
• Fs=44100;
• C=zeros(1,10);
Slider 1 values are as follow;
• set(handles.slider1,'min',-20);
• set(handles.slider1,'max',20);
• set(handles.slider1,'value',0);
• set(handles. slider1,'SliderStep',[0.025,0.05]);
• set(handles. slider1,'string',num2str(0));
Repeat the above steps for all 10 Sliders
1/5/2017Audio Equalizer.............................................Hasham_Khan
 Double click on each slider and click “ callback”
and “ CreateFtn ”…By clicking both you will see both functions
in your m file
1/5/2017Audio Equalizer.............................................Hasham_Khan
 To get the different values of slider add “get” function
• % Executes on slider movement.
• function slider1_Callback(hObject, eventdata, handles)
• global C;
• C(1)=get(hObject,'value');
• set(handles.slider1_val,'string',num2str(C(1)));
• % --- Executes during object creation, after setting all properties.
• function slider1_CreateFcn(hObject, eventdata, handles)
• if isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
• set(hObject,'BackgroundColor',[.9 .9 .9]);
• end
Repeat the above steps for all 10 sliders
1/5/2017Audio Equalizer.............................................Hasham_Khan
 To add “Load”, “ Reset ”, “ Play ” ,“ Stop ’’ buttons use the Push button
in the GUI
 Double click on Push button and change the string and tag as load , reset ,
play and stop.
1/5/2017Audio Equalizer.............................................Hasham_Khan
 Now after adding the button your design will be like this ;
1/5/2017Audio Equalizer.............................................Hasham_Khan
 Double click on each button and select callback function
For Reset button :
• set(handles.slider1_val,'string',num2str(0));
• set(handles.slider1_var,'value',0);
Repeat the above step for all 10 sliders
For Load button :
• % -Executes on button press in load.
• function load_Callback(hObject, eventdata, handles)
• global file_name;
• file_name=uigetfile('*wav','hasham .wav');
1/5/2017Audio Equalizer.............................................Hasham_Khan
For Stop and Play Button :
• % --- Executes on button press in play.
• function play_Callback(hObject,
eventdata, handles)
• global stop file_name C;
• stop=1;
• equalizer_play();
• function equalizer_play()
• global stop file_name C;
• [x,Fs]=wavread(file_name);
• [a,b]=coef();
• l_bucata=2*Fs;
• Nb=round(length(x)/l_bucata);
• y=0;
• for i=1:floor(Nb)
• bucata=x((i-1)*l_bucata+1:i*l_bucata);
• for k=1:5
• y=y+filter(10^(C(k)/20)*b{k},a{k},bucat
a);
• if(stop==0)
• break;
• end
• end
• wavplay(y,Fs,'async');
• y=0;
• if(stop==0)
• break;
• end
• end
• % --- Executes on button press in stop.
• function stop_Callback(hObject, eventdata,
handles)
• global stop;
• stop=0;
1/5/2017Audio Equalizer.............................................Hasham_Khan
 Add Edit Text to each slider and double click the edit text icon and select
“callback” and “CreateFtn” for each slider
1/5/2017Audio Equalizer.............................................Hasham_Khan
 After adding the edit text to each slider your design will be like this ;
1/5/2017Audio Equalizer.............................................Hasham_Khan
 To have the value of each slider add the below code to each slider;
 function slider1_val_Callback(hObject, eventdata, handles)
 global C;
 C(1)=str2num(get(hObject,'string'));
 minn=get(handles.C1_var,'min');maxx=get(handles.C1_var,'max');
 if(C(1)<minn || C(1)>maxx)
 C(1)=get(handles.C1_var,'value');set(hObject,'string',num2str(0));
 else set(handles.slider1_var,'value',C(1));
 end
 function slider1_val_CreateFcn(hObject, eventdata, handles)
 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
 set(hObject,'BackgroundColor','black');
 end
Repeat the above step for all 10 sliders
1/5/2017Audio Equalizer.............................................Hasham_Khan
 Add equalizer plot and filter function in the code. As the equalizer is of
10 band so we have to design 10 filters.
1/5/2017Audio Equalizer.............................................Hasham_Khan
 After adding the equalizer plot your design will be like this ;
1/5/2017Audio Equalizer.............................................Hasham_Khan
 So your design of 10 Band Audio Equalizer is ready now run the code
1/5/2017Audio Equalizer.............................................Hasham_Khan
Thank You
Prepared by
Hasham Khan
hkhan.msee16seecs@seecs.edu.pk
NUST School of Electrical Engineering and Computer Science(SEECS)
1/5/2017Audio Equalizer.............................................Hasham_Khan

More Related Content

What's hot

Stick Diagram
Stick DiagramStick Diagram
Stick Diagram
Kalyan Acharjya
 
ARM Processor Tutorial
ARM Processor Tutorial ARM Processor Tutorial
ARM Processor Tutorial
Embeddedcraft Craft
 
Analog to digital converters, adc
Analog to digital converters, adcAnalog to digital converters, adc
Analog to digital converters, adc
Saumya Ranjan Behura
 
Vlsi design and fabrication ppt
Vlsi design and fabrication  pptVlsi design and fabrication  ppt
Vlsi design and fabrication pptManjushree Mashal
 
Introduction to arm architecture
Introduction to arm architectureIntroduction to arm architecture
Introduction to arm architecture
Zakaria Gomaa
 
Delay Calculation in CMOS Chips Using Logical Effort by Prof. Akhil Masurkar
Delay Calculation in CMOS Chips Using Logical Effort by Prof. Akhil MasurkarDelay Calculation in CMOS Chips Using Logical Effort by Prof. Akhil Masurkar
Delay Calculation in CMOS Chips Using Logical Effort by Prof. Akhil MasurkarAkhil Masurkar
 
SRAM DRAM
SRAM DRAMSRAM DRAM
SRAM DRAM
Tipu Sultan
 
VLSI subsystem design processes and illustration
VLSI subsystem design processes and illustrationVLSI subsystem design processes and illustration
VLSI subsystem design processes and illustration
Vishal kakade
 
ASIC design Flow (Digital Design)
ASIC design Flow (Digital Design)ASIC design Flow (Digital Design)
ASIC design Flow (Digital Design)
Sudhanshu Janwadkar
 
microcontroller vs microprocessor
microcontroller vs microprocessormicrocontroller vs microprocessor
microcontroller vs microprocessor
sobhadevi
 
Embedded System Tools ppt
Embedded System Tools  pptEmbedded System Tools  ppt
Embedded System Tools pptHalai Hansika
 
Design of FIR filters
Design of FIR filtersDesign of FIR filters
Design of FIR filters
op205
 
SRAM Design
SRAM DesignSRAM Design
SRAM Design
Bharat Biyani
 
Matlab: Speech Signal Analysis
Matlab: Speech Signal AnalysisMatlab: Speech Signal Analysis
Matlab: Speech Signal Analysis
DataminingTools Inc
 
Orcad pspice intro and basics
Orcad pspice intro and basicsOrcad pspice intro and basics
Orcad pspice intro and basics
Praveen Kumar
 
Introduction to embedded systems
Introduction  to embedded systemsIntroduction  to embedded systems
Introduction to embedded systems
RAMPRAKASHT1
 
Interfacing of io device to 8085
Interfacing of io device to 8085Interfacing of io device to 8085
Interfacing of io device to 8085
Nitin Ahire
 
VHDL CODE
VHDL CODE VHDL CODE
VHDL CODE
Veer Singh shakya
 
Microprocessor Presentation
Microprocessor PresentationMicroprocessor Presentation
Microprocessor Presentation
alaminmasum1
 
AVR ATmega32
AVR ATmega32AVR ATmega32
AVR ATmega32
Prashant Tiwari
 

What's hot (20)

Stick Diagram
Stick DiagramStick Diagram
Stick Diagram
 
ARM Processor Tutorial
ARM Processor Tutorial ARM Processor Tutorial
ARM Processor Tutorial
 
Analog to digital converters, adc
Analog to digital converters, adcAnalog to digital converters, adc
Analog to digital converters, adc
 
Vlsi design and fabrication ppt
Vlsi design and fabrication  pptVlsi design and fabrication  ppt
Vlsi design and fabrication ppt
 
Introduction to arm architecture
Introduction to arm architectureIntroduction to arm architecture
Introduction to arm architecture
 
Delay Calculation in CMOS Chips Using Logical Effort by Prof. Akhil Masurkar
Delay Calculation in CMOS Chips Using Logical Effort by Prof. Akhil MasurkarDelay Calculation in CMOS Chips Using Logical Effort by Prof. Akhil Masurkar
Delay Calculation in CMOS Chips Using Logical Effort by Prof. Akhil Masurkar
 
SRAM DRAM
SRAM DRAMSRAM DRAM
SRAM DRAM
 
VLSI subsystem design processes and illustration
VLSI subsystem design processes and illustrationVLSI subsystem design processes and illustration
VLSI subsystem design processes and illustration
 
ASIC design Flow (Digital Design)
ASIC design Flow (Digital Design)ASIC design Flow (Digital Design)
ASIC design Flow (Digital Design)
 
microcontroller vs microprocessor
microcontroller vs microprocessormicrocontroller vs microprocessor
microcontroller vs microprocessor
 
Embedded System Tools ppt
Embedded System Tools  pptEmbedded System Tools  ppt
Embedded System Tools ppt
 
Design of FIR filters
Design of FIR filtersDesign of FIR filters
Design of FIR filters
 
SRAM Design
SRAM DesignSRAM Design
SRAM Design
 
Matlab: Speech Signal Analysis
Matlab: Speech Signal AnalysisMatlab: Speech Signal Analysis
Matlab: Speech Signal Analysis
 
Orcad pspice intro and basics
Orcad pspice intro and basicsOrcad pspice intro and basics
Orcad pspice intro and basics
 
Introduction to embedded systems
Introduction  to embedded systemsIntroduction  to embedded systems
Introduction to embedded systems
 
Interfacing of io device to 8085
Interfacing of io device to 8085Interfacing of io device to 8085
Interfacing of io device to 8085
 
VHDL CODE
VHDL CODE VHDL CODE
VHDL CODE
 
Microprocessor Presentation
Microprocessor PresentationMicroprocessor Presentation
Microprocessor Presentation
 
AVR ATmega32
AVR ATmega32AVR ATmega32
AVR ATmega32
 

Similar to Audio equalizer

Automated Testing with Ruby
Automated Testing with RubyAutomated Testing with Ruby
Automated Testing with Ruby
Keith Pitty
 
Readme cakewalk
Readme cakewalkReadme cakewalk
Readme cakewalk
Roszalina Ina
 
Game programming workshop
Game programming workshopGame programming workshop
Game programming workshopnarigadu
 
Cheap Online Zyprexa Fedex Cod
Cheap Online Zyprexa Fedex Cod Cheap Online Zyprexa Fedex Cod
Cheap Online Zyprexa Fedex Cod
TopMed
 
The Ring programming language version 1.10 book - Part 92 of 212
The Ring programming language version 1.10 book - Part 92 of 212The Ring programming language version 1.10 book - Part 92 of 212
The Ring programming language version 1.10 book - Part 92 of 212
Mahmoud Samir Fayed
 
Chapter03 Of It .... BBa 1st
Chapter03 Of It .... BBa 1st Chapter03 Of It .... BBa 1st
Chapter03 Of It .... BBa 1st
Geo-Info Ltd
 
Game salad creator for windows manual 2012 11-01
Game salad creator for windows manual 2012 11-01Game salad creator for windows manual 2012 11-01
Game salad creator for windows manual 2012 11-01gabikovacs10
 
PHP
PHPPHP
The Ring programming language version 1.5.4 book - Part 18 of 185
The Ring programming language version 1.5.4 book - Part 18 of 185The Ring programming language version 1.5.4 book - Part 18 of 185
The Ring programming language version 1.5.4 book - Part 18 of 185
Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 10 of 88
The Ring programming language version 1.3 book - Part 10 of 88The Ring programming language version 1.3 book - Part 10 of 88
The Ring programming language version 1.3 book - Part 10 of 88
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.1 book - Part 16 of 180
The Ring programming language version 1.5.1 book - Part 16 of 180The Ring programming language version 1.5.1 book - Part 16 of 180
The Ring programming language version 1.5.1 book - Part 16 of 180
Mahmoud Samir Fayed
 
Software and its types
Software and its typesSoftware and its types
Software and its types
Waheed Iqbal Boss
 
GRADE 7 LESSON 3-4 HARDWARE N SOFTWARE.ppt
GRADE 7 LESSON 3-4 HARDWARE N SOFTWARE.pptGRADE 7 LESSON 3-4 HARDWARE N SOFTWARE.ppt
GRADE 7 LESSON 3-4 HARDWARE N SOFTWARE.ppt
CherryLim21
 
IBM Ported Tools for z/OS: OpenSSH User's Guide
IBM Ported Tools for z/OS: OpenSSH User's GuideIBM Ported Tools for z/OS: OpenSSH User's Guide
IBM Ported Tools for z/OS: OpenSSH User's Guide
IBM India Smarter Computing
 

Similar to Audio equalizer (20)

Automated Testing with Ruby
Automated Testing with RubyAutomated Testing with Ruby
Automated Testing with Ruby
 
Readme cakewalk
Readme cakewalkReadme cakewalk
Readme cakewalk
 
Game programming workshop
Game programming workshopGame programming workshop
Game programming workshop
 
Readme
ReadmeReadme
Readme
 
Readme
ReadmeReadme
Readme
 
Cheap Online Zyprexa Fedex Cod
Cheap Online Zyprexa Fedex Cod Cheap Online Zyprexa Fedex Cod
Cheap Online Zyprexa Fedex Cod
 
The Ring programming language version 1.10 book - Part 92 of 212
The Ring programming language version 1.10 book - Part 92 of 212The Ring programming language version 1.10 book - Part 92 of 212
The Ring programming language version 1.10 book - Part 92 of 212
 
Chapter03 Of It .... BBa 1st
Chapter03 Of It .... BBa 1st Chapter03 Of It .... BBa 1st
Chapter03 Of It .... BBa 1st
 
Game salad creator for windows manual 2012 11-01
Game salad creator for windows manual 2012 11-01Game salad creator for windows manual 2012 11-01
Game salad creator for windows manual 2012 11-01
 
PHP
PHPPHP
PHP
 
How To Theme Fedora
How To Theme FedoraHow To Theme Fedora
How To Theme Fedora
 
The Ring programming language version 1.5.4 book - Part 18 of 185
The Ring programming language version 1.5.4 book - Part 18 of 185The Ring programming language version 1.5.4 book - Part 18 of 185
The Ring programming language version 1.5.4 book - Part 18 of 185
 
Readme
ReadmeReadme
Readme
 
Readme
ReadmeReadme
Readme
 
The Ring programming language version 1.3 book - Part 10 of 88
The Ring programming language version 1.3 book - Part 10 of 88The Ring programming language version 1.3 book - Part 10 of 88
The Ring programming language version 1.3 book - Part 10 of 88
 
The Ring programming language version 1.5.1 book - Part 16 of 180
The Ring programming language version 1.5.1 book - Part 16 of 180The Ring programming language version 1.5.1 book - Part 16 of 180
The Ring programming language version 1.5.1 book - Part 16 of 180
 
Software and its types
Software and its typesSoftware and its types
Software and its types
 
GRADE 7 LESSON 3-4 HARDWARE N SOFTWARE.ppt
GRADE 7 LESSON 3-4 HARDWARE N SOFTWARE.pptGRADE 7 LESSON 3-4 HARDWARE N SOFTWARE.ppt
GRADE 7 LESSON 3-4 HARDWARE N SOFTWARE.ppt
 
IBM Ported Tools for z/OS: OpenSSH User's Guide
IBM Ported Tools for z/OS: OpenSSH User's GuideIBM Ported Tools for z/OS: OpenSSH User's Guide
IBM Ported Tools for z/OS: OpenSSH User's Guide
 
Readme
ReadmeReadme
Readme
 

Recently uploaded

一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 

Recently uploaded (20)

一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 

Audio equalizer

  • 1.
  • 2. Task is to design a 10-band software audio equalizer. 1/5/2017Audio Equalizer.............................................Hasham_Khan
  • 3.  Open Matlab  Using “ guide ” function create a new GUI 1/5/2017Audio Equalizer.............................................Hasham_Khan
  • 4.  For 10 bands Audio Equalizer we need 10 sliders… so select 10 sliders 1/5/2017Audio Equalizer.............................................Hasham_Khan
  • 5.  After the completion of previous step your design will be like this ; 1/5/2017Audio Equalizer.............................................Hasham_Khan
  • 6.  Define the values for each slider handles • global stop C Fs; • stop=1; • Fs=44100; • C=zeros(1,10); Slider 1 values are as follow; • set(handles.slider1,'min',-20); • set(handles.slider1,'max',20); • set(handles.slider1,'value',0); • set(handles. slider1,'SliderStep',[0.025,0.05]); • set(handles. slider1,'string',num2str(0)); Repeat the above steps for all 10 Sliders 1/5/2017Audio Equalizer.............................................Hasham_Khan
  • 7.  Double click on each slider and click “ callback” and “ CreateFtn ”…By clicking both you will see both functions in your m file 1/5/2017Audio Equalizer.............................................Hasham_Khan
  • 8.  To get the different values of slider add “get” function • % Executes on slider movement. • function slider1_Callback(hObject, eventdata, handles) • global C; • C(1)=get(hObject,'value'); • set(handles.slider1_val,'string',num2str(C(1))); • % --- Executes during object creation, after setting all properties. • function slider1_CreateFcn(hObject, eventdata, handles) • if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) • set(hObject,'BackgroundColor',[.9 .9 .9]); • end Repeat the above steps for all 10 sliders 1/5/2017Audio Equalizer.............................................Hasham_Khan
  • 9.  To add “Load”, “ Reset ”, “ Play ” ,“ Stop ’’ buttons use the Push button in the GUI  Double click on Push button and change the string and tag as load , reset , play and stop. 1/5/2017Audio Equalizer.............................................Hasham_Khan
  • 10.  Now after adding the button your design will be like this ; 1/5/2017Audio Equalizer.............................................Hasham_Khan
  • 11.  Double click on each button and select callback function For Reset button : • set(handles.slider1_val,'string',num2str(0)); • set(handles.slider1_var,'value',0); Repeat the above step for all 10 sliders For Load button : • % -Executes on button press in load. • function load_Callback(hObject, eventdata, handles) • global file_name; • file_name=uigetfile('*wav','hasham .wav'); 1/5/2017Audio Equalizer.............................................Hasham_Khan
  • 12. For Stop and Play Button : • % --- Executes on button press in play. • function play_Callback(hObject, eventdata, handles) • global stop file_name C; • stop=1; • equalizer_play(); • function equalizer_play() • global stop file_name C; • [x,Fs]=wavread(file_name); • [a,b]=coef(); • l_bucata=2*Fs; • Nb=round(length(x)/l_bucata); • y=0; • for i=1:floor(Nb) • bucata=x((i-1)*l_bucata+1:i*l_bucata); • for k=1:5 • y=y+filter(10^(C(k)/20)*b{k},a{k},bucat a); • if(stop==0) • break; • end • end • wavplay(y,Fs,'async'); • y=0; • if(stop==0) • break; • end • end • % --- Executes on button press in stop. • function stop_Callback(hObject, eventdata, handles) • global stop; • stop=0; 1/5/2017Audio Equalizer.............................................Hasham_Khan
  • 13.  Add Edit Text to each slider and double click the edit text icon and select “callback” and “CreateFtn” for each slider 1/5/2017Audio Equalizer.............................................Hasham_Khan
  • 14.  After adding the edit text to each slider your design will be like this ; 1/5/2017Audio Equalizer.............................................Hasham_Khan
  • 15.  To have the value of each slider add the below code to each slider;  function slider1_val_Callback(hObject, eventdata, handles)  global C;  C(1)=str2num(get(hObject,'string'));  minn=get(handles.C1_var,'min');maxx=get(handles.C1_var,'max');  if(C(1)<minn || C(1)>maxx)  C(1)=get(handles.C1_var,'value');set(hObject,'string',num2str(0));  else set(handles.slider1_var,'value',C(1));  end  function slider1_val_CreateFcn(hObject, eventdata, handles)  if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))  set(hObject,'BackgroundColor','black');  end Repeat the above step for all 10 sliders 1/5/2017Audio Equalizer.............................................Hasham_Khan
  • 16.  Add equalizer plot and filter function in the code. As the equalizer is of 10 band so we have to design 10 filters. 1/5/2017Audio Equalizer.............................................Hasham_Khan
  • 17.  After adding the equalizer plot your design will be like this ; 1/5/2017Audio Equalizer.............................................Hasham_Khan
  • 18.  So your design of 10 Band Audio Equalizer is ready now run the code 1/5/2017Audio Equalizer.............................................Hasham_Khan
  • 19. Thank You Prepared by Hasham Khan hkhan.msee16seecs@seecs.edu.pk NUST School of Electrical Engineering and Computer Science(SEECS) 1/5/2017Audio Equalizer.............................................Hasham_Khan