Audio Project

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Project Report

On
Audio Equalizer Using FIR Filter
Submitted By:
Chetanya Katara (20215072)
Deepshikha Dharkrey (20215015)
Daksh Agrawal (20215070)
Deepanshu Rajput (20215042)
ECE-A(II)
B.Tech (VI SEM)
DIGITAL SIGNAL PROCESSING (LAB) (EC-1651)

Session-2024
Under the guidance of:
Dr. Dharmendra Dixit
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
MOTILAL NEHRU NATIONAL INSTITUTE OF TECHNOLOGY, ALLAHABAD
PRAYAGRAJ-211004, INDIA
Project Statement
Make a software audio equalizer with the following frequency bands

[0 – 200 Hz], [200 Hz – 400 Hz], [400 Hz – 800 Hz], [800 Hz – 1.5 kHz], [1.5 kHz – 3 kHz],
[3 kHz –5kHz], [5 kHz – 7 kHz], [7 kHz – 10 kHz], [10 kHz – 15 kHz], [15 kHz – 20 kHz]

MATLAB FUNCTIONS USED:


1.INBUILT FUNCTIONS:
• set , get , pushbutton_callback , uigetfile , strcat , guidata , fir1 , filter ,
play_equalizer , player , audioread , audioplayer , subplot , plot .

2.CREATED FUNCTIONS:
• stop, play , pause , resume , pop , reggae , rock , techno , classical ,
party, browse .

Motivation Behind the Project


Creating this Project on Audio Equalizer is a fantastic endeavour that allows you to dive
into the fascinating world of Sound Processing and Digital Signal Processing.
1. Understanding the Magic of Sound: With an Audio equalizer project, we get a
hands-on experience in understanding how sound frequencies work and how they
can be manipulated to enhance the audio quality.

2. Skill Development: Building an audio equalizer requires knowledge in areas such


as Digital Signal Processing, Electronics, MATLAB. By working on this project, we
sharpen your skills in these domains and gain valuable experience that can be
applied to future projects.

3. Enhanced Listening Experience: By fine-tuning the audio frequencies, we can


improve the clarity, depth, and overall quality of the sound we're listening to.
Whether it's music, movies, or podcasts, your audio equalizer can make every
listening session more enjoyable and immersive whether what frequencies is perfect
to tune ON.
Learnings from the Project
1. Fundamentals Of Sound Processing: Learnt how sound can be represented in
digital form, including concepts like sampling rate, bit depth, and digital encoding
of audio.

2. Software Development Skill: Translating mathematical DSP concepts into effective


software algorithms. Designing a user-friendly interface that allows users to interact
with the equalizer effectively, learning about the principles of GUI design.

3. Real-Time Audio Processing: Understand the challenges and techniques involved


in processing audio in real-time, including handling latency and optimizing
performance to prevent audio glitches.

4. Team Collaboration and Project Management: Experience in working as a part of


a team, managing tasks, integrating components developed by different team
members, and using version control systems. Skills in diagnosing and solving
software bugs and logical errors in DSP implementation.

THEORY :
1. AUDIO EQUALIZATION

It is a process to deliberately alter the tonal quality of audio passing through it. It does this

by using a number of filter circuits, which are capable of applying gain to audio signals

within specific frequency ranges — both positive gain, referred to a 'boost', and negative

gain, referred to as 'cut'.

There are two different types of equalizers:


a. Graphic Equalizers
In the graphic equalizer, the input signal is sent to a bank of filters. Each filter passes

the portion of the signal present in its own frequency range or band. The amplitude

passed by each filter is adjusted using a slide control to boost or cut frequency

components passed by that filter.

Figure 1:- Graphic Equalizer

b. Parametric Equalizer
Parametric equalizers are multi-band variable equalizers which allow users to

control the three primary parameters: amplitude, center frequency and bandwidth.

The amplitude of each band can be controlled, and the center frequency can be

shifted, and bandwidth ("Q") can be widened or narrowed.

Figure 2:- Parametric Equalizer


2. SOFTWARE DESIGN METHODOLOGY

1. Graphic Interface of Audio Equalizer

Firstly, a graphical overview of the required equalizer is designed with appropriate buttons,
sliders and axes placements.

Figure 3 GUI Design

1. Push buttons:-

 Browse the ‘.*wav’ files from computer to read and equalized.


 After selecting the file, process button plots the frequency response of the audio file.
 Play sound button for playing audio selected.
 Gains can be set to zero by pressing Reset Gains button.

2. Panel:-

Process, Play Sound and Reset Gains options are grouped into an ‘Option’ panel for
user accessibility.

3. Sliders

10 different sliders with required cutoff frequencies are placed which can be changed by
user in real time.
4. Static Text

Few static texts are introduces such as ‘Select, Frequencies, -20dB and 20dB’. These texts
can’t be edited in run-time.

5. Edit Texts

When users vary the gain of the sliders, the gain values appear in the edit text gadget
below each slider. Also, when user select the audio file from computer it’s path also appear
in an edit text box.

6. Tools
Following tools are added in tool bar:

Save figure, Legend, Print, Color Bar, Data cursor

Figure 4 Toolbars in Software


2. Run GUI interface

Now when all the desired buttons are set, click play or Run Fig to see layout.

