Matching Sample Duration To Pattern Time Duration

I would like to be able to load a sample (WAV) into Renoise and then be able to stretch or shrink that sample to exactly match the pattern’s duration. I can currently do this by finding Renoise’s computation of the pattern time duration based on BPM and pattern length and then taking the sample into an external editor for stretching/shrinking. If I then change the BPM in the song I am working on, then I’m back to the external editor to make another change to make it fit.

Example - Sample duration of 3.5 seconds
Pattern duration (40 length at 95 bpm) is 3.7569 seconds
Change the sample to 3.7569 seconds to match pattern

Then Change BPM to 80 - so pattern duration is now 4.2362 seconds
Sample is either automatically or manually changed to 4.2362 seconds

Is there an easy way for Renoise to have the sample match the pattern duration even if the BPM is changed? Hope I’m not missing something simple in the sample editor menu…

Thanks for your help with this,
Toad

EDITED: Is Beatsync the answer to my question? I’m at work and can’t currently try it out. If so, please fell free to shout RTFM at me as much as you please…

Beatsync might be the answer. You specify the nr of lines you want to sync to and the sample will play in sync calculated from the length of the sample. There is no easy way to finetune this afterwards other than cutting the sample to the correct length though.

However this does not mean any complicated stretching/shrinking, it simply changes the pitch and tempo (as if you manually would do by changing the note and finetune). So it works good for drum loops when the tempo change is not too big, but not for melodies or singing.