jit.qt.record – realtime issues and sound

Mar 4, 2006 at 12:34pm

jit.qt.record – realtime issues and sound

I’ve found a whole bunch of stuff online about jit.qt.record, and I’m
pretty sure I understand how it works, but I’m not too sure about a
workaround for what I want. It seems like this should be easy, but….

Yesterday, I started what I thought would be a simple patch.
Basically, I want to take a source movie and remove all frames that
have an amplitude above or below a certain number (maybe both, but
that’s the easy part), keeping the sound for the frames that pass
through intact. My first problem was that spigot~ doesn’t work on
10.4.4, but I got around that with soundflower. I have two other
problems:

1. If I enable realtime, I get static frames (keeps sending the same
one through) when the amplitude does not pass my test. If I disable
realtime, the time distorts. Happy medium of only record when
actually sending frames but do it in real time? Other suggestions?
2. No sound – I can’t just record an aiff, as I only want sound when
a frame gets sent through, and I want it perfectly synced.

I really thought this would just be jit.qt.movie, spigot~ and meter~
with < and sel, jit.qt.record, and a few spares. I guess I completely
misunderstood jit.qt.record’s capabilities, cuz with the above
issues, it seems like a much longer project that might require a fair
amount of Final Cut intervention (taking away the generative aspect I
kind of liked about this short-term patch play). Can anyone help with
an elegant solution(s)? I’d really appreciate any and all help.

my test patch so far (note that I’m using soundflower to route max’s
sound back into itself):

#P toggle 285 244 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 285 272 61 196617 realtime $1;
#P message 352 272 132 196617 write 29.97 dvntsc normal;
#P newex 124 124 30 196617 print;
#P button 171 202 15 0;
#P message 254 272 27 196617 stop;
#P newex 396 320 30 196617 print;
#P newex 240 298 166 196617 jit.qt.record 720 480 @realtime 1;
#B color 5;
#P message 122 68 37 196617 loop 0;
#P newex 234 156 32 196617 sel 1;
#P newex 234 134 33 196617 < 0.1;
#P user jit.pwindow 109 285 82 62 0 1 0 0 1 0;
#P flonum 234 117 76 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user meter~ 234 100 314 113 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 newex 234 77 27 196617 +~;
#P newex 234 53 31 196617 adc~;
#P toggle 8 25 15 0;
#P newex 8 46 52 196617 metro 20;
#P user jit.pwindow 23 125 82 62 0 1 0 0 1 0;
#P message 86 69 32 196617 start;
#P message 55 69 27 196617 stop;
#P message 24 69 29 196617 read;
#P newex 24 93 63 196617 jit.qt.movie;
#P newex 115 240 95 196617 jit.matrix @thru 0;
#P connect 7 0 6 0;
#P fasten 6 0 1 0 13 90 29 90;
#P fasten 15 0 1 0 127 87 29 87;
#P connect 2 0 1 0;
#P fasten 3 0 1 0 60 88 29 88;
#P fasten 4 0 1 0 91 87 29 87;
#P connect 1 0 5 0;
#P connect 0 0 12 0;
#P connect 5 0 0 0;
#P connect 19 0 0 0;
#P connect 1 1 20 0;
#P connect 14 0 19 0;
#P fasten 7 0 8 0 13 43 239 43;
#P connect 8 0 9 0;
#P connect 9 0 10 0;
#P connect 10 0 11 0;
#P connect 11 0 13 0;
#P connect 13 0 14 0;
#P connect 0 0 16 0;
#P fasten 22 0 16 0 290 295 245 295;
#P fasten 21 0 16 0 357 290 245 290;
#P fasten 18 0 16 0 259 289 245 289;
#P connect 8 1 9 1;
#P connect 23 0 22 0;
#P connect 16 1 17 0;
#P window clipboard copycount 24;

thanks so much in advance,

nathaniel

http://nathanielstern.com

#24701
Mar 4, 2006 at 1:36pm

ok. I mostly figured out the timing issue (just some calculations
with messages boxes to write, metro and meter~); it’s just that both
peakamp and meter~ truncate the interval decimals, and I’m not sure
how that’ll work out with sound when I try to sync it. Anyone have
any ideas about this and/or how to record the sound only when frames
are passed through? Thanks again,

nathaniel

