Sei sulla pagina 1di 19

JUKEBOX

Using N-band equaliser

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING


SUBMITTED BY:HIMANSHU CHAUHAN (09102306) ABHINEET KUMAR (09102279)

SUBMITTED TO:Dr.VIKRAM KARWAL

CERTIFICATE
This is to certify that the work titled JUKEBOX using N-BAND EQUALISER submitted by HIMANSHU CHAUHAN AND ABHINEET KUMAR in minor project of degree of Bachelor of Technology of Jaypee Institute of Information under Technology, Noida has been carried out

my supervision. This work has not been submitted partially or wholly to any other

University or Institute for the award of this or any other degree or diploma. Signature of Supervisor. \

Name of Supervisor: Dr. VIKARAM KARWAL

Designation: ASSOCIATE PROFFESSOR

Department of Electronics and Communications Engineering Jaypee Institute of Information Technology, Noida

ACKNOWLEDGEMENT
First and foremost, we would like to thank God for blessing us with the strength, intelligence, and patience to complete this project. We would like to express my sincere thanks to Dr. Vikram Karwal who have been helping us by giving their valuable suggestions and guiding us right way throughout the project.

We am extremely thankful to the Dean, Prof. Krishna Gopal and the HOD of Electronics and Communication Engineering Department, Prof. R. C. Jain for providing the infrastructural facilities to work in, without which this work would have not been possible.

Name of Student:Himanshu Chauhan Abhineet Kumar

Signatures of students:.

Date: ..

INTRODUCTION
JUKEBOX is a term typically used to describe computer software for playing back multimedia files. While many media players can play both audio and video, others focus only on one media type or the other. Such players are known as either audio players or video players and often have a user interface tailored for the specific media type. Media players often display icons known from physical devices such as tape recorders and CD players. Examples of these icons are (stop). (play), (pause), and

An electronic device made of filters and amplifiers, used to alterthe relative strengths of different frequencies in an electronicsignal. Equalizers are used primarily in audio equipment, allowing fine tuning of the signal to compensate for distortions such asweak response or oversensitivity at various freque ncies. Agraphic equalizer uses a set of controls that determine thelevel of boost or su ppression of individual frequencies. Thecontrols are usually sliding faders, set up in a row from lowestfrequency to highest frequency, so that the final settingsresemble a graph of the frequency response of the equalizer. A band equalizer is a tool which is designed to change the output of sound by making adjustments within various bands set by the operator of the equalizer. Equalizers are used during recording to get sound of a clear, crisp quality and they are also utilized during production to further clean up recordings and get the best possible sound. In live performance, a band equalizer can be part of the sound system which is used to control quality. With a band equalizer, the goal is not to make sweeping changes to all of the sound, but to make changes within specific bands on the audio spectrum with the use of a band pass filter. This allows people to filter out very specific types of sounds without involving the signal as a whole. For example, a sound engineer working on recording a performing orchestra could use a band equalizer to isolate the sounds of different instruments, filter out sounds like feedback, shuffling feet, and other unwanted noises, and return a clear audio signal.

TOOL USED:- MATLAB R2008a


MATLAB (matrix laboratory) is a numerical computing environment and fourth-generation programming language. Developed by MathWorks, MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, Java, and Fortran. Although MATLAB is intended primarily for numerical computing, an optional toolbox uses the MuPAD symbolic engine, allowing access to symbolic computing capabilities. An additional package, Simulink, adds graphical multi-domain simulation and Model-Based Design for dynamic and embedded systems. In 2004, MATLAB had around one million users across industry and academia. MATLAB users come from various backgrounds of engineering, science, and economics. MATLAB is widely used in academic and research institutions as well as industrial enterprises.

GUI IN MATLAB:A GUI (graphical user interface) allows users to perform tasks interactively through controls such as buttons and sliders. Within MATLAB, GUI tools enable you to perform tasks such as creating and customizing plots (plottools), fitting curves and surfaces (cftool), and analyzing and filtering signals (sptool). You can also create custom GUIs for others to use either by running them in MATLAB or as standalone applications. GUIDE (GUI development environment) provides tools for designing and programming GUIs. Using the GUIDE Layout Editor, you can graphically design your GUI. GUIDE then automatically generates the MATLAB code that defines all component properties and establishes a framework for GUI callbacks (routines that execute when a user interacts with a GUI component).

FILTERS USED FOR IMPLEMENTING EQUALIZER:-

