Hi- I'm trying to make a sample-based app that uses wav files. For instruments like a trumpet where the note can be sustained for up to several seconds, I play the wav sample from the beginning up to a pre-determined loop point in the file and then loop that section for the remaining duration of the note. I've been able to make this work seamlessly with vline~ and a del that bangs in the new vline~ parameters and a metro that keeps playing the loop.
I'd like to be able to bend the note, so I have been trying to use a vline~ to play the beginning part of the file and a del to trigger a phasor~ to play the loop part, but there is an audible lag between the end of the vline~ played part and the start of the phasor~ played loop.
I've also tried to get the note bend by using the vline/metro approach and making the looped section short and varying the metro period on each pass, but while that allows the seamless transition from the beginning part to the looped part the bend sounds awful.
Having worked with SoundFonts for some time, this seems like a very basic functionality. Can someone advise me the best way to play a wav file to transition from the initial attack portion into the loop section seamlessly and have the smooth note bend that the phasor~ gives?