Forums > MaxMSP

groove~ scrub through audio

December 7, 2006 | 3:55 pm

Hi guys,

I have an input (jog wheel) that gives me 0-255 in data output. I want it to hook up with the groove~ object to be able to scrub forward and back throughout the track being played, i.e every time you move the wheel, it jumps half a second (or something like that!).

Any ideas?

Thanks!

Dave


December 7, 2006 | 4:12 pm

Shouldn’t this be very obvious to do? Play a new position for a short while after every input of the jog wheel? Or are there more requirements to your system? Of course I can think of tons of advanced timestretching/scratching/looping functionalities you could implement. Or were you hoping for a complete patch? ;)

Greets,
Mattijs


December 7, 2006 | 5:53 pm

>I have an input (jog wheel) that gives me 0-255 in data output. I >want it to hook up with the groove~ object to be able to scrub >forward and back throughout the track being played, i.e every time >you move the wheel, it jumps half a second (or something like that!).

I am doing something very similar to what you’re describing in a project I’m working on right now. I am using the play~ object, which takes an input from line~ to move backwards or forwards through the sample. Everytime I move the jog wheel I add or subtract from my current position, send that new value to the line~ to "draw" a line to that position, and then store the resulting position as my new current position. This setup results in a pretty smooth sounding output, and you can adjust both the ramp time on the line and the amount of time to jump through the sample to taste.

Hope that helps.

/dan


December 7, 2006 | 9:01 pm

Quote: Mattijs wrote on Thu, 07 December 2006 16:12
—————————————————-
> Shouldn’t this be very obvious to do? Play a new position for a short while after every input of the jog wheel? Or are there more requirements to your system? Of course I can think of tons of advanced timestretching/scratching/looping functionalities you could implement. Or were you hoping for a complete patch? ;)
>
> Greets,
> Mattijs
—————————————————-

Thanks Mattijs,

I’ve just been trying to get it working by getting the signal value (position) and converting it to milliseconds, storing the value, then adding 1 second on and banging the value into the groove~ loop min inlet. I was hoping it would automatically jump to that position but this isn’t the case!

Any ideas on how i can sort this?

Of course a complete patch is always a benfit! ;)

Thanks again,

Dave


December 7, 2006 | 10:38 pm

I think after banging in the loop min point you need to send groove~ a startloop message.

-CJ



f.e
December 8, 2006 | 11:24 am

It *should* jump. It was one of my first patch ever (kind of Oval cd
skipping tool). Could you post your patch ?

f.e

f.e chanfrault | aka | personal computer music
> >>>>>> http://www.personal-computer-music.com
> >>>>>> |sublime music for a desperate people|

Dave Hardy wrote:
> Quote: Mattijs wrote on Thu, 07 December 2006 16:12
> —————————————————-
>
>> Shouldn’t this be very obvious to do? Play a new position for a short while after every input of the jog wheel? Or are there more requirements to your system? Of course I can think of tons of advanced timestretching/scratching/looping functionalities you could implement. Or were you hoping for a complete patch? ;)
>>
>> Greets,
>> Mattijs
>>
> —————————————————-
>
> Thanks Mattijs,
>
> I’ve just been trying to get it working by getting the signal value (position) and converting it to milliseconds, storing the value, then adding 1 second on and banging the value into the groove~ loop min inlet. I was hoping it would automatically jump to that position but this isn’t the case!
>
> Any ideas on how i can sort this?
>
> Of course a complete patch is always a benfit! ;)
>
> Thanks again,
>
> Dave
>
>


December 8, 2006 | 1:56 pm

Hi Guys, thanks for the replies, i’ve managed to get it to (kinda) work but to be honest i’ve ran out of things to change to see if that will make it work!

I’ve uploaded the .pat file to my server and if possible could you take a quick look and see where i’m going wrong.

http://www.dhardy.co.uk/scrub.pat
or

http://www.dhardy.co.uk/scrub.zip

By the way, the milliseconds calulation is rough as i don’t need it to be exact!

Thanks!

Dave



f.e
December 8, 2006 | 2:07 pm

please, don’t link to online patches. It doesn’t work. Use copy & paste
instead. (select all in your patch, copy then paste it in your mail).

f.e

f.e chanfrault | aka | personal computer music
> >>>>>> http://www.personal-computer-music.com
> >>>>>> |sublime music for a desperate people|

