This example shows how to use the Single-Band Parametric EQ block and the
multibandParametricEQ System object™ to implement a parametric audio equalizer model, that can run on your host computer or an Apple iOS device.
Parametric equalizers are used to adjust the frequency response of audio systems. For example, a parametric equalizer can compensate for biases introduced by specific speakers. Equalization is a primary tool in audio recording technologies.
In this example, you design a parametric audio equalizer in a Simulink® model. You can run your model on the host computer or an iOS device. The equalization algorithm is a cascade of three filters with tunable center frequencies, bandwidths, and gains. You can visualize the frequency response in real time while adjusting the parameters.
To run this example on iOS devices you need the following hardware:
iPhone, iPod or an iPad
Host computer with Mac OS X system
USB cable to connect the iOS device to host computer
The audioequalizeriOS model provides a choice of device (host computer or iOS device), and audio source (MATLAB workspace or microphone). You can choose the configuration by clicking the
Configuration UI button.
When you choose to run the model on the host computer, a UI designed to interact with the simulation is provided and can be opened by clicking
Host Tuning UI.
Host Tuning UI:
The UI allows you to tune the parameters of three filters individually, and view the frequency response in real time. You can also check the
Bypass check box to compare the modified sound with the original sound.
View Frequency Response button to visualize the filters frequency response.
To run the model on your Apple iOS device, you need to first ensure that you have installed
Simulink Support Package for Apple iOS Devices and that your iOS device is provisioned.
Once your iOS device is properly configured, use a USB cable to connect the device to your host computer.
You can choose to make an iOS standalone equalizer app by clicking the
Deploy to hardware button on the Simulink Editor toolbar. After deployment, the app can run on your iOS device even when it is disconnected from the host computer. The parameter tuning UI displays on your iOS device screen, as shown below:
You can also run the model in
External mode by clicking the
Run button on the Simulink Editor toolbar. To run in
External mode, the iOS device must stay connected to the host computer. This mode enables you to view the frequency response on the host computer while adjusting parameters on your iOS device. Frequency response will display on the host screen as follows: