AudioKit: Noise gate

人走茶凉 提交于 2019-12-11 03:09:40

问题


I'm trying to implement a simple noise gate if the amplitude is beyond a certain threshold using AudioKit.

I believe this should be simple and I just need to use the AKAmplitudeTracker and set the output to zero, but I can't work out how to do the latter part.

Source for AKAmplitudeTracker


回答1:


If I understand your question, you don't know how to set the output to zero. I'll go ahead and write the most obvious answer first, send the output through a booster,

...tracker stuff...
let booster = AKBooster(tracker, gain: 0)
AudioKit.output = booster

and then wherever you poll the tracker, set

if tracker.amplitude > threshold {
   booster.gain = 1
}

Mind you, this will be very primitive and you'll have a better noise gate doing things at the DSP level, but this may be good enough for a proof of concept or test.



来源:https://stackoverflow.com/questions/47601246/audiokit-noise-gate

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!