manucontrovento / SpinTool

Loop application synced with jack transport
GNU General Public License v3.0
13 stars 2 forks source link

Feature Request: Timestretching and pitch shifting #2

Open spectromas opened 4 years ago

spectromas commented 4 years ago

I've been having a lot of fun playing with this but very quickly I started to wish that it had some kind of time stretching capability so you can throw any samples in without worrying if it will fit.

Additionally, or perhaps very much related, it would be great to be able to pitch samples up and down, ideally with and without keeping the original sample speed.

manucontrovento commented 4 years ago

Hi @spectromas glad you're having fun! yeah. time stretching would be a worthy feature, and big challenge to me, and it's already on my to-do list, in future... I can't tell when I'll face it.. You have to know that it's my first time developing on Linux, on Python, and dealing with audio-stuff too... In these days I have more time because of this covid-19 thing... that's why I started developing on super Boucle right now :) However, I already have a new release planned for next weeks where I'm introducing other features. Then I'll face all the other issues. Maybe, including this one Thanks, bye

manucontrovento commented 4 years ago

Sorry. I closed the issue, just re opened

spectromas commented 4 years ago

Sure, no worries, I can see that it's a big step and I'm sure would involve a lot of work. I know from people making similar additions to Renoise with tools that there are libraries around that can do it, at least on a basic level (sox comes to mind), but I have no idea about how it would fit with your code and python. It's all good though, this is very useful as it is.

sonejostudios commented 4 years ago

This is of course a nice-to-have but also really difficult and time-consuming to implement if you want to do it properly. If not, it could add a lot of drawbacks to the software, especially if you want to do it in realtime. It will also add o lot of resource consumption, which will also add latency. I hat a lot off issues with Luppp because of this and that was the reason I switched to SuperBoucle (IMHO because SB doesn't have Timestreching, it is stable enough for the stage). My workflow is like this: I prepare all my loops with Ardour (also timestreching, pitchshifting and so on), them when everything is great I export them and Import them all to SB.

manucontrovento commented 4 years ago

Hello everyone

I agree with @sonejostudios ; yesterday I was thinking about it and actually I found a Py library I could use. But, as Vince says, I don't know how this could affect performance. A good idea could be a "destructive" time-pitch-stretching, i.e. a function which can stretch and transpose your loop when importing it, and this new loop replaces the original and assignes it to the clip. So, there will not be a real-time CPU work on stretching, you just will play a new file. When saving the song, both original and modified files could be stored, so the user could "undo" the changes and switch back to the original sample. The function should run just in status of Jack == Paused not to affect performance. At the moment this is the best that my brain can do.
:)

I currently don't use Ardour so I don't know how much time it takes to adjust pitch/timing; I can say that with Qtractor (which I use for most songs) it's a quite fast thing to do.

grammoboy2 commented 4 years ago

Isn't librubberband the timestretching thing on Linux? https://breakfastquay.com/rubberband/