Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestretching? #146

Closed
yaxu opened this issue Sep 19, 2019 · 13 comments
Closed

Timestretching? #146

yaxu opened this issue Sep 19, 2019 · 13 comments

Comments

@yaxu
Copy link
Collaborator

yaxu commented Sep 19, 2019

Ref tidalcycles/Tidal#554 , is there a quick way to add timestretching to superdirt, so e.g. samples can be played higher without getting shorter?

@bgold-cosmos
Copy link
Contributor

Timestretching tends to sound terrible unless you use a quite sophisticated method; I've experimented a little in SuperCollider but have never gotten very good results. Doing a little Googling suggests there might be a way to implement a WSOLA algorithm in there (someone has probably already done it). I'll keep looking.

@bgold-cosmos
Copy link
Contributor

AREUREEEADY.zip

Two problems so far

  • It may not be fast enough for realtime. My test code is in Python, though, so it might be OK when translated to SuperCollider
  • The actual amount of stretch is different from the requested because it tries to do some wavelet similarity matching, so it's really hard to control the duration of the output with this method

There may be some variations I can try, though, this is fun stuff...

@yaxu
Copy link
Collaborator Author

yaxu commented Sep 26, 2019

That sounds good to me, nice one!

@telephon
Copy link
Contributor

yes, I'm sure it would make a good plugin! You may have to design it in a way that it conforms to the scsynth way (very very little memory allocation at startup of the ugen).

@bgold-cosmos
Copy link
Contributor

Example implementation in #149

I couldn't get any of the wavelet similarity stuff to work well for all samples, so fell back to a fairly simple overlap-add method. The nice part about this is no extra memory allocation is needed, and the whole thing can be done by just making some custom phase inputs to BufRd and summing over them.

@yaxu
Copy link
Collaborator Author

yaxu commented Aug 6, 2021

I saw there is a new(?) time stretch quark: https://github.com/spluta/TimeStretch
It would still be great to get #229 merged, as a flavourful stretch!

@yaxu
Copy link
Collaborator Author

yaxu commented Aug 6, 2021

Ah now I look, I see that that timestretch quark isn't realtime.

@telephon
Copy link
Contributor

telephon commented Aug 6, 2021

It would still be great to get #229 merged, as a flavourful stretch!

Yes, I've just made a comment, it is not fully resolved yet, but not far away.

@aptrn
Copy link

aptrn commented Sep 28, 2021

Any update on this?
Seems like #229 has been merged but the wordy counterpart is not yet implemented in Tidal?

Totally my most wanted feature 🥇

@telephon
Copy link
Contributor

I has already been merged :)

@ndr-brt
Copy link
Contributor

ndr-brt commented Sep 29, 2021

@aptrn you just need to define the timescale parameter:
let timescale = pF "timescale"

then you can use with your samples, like:
d1 $ s "cp" # timestretch 5

@yaxu
Copy link
Collaborator Author

yaxu commented Dec 24, 2021

We still need to add the parameters to tidal. @bgold-cosmos is it timescale and timescalewin that we want? Does it make sense to use these parameters with control buses?

@yaxu
Copy link
Collaborator Author

yaxu commented Dec 24, 2021

I tried it, and they don't work with control buses - just went silent when I tried with timescalebus.. So added them to the 'nobus' list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants