Live Video sampler

Aug 18, 2008 at 12:31pm

Live Video sampler

Hi there,

Im not that experienced with jitter but I’d like to build a simple Live Video Sampler. A patch that can record from a camera true the video input a clip and then loop it and manipulate it. I can imagine somethings like this already exist on which I can base my tool. Any suggestions?

#39330
Aug 18, 2008 at 3:44pm

you’ve got to do the tutorials first (both max and jitter). after that search the jitter forum for sampler or looper.

the two main objects you want to look at are:
jit.qt.grab (or dx.grab)
jit.matrixset (or jit.matrix with 3 dimensions, 3rd dimension being time)

spend some time researching and experimenting, and put together a *simple* patch illustrating your concept. post it with some questions or problems you experience, and i guarantee you’ll get some useful answers.

#138309
Aug 18, 2008 at 4:18pm

once you’re ready, you can also take a look at the invaluable examples here:
Max5/examples/jitter-examples

and in particular, there are some apps which could help you out in this folder:
Max5/examples/jitter-examples/3rd_Party/JitterApplets

In that last folder, SIMPLE_MIX.maxpat, can show you how to apply effects, and VideoInput.maxpat can show you how to capture video. Time based cut-up is rather simple in comparison but there are also examples which can help you understand that here:
Max5/examples/jitter-examples/video/quicktime

But mainly for time-cut-up(and even all the rest) you definitely want to read through tutorials and check help-files and reference pages for each specific object you come across.

Best of luck. Have fun with it.

#138310
Aug 23, 2008 at 4:59pm

but in case all that gets too BORING ha ha ha
or if you prefer to learn by example…

here’s a patch that records video input to disk. just 1 click! four bins of sampling joy!