1.High shelving filter:- A high shelf filter will cut or boost signals of
frequencies ABOVE fc. Below the cutoff frequency, the input signal is unaffected. This operates opposite to a low shelf filter. Below is the response output of a high shelf filter used in cutting signals above fc

INPUT

OUTPUT

A common implementation of high shelf filter reduction is similar to a low pass filter such as noise filtering. Unlike a low pass filter which is designed only for attenuation or cutting signals. A high shelf filter can also be used to boost signals above the cut off frequency

EQUATIONS:-

A = 10[(G /20)]1/2 c = 2 f f S = sin( c) C = cos (c) . =S/(2.Q) . = A^1/2/Q

b0 = A{(A+1)+[(A1)C]+ ( S )} b1 = 2 A{(A1)+[(A+1)C]} b2 = A{(A+1)+[(A1)C] ( S )} a0 ={(A+1)[(A1)C]+ ( S )} a1= 2{(A1)[(A+1)C]} a2 ={(A+1)[(A 1)C] ( S )}

2.LOW SHELVING FILTER:- A low shelf filter will cut or boost signals of
frequencies BELOW fc or cutoff frequency. Above fc, the frequency response will not be altered and will pass normally. Below is the screenshot of a low shelf filter used in cutting signals of frequencies below the cutoff fc

Low shelf filter is commonly used during guitar EQ mixing and mixing vocals. The purpose is to cut the lower bass frequencies of each instruments so that it wont conflict with the bass guitar and kick drum frequencies. However, common misconception is using only the low shelf filter for cutting signals below the cut off frequency. This is not true in all cases. Sometimes, you will use a low shelf filter to boost the frequencies below the cutoff

INPUT

OUTPUT

b0 = A{(A+1)-[(A1)C]+ ( S )} b1 = 2 A{(A1)-[(A+1)C]} b2 = A{(A+1)-[(A1)C] ( S )} a0 ={(A+1)+[(A1)C]+ ( S )} a1= 2{(A1)+[(A+1)C]} a2 ={(A+1)+[(A 1)C] ( S )}

3.PEAK FILTERS:-In this filter the centre frequency is

boosted only resulting in the change of gain of that particular frequency.

b0 =1+( A) b1 = 2C b2 = 1( A) a0= 1+( A) a1 = 2C a2 = 1( A)

FUNCTIONS USED:-

1.Get:- get(h,'PropertyName') returns the value of the property


'PropertyName' of the graphics object identified by h. a = get(h,'DefaultObjectTypePropertyName')

2.Set:- set(H,'PropertyName',PropertyValue,...) sets the named


properties to the specified values on the object(s) identified by H. H can be a vector of handles, in which case set sets the properties' values for all the objects. a=set(H,'PropertyName',PropertyValue,...)

3.Uicontrol:- Uicontrol creates a uicontrol graphics objects (user


interface controls), which you use to implement graphical user interfaces. handle = uicontrol('PropertyName',PropertyValue,...) creates a uicontrol and assigns the specified properties and values to it. It assigns the default values to any properties you do not specify. The default uicontrol style is a pushbutton. The default parent is the current figure. See the Uicontrol Properties reference page for more information. handle = uicontrol(parent,'PropertyName',PropertyValue,...) creates a uicontrol in the object specified by the handle, parent. If you also specify a different value for the Parent property, the value of the Parent property takes precedence. parent can be the handle of a figure, uipanel, or uibuttongroup. handle = uicontrol('PropertyName',PropertyValue,...)
uicontrol('Style', 'slider',... 'Min',g1,'Max',g2,'Value',0,... 'units',pu,....

'Position', [x y 1.5*sz szy],... 'Callback', 'recalculate_filter;');

4.Uigetfile:- uigetfile displays a modal dialog box that lists files in the
current directory and enables the user to select or type the name of a file to be opened. If the filename is valid and if the file exists, uigetfile returns the filename when the user clicks Open. Otherwise uigetfile displays an appropriate error message from which control returns to the dialog box. The user can then enter another filename or click Cancel. If the user clicks Cancel or closes the dialog window, uigetfile returns 0. [FileName,PathName,FilterIndex] = uigetfile(FilterSpec) displays only those files with extensions that match FilterSpec. The uigetfile function appends 'All Files' to the list of file types.FilterSpec can be a string or a cell array of strings, and can include the * wildcard. [FileName,PathName,FilterIndex]=uigetfile({'*.mp3; *.wav;*.wma;*.avi;*.mpg','mediafiles(*.mp3,*.wav,* .wma,*.avi,*.mpg)';'*.*', 'All Files (*.*)'},'File Selector') ;

