DSP-滤镜扫描效果 [英] DSP - Filter sweep effect

查看:120
本文介绍了DSP-滤镜扫描效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实现过滤器扫描效果(我不知道是否这样称呼)。我要做的基本上是创建一个低通滤波器,并使它在特定频率范围内移动。

I'm implementing a 'filter sweep' effect (I don't know if it's called like that). What I do is basically create a low-pass filter and make it 'move' along a certain frequency range.

要计算给定时刻的滤波器截止频率我使用了用户提供的线性函数,其值介于0到1之间。

To calculate the filter cut-off frequency at a given moment I use a user-provided linear function, which yields values between 0 and 1.

我的第一次尝试是将线性函数返回的值直接映射到的范围内。频率,如cf = freqRange * lf(x)。尽管它工作正常,但看起来它在扫过低频时运行得更快,然后在到达高频区的过程中放慢了速度。我不确定为什么会这样,但我想这与人的听觉以非线性方式感知频率变化有关。

My first attempt was to directly map the values returned by the linear function to the range of frequencies, as in cf = freqRange * lf(x). Although it worked ok it looked as if the sweep ran much faster when moving through low frequencies and then slowed down during its way to the high frequency zone. I'm not sure why is this but I guess it's something to do with human hearing perceiving changes in frequency in a non-linear manner.

我的下一个尝试是以对数方式移动滤波器的截止频率。现在它的效果要好得多,但是我仍然觉得滤波器在频率范围内并不会以恒定的感知速度运动。

My next attempt was to move the filter's cut-off frequency in a logarithmic way. It works much better now but I still feel that the filter doesn't move at a constant perceived speed through the range of frequencies.

我应该如何将频率空间划分为获得恒定的感知扫描速度?

How should I divide the frequency space to obtain a constant perceived sweep speed?

预先感谢。

推荐答案

您所指的扫频效果可能是哇哇滤波器,以无处不在的

The frequency sweep effect you're referring to is likely a wah-wah filter, named for the ubiquitous wah-wah pedal.

我们听到的频率是八度,用对数刻度扫过八度是线性化的方法。听起来并不无聊,但听起来您所做的事在物理和数学上都是正确的。 (您应该花费200至400 Hz之间的时间,而不是2000至4000 Hz之间的时间,等等。)您只是不喜欢它的声音。两种情况都还不错-音频是高度主观的。

We hear frequency in terms of octaves, and sweeping through octaves with a logarithmic scale is the way to linearize it. Not to sound dismissive, but it sounds like what you're doing is physically and mathematically correct. (You should spent as much time between 200 and 400 Hz as you do between 2000 and 4000 Hz, etc.) You just don't like how it sounds. And that's quite okay on both counts -- audio is highly subjective.

要弄混一些东西,一种选择是尝试 Bark缩放,它基于心理声学和耳朵的结构。据我了解,这样做是为了在您耳朵的每个内部带通滤波器中花费相同的时间。

To mix things up a bit, one option would be to try the Bark scale, which is based on psychoacoustics and the structure of the ear. As I understand it, this is designed to spend equal amounts of time in each of your ear's internal "bandpass filters".

您始终可以尝试在两个函数之间使用二次函数或三次函数0和1。音频电位计通常使用一些分段的二次方或三次方来获取其映射。

You could always try a quadratic or cubic function between 0 and 1. Audio potentiometers often use a few piecewise quadratic or cubic sections to get their mapping.

这篇关于DSP-滤镜扫描效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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