I am creating a script that automatically imports samples and sets up AutoPitch on them and now i need to set up fades for the samples, but using the addFadeOutCurve function causes that sound to become silent and not play. I can get the sample to play again by removing the fade and manually adding it again using the Studio. Is this a bug or am i not using the function correctly?
My code looks like this:
var audio = track.addSound(event.parameters[0], “SingleSound”, 0, 6000);
audio.audioFile = studio.project.importAudioFile(p2samples + “/” + bank + “_02.wav”);
audio.addFadeOutCurve(3500, 0.25);
As you’ve pointed out, it seems that using the addFadeOutCurve() function does not correctly add the automation points needed for the fades. I’ve raised this as a bug and will take a look at it for a future release. In the meantime, fades will either need to be manually created or you can manually jiggle them slightly for the automation points to be created.
