声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 740|回复: 2

[综合讨论] 关于AUDIO GAIN COMPRESSOR 的实验

[复制链接]
发表于 2008-1-10 09:29 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
我现在需要做一个关于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 编辑 ]
回复
分享到:

使用道具 举报

发表于 2008-1-10 09:39 | 显示全部楼层
原帖由 kinvis 于 2008-1-10 09:29 发表
我现在需要做一个关于AUDIO GAIN COMPRESSOR的实验报告,可是我对MATLAB的使用又不是很熟悉,希望各位大哥大姐能帮帮我,万分感谢。以下是实验要求:

In this laboratory project you are asked to write a real- ...

没有人有空到帮别人完成他的实验
 楼主| 发表于 2008-1-10 09:57 | 显示全部楼层
有人做过相似的实验么?
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-12-5 04:03 , Processed in 0.066444 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表