unnieversal/crates/pvoc-rs
annieversary 43a66b4769 [opiate, pvoc] implement changing phase and not frequency 2021-09-16 17:42:18 +02:00
..
src [opiate, pvoc] implement changing phase and not frequency 2021-09-16 17:42:18 +02:00
.gitignore restart history 2021-07-24 18:40:59 +02:00
Cargo.toml restart history 2021-07-24 18:40:59 +02:00
LICENSE restart history 2021-07-24 18:40:59 +02:00
README.md restart history 2021-07-24 18:40:59 +02:00

README.md

fork

this is a minor fork that adds a set_sample_rate method. i'm too lazy to open a pr and stuff

upstream at https://github.com/nwoeanhinnogaehr/pvoc-rs

pvoc-rs

A phase vocoder written in Rust.

Example usage

use pvoc::{PhaseVocoder, Bin};

let mut pvoc = PhaseVocoder::new(1, 44100.0, 256, 4);
pvoc.process(&input_samples,
             &mut output_samples,
             |channels: usize, bins: usize, input: &[Vec<Bin>], output: &mut [Vec<Bin>]| {
    for i in 0..channels {
        for j in 0..bins {
            output[i][j] = input[i][j]; // change this!
        }
    }
});

Check out pvoc-plugins for some LADSPA plugins that use this library.