Dave Hardy wrote:
> Hi Guys, thanks for the replies, i’ve managed to get it to (kinda) work but to be honest i’ve ran out of things to change to see if that will make it work!
>
> I’ve uploaded the .pat file to my server and if possible could you take a quick look and see where i’m going wrong.
>
> http://www.dhardy.co.uk/scrub.pat
>
> By the way, the milliseconds calulation is rough as i don’t need it to be exact!
>
> Thanks!
>
> Dave
>
>


December 8, 2006 | 2:46 pm

Ok, here u go:

max v2;
#N vpatcher 75 129 976 834;
#P origin 0 14;
#P window setfont "Sans Serif" 9.;
#P newex 458 614 50 196617 + 1000;
#P number 306 405 63 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 458 641 45 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 458 588 72 196617 * 1000000.;
#P flonum 458 563 59 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 458 533 35 196617 * 0.3;
#P button 556 552 15 0;
#P newex 306 383 50 196617 value test;
#P message 523 552 28 196617 bang;
#P flonum 458 505 64 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user number~ 271 481 468 496 9 3 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 523 519 60 196617 split 1 255;
#P user dial 523 319 191 191 255 1 0 0 30 359 5 1. 170 170 170 255 255 255 120 120 120 225 225 225 0 0 0 0 0 0;
#P hidden newex 206 562 42 196617 dac~;
#P hidden newex 29 501 48 196617 loadbang;
#P hidden message 29 472 29 196617 stop;
#P hidden message 29 532 67 196617 startwindow;
#P message 84 371 51 196617 startloop;
#P hidden newex 95 285 62 196617 prepend set;
#P window linecount 2;
#P message 38 18 254 196617 read "SYSTEM:/Users/drhardy/Desktop/Bob Sinclar – Love ge#7FEA6.aif";
#P user meter~ 238 51 263 144 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 267 51 292 144 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P window linecount 1;
#P hidden newex 92 409 81 196617 loadmess loop 1;
#P hidden message 176 337 60 196617 loadmess 1;
#P hidden number 193 387 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 176 357 15 0;
#P hidden newex 176 408 27 196617 sig~;
#P window linecount 2;
#P hidden comment 194 358 103 196617 • play normal speed forward/stop;
#P window linecount 1;
#P hidden newex 206 438 75 196617 groove~ ch1 2;
#P user dropfile 23 169 293 274 1;
#P window linecount 2;
#P comment 26 209 100 196617 drag and drop a file here…;
#P window linecount 1;
#P hidden newex 144 313 32 196617 print;
#P hidden newex 23 312 111 196617 buffer~ ch1 240000 2;
#P hidden newex 23 285 68 196617 prepend read;
#P window linecount 2;
#P comment 22 138 100 196617 select AIFF for channel 1;
#P window linecount 1;
#P comment 247 146 39 196617 CH1 EQ;
#P hidden connect 6 0 2 0;
#P hidden connect 2 0 3 0;
#P hidden connect 21 0 19 0;
#P hidden fasten 17 0 16 0 100 307 296 307 296 162 21 162 21 56 43 56;
#P fasten 27 0 18 0 528 578 521 578 521 337 89 337;
#P hidden fasten 2 0 17 0 28 309 94 309 94 278 100 278;
#P hidden connect 2 0 4 0;
#P hidden connect 12 0 10 0;
#P hidden connect 10 0 9 0;
#P hidden connect 11 0 9 0;
#P hidden connect 9 0 7 0;
#P hidden connect 13 0 7 0;
#P hidden connect 18 0 7 0;
#P fasten 20 0 22 0 211 489;
#P fasten 19 0 22 0 34 561;
#P connect 7 0 22 0;
#P hidden fasten 7 0 15 0 137 484 137 464 20 464 20 48 243 48;
#P connect 28 0 7 1;
#P connect 7 1 22 1;
#P hidden fasten 7 1 14 0 243 492 138 492 138 463 18 463 18 46 272 46;
#P connect 7 2 25 0;
#P fasten 33 0 28 0 463 662 518 662 518 372 311 372;
#P connect 28 0 34 0;
#P connect 25 1 26 0;
#P connect 26 0 30 0;
#P connect 30 0 31 0;
#P connect 31 0 32 0;
#P connect 32 0 35 0;
#P connect 35 0 33 0;
#P connect 23 0 24 0;
#P connect 24 0 27 0;
#P connect 24 0 29 0;
#P pop;

Thanks,
Dave


December 8, 2006 | 2:54 pm

Here’s a screengrab of how far i’ve got


December 8, 2006 | 4:22 pm

