sample-accurate scrubbing in maxmsp
I was wondering if anyone knows if it is possible to scrub through the playback of a buffer in samples rather than milliseconds like with groove~ and waveform~. I want to be able to emulate vinyl scratching with a midi controller, and all my attempts so far have been really glitchy sounding due to the resolution of the controller. Is there a way to interpolate the controller value so it will scrub through the buffer smoothly.
thanks
I've not used any of the object before, but just tried them out, it seems to work better that my previous attempts. I'm sure there is a better way of doing it though.
Would you mind having a look at the patch I tried with index and rampsmooth~? I'm not sure if I'm using them (particularly rampshooth~) to their full potential. Also I wasn't sure how to smooth the values out of the slider. I tried scaling 0 127 to the length of the sample, but this way worked better. Should I try line?
Also, it kind of sounds like its working on very short samples, but using longer ones results in lots of high frequency glitching sounds, could this be due to the smoothing of rampsmooth~ not being fast enough?
Thanks for the help, heres the first attempt patch:
if there are millishit on the other end
and pumples on the one end
but you would like to submit pumples to the other end
all you have to do is
to convert pumples to millishit
before you submit them.
pumple 110
........in regards to the patch I posted, doesn't actually sound like its working. Still very un-smooth.
here's a patch that seems to be working for me. try toying with rampsmooth's values to tailor it to your taste.
to put what roman was saying in a bit clearer terms: it doesn't matter if an object uses milliseconds or samples, since it's an MSP object its calculations are all sample based. so you don't need to use index~ to scrub, using play~ and adjusting millisecond values will give the same kind of precision. what does matter, however, is whether or not an object interpolates during sample playback. the details of that, i can't really tell you. there was a post on that a bit ago im sure you could dig up with some searching.
for sure you want interpolating for scrubbing, index~ wouldn't cut it, as it is not interpolating. play~ or wave~ would sound better...
I made a similar patch a while ago.
My solution was an adaptive smoothing using rampsmooth~.
Basically you need to calculate the instantaneous speed of your controller. And use this value to control rampsmooth~ ramp times.
If your controller is moving slowly the ramp time must be long. If it's going fast, it will be very short.
I don't have my patch here with me, I'll post it here as soon as I find it.
(late answer I know, hope it still helps)