http://nathanielstern.com

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 374 104 61 196617 interval $1;
#P newex 25 247 124 196617 jit.matrix movie @thru 0;
#P flonum 90 49 100 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont “Fixedwidth Serif” 10.;
#P newex 222 265 53 1441802 !/ 1000.;
#P message 182 211 43 1441802 getfps;
#P flonum 222 243 39 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 182 190 38 1441802 sel 1;
#P newex 124 169 68 1441802 unpack s 0;
#P newex 124 144 92 1441802 route read fps;
#P window setfont “Sans Serif” 9.;
#P message 448 264 182 196617 write no-sound.mov $1 dvntsc normal;
#P button 292 206 15 0;
#P message 416 264 27 196617 stop;
#P newex 558 311 30 196617 print;
#P newex 402 290 166 196617 jit.qt.record 720 480 @realtime 0;
#B color 5;
#P message 199 94 37 196617 loop 0;
#P newex 314 182 32 196617 sel 1;
#P newex 314 160 33 196617 < 0.1;
#P user jit.pwindow 313 231 82 62 0 1 0 0 1 0;
#P flonum 314 143 76 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user meter~ 314 126 394 139 66 0 168 0 103 103 103 255 153 0 255 0
0 217 217 0 153 186 0 12 3 3 3 3;
#P newex 314 103 27 196617 +~;
#P newex 314 79 31 196617 adc~;
#P toggle 9 28 15 0;
#P newex 9 71 91 196617 metro 33.366699;
#P user jit.pwindow 24 150 82 62 0 1 0 0 1 0;
#P message 163 94 32 196617 start;
#P message 132 94 27 196617 stop;
#P message 101 94 29 196617 read;
#P newex 25 118 63 196617 jit.qt.movie;
#P newex 314 208 124 196617 jit.matrix movie @thru 0;
#P connect 7 0 6 0;
#P fasten 15 0 1 0 204 112 30 112;
#P connect 2 0 1 0;
#P fasten 3 0 1 0 137 113 30 113;
#P fasten 4 0 1 0 168 112 30 112;
#P fasten 6 0 1 0 14 115 30 115;
#P fasten 25 0 1 0 187 234 15 234 15 114 30 114;
#P connect 1 0 5 0;
#P connect 5 0 28 0;
#P fasten 26 0 27 0 227 286 281 286 281 43 95 43;
#P connect 27 0 6 1;
#P fasten 1 1 21 0 83 138 129 138;
#P connect 21 0 22 0;
#P connect 22 1 23 0;
#P connect 23 0 25 0;
#P fasten 21 1 24 0 170 165 227 165;
#P connect 24 0 26 0;
#P connect 14 0 19 0;
#P fasten 7 0 8 0 14 67 319 67;
#P connect 8 0 9 0;
#P connect 9 0 10 0;
#P connect 29 0 10 0;
#P connect 10 0 11 0;
#P connect 11 0 13 0;
#P connect 13 0 14 0;
#P connect 14 0 0 0;
#P connect 0 0 12 0;
#P connect 8 1 9 1;
#P fasten 26 0 29 0 227 288 282 288 282 100 379 100;
#P fasten 0 0 16 0 319 227 407 227;
#P fasten 18 0 16 0 421 281 407 281;
#P fasten 20 0 16 0 453 282 407 282;
#P fasten 24 0 20 0 227 261 304 261 304 228 453 228;
#P connect 16 1 17 0;
#P window clipboard copycount 30;

#71898
Mar 4, 2006 at 3:16pm

