musikinformatik / SuperDirt

Tidal Audio Engine
GNU General Public License v2.0
519 stars 75 forks source link

Stretch v2 #229

Closed bgold-cosmos closed 2 years ago

bgold-cosmos commented 3 years ago

Update of #149

bgold-cosmos commented 3 years ago

One comment on this is that the timestretch algorithm used here doesn't really work with the workaround for issue #196. So if you're timestretching long samples, it may sound weird, but I'm not sure when it becomes noticeable since the timestretching itself is going to sound weird.

yaxu commented 3 years ago

I'm just trying to getting this running, I think it's just the timescale parameter that needs sending, right?

Maybe we could call that parameter stretch instead? Tidal already has a function with that name, but it seems to only be a supporting function for fit'.

yaxu commented 3 years ago

I've got it working now, sounding nice and gnarly! It would be nice to have a version that resizes it relative to the event duration (the delta param). Not sure what that could be called, maybe pack?

bgold-cosmos commented 3 years ago

The parameter was originally called stretch and I can see in the commit history when it changed, but I don't remember at all the reason why. I have a vague recollection of some discussion about possible name collisions in SuperCollider.

By your second comment, you mean a version that automatically stretches the sample so that it fills the event duration?

yaxu commented 3 years ago

Ah OK, maybe @telephon remembers about the name collision. We could still call the parameter stretch on the tidal side, although it's nice to have things named the same everywhere.

And yes that's right. A bit like legato. In fact it could detect if legato is switched on, and if so change its behaviour so that the eventual duration in seconds is legato * stretch * delta.

telephon commented 3 years ago

The parameter stretch is used in the event system of sclang for a different purpose, so we might want to avoid it.

telephon commented 3 years ago

How should these parameters work for synths?

yaxu commented 3 years ago

Perhaps we call it timestretch then, with the alias stretch in tidal.

For synths I guess we'd just multiply legato up using stretch and not use it otherwise? As synths are already stretchy by nature.

telephon commented 3 years ago

For synths I guess we'd just multiply legato up using stretch and not use it otherwise? As synths are already stretchy by nature.

yes. synths may still use the timestretch argument if they like, to add some inexplainably weird distortion :)

yaxu commented 3 years ago

Oh I hadn't realised that synths could actually be timestretched with the same effect! That's strange edit Oh re-reading I think I misunderstood. You're saying individual synths can add timestretch distortion? Heh

telephon commented 3 years ago

You're saying individual synths can add timestretch distortion? Heh

yes, they could do anything with that parameter, so that when you mix synths and samples in one pattern, they have some sort of analogy to each other.

telephon commented 2 years ago

Let me know if you want to add more polish.