musikinformatik / SuperDirt

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

Control the envelope of # cut #237

Closed cephasteom closed 3 years ago

cephasteom commented 3 years ago

When I use cut in Tidal to truncate samples when another one plays, I often get clicks and pops. This is especially apparent on subby samples such as longer kick drums. For an example of the artefacts that arise, run

d1 $ s "wobble*8" # cut 1

In the example above I could, of course, just shorten the envelope of the notes, but I don't always know in advance how long each note will be and I want to able to sustain notes indefinitely until the next note is played and cuts off the previous one.

Is there a way of controlling the envelope of the cut event? I'm assuming the click occurs because the sample is released too abruptly. Is is possible to control the release time of the cut event?

Many thanks.

telephon commented 3 years ago

Have you tried to set the #fadeInTime or # fadeTime parameters? Defaults are very short (0.001), you can set them to e.g. 0.03 and see if it gets better.

cephasteom commented 3 years ago

Hi @telephon - thanks so much for getting back to me so quickly, and on a Sunday too! # fadeTime appears to do the job although I have to add it as a parameter in Tidal, e.g. let fadeTime = pI "fadeTime". That's brilliant and has solved an issue that's been annoying me for a while. I'll close this issue now. Best wishes... Pete.

yaxu commented 3 years ago

Ah I have these in a list of parameters that can't be controlled via buses, but am not actually exposing them. So:

Is that right?

I also have length and endSpeed, but these seem internal to the calculation of begin/end and accelerate respectively, and don't seem to do anything if I send values from tidal.

yaxu commented 3 years ago

Added the fades https://github.com/tidalcycles/Tidal/commit/681ecee4635f8b26c68eecfbbb0b19c24ace2cb8

telephon commented 3 years ago

Is that right?

yes!

endSpeed

we could expose it, at a little bit of cost.

yaxu commented 3 years ago

@petethomasmusique you'll want to use pF rather than pI there by the way