I have this 'chance' sampler made for me by my teacher that operates via transport. I can set the probability of recording and then playing back from a buffer~, and the transport picks a random pitch and a random point in the sample to play from. It's very prone to clicks, however, and I can't work out a system that gets rid of them. I tried adsr~, but the clicks are being caused by a bang that picks the point of the sample and the pitch (rather than a signal), so that doesn't work. I also tried using line~ to quickly drop the amplitude, then bring it back up again (using a message like 1, 0 25 1 25), but that doesn't work either. I thought about using function, but I can't get my head around how that object works.
I hope that makes sense. Basically, I need something that will detect the bang that chooses the pitch and point in the buffer~, then drop the signal and bring it back in quickly, eliminating clicks. Can anyone offer some hints? I'm not after someone to fix this for me, just point me in the right direction.