study this closely – there are many good lessons within!

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#N vpatcher 30 89 375 532;
#P window setfont “Sans Serif” 9.;
#P newex 51 90 40 196617 t 0 1 b;
#P newex 51 158 36 196617 t stop;
#N vpatcher 30 89 630 489;
#P window setfont Arial 9.;
#P newex 59 135 92 131137545 sprintf %s_%ld.mov;
#P message 61 88 34 131137545 Movie;
#P newex 50 50 52 131137545 t b b ticks;
#P newex 95 88 40 131137545 date;
#P window setfont “Sans Serif” 9.;
#P newex 44 177 167 196617 pack write name 30. jpeg max 600;
#P comment 100 67 200 196617 low chance of overwriting existing movie!;
#P inlet 50 30 15 0;
#P outlet 44 199 15 0;
#P connect 5 0 3 0;
#P connect 3 0 0 0;
#P connect 1 0 5 0;
#P connect 6 0 7 0;
#P connect 5 1 6 0;
#P connect 7 0 3 1;
#P connect 5 2 4 0;
#P connect 4 2 7 1;
#P pop;
#P newobj 144 168 85 196617 p generate-name;
#P comment 150 74 108 196617 one measure of tempo;
#P newex 118 73 29 196617 * 4.;
#P newex 233 326 42 196617 r drive;
#P newex 235 297 59 196617 print READ;
#P newex 166 296 68 196617 prepend read;
#P newex 165 326 63 196617 jit.qt.movie;
#P newex 167 275 51 196617 zl slice 1;
#P newex 165 254 62 196617 route write;
#P newex 120 50 55 196617 !/ 60000.;
#P newex 51 135 55 196617 pipe 5000;
#P newex 93 197 29 196617 gate;
#P newex 51 235 124 196617 jit.qt.record @realtime 1;
#P inlet 51 67 15 0;
#P inlet 116 177 15 0;
#P inlet 120 30 15 0;
#P outlet 165 348 15 0;
#P connect 3 0 18 0;
#P connect 18 0 6 0;
#P connect 6 0 17 0;
#P connect 17 0 4 0;
#P connect 5 0 4 0;
#P fasten 16 0 4 0 149 231 56 231;
#P fasten 6 0 5 0 56 155 98 155;
#P fasten 18 1 5 0 71 131 98 131;
#P connect 14 0 6 1;
#P connect 2 0 5 1;
#P connect 7 0 14 0;
#P connect 1 0 7 0;
#P fasten 18 2 16 0 86 128 149 128;
#P connect 4 1 8 0;
#P connect 11 0 10 0;
#P connect 13 0 10 0;
#P connect 10 0 0 0;
#P connect 9 0 11 0;
#P connect 8 0 9 0;
#P connect 11 0 12 0;
#P pop;
#P newobj 529 201 96 196617 p record-then-play;
#P button 529 137 34 0;
#P user jit.pwindow 528 229 82 62 0 1 0 0 1 0;
#N vpatcher 30 89 375 532;
#P window setfont “Sans Serif” 9.;
#P newex 51 90 40 196617 t 0 1 b;
#P newex 51 158 36 196617 t stop;
#N vpatcher 30 89 630 489;
#P window setfont Arial 9.;
#P newex 59 135 92 131137545 sprintf %s_%ld.mov;
#P message 61 88 34 131137545 Movie;
#P newex 50 50 52 131137545 t b b ticks;
#P newex 95 88 40 131137545 date;
#P window setfont “Sans Serif” 9.;
#P newex 44 177 167 196617 pack write name 30. jpeg max 600;
#P comment 100 67 200 196617 low chance of overwriting existing movie!;
#P inlet 50 30 15 0;
#P outlet 44 199 15 0;
#P connect 5 0 3 0;
#P connect 3 0 0 0;
#P connect 1 0 5 0;
#P connect 6 0 7 0;
#P connect 5 1 6 0;
#P connect 7 0 3 1;
#P connect 5 2 4 0;
#P connect 4 2 7 1;
#P pop;
#P newobj 144 168 85 196617 p generate-name;
#P comment 150 74 108 196617 one measure of tempo;
#P newex 118 73 29 196617 * 4.;
#P newex 233 326 42 196617 r drive;
#P newex 235 297 59 196617 print READ;
#P newex 166 296 68 196617 prepend read;
#P newex 165 326 63 196617 jit.qt.movie;
#P newex 167 275 51 196617 zl slice 1;
#P newex 165 254 62 196617 route write;
#P newex 120 50 55 196617 !/ 60000.;
#P newex 51 135 55 196617 pipe 5000;
#P newex 93 197 29 196617 gate;
#P newex 51 235 124 196617 jit.qt.record @realtime 1;
#P inlet 51 67 15 0;
#P inlet 116 177 15 0;
#P inlet 120 30 15 0;
#P outlet 165 348 15 0;
#P connect 3 0 18 0;
#P connect 18 0 6 0;
#P connect 6 0 17 0;
#P fasten 16 0 4 0 149 231 56 231;
#P connect 5 0 4 0;
#P connect 17 0 4 0;
#P fasten 18 1 5 0 71 131 98 131;
#P fasten 6 0 5 0 56 155 98 155;
#P connect 14 0 6 1;
#P connect 2 0 5 1;
#P connect 7 0 14 0;
#P connect 1 0 7 0;
#P fasten 18 2 16 0 86 128 149 128;
#P connect 4 1 8 0;
#P connect 11 0 10 0;
#P connect 13 0 10 0;
#P connect 10 0 0 0;
#P connect 9 0 11 0;
#P connect 8 0 9 0;
#P connect 11 0 12 0;
#P pop;
#P newobj 430 201 96 196617 p record-then-play;
#P button 430 137 34 0;
#P user jit.pwindow 429 229 82 62 0 1 0 0 1 0;
#P window linecount 6;
#P comment 462 39 100 196617 another way to do this could be with matrixset , but for longer clips , this will get memory intensive.;
#P comment 352 40 100 196617 takes live camera input , records to disk , then loads the clip into a movie player. All BPM based.;
#P window linecount 1;
#P hidden newex 83 349 20 196617 t b;
#P window setfont Arial 9.;
#P message 110 327 143 131137545 http://www.lividinstruments.com/;
#P window linecount 2;
#P hidden message 110 346 230 131137545 ; max launch_browser http://www.lividinstruments.com/;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 110 313 143 196617 pnyboer at slambassador.com;
#P comment 110 298 109 196617 patch by peter nyboer;
#N vpatcher 30 89 375 532;
#P window setfont “Sans Serif” 9.;
#P newex 51 90 40 196617 t 0 1 b;
#P newex 51 158 36 196617 t stop;
#N vpatcher 30 89 630 489;
#P window setfont Arial 9.;
#P newex 59 135 92 131137545 sprintf %s_%ld.mov;
#P message 61 88 34 131137545 Movie;
#P newex 50 50 52 131137545 t b b ticks;
#P newex 95 88 40 131137545 date;
#P window setfont “Sans Serif” 9.;
#P newex 44 177 167 196617 pack write name 30. jpeg max 600;
#P comment 100 67 200 196617 low chance of overwriting existing movie!;
#P inlet 50 30 15 0;
#P outlet 44 199 15 0;
#P connect 5 0 3 0;
#P connect 3 0 0 0;
#P connect 1 0 5 0;
#P connect 6 0 7 0;
#P connect 5 1 6 0;
#P connect 7 0 3 1;
#P connect 5 2 4 0;
#P connect 4 2 7 1;
#P pop;
#P newobj 144 168 85 196617 p generate-name;
#P comment 150 74 108 196617 one measure of tempo;
#P newex 118 73 29 196617 * 4.;
#P newex 233 326 42 196617 r drive;
#P newex 235 297 59 196617 print READ;
#P newex 166 296 68 196617 prepend read;
#P newex 165 326 63 196617 jit.qt.movie;
#P newex 167 275 51 196617 zl slice 1;
#P newex 165 254 62 196617 route write;
#P newex 120 50 55 196617 !/ 60000.;
#P newex 51 135 55 196617 pipe 5000;
#P newex 93 197 29 196617 gate;
#P newex 51 235 124 196617 jit.qt.record @realtime 1;
#P inlet 51 67 15 0;
#P inlet 116 177 15 0;
#P inlet 120 30 15 0;
#P outlet 165 348 15 0;
#P connect 3 0 18 0;
#P connect 18 0 6 0;
#P connect 6 0 17 0;
#P connect 17 0 4 0;
#P connect 5 0 4 0;
#P fasten 16 0 4 0 149 231 56 231;
#P fasten 6 0 5 0 56 155 98 155;
#P fasten 18 1 5 0 71 131 98 131;
#P connect 14 0 6 1;
#P connect 2 0 5 1;
#P connect 7 0 14 0;
#P connect 1 0 7 0;
#P fasten 18 2 16 0 86 128 149 128;
#P connect 4 1 8 0;
#P connect 11 0 10 0;
#P connect 13 0 10 0;
#P connect 10 0 0 0;
#P connect 9 0 11 0;
#P connect 8 0 9 0;
#P connect 11 0 12 0;
#P pop;
#P newobj 331 201 96 196617 p record-then-play;
#P button 331 137 34 0;
#P user jit.pwindow 330 229 82 62 0 1 0 0 1 0;
#N vpatcher 30 89 375 532;
#P window setfont “Sans Serif” 9.;
#P newex 51 90 40 196617 t 0 1 b;
#P newex 51 158 36 196617 t stop;
#N vpatcher 30 89 630 489;
#P window setfont Arial 9.;
#P newex 59 135 92 131137545 sprintf %s_%ld.mov;
#P message 61 88 34 131137545 Movie;
#P newex 50 50 52 131137545 t b b ticks;
#P newex 95 88 40 131137545 date;
#P window setfont “Sans Serif” 9.;
#P newex 44 177 167 196617 pack write name 30. jpeg max 600;
#P comment 100 67 200 196617 low chance of overwriting existing movie!;
#P inlet 50 30 15 0;
#P outlet 44 199 15 0;
#P connect 5 0 3 0;
#P connect 3 0 0 0;
#P connect 1 0 5 0;
#P connect 6 0 7 0;
#P connect 5 1 6 0;
#P connect 7 0 3 1;
#P connect 5 2 4 0;
#P connect 4 2 7 1;
#P pop;
#P newobj 144 168 85 196617 p generate-name;
#P comment 150 74 108 196617 one measure of tempo;
#P newex 118 73 29 196617 * 4.;
#P newex 233 326 42 196617 r drive;
#P newex 235 297 59 196617 print READ;
#P newex 166 296 68 196617 prepend read;
#P newex 165 326 63 196617 jit.qt.movie;
#P newex 167 275 51 196617 zl slice 1;
#P newex 165 254 62 196617 route write;
#P newex 120 50 55 196617 !/ 60000.;
#P newex 51 135 55 196617 pipe 5000;
#P newex 93 197 29 196617 gate;
#P newex 51 235 124 196617 jit.qt.record @realtime 1;
#P inlet 51 67 15 0;
#P inlet 116 177 15 0;
#P inlet 120 30 15 0;
#P outlet 165 348 15 0;
#P connect 3 0 18 0;
#P connect 18 0 6 0;
#P connect 6 0 17 0;
#P fasten 16 0 4 0 149 231 56 231;
#P connect 5 0 4 0;
#P connect 17 0 4 0;
#P fasten 18 1 5 0 71 131 98 131;
#P fasten 6 0 5 0 56 155 98 155;
#P connect 14 0 6 1;
#P connect 2 0 5 1;
#P connect 7 0 14 0;
#P connect 1 0 7 0;
#P fasten 18 2 16 0 86 128 149 128;
#P connect 4 1 8 0;
#P connect 11 0 10 0;
#P connect 13 0 10 0;
#P connect 10 0 0 0;
#P connect 9 0 11 0;
#P connect 8 0 9 0;
#P connect 11 0 12 0;
#P pop;
#P newobj 220 201 96 196617 p record-then-play;
#P newex 29 102 42 196617 s drive;
#P button 220 137 34 0;
#P newex 207 35 72 196617 loadmess 120;
#P user jit.pwindow 219 229 82 62 0 1 0 0 1 0;
#P flonum 207 64 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user jit.pwindow 75 229 82 62 0 1 0 0 1 0;
#P message 173 102 33 196617 close;
#P newex 138 80 41 196617 sel 1 0;
#P message 139 102 30 196617 open;
#P toggle 76 32 27 0;
#P newex 76 102 52 196617 metro 33;
#P newex 76 133 56 196617 jit.qt.grab;
#P comment 244 64 100 196617 BPM;
#P fasten 8 0 13 2 212 192 311 192;
#P fasten 8 0 16 2 212 191 422 191;
#P fasten 8 0 26 2 212 191 521 191;
#P fasten 8 0 29 2 212 191 620 191;
#P connect 1 0 7 0;
#P fasten 1 0 13 1 81 175 268 175;
#P fasten 1 0 16 1 81 175 379 175;
#P fasten 1 0 26 1 81 175 478 175;
#P fasten 1 0 29 1 81 175 577 175;
#P connect 29 0 27 0;
#P connect 28 0 29 0;
#P connect 26 0 24 0;
#P connect 25 0 26 0;
#P connect 16 0 14 0;
#P connect 15 0 16 0;
#P connect 13 0 9 0;
#P connect 11 0 13 0;
#P connect 10 0 8 0;
#P connect 5 1 6 0;
#P connect 5 0 4 0;
#P connect 3 0 2 0;
#P connect 3 0 5 0;
#P hidden connect 21 0 19 0;
#P hidden connect 20 0 21 0;
#P connect 4 0 1 0;
#P connect 6 0 1 0;
#P connect 2 0 12 0;
#P connect 2 0 1 0;
#P window clipboard copycount 30;

