audio effects for ios devices -凯发k8网页登录
this example shows how to use system objects™ from audio toolbox™ to implement echo and reverberation effects in a simulink® model. you can run the model on your host computer or deploy it to an apple ios device.
introduction
echo and reverberation are two commonly-used audio effects in recording, movie making, and sound design. echo is a reflection of sound that arrives at the listener with a delay after the direct sound. echo can be produced by the bottom of a well or by the walls of a building. reverberation is a large number of sound reflections building up and then decaying. a common use of reverberation is to simulate music played in a closed room. most digital audio workstations (daws) have options to add echo and reverberation effects to sound tracks.
in this example, you design and implement echo and reverberation audio effects in a simulink model. you can run your model on the host computer or an apple ios device.
required hardware
to run this example on ios devices you will need the following hardware:
iphone, ipod or an ipad
host computer with mac os x system
usb cable to connect the device to host computer
model setup
the audioeffectsios
model provides a choice of audio effect (echo or reverberation), device (host computer or ios device), and audio source (matlab workspace or microphone). you can choose the configuration by clicking the configuration ui
button.
configuration ui:
audio effect: echo
the echo effect has four tunable parameters that can be modified while the model is running:
delay - delay applied to audio signal, in seconds
gain - linear gain of the delayed audio
feedbacklevel - feedback gain applied to delay line
wet/dry mix - ratio of wet signal added to dry signal
run echo effect on the host computer
if you choose to run the echo effect on your host computer, a ui designed to interact with the simulation is provided and can be opened by clicking host tuning ui
. the ui allows you to tune echo parameters and hear the echo sound effect in real time.
host tuning ui for echo effect:
run echo effect on an apple ios device
when you choose to run the echo effect 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 echo effect 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. 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.
the ui for the echo effect displays on your ios device screen, as shown below:
audio effect: reverberation
the reverberation effect has six tunable parameters that can be modified while the model is running:
pre-delay - time between hearing direct sound and the first early reflection
highcut frequency - cutoff frequency for the lowpass filter at the front of the reverberator structure
diffusion - density of reverb tail
decay factor - decay factor of reverb tail
high frequency damping - attenuation of high frequencies in the reverberation output
wet/dry mix - ratio of wet signal added to dry signal
run reverberation effect on the host computer
if you choose to run the reverberation effect on your host computer, a ui designed to interact with the simulation is provided and can be opened by clicking host tuning ui
. the ui allows you to tune reverberation parameters and hear the reverberation sound effect in real time.
host tuning ui for reverberation effect:
run reverberation effect on an apple ios device
when you choose to run the reverberation effect 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 reverberation effect 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. 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.
the ui for the reverberation effect displays on your ios device screen, as shown below: