我正在使用 Tone JS 发出声音,我想向我的 Sampler 乐器添加一个过滤器,我从文档中了解到,我可以通过使用采样器上的方法并将过滤器作为参数传递来实现connect:
const filter = new Filter(20000, "highpass").toDestination();
this.sampler = new Sampler({
urls: { C1: 'C1.wav' },
baseUrl: "/static/samples/piano/",
})
.connect(filter)
.toDestination();
当声音播放时,上面没有应用过滤效果,我不确定为什么?
萧十郎
相关分类