#138311
Sep 1, 2008 at 10:07am

I can’t open that patch

it’s just me that I’m a noob or what?

I’ve pasted this

max v2;
#N vpatcher 8 49 1438 754;
#P origin 9 0;

at the beginning of the patch but it just don’t work. It don’t have sense what I’ve did?

I’m working with max 4.5 and jitter 1.2.3

Sorry, thanks

#138312
Sep 1, 2008 at 10:08am

I can’t open that patch

it’s just me that I’m a noob or what?

I’ve pasted this

max v2;
#N vpatcher 8 49 1438 754;
#P origin 9 0;

at the beginning of the patch but it just don’t work. It don’t have sense what I’ve did?

I’m working with max 4.5 and jitter 1.2.3

Sorry, thanks

#138313
Sep 1, 2008 at 10:26am

Hi,

Sorry, I was distracted from playing around by other work. Yes, I did most of the tutorials but I’m more the learn by doing type. So pnyboer realy helped me out. Thats defenitly a cool basis to mix with effect tutorials etc. Thanks alot!

@ Mr Dobelina
just copy the text and in max chose File > New from Clipboard

#138314
Sep 1, 2008 at 10:29am

It opens fine here, Bob.
You don’t have to add anything…

max 4.6
jitter 1.6.3 or 1.6.4 i think, not going to restart max (cycling, hint). So your jitter seems a little old, but it should still copy.

