From 5979eef0279b354c993108860538155302af00cd Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 16 Nov 2009 23:24:06 +0000 Subject: ported to new global frameclock receive, fps, and frameclock svn path=/trunk/externals/framesync/; revision=12782 --- fsline-help.pd | 21 +++++-------- fsline.pd | 70 ++++++++++++++++++++--------------------- fstabplay~-help.pd | 46 +++++++++++++++++++-------- fstabplay~.pd | 92 ++++++++++++++++++++++++++++-------------------------- 4 files changed, 124 insertions(+), 105 deletions(-) diff --git a/fsline-help.pd b/fsline-help.pd index ba7b047..99fae5f 100644 --- a/fsline-help.pd +++ b/fsline-help.pd @@ -1,4 +1,4 @@ -#N canvas 501 356 588 378 10; +#N canvas 648 414 588 378 10; #X obj 80 184 fsline 10 20; #X floatatom 80 212 9 0 0 0 - - -; #X obj 83 239 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144 @@ -7,23 +7,18 @@ #X floatatom 230 212 9 0 0 0 - - -; #X obj 233 239 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 12700 1; -#X obj 230 184 fsline 30 40; #X floatatom 380 212 9 0 0 0 - - -; #X obj 383 239 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 12700 1; -#X obj 380 184 fsline 50 60; -#X text 31 275 the first inlet is for the frame clock; -#X text 31 295 the first argument/second inlet sets the start frame -; -#X text 31 315 the second argument/third inlet sets the end frame; #X text 33 16 Generate a 0-to-1 line based on frame numbers \, outputting once per frame.; +#X obj 230 184 fsline 30 40; +#X obj 380 184 fsline 50 60; +#X text 31 285 the first argument/inlet sets the start frame; +#X text 31 304 the second argument/inlet sets the end frame; #X connect 0 0 1 0; #X connect 1 0 2 0; -#X connect 3 0 0 0; -#X connect 3 0 6 0; -#X connect 3 0 9 0; #X connect 4 0 5 0; -#X connect 6 0 4 0; -#X connect 7 0 8 0; -#X connect 9 0 7 0; +#X connect 6 0 7 0; +#X connect 9 0 4 0; +#X connect 10 0 6 0; diff --git a/fsline.pd b/fsline.pd index 1fee226..d289aa2 100644 --- a/fsline.pd +++ b/fsline.pd @@ -1,39 +1,39 @@ -#N canvas 180 162 479 363 10; -#X obj 145 106 purepd/float_argument \$1; -#X obj 145 31 inlet; -#X obj 180 56 loadbang; -#X obj 305 31 inlet; -#X obj 47 31 inlet; -#X text 87 31 frame #; -#X text 199 33 start frame; -#X text 350 29 end frame; -#X obj 305 106 purepd/float_argument \$2; -#X obj 180 79 trigger bang bang; -#X obj 47 139 moses; -#X obj 74 173 moses; -#X obj 74 243 -; -#X msg 179 177 \$2 \$1; -#X obj 179 199 -; -#X obj 179 157 pack float float; -#X obj 74 278 /; +#N canvas 497 472 479 363 10; +#X obj 145 118 purepd/float_argument \$1; +#X obj 145 11 inlet; +#X obj 190 68 loadbang; +#X obj 305 11 inlet; +#X text 199 13 start frame; +#X text 350 9 end frame; +#X obj 305 118 purepd/float_argument \$2; +#X obj 190 91 trigger bang bang; +#X obj 47 151 moses; +#X obj 74 185 moses; +#X obj 74 255 -; +#X msg 179 189 \$2 \$1; +#X obj 179 211 -; +#X obj 179 169 pack float float; +#X obj 74 280 /; #X obj 74 325 outlet; -#X obj 101 153 + 1; +#X obj 101 165 + 1; +#X obj 47 45 receive framesync/frameclock; +#X text 44 28 current frame #; +#X connect 0 0 8 1; #X connect 0 0 10 1; -#X connect 0 0 12 1; -#X connect 0 0 15 0; +#X connect 0 0 13 0; #X connect 1 0 0 0; -#X connect 2 0 9 0; -#X connect 3 0 8 0; -#X connect 4 0 10 0; -#X connect 8 0 15 1; -#X connect 8 0 18 0; -#X connect 9 0 0 0; -#X connect 9 1 8 0; -#X connect 10 1 11 0; +#X connect 2 0 7 0; +#X connect 3 0 6 0; +#X connect 6 0 13 1; +#X connect 6 0 16 0; +#X connect 7 0 0 0; +#X connect 7 1 6 0; +#X connect 8 1 9 0; +#X connect 9 0 10 0; +#X connect 10 0 14 0; #X connect 11 0 12 0; -#X connect 12 0 16 0; -#X connect 13 0 14 0; -#X connect 14 0 16 1; -#X connect 15 0 13 0; -#X connect 16 0 17 0; -#X connect 18 0 11 1; +#X connect 12 0 14 1; +#X connect 13 0 11 0; +#X connect 14 0 15 0; +#X connect 16 0 9 1; +#X connect 17 0 8 0; diff --git a/fstabplay~-help.pd b/fstabplay~-help.pd index 4aee68a..3fc6c13 100644 --- a/fstabplay~-help.pd +++ b/fstabplay~-help.pd @@ -1,15 +1,35 @@ -#N canvas 313 376 504 442 10; -#X text 201 227 frame; -#X text 212 265 bang when done; -#X text 91 265 audio out; -#X text 45 20 Plays a sound file til it ends \, synced up to the frame +#N canvas 389 188 606 403 10; +#X text 212 227 frame; +#X text 241 263 bang when done; +#X text 71 265 audio out; +#X text 25 20 Plays a sound file til it ends \, synced up to the frame clock. Should stay in sync when randomly accessing different frame numbers.; -#X text 146 216 array; -#X text 146 227 name; -#X text 201 217 start; -#X text 134 311 arguments: arrayname startframe#; -#X obj 115 112 frameclock 1000; -#X text 35 232 frame clock; -#X obj 115 243 fstabplay~ \$0-array; -#X connect 8 0 10 0; +#X text 96 216 array; +#X text 96 227 name; +#X text 211 216 start; +#X text 177 308 arguments: arrayname startframe#; +#X obj 377 279 soundfiler; +#X obj 377 232 symbol \$0-array; +#N canvas 0 22 450 300 (subpatch) 0; +#X array \$0-array 62079 float 2; +#X coords 0 1 62079 -1 200 140 1; +#X restore 376 50 graph; +#X msg 377 210 bang; +#X msg 377 254 read ../../sound/voice.wav \$1; +#X obj 95 112 frameclock 400; +#X obj 76 322 output~; +#X obj 95 243 fstabplay~ \$0-array 40; +#X obj 224 264 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X msg 108 82 78; +#X msg 77 82 55; +#X text 134 80 <-- try jumping to a frame; +#X connect 9 0 12 0; +#X connect 11 0 9 0; +#X connect 12 0 8 0; +#X connect 15 0 14 0; +#X connect 15 0 14 1; +#X connect 15 1 16 0; +#X connect 17 0 13 0; +#X connect 18 0 13 0; diff --git a/fstabplay~.pd b/fstabplay~.pd index ae0eb12..0ac4c53 100644 --- a/fstabplay~.pd +++ b/fstabplay~.pd @@ -1,22 +1,17 @@ -#N canvas 593 271 707 506 10; -#X obj 24 7 inlet; +#N canvas 705 374 707 506 10; #X obj 301 4 inlet; #X obj 131 458 outlet~; #X obj 224 325 samplerate~; -#X obj 122 76 receive TN_FPS_MS; #X obj 204 120 / 1000; #X obj 224 348 *; #X obj 99 100 trigger bang float; #X obj 131 375 *; #X obj 131 397 pack float float; #X obj 224 376 + 100; -#X obj 301 71 purepd/symbol_argument \$1; -#X obj 309 40 loadbang; -#X text 342 3 file to play; +#X obj 301 83 purepd/symbol_argument \$1; +#X obj 222 30 loadbang; #X obj 504 11 inlet; -#X text 67 9 current frame number; #X text 544 8 frame # when to play; -#X obj 538 54 loadbang; #X obj 504 82 purepd/float_argument \$2; #X obj 104 300 moses; #X obj 131 324 moses; @@ -27,43 +22,52 @@ #X obj 158 299 +; #X obj 194 458 outlet; #X text 240 458 bang when done; -#X msg 64 54 33.3333; -#X text 114 52 default to 30fps; -#X obj 64 34 loadbang; #X obj 131 431 tabplay~ \$1; #X msg 301 396 set \$1; +#X obj 99 78 framesync/fps_ms; +#X obj 222 50 trigger bang bang bang; +#X obj 22 48 receive framesync/frameclock; +#X text 19 31 current frame #; +#X floatatom 101 204 0 0 0 0 - - -; +#X floatatom 234 158 0 0 0 0 - - -; +#X obj 234 427 pddp/print; +#X text 342 3 array to play; #X obj 99 169 flatspace/arraysize; -#X connect 0 0 19 0; -#X connect 1 0 11 0; -#X connect 3 0 6 0; -#X connect 4 0 7 0; -#X connect 5 0 6 1; -#X connect 5 0 21 1; -#X connect 6 0 8 1; -#X connect 6 0 10 0; -#X connect 7 0 3 0; -#X connect 7 0 33 0; -#X connect 7 1 5 0; -#X connect 8 0 9 0; -#X connect 9 0 31 0; -#X connect 10 0 9 1; -#X connect 11 0 32 0; -#X connect 12 0 11 0; -#X connect 14 0 18 0; +#X connect 0 0 9 0; +#X connect 2 0 4 0; +#X connect 3 0 4 1; +#X connect 3 0 16 1; +#X connect 3 0 30 0; +#X connect 4 0 6 1; +#X connect 4 0 8 0; +#X connect 5 0 2 0; +#X connect 5 0 33 0; +#X connect 5 1 3 0; +#X connect 6 0 7 0; +#X connect 7 0 23 0; +#X connect 7 0 31 0; +#X connect 8 0 7 1; +#X connect 9 0 24 0; +#X connect 9 0 33 1; +#X connect 10 0 26 0; +#X connect 11 0 13 0; +#X connect 13 0 19 1; +#X connect 13 0 14 1; +#X connect 13 0 20 1; +#X connect 14 1 15 0; +#X connect 15 0 19 0; +#X connect 16 0 17 0; #X connect 17 0 18 0; -#X connect 18 0 24 1; -#X connect 18 0 19 1; -#X connect 18 0 25 1; -#X connect 19 1 20 0; -#X connect 20 0 24 0; -#X connect 21 0 22 0; -#X connect 22 0 23 0; -#X connect 23 0 25 0; -#X connect 24 0 8 0; -#X connect 25 0 20 1; -#X connect 28 0 7 0; -#X connect 30 0 28 0; -#X connect 31 0 2 0; -#X connect 31 1 26 0; -#X connect 32 0 31 0; -#X connect 33 0 21 0; +#X connect 18 0 20 0; +#X connect 19 0 6 0; +#X connect 20 0 15 1; +#X connect 23 0 1 0; +#X connect 23 1 21 0; +#X connect 24 0 23 0; +#X connect 25 0 5 0; +#X connect 26 0 25 0; +#X connect 26 1 9 0; +#X connect 26 2 13 0; +#X connect 27 0 14 0; +#X connect 33 0 16 0; +#X connect 33 0 29 0; -- cgit v1.2.1