下采样和应用低通滤波器的数字音频 [英] Downsampling and applying a lowpass filter to digital audio

查看:315
本文介绍了下采样和应用低通滤波器的数字音频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得从psented为16位PCM样品阵列的CD,再$ P $一个44kHz的音频流。我想剪下来到11KHZ流。我怎么做?许多年前,我的工科类的日子里,我知道流将不能够描述在5500Hz准确的东西了,所以我想我希望削减上述的一切说出来了。有任何想法吗?谢谢你。

I've got a 44Khz audio stream from a CD, represented as an array of 16 bit PCM samples. I'd like to cut it down to an 11KHz stream. How do I do that? From my days of engineering class many years ago, I know that the stream won't be able to describe anything over 5500Hz accurately anymore, so I assume I want to cut everything above that out too. Any ideas? Thanks.

更新:有在一些code用一个简单的算法和系数数组,看起来像这样页面,从48KHz的转换至8KHz的{1,4,12,12,4,1}。我认为这是我需要什么,但我需要它的4倍,而不是6倍的一个因素。任何想法,这些常数是如何计算的?另外,我最终转换16字节样本反正花车,所以我可以做花车,而不是短裤下采样,如果这有助于质量可言。

Update: There is some code on this page that converts from 48KHz to 8KHz using a simple algorithm and a coefficient array that looks like { 1, 4, 12, 12, 4, 1 }. I think that is what I need, but I need it for a factor of 4x rather than 6x. Any idea how those constants are calculated? Also, I end up converting the 16 byte samples to floats anyway, so I can do the downsampling with floats rather than shorts, if that helps the quality at all.

推荐答案

阅读FIR和IIR滤波器。这些是使用一个系数r阵列的过滤器。

Read on FIR and IIR filters. These are the filters that use a coefficent array.

如果你做FIR或IIR滤波器设计师谷歌搜索,你会发现很多的软件和做了艰苦的工作(获取系数)为您在线小程序。

If you do a google search on "FIR or IIR filter designer" you will find lots of software and online-applets that does the hard job (getting the coefficients) for you.

编辑:

下面这个页面(<一个href=\"http://www-users.cs.york.ac.uk/~fisher/mkfilter/\">http://www-users.cs.york.ac.uk/~fisher/mkfilter/ )让您输入滤波器的参数,并会吐出准备使用C-code ...

This page here ( http://www-users.cs.york.ac.uk/~fisher/mkfilter/ ) lets you enter the parameters of your filter and will spit out ready to use C-Code...

这篇关于下采样和应用低通滤波器的数字音频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