#138315
Sep 1, 2008 at 10:44am

Well, I don’t have the “new from clipboard” option.

Anyway, I’ve just tried to copy and paste as it is in a new Text Patch. Copy, paste, save as. Then Open that created file and comes out the text file just created! I use Open (the normal one, not the open as text!)

Really don’t know

Thanks

It will be possible to recreate the patch just looking from a photo? or it involve subpatch and other complicated stuff?
If someone could post a photo of that patch it could be great

#138316
Sep 1, 2008 at 10:52am

why not update to 4.6? That has “new from clipboard”.

Also, try saving it in a text editor (not max!) with the extension
.pat. that ought work.

On Mon, Sep 1, 2008 at 12:44 PM, Filippo wrote:
>
> Well, I don’t have the “new from clipboard” option.
>
> Anyway, I’ve just tried to copy and paste as it is in a new Text Patch. Copy, paste, save as. Then Open that created file and comes out the text file just created! I use Open (the normal one, not the open as text!)
>
> Really don’t know
>
> Thanks
>
> It will be possible to recreate the patch just looking from a photo? or it involve subpatch and other complicated stuff?
> If someone could post a photo of that patch it could be great

#138317
Sep 1, 2008 at 11:40am

I personally never use ‘new from clipboard’. I just make a new empty patch, then copy the text from browser, then paste into the empty window. Won’t trigger loadbangs that way, but usually there aren’t that many.

#138318
Sep 1, 2008 at 11:57am

I don’t know why, but it don’t works for me.

Even trying to paste it in an another text editor!

No way.

So, How I can create with jit.record a sequence of clip? I mean that automatically generate a sequential series of video like: live1.avi – live2.avi – live3.avi etc etc in the same folder?

I’ll try to build my patch

=)

#138319

You must be logged in to reply to this topic.