sample-accurate scrubbing in maxmsp

    Apr 29 2009 | 6:22 pm
    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.

    • Apr 29 2009 | 8:11 pm
      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.
    • Apr 30 2009 | 12:40 am
      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:
    • Apr 30 2009 | 1:00 am
      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
    • Apr 30 2009 | 1:24 am regards to the patch I posted, doesn't actually sound like its working. Still very un-smooth.
    • Apr 30 2009 | 2:40 am
      here's a patch that seems to be working for me. try toying with rampsmooth's values to tailor it to your taste.
    • Apr 30 2009 | 4:14 am
      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).
    • Apr 30 2009 | 6:09 am
      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.
    • Apr 30 2009 | 1:01 pm
      for sure you want interpolating for scrubbing, index~ wouldn't cut it, as it is not interpolating. play~ or wave~ would sound better...
    • May 01 2009 | 7:06 am
      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.
    • May 28 2009 | 2:46 pm
      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)