5.mmfileinfo:- info = mmfileinfo(filename) returns a structure, info,


with fields containing information about the contents of the multimedia file identified by filename. The filename input is a string enclosed in single quotes.

ainfo=mmfileinfo(fln);

6. wavread:- y = wavread(filename) loads a WAVE file specified by the


string filename, returning the sampled data in y. If filename does not include an extension, wavreadappends .wav. [y, Fs] = wavread(filename) returns the sample rate (Fs) in Hertz used to encode the data in the file.

[s Fs]=wavread(fln);

7. analogoutput:- AO = analogoutput('adaptor') creates the analog


output object AO for a sound card having an ID of 0 (adaptor must be winsound). This is the only case where ID is not required
Arguments

'adaptor' The hardware driver adaptor name. The supported adaptors are advantech, mcc, nidaq, and winsound. ID AO The hardware device identifier. ID is optional if the device object is associated with a sound card having an ID of 0. The analog output object.

8.addchannel:- Add hardware channels to analog input or output


object chans = addchannel(obj,hwch) adds the hardware channels specified by hwch to the device object obj. The MATLAB indices associated with the added channels are assigned automatically. chans is a column vector of channels ch = addchannel(ao,1:2);

9.filter:- y = filter(b,a,X) filters the data in vector X with the filter


described by numerator coefficient vector b and denominator coefficient vector a. If a(1) is not equal to 1, filter normalizes the filter coefficients by a(1). If a(1) equals 0, filter returns an error.

filter(hd1,d1(:,1))

10.putdata:- Queue analog output data in engine for eventual output


putdata(obj,data) queues the data specified by data in the engine for eventual output to the analog output subsystem. data must consist of a column of data for each channel contained by obj. That is, data must be an m-by-n matrix, where m rows correspond to the number of samples and n columns correspond to the number of channels in obj . Data can consist of doubles or native data types but cannot contain NaNs. Data must contain a column of data for each channel contained in obj. If data contains any data points that are not within the UnitsRange of the channel it pertains to, the data points will be clipped to the bounds of the UnitsRange property. data can be a tscollection object or timeseries object. If data is a tscollection object, there must be one timeseries per channel in obj. If data is atimeseries object, there must be only one channel in obj. If the tscollection or timeseries object contains gaps, or is sampled at a different rate than theSampleRate of obj, the data will be resampled at the rate of obj using a zero order hold.
Syntax

putdata(obj,data)
Arguments

obj data

An analog output object. The data to be queued in the engine.

putdata(ao,d1);

11.dfilt.df1sos:- Discrete-time, second-order section, direct-form I


filter Hd = dfilt.df1sos(s) returns a discrete-time, second-order section, directform I filter, Hd, with coefficients given in the s matrix. The filter states for this object are stored in a filtstates object.

hd1=dfilt.df1sos(ss);

12. freqz:- Frequency response of filter.


freqz returns the frequency response based on the current filter coefficients. This section describes common freqz operation with adaptive filters, discrete-time filters, multirate filters, and filter System objects. [h,w] = freqz(hfilt) returns the frequency response h and the corresponding frequencies w at which the filter response of hfilt is computed. The frequency response is evaluated at 8192 points equally spaced around the upper half of the unit circle. [h,w] = freqz(hd1);

13. stop:- Stop device object.


stop(obj) terminates the execution of the device object obj.
Syntax

stop(obj)
Arguments

Obj = A device object or an array of device objects.

Stop(ao)

14. exist:- Check existence of variable, function, folder, or class


Syntax
exist name

IMPLEMENTATION:-

1.Equaliser 2.audio read 3.open device a) Add to buffer b) Display time script 4.recalculate filter i) High shelving filter ii) Low shelving filter iii) Peak shelving filter

GUI beforehand:-

GUI after code run:-

BIBliography Web refrences: www.google.com www.wikipedia.com www.youtube.com www.nptl.com http://www.audiorecording.me/what-is-a-low-shelfand-high-shelf-filter-in-parametric-equalization.html https://ccrma.stanford.edu/~jos/filters/Low_High_Shel ving_Filters.html http://www.ovnilab.com/articles/eqtypes.shtml

Potrebbero piacerti anche