Apologies for list-clog. I feel like this patch should do it, but not
so much.

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P hidden newex 495 35 48 196617 loadbang;
#P newex 154 422 31 196617 adc~;
#P message 477 355 49 196617 writeaiff;
#P newex 318 404 30 196617 line~;
#P message 318 380 86 196617 0 , 60000 60000;
#P newex 331 458 67 196617 dac~;
#P newex 318 427 96 196617 play~ soundtrack 2;
#P newex 112 285 43 196617 r sound;
#P newex 359 183 43 196617 s sound;
#P toggle 61 287 15 0;
#P newex 61 309 29 196617 gate;
#P message 91 352 14 196617 0;
#P message 76 352 14 196617 1;
#P newex 61 329 40 196617 change;
#P toggle 83 372 15 0;
#P newex 477 378 138 196617 buffer~ soundtrack 60000 2;
#P newex 111 456 107 196617 record~ soundtrack 2;
#B color 5;
#P toggle 127 375 15 0;
#P message 127 395 58 196617 append $1;
#P message 374 104 61 196617 interval $1;
#P newex 25 247 124 196617 jit.matrix movie @thru 0;
#P flonum 90 49 100 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont “Fixedwidth Serif” 10.;
#P newex 222 265 53 1441802 !/ 1000.;
#P message 182 211 43 1441802 getfps;
#P flonum 222 243 39 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 182 190 38 1441802 sel 1;
#P newex 124 169 68 1441802 unpack s 0;
#P newex 124 144 92 1441802 route read fps;
#P window setfont “Sans Serif” 9.;
#P message 448 264 182 196617 write no-sound.mov $1 dvntsc normal;
#P button 292 206 15 0;
#P message 416 264 27 196617 stop;
#P newex 558 311 30 196617 print;
#P newex 402 290 166 196617 jit.qt.record 720 480 @realtime 0;
#B color 5;
#P message 199 94 37 196617 loop 0;
#P newex 314 182 32 196617 sel 1;
#P newex 314 160 33 196617 < 0.1;
#P user jit.pwindow 313 231 82 62 0 1 0 0 1 0;
#P flonum 314 143 76 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user meter~ 314 126 394 139 66 0 168 0 103 103 103 255 153 0 255 0
0 217 217 0 153 186 0 12 3 3 3 3;
#P newex 314 103 27 196617 +~;
#P newex 314 79 31 196617 adc~;
#P toggle 9 28 15 0;
#P newex 9 71 91 196617 metro 33.366699;
#P user jit.pwindow 24 150 82 62 0 1 0 0 1 0;
#P message 163 94 32 196617 start;
#P message 132 94 27 196617 stop;
#P message 101 94 29 196617 read;
#P newex 25 118 63 196617 jit.qt.movie;
#P newex 314 208 124 196617 jit.matrix movie @thru 0;
#P hidden connect 48 0 7 0;
#P connect 7 0 6 0;
#P fasten 25 0 1 0 187 234 15 234 15 114 30 114;
#P fasten 6 0 1 0 14 115 30 115;
#P fasten 4 0 1 0 168 112 30 112;
#P fasten 3 0 1 0 137 113 30 113;
#P connect 2 0 1 0;
#P fasten 15 0 1 0 204 112 30 112;
#P connect 1 0 5 0;
#P connect 5 0 28 0;
#P hidden connect 48 0 39 0;
#P connect 39 0 38 0;
#P connect 38 0 35 0;
#P connect 35 1 36 0;
#P connect 41 0 38 1;
#P connect 37 0 34 0;
#P connect 36 0 34 0;
#P fasten 26 0 27 0 227 286 281 286 281 43 95 43;
#P connect 27 0 6 1;
#P connect 35 2 37 0;
#P connect 47 0 32 0;
#P connect 30 0 32 0;
#P connect 34 0 32 0;
#P fasten 1 1 21 0 83 138 129 138;
#P connect 21 0 22 0;
#P hidden connect 48 0 31 0;
#P connect 31 0 30 0;
#P connect 47 1 32 1;
#P connect 22 1 23 0;
#P connect 23 0 25 0;
#P fasten 23 0 15 0 187 211 239 211 239 89 204 89;
#P fasten 21 1 24 0 170 165 227 165;
#P connect 24 0 26 0;
#P connect 14 0 19 0;
#P fasten 7 0 8 0 14 67 319 67;
#P connect 8 0 9 0;
#P connect 29 0 10 0;
#P connect 9 0 10 0;
#P connect 10 0 11 0;
#P connect 11 0 13 0;
#P connect 13 0 14 0;
#P connect 14 0 0 0;
#P connect 0 0 12 0;
#P connect 44 0 45 0;
#P connect 45 0 42 0;
#P connect 8 1 9 1;
#P connect 42 0 43 0;
#P connect 13 0 40 0;
#P fasten 26 0 29 0 227 288 282 288 282 100 379 100;
#P connect 42 1 43 1;
#P fasten 20 0 16 0 453 282 407 282;
#P fasten 18 0 16 0 421 281 407 281;
#P fasten 0 0 16 0 319 227 407 227;
#P fasten 24 0 20 0 227 261 304 261 304 228 453 228;
#P connect 46 0 33 0;
#P connect 16 1 17 0;
#P window clipboard copycount 49;

nathaniel

http://nathanielstern.com

#71899

You must be logged in to reply to this topic.