kinvis 发表于 2008-1-10 09:29

关于AUDIO GAIN COMPRESSOR 的实验

我现在需要做一个关于AUDIO GAIN COMPRESSOR的实验报告,可是我对MATLAB的使用又不是很熟悉,希望各位大哥大姐能帮帮我,万分感谢。以下是实验要求:

In this laboratory project you are asked to write a real-time C program for theTMS320VC5510 that samples audio data of
48000 samples/second.
Your program must break the speech up into 30 ms frames.
This is to be done by storing the speech samples in a 0.030 s * 48000 samples/second = 1440 element buffer.

Each time the array “wraps around to the top location” corresponds to a new 30 ms frame.
During each sample period, you should update a sum variable in your interrupt routine.
The absolute value of the new sample should be added to the sum.
Then, when the buffer wraps (the buffer array index variable is set back to zero), the sum of the last 1440 absolute values can be divided by 1440 to determine the average audio magnitude value (AVG_MAG_OF_FRAME) for the 30 ms frame.
The oldest value in the buffer, which corresponds to the oldest value in the previously recorded frame, may then be multiplied by the scaling constant (DESIRED_AV_MAG) / (AVG_MAG_OF_FRAME), and sent out to the D/A converter.
This should happen with each interrupt, so that after 240 more interrupts, the entire "amplitude scaled" frame will be sent to the D/A converter.
Note that each frame will be scaled (each of the 240 samples in the frame will be multiplied by the scaling constant) to have the same average magnitude value, "DESIRED_AV_MAG".
Also, note that the output of this digital gain compression system will lag the present input by 30 ms, which is a barely perceptible delay.

If the AVG_MAG_OF_FRAME falls below a "zero threshold" value (ZERO_THRESHOLD), which you will have to experimentally determine, set the entire 240-sample frame to zero, as you send it out to the D/A converter.

You will need to experiment with appropriate DESIRED_AVG_MAG and ZERO_THRESHOLD values.
You will also have to decide whether to implement this routine in floating point or fixed point (fixed point may be more challenging, but it can be implemented more cheaply.)


You should test your program with both a microphone and a 400-Hz sine-wave generator, whose gain is varied.
You should be able to demonstrate nearly constant output (no more than 1 dB variation) while the output is varied over a least a 10:1 (20 dB) amplitude range.

[ 本帖最后由 eight 于 2008-1-10 09:38 编辑 ]

eight 发表于 2008-1-10 09:39

原帖由 kinvis 于 2008-1-10 09:29 发表 http://www.chinavib.com/forum/images/common/back.gif
我现在需要做一个关于AUDIO GAIN COMPRESSOR的实验报告,可是我对MATLAB的使用又不是很熟悉,希望各位大哥大姐能帮帮我,万分感谢。以下是实验要求:

In this laboratory project you are asked to write a real- ...
没有人有空到帮别人完成他的实验

kinvis 发表于 2008-1-10 09:57

有人做过相似的实验么?
页: [1]
查看完整版本: 关于AUDIO GAIN COMPRESSOR 的实验