mine is bigger…
don’t know if your jogwheel sends inc, dec values, would be helpful.

max v2;
#N vpatcher 84 44 1426 911;
#P origin 0 14;
#P window setfont "Sans Serif" 9.;
#P flonum 183 607 81 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 183 585 97 196617 if $f1 > 0. then $f1;
#P flonum 206 442 81 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 464 528 46 196617 t b 500.;
#P newex 401 529 51 196617 t b -500.;
#P message 183 504 39 196617 set $1;
#P newex 183 399 29 196617 * 1.;
#P comment 235 353 46 196617 length;
#P newex 183 564 50 196617 accum 0.;
#P newex 194 672 76 196617 snapshot~ 500;
#P button 401 503 15 0;
#P button 464 503 15 0;
#P newex 401 461 57 196617 change 0 -;
#P newex 464 461 58 196617 change 0 +;
#P message 76 560 37 196617 loop 1;
#P user ezdac~ 182 748 226 781 0;
#P flonum 202 371 106 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 124 349 105 196617 info~ ch1;
#P message 53 284 43 196617 replace;
#P user dial 539 25 732 732 255 1 0 0 31 359 5 1. 170 170 170 255 255 255 120 120 120 225 225 225 0 0 0 0 0 0;
#P newex 130 765 42 196617 dac~;
#P message 7 559 51 196617 startloop;
#P newex 76 469 48 196617 loadbang;
#P toggle 130 516 15 0;
#P newex 130 567 27 196617 sig~;
#P newex 130 641 75 196617 groove~ ch1 2;
#P newex 53 315 81 196617 buffer~ ch1 1 2;
#P comment 51 265 46 196617 musique;
#P comment 403 562 100 196617 add subtract 500 ms;
#P connect 6 0 7 0;
#P connect 10 0 2 0;
#P connect 6 0 14 0;
#P connect 2 1 11 0;
#P connect 6 0 5 0;
#P connect 5 0 4 0;
#P connect 28 0 3 0;
#P connect 4 0 3 0;
#P connect 7 0 3 0;
#P connect 14 0 3 0;
#P connect 3 0 8 0;
#P connect 3 1 8 1;
#P fasten 19 0 22 0 199 714 311 714 311 389 188 389;
#P connect 22 0 23 0;
#P connect 25 0 20 0;
#P connect 24 0 20 0;
#P connect 23 0 20 0;
#P connect 20 0 27 0;
#P connect 27 0 28 0;
#P connect 3 2 19 0;
#P connect 11 6 12 0;
#P connect 12 0 22 1;
#P connect 25 1 20 1;
#P connect 24 1 20 1;
#P connect 22 0 26 0;
#P connect 9 0 16 0;
#P connect 16 0 18 0;
#P connect 18 0 24 0;
#P connect 9 0 15 0;
#P connect 15 0 17 0;
#P connect 17 0 25 0;
#P pop;


December 8, 2006 | 4:37 pm

Thats the one!

Think i took the long way round!

Thank you all for your help,

Dave


December 8, 2006 | 6:02 pm

Just 1 quick question: Is there any way to be able to scrub through the track without it playing (i.e keeping it paused), but being able to hear the scrubbing (so you can cue it up to a specific beat)?

Thanks,

Dave


December 9, 2006 | 8:02 pm

Quote: comedydave wrote on Fri, 08 December 2006 19:02
—————————————————-
> Just 1 quick question: Is there any way to be able to scrub through the track without it playing (i.e keeping it paused), but being able to hear the scrubbing (so you can cue it up to a specific beat)?
>
> Thanks,
>
> Dave
—————————————————-

I think scrubbing is the same as playing for 50 ms every time you change the position.

Mattijs


July 17, 2007 | 8:05 am

"Of course I can think of tons of advanced timestretching/scratching/looping functionalities"

Could you direct me to where one could learn how to build patches using these functionalities, or any patches that one could learn from?


July 17, 2007 | 9:01 am

Quote: chthonic wrote on Tue, 17 July 2007 10:05
—————————————————-
> "Of course I can think of tons of advanced timestretching/scratching/looping functionalities"
>
> Could you direct me to where one could learn how to build patches using these functionalities, or any patches that one could learn from?
>
>
—————————————————-

I don’t have a list of links ready, but you can always search for pitch shifting/time stretching, fft-based or granular-based.

I made a couple of these patches myself but I’m not sure I can provide you with any ready-made examples that would make sense to you.

Mattijs


Viewing 16 posts - 1 through 16 (of 16 total)