Difficult to advise as it is difficult to work out what it's intended to do? Maybe worth explaining a bit more.
Function needs to be triggered with a bang. Use the setdomain message to change the duration of the envelope.
As far as I know, scrubbing around on the rslider while the groove~ is playing will always click, even if you convert to signals - what are you trying to achieve here? You can set the loop point before you trigger, but not halfway through, it's like jumping through a waveform while it's playing.
Unfortunately, you seem to have fallen foul of a common problem: blindly adding functionality without testing each step of the way. I've been using Max for several years now and I really can't determine what you're trying to achieve in this patch. There are numerous objects in here that have absolutely no bearing whatsoever on the problem your are vaguely describing. Can I suggest that you strip it down, tidy it up; and please don't assume everyone on this forum will have a MIDI keyboard attached to their computer while viewing your patch, and that we will somehow *know* how your patch works or should work.
Im sorry Brendan that my vagueness has offended you lol, its quite a large patch i have made with all bits and peices i have put together from previous patches so thats why its messy at the moment. Thanks for the help guys anyway. I will post back if i work out some solution.