audio scrub with mouse position in waveform~ ??


    Apr 20 2006 | 7:42 pm
    This question seems obvious enough but after 40 straight hours of looking at max im drawing a blank
    I'm taking the horizontal mouse position outputted from the [waveform~] object, and I want to be able to scrub over the audio within the buffer. I get values from 0 - 1 as i drag the mouse across the file.
    what is the correct object to use for this? could I use a play~ object and map the values from 0-1 to the values of the start and end time of the buffer? hmm actually i might have answered my own question right there...but i doubt it...any help?

    • Apr 20 2006 | 8:14 pm
      ok yea i tried what i said before but when when i try to scrub over the audio it just makes a clicking static sound. any suggestions on the objects i should use for this?
      im thinking i need to interpolate the audio in some fasion...
    • Apr 21 2006 | 11:32 am
      Try to use buffer~ and play~ and how they works.
      ric
    • Apr 21 2006 | 12:58 pm
      you should use a line object with a short ramp (5ms or whatever), that would remove the clicking sounds. Use the line~ to drive a play~ object. The play~ interpolates by default.
      If you want the pitch to be left unchanged, use a granulator or phase vocoder for playing back the audio.
    • Apr 21 2006 | 1:09 pm
      Darek Rossman wrote:
      > what is the correct object to use for this? could I use a play~
      > object and map the values from 0-1 to the values of the start and end
      > time of the buffer? hmm actually i might have answered my own
      > question right there...but i doubt it...any help?
      Its not as easy as it seems, one pixel mouse movement is a lot of
      samples....
      But as always there is hope: in the examples there is a pvoc patcher
      (read "phase vocoder") which does some scratching. Not necessarily
      beginners stuff, as its fft based, but it does scrubbing...
      Stefan
      --
      [][] [][][] [][] [][][]
      [][][][][][][][][][][][][][][]
      Stefan Tiedje
      Klanggestalter
      Electronic Composition
      &
      Improvisation
      /~~~~~
      \ /|() ()|
      ))))) )| | |( \
      /// _/)/ )))))
      ___/ ///
      -------------------------x----
      --_____-----------|-----------
      --(_|_ ----|-----|-----()----
      -- _|_)----|-----()-----------
      ----------()------------x-----
      14, Av. Pr. Franklin Roosevelt,
      94320 Thiais, France
      Phone at CCMIX +33-1-57 42 91 09
    • Apr 21 2006 | 1:32 pm
      Here's a very simple and rough scrubber using buffer~ , play~ and line~.
      Hope it may help
      ciao,
      ric
      max v2;
    • Apr 21 2006 | 3:49 pm
      an example using waveform
    • Apr 21 2006 | 7:57 pm
      thanks for all the feedback guys ill try this stuff out
    • Apr 21 2006 | 8:37 pm
      also, consider using the clock object to get the time since the last
      mousemove event, then you don't have to guess :)
      _Mark