【问题标题】:blending 2 phase vocoder frames together将 2 个相位声码器帧混合在一起
【发布时间】:2017-08-08 18:04:26
【问题描述】:

我正在尝试制作使用相位声码器冻结声音的效果。我通过存储光谱帧(幅度和相位)以及前一帧和当前帧之间的相位差来做到这一点。为了回放冻结的帧,我只需将频谱帧重复插入相位声码器的反函数,每次都用我的相位差值递增(并环绕)相位。

这是我目前正在做的一些伪代码(为简洁起见),其中 frameA 和 frameB 是相位声码器的 fft 表示的幅度/相位表示。

void analyze(inputSignal) {
    // convert time domain "inputSignal" to frequency domain
    frameA = vocoder.forward(inputSignal); 

    // calculate the inter-frame phase delta
    phaseDeltaA = frameA.phase - lastPhases;
    lastPhases = frameA.phase; 
}

void playback(outputSignal) {
    frameA.phase += phaseDeltaA;
    outputSignal = vocoder.reverse(frameA);
}

效果很好。但我想要做的是将这个冻结的光谱帧与其他“冻结”帧结合起来(累积它们)。

我尝试过将帧加在一起,也尝试过将相位差加在一起,但这只会产生讨厌的噪音。

void analyze(inputSignal) {

    ...

    // naively sum the magnitudes and phases of both frames
    combinedFrame.magnitude = frameA.magnitude + frameB.magnitude;
    combinedFrame.phase = frameA.phase + frameB.phase;

    // sum the phase deltas
    combinedPhaseDelta = phaseDeltaA + phaseDeltaB;

}
void playback(outputSignal) {
    combinedFrame.phase += combinedPhaseDelta;
    outputSignal = vocoder.reverse(combinedFrame);
}

【问题讨论】:

    标签: audio signal-processing fft aubio


    【解决方案1】:

    将 delta 相位加在一起会改变频率,从而破坏使合成听起来“好”所需的任何谐波关系。

    另一种可能的解决方案是不组合帧,而是组合完整的合成音轨。例如确保每个相位声码器合成的音轨本身听起来不错,然后使用混音器合成结果。

    【讨论】:

    • 我同意将声音移回时域后将它们相加是可行的(我实际上有这个工作,以便听到它应该听起来像什么),但我想在频域,所以我不必做比我需要的更多的IFFT。我认为因为 FFT 是线性的,您应该能够以某种方式添加这两个信号。就是想不通。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-22
    • 1970-01-01
    • 2013-11-20
    相关资源
    最近更新 更多