Stumped on gen-based turntable smoothness

Rodrigo's icon

So I've been massaging/tweaking this gen-based turntable code I found on here, and it's sounding/working amazing. The only problem I'm still having is that the start/end controls for the loops drags the playhead around in a most unpleasant way.

I tried [sah 0] after the phasor inside gen and using that to change start/end points for [wave] inside gen, but that only gave me funky pitch shifting stuff.

Ideal would be for the playhead to be dragged around, but subject to the same parameters as the play/stop/scratching (the smoothness and inertia parameters). I can see where that is in the code, but I don't know where/how to integrate it.

My gen chops are not quite there yet to be able to put this together, so any pointers/suggestions would be most welcome.

Max Patch
Copy patch and select New From Clipboard in Max.

Rodrigo's icon

Actually in messing with it more (still can't de-drag it) I tried to fold in this 'jump only when the playhead touches the beginning/end' gen code from another of my projects. The problem with this is the gencode is +~ based, and is just a driver for a regular play~ object (where as the original code I posted contained playback too).

Here's the jumping/gen code.

Max Patch
Copy patch and select New From Clipboard in Max.