sample-accurate scrubbing in maxmsp

Apr 29, 2009 at 6:22pm

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

#43589
Apr 29, 2009 at 8:11pm

Depending on how you’re implementing it, you could try taking a look at the rampsmooth~ and slide~ objects(take the output from your controller, scale it to whatever the file-length is(or perhaps the length of a segment/selection within the file), then the scaled output can be fed into rampsmooth~ or slide~ with appropriate settings of those objects for the amount of smoothing you want). You could also use index~ for sample-based playback but you’ll still want smoothing going from controller values to samples. Hope that helps.

#156386
Apr 30, 2009 at 12:40am

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:

– Pasted Max Patch, click to expand. –
#156387
Apr 30, 2009 at 1:00am

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

#156388
Apr 30, 2009 at 1:24am

……..in regards to the patch I posted, doesn’t actually sound like its working. Still very un-smooth.

#156389
Apr 30, 2009 at 2:40am

here’s a patch that seems to be working for me. try toying with rampsmooth’s values to tailor it to your taste.

– Pasted Max Patch, click to expand. –
#156390
Apr 30, 2009 at 4:14am

ya, see ComfortableInClouds patch.

you had the right idea, but the reference page for rampsmooth~ says the default value is 0 for the ramp(if you put no arguments to the object). it’s almost the same thing as having no rampsmooth~ in place.

you could even try the message to rampsmooth~ in order to try different values(see help-file).

#156391
Apr 30, 2009 at 6:09am

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.

#156392
Apr 30, 2009 at 1:01pm

for sure you want interpolating for scrubbing, index~ wouldn’t cut it, as it is not interpolating. play~ or wave~ would sound better…

#156393
May 1, 2009 at 7:06am

unfortunately, though, if you’re using MIDI control values like 0-127, you’ll want rampsmooth~ or similar in the mix to perform additional interpolation no matter what. still, play~ or wave~ is a good starting point.

#156394
May 28, 2009 at 2:46pm

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)

#156395

You must be logged in to reply to this topic.