<< Chapter < Page | Chapter >> Page > |
Start MATLAB 7.3.0 R2006b
In the top left hand corner of the MATLAB screen, select File ->Open.
The following screen will appear.
Highlight “C6713_Audio_Template” then click on “Open”.
The “C6713_Audio_Template” is now displayed.
You are now going to implement the Echo Subsystem shown below.
Double click on the “Effect 1” subsystem block. An empty model will appear.
You will now drag-and-drop some library components onto the model.
Select View ->Library Browser. Expand the “Simulink” section.
A list of available blocks will appear. We are initially interested in the “Commonly Used Blocks”.
From “Commonly Used Blocks”, drag-and-drop a ”Gain” block, a “Sum” block and two “Data Type Conversion” blocks onto the model.
From the Simulink Library Browser, select “Discrete”. Highlight “Integer Delay” and drag-and-drop this block onto the model.
The delay time will be 0.5 seconds. Using a sampling rate of 8000 Hz, this requires 8000 x 0.5 = 4000 samples. In the equation given in the lecture, this would make N = 4000.
Double click on the “Integer Delay” block. Change the “Number of delays” field to 4000, then click on “OK”.
We want to set the gain to 0.9. If you multiply an integer value by 0.9, then the value 0.9 will be rounded-down to zero. Instead, you need to convert the integer value to a floating-point value such as “single”, and then convert it back later. Click on “OK”.
We required that 0.9 of the delayed input is added to the normal input. Therefore, set the “Gain” to 0.9 then click on “OK”.
Double click on the second “Data Type Conversion” block. Set the “Output data type mode” to int16. This is compatible with the DAC on the C6713 DSK.
Join the blocks as shown and add a title.
From the Toolbar, select the “Up Arrow” icon. This returns you to the next higher level.
The next subsystem to be implemented will be Reverberation.
We are now going to implement the Reverberation System shown below.
Note that the reverberation subsystem is very similar to that of echo. We will cut-and-paste from the Echo Subsystem
From the “C6713 Audio Template” top level, double-click on the “Effect 2” subsystem.
Notification Switch
Would you like to follow the 'From matlab and simulink to real-time with ti dsp's' conversation and receive update notifications?