找回密码
 注册帐号

扫一扫,访问微社区

audiohighpassfilter.cutofffrequency 截止频率

2015-1-3 04:47| 发布者: 杨炎| 查看: 1945| 评论: 0|原作者: 蛮牛|来自: unity3d脚本manual

摘要: audiolowpassfilter.cutofffrequency 截止频率varcutofffrequency: floatdescription描述lowpass cutoff frequency in hz. 10.0 to 22000.0. default = 5000.0.低通截止频率在10.0~22000.0hz。默认=5000.0。截止频 ...

audiolowpassfilter.cutofffrequency 截止频率

varcutofffrequency: float

description描述

lowpass cutoff frequency in hz. 10.0 to 22000.0. default = 5000.0.

低通截止频率在10.0~22000.0hz。默认=5000.0。

截止频率(cutofffrequency),在滤波器中,以cutofffrequency决定要去掉哪个频率范围的声音。

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

void update() {

getcomponent().cutofffrequency =mathf.sin(time.time) * 11010 + 11000;

}

}

// moves the cuttoutfrequency from 10 to 22000 following a sinus function

// attach this to an audio source with a lowpassfilter to listen it working.

//跟随sinus函尸移动截止频率从10~22000,附加到一个带有lowpassfilter 的音频

@scriptrequirecomponent(audiosource)

@scriptrequirecomponent(audiolowpassfilter)

function update() {

getcomponent(audiolowpassfilter).cutofffrequency = (mathf.sin(time.time)*11010 + 11000);

}

相关阅读

文章点评
相关文章