【问题标题】:Routing multiple effects in the Webaudio API在 Webaudio API 中路由多个效果
【发布时间】:2016-01-11 00:57:28
【问题描述】:
this.source.connect(this.filter); // Filter set to eq value 200
this.source.connect(this.convolver);
this.source.connect(this.dry);
this.convolver.connect(this.wet); // Convolver is the actual convolver
this.filter.connect( context.destination );     
this.dry.connect(context.destination); // Dry is a gain (at 1)
this.wet.connect(context.destination); // Wet is a gain (at 1)

当我想添加过滤器时,事情变得完全混乱。您可以假设过滤器和所有内容都设置正确。单独测试它们工作正常。然而,就目前而言,除了过滤器之外,一切正常。同样,单独的过滤器工作正常,但我无法弄清楚如何正确路由它。

我确实看过这里:http://www.w3.org/TR/webaudio/#ModularRouting 虽然这个例子对于像我这样的初学者来说有点太复杂了。

我究竟如何将过滤器路由到其余部分,当想要为音频文件的相同干湿部分添加更多效果时,我必须考虑什么?

奖励:一个漂亮的“中间”图表会很棒:)。

【问题讨论】:

    标签: javascript web-audio-api


    【解决方案1】:

    一般来说,大多数“效果”风格的路由需要串联,而不是并联。你让它路由的方式,最后过滤的信号被添加到未过滤的信号中(通过卷积器的湿路由和干路由路由)。它仍然会产生一些影响,但这可能不是您想要的;你可能想要这个:

    this.source.connect(this.filter); // Filter set to eq value 200
    this.filter.connect(this.convolver);
    this.filter.connect(this.dry);
    this.convolver.connect(this.wet); // Convolver is the actual convolver
    this.dry.connect(context.destination); // Dry is a gain (at 1)
    this.wet.connect(context.destination); // Wet is a gain (at 1)
    

    现在,湿/干增益将在卷积和非卷积信号之间取得平衡,但两者都将被过滤。

    【讨论】:

    • 哦,我明白了!我以为我可以并行执行此操作。到目前为止,您的所有答案都是完美的,因为您的解释总是如此详细。我很高兴有人知道这个话题。很难获得关于 tge webaudio api 等新技术的建议,所以我会在 2 天内再次给你一个赏金:)
    • 我现在设法路由了许多效果,例如延迟和压缩器。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-01-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-15
    相关资源
    最近更新 更多