Scrubbing a sample with the crank?

I'm on mac and using Lua. I'm interested in a basic demo of scrubbing a sample with the crank. Can anyone help me out?

Not positive... but if I had to guess, I'd start by looking at the setOffset() function of either fileplayer or sampleplayer. Then use getCrankPosition(), and translate that from degrees into the length of the sound sample.