我正在尝试分析音频文件的振幅数据,但是在应用滤波器之后,似乎无法找到一种获取此数据的方法。是否可以获取floatChannelData或将输出写入新文件进行分析?
player = AKPlayer(audioFile: file)
player.buffering = .always
player.preroll()
let filter = AKBandPassButterworthFilter(player, centerFrequency: 1000, bandwidth: 100)
AudioKit.output = filter
do {
try AudioKit.start()
} catch {
print("Failed to start AudioKit")
return nil
}
// This is the peak as though no filter was applied
print(player.buffer?.peak())
答案 0 :(得分:0)
是的,您可以选择将输出呈现到文件。您还可以点击过滤器节点以获取其数据以用于绘图中,或将内容保存到缓冲区中并保存AudioKit渲染外部的数据。