tesselode / kira

Library for expressive game audio.
https://crates.io/crates/kira
Apache License 2.0
836 stars 42 forks source link

Feature Request: PlaybackRate while having the pitch not modify voice. #73

Open yygrechka opened 5 months ago

yygrechka commented 5 months ago

I don't know if kira has this capability, but when I call set_playback_rate on my sound, I can speed up the sound, but the pitch change makes it sound strange. I want to be able to play the sound at 2x speed without changing the way the voice sounds (like speeding up youtube videos).

I'm an audio noob, so I can't express what I want in precise terminology, but I hope its clear what I'm after.

SolarLiner commented 1 month ago

A solution for this is #90, though phase vocoders are the most basic time stretching algorithm and do not sound particularly great. It would be nice to not have to reinvent the wheel, and use some established library to do this, however none of them are written in Rust and so we'd need to add FFI, which I don't think is right for Kira.

It is however perfectly reasonable to provide a third-party crate that integrates one into Kira, as the architecture allows it pretty easily. Never mind this can't be an effect since we're talking about changing the playback rate of a sound here.