Figure 5 Basic GUI

3. M-file editing

Now click on open editor to see m-file related to the project. Audio_equalizer_sidra.m
contains a variety of functions related to sliders, push button, edit text buttons etc
Functions which are edited are shown below:

1) Browsing function

Figure 6 Browsing
% --- Executes on button press in Browse.

function pushbutton1_Callback(hObject,eventdata,handles)

% hObject handle to pushbutton1 (see GCBO)

% eventdata reserved - to be defined in a future version


of MATLAB

% handles structure with handles and user data(GUIDATA)

% Open a file selection dialog for WAV files

[filename,pathname]=uigetfile({'*.wav'},'FileSelector');

% Concatenate the file path and name

handles.fullpathname = strcat(pathname, filename);

% Display the full file path in a text box

set(handles.textt,'String',handles.fullpathname);

% Update handles structure

guidata(hObject, handles);

end

2) Processing Function
This function reads and plots the sound wave as shown below:

% --- Executes on button press in Process.


function process(handles)
% Load the selected WAV file
[audioData,sampleRate]=audioread(handles.fullpathname);
% Apply some processing to the audio data (replace this
with your actual processing steps)
processedData=myProcessingFunction(audioData,sampleRate;
% Display the processed data or its properties (replace
this with your actual display code)
plot(processedData);
% Example: plotting the processed data
% Update the GUI elements if necessary (replace this
with your actual GUI update code)
set(handles.resultText, 'String', 'Processing
complete');
% Example: updating a text box
end
Figure 7:- Processing

3) Scrolling sliders and Object Creation

This function scrolling of slides of the sound wave and create objects as
shown below:-
% --- Executes on slider movement and object creation.
function slider15_Callback(hObject, eventdata, handles)
% hObject handle to slider15 (see GCBO)
% eventdata reserved - to be defined in a future version
of MATLAB
% handles structure with handles and user data (see
GUIDATA)

% Hints: get(hObject,'Value') returns position of slider


% get(hObject,'Min') and get(hObject,'Max') to determine range of slider

function slider15_CreateFcn(hObject, eventdata, handles)

% hObject handle to slider15 (see GCBO)


% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: slider controls usually have a light gray background.


if isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor',[.9 .9 .9]);
end
5) Play Sound
This button reads the file from the path given in the browse window.

% --- Executes on button press in Play Sound.

function pushbutton13_Callback(hObject, eventdata, handles)


global s fs;

6.) Play Sound On Particular frequency


This helps to play the sound on particular frequency band(Ex-ROCK):

% --- Executes on button press in Rock.


function slider15_Callback(hObject, eventdata, handles)
g1 = 4.5;
g2 = -3.6;
g3 = -6.6;
g4 = -2.7;
g5 = 2.1;
g6 = 6;
g7 = 7.5;
g8= 7.8;
g9 =7.8;
g10 = 8.1;
set(handles.slider3,'value',g1);
set(handles.slider4,'value',g2);
set(handles.slider5,'value',g3);
set(handles.slider7,'value',g4);
set(handles.slider8,'value',g5);
set(handles.slider9,'value',g6);
set(handles.slider10,'value',g7);
set(handles.slider11,'value',g8);
set(handles.slider6,'value',g9);
set(handles.slider12,'value',g10);

set(handles.text16, 'String',g1);
set(handles.text19, 'String',g2);
set(handles.text20, 'String',g3);
set(handles.text21, 'String',g4);
set(handles.text22, 'String',g5);
set(handles.text23, 'String',g6);
set(handles.text24, 'String',g7);
set(handles.text25, 'String',g8);
set(handles.text26, 'String',g9);
set(handles.text27, 'String',g10);
OUTCOME OF THE PROJECT:
Here are some common outcomes of the project:
1) Graphical User Interface (GUI): A user-friendly interface that allows users
to interact with the equalizer. This GUI might include sliders, knobs, or other
controls for adjusting the audio frequency bands.

2) Real-time Audio Processing: The ability to process audio in real-time,


allowing users to hear the effects of their adjustments immediately.

3) Spectral Analysis: Some equalizers may include a visual representation of


the audio spectrum, showing the intensity of different frequency bands in
real-time.

4) Performance Optimization: Optimization for efficient audio processing,


minimizing latency and system resource usage to ensure smooth
performance even on lower-powered devices.

PRACTICAL APPLICATION:
The practical applications of an audio equalizer project are diverse and can
span across various industries, enhancing user experiences.

1) MUSIC PRODUCTION: Equalizers are essential in studio settings to adjust


frequencies and balance the sound of recordings, making instruments and vocals
blend harmoniously.

2) BROADCASTING: Equalizers are used to modify voice clarity and overall sound
quality, ensuring that broadcasts are clear and pleasant to listen to.

3) MULTIMEDIA PRODUCTION: Audio engineers use equalizers in post-production


to adjust sounds to match the desired atmosphere of scenes or to create realistic and
immersive environments in video games.
4) SMART HOME DEVICES: Integration of equalizers in smart speakers can enhance
user interaction by optimizing sound output based on room acoustics and user
preferences.

5) PROFESSIONAL AUDIO TOOLS: The project could lead to the development of


plugins for professional audio software, expanding the toolsets available to audio
engineers and enthusiasts.

You might also like