audio scrub with mouse position in waveform~ ??

Darek Rossman's icon

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?

Darek Rossman's icon

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...

riccardo dapelo's icon

Try to use buffer~ and play~ and how they works.
ric

robotic-audio's icon

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.

Stefan Tiedje's icon

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

riccardo dapelo's icon

Here's a very simple and rough scrubber using buffer~ , play~ and line~.
Hope it may help

ciao,
ric

Max Patch
Copy patch and select New From Clipboard in Max.

robotic-audio's icon

an example using waveform

Max Patch
Copy patch and select New From Clipboard in Max.

Darek Rossman's icon

thanks for all the feedback guys ill try this stuff out

Mark Pauley's icon

also, consider using the clock object to get the time since the last
mousemove event, then you don't have to guess :)

_Mark