The way to deal with this in real-time is to fade in for a short period at the start, and fade out at the end. In order for that to respond in real time, I've found a good way is to delay the audio stream by a tiny value (e.g. 5ms) then fade the audio at 5ms - 1 audio block (about 1.46ms). That way, when you hit "stop" on the sample playback object (e.g. tabread4~ or xgroove~) the audio stops, but the 5ms delay means that the fadeout starting at that moment will happen before the audio you hear stops (because it is delayed by 5ms).

I hope that makes sense. Patch enclosed!
Ed
 
Ninja Jamm - a revolutionary new music remix app from Ninja Tune and Seeper, for iPhone and iPad
http://www.ninjajamm.com/


Gemnotes-0.2: Live music notation for Pure Data, now with dynamics!
http://sharktracks.co.uk/ 


On Wednesday, 26 March 2014, 21:52, "puredata@11h11.com" <puredata@11h11.com> wrote:
Hi everyone,

I'm struggling at making my own loop station solution inside pd. I'm 
trying to mimic SooperLooper, that is:

- multiple sync options
- multiple quantize options
+ something i am not sure SooperLooper do: cross-fading begin/end of 
loop to avoid glitches.

I have code a patch, but it is very messy (1 abstraction for master, x 
abstractions for slaves). I am using xrecord & xgroove (for 
crossing-fading start / end). The patch is kind of working but I am 
getting glitches when starting and stopping the recording (I think it 
was okay when using a bigger jack buffer - (I am now at 64...)).

Thanks!


_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list