tramhao / termusic

Music Player TUI written in Rust
GNU General Public License v3.0
1.05k stars 44 forks source link

Help needed with soundtouch tempo_strech #254

Closed tramhao closed 6 months ago

tramhao commented 6 months ago

Currently for backend gstreamer and mpv, the speed change preserve pitch, and I'm trying to do the same for rusty backend. I found soundtouch-rs lib and use it to do tempo strech. However, the input and output of this lib is f32, and I failed to convert it from and to Sample. 37cd6e9243a6441ff10ec7fa5e758aefb00f7ba0 in dev branch This can compile, but I cannot chain it to source. Stuck here for 2 days...

tramhao commented 6 months ago

I'm modifying another simpler module from Sonic.

tramhao commented 6 months ago

soundtouch for rusty backend speed change works now in master commit e60822. And the result is quite good to me. The best part is, as soundtouch is a dependency of gst-plugins-bad, it's already installed for gstreamer backend. The pitch is good.