From b0992dd1c5fc700cadc2a3f2458ed0fdb912aa47 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 16 Nov 2009 22:35:55 +0000 Subject: made the object work if the startframe is 0; changed the right outlet to output the message to send to a line rather than the line itself, so it can be fed into a line, line~, or vline~ svn path=/trunk/externals/framesync/; revision=12779 --- fsfilelooper~-help.pd | 36 +++++++++++---- fsfilelooper~.pd | 123 ++++++++++++++++++++++++-------------------------- 2 files changed, 86 insertions(+), 73 deletions(-) diff --git a/fsfilelooper~-help.pd b/fsfilelooper~-help.pd index e5056de..36d0166 100644 --- a/fsfilelooper~-help.pd +++ b/fsfilelooper~-help.pd @@ -1,4 +1,4 @@ -#N canvas 293 407 582 328 10; +#N canvas 463 304 574 472 10; #X text 30 7 loops a sound file between a startframe and endframe; #X text 138 179 start; #X text 139 191 frame; @@ -6,13 +6,33 @@ #X text 223 181 end; #X text 34 230 audio out; #X text 56 189 filename; -#X text 185 229 line (0-1) for position between startframe and endframe -; -#X obj 214 42 frameclock 400; -#X obj 61 208 fsfilelooper~ ../../sound/voice.wav 50 200; -#X obj 53 257 output~; +#X obj 177 49 frameclock 400; +#X obj 61 407 output~; #X text 318 206 args: filename startframe# endframe#; #X text 33 138 This will loop the voice.wav sound file starting at frame 50 and ending at frame 200:; -#X connect 9 0 10 0; -#X connect 9 0 10 1; +#X obj 313 281 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144 +-1 -1 12700 1; +#X floatatom 310 300 5 0 0 0 - - -; +#X obj 61 208 fsfilelooper~ ../../sound/voice.wav 50 200; +#X obj 310 260 line; +#X text 204 227 right outlet outputs a message to send to a line which +will generate a line with 0 at the start and 1 at the end; +#X obj 139 382 *~; +#X obj 154 362 line~; +#X obj 139 306 osc~ 333; +#X msg 231 333 0; +#X obj 139 327 *~ 0.3; +#X obj 231 312 select 1; +#X connect 11 0 12 0; +#X connect 13 0 8 0; +#X connect 13 1 14 0; +#X connect 13 1 17 0; +#X connect 14 0 11 0; +#X connect 14 0 21 0; +#X connect 16 0 8 1; +#X connect 17 0 16 1; +#X connect 18 0 20 0; +#X connect 19 0 17 0; +#X connect 20 0 16 0; +#X connect 21 0 19 0; diff --git a/fsfilelooper~.pd b/fsfilelooper~.pd index 0788bb8..d9d254a 100644 --- a/fsfilelooper~.pd +++ b/fsfilelooper~.pd @@ -1,8 +1,8 @@ -#N canvas 897 548 605 420 10; -#X obj 265 21 inlet; -#X obj 180 42 loadbang; -#X obj 425 21 inlet; -#X obj 129 383 outlet~; +#N canvas 771 553 605 420 10; +#X obj 280 21 inlet; +#X obj 195 42 loadbang; +#X obj 440 21 inlet; +#X obj 144 383 outlet~; #N canvas 679 332 352 429 play 0; #X obj 35 13 inlet; #X obj 90 375 outlet~; @@ -40,19 +40,18 @@ #X connect 13 1 10 1; #X connect 14 0 15 1; #X connect 15 0 13 0; -#X restore 129 341 pd play sample; -#X obj 129 318 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +#X restore 144 341 pd play sample; +#X obj 144 318 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; -#X obj 162 198 select; -#X msg 162 221 1; -#X obj 322 198 select; -#X msg 322 221 0; -#X text 319 23 start frame; -#X text 470 19 end frame; -#X msg 238 314 0 \, 1 \$1; -#X obj 196 220 float; -#X obj 238 383 outlet; -#X obj 238 338 line; +#X obj 177 198 select; +#X msg 177 221 1; +#X obj 337 198 select; +#X msg 337 221 0; +#X text 334 23 start frame; +#X text 485 19 end frame; +#X msg 253 340 0 \, 1 \$1; +#X obj 211 220 float; +#X obj 253 383 outlet; #N canvas 258 306 450 300 calc 0; #X obj 89 12 inlet; #X obj 228 11 inlet; @@ -73,29 +72,27 @@ #X connect 8 0 2 0; #X connect 8 0 6 0; #X connect 9 0 7 0; -#X restore 223 198 pd calc time; -#X obj 99 199 select 0; -#X msg 99 219 0; -#X obj 265 96 purepd/float_argument \$2; -#X obj 425 96 purepd/float_argument \$3; -#X text 126 22 first arg is filename; -#X obj 416 223 bang; -#X msg 416 245 0; -#X obj 32 200 delay 100; +#X restore 238 198 pd calc time; +#X msg 32 281 0; +#X obj 280 96 purepd/float_argument \$2; +#X obj 440 96 purepd/float_argument \$3; +#X text 141 22 first arg is filename; +#X obj 431 223 bang; +#X msg 431 245 0; #X obj 32 176 bang; #X obj 32 139 receive framesync/frameclock; -#X text 29 122 current frame #; -#X obj 65 21 inlet; -#X obj 65 96 purepd/symbol_argument \$1; -#X obj 180 65 trigger bang bang bang; -#X floatatom 24 232 5 0 0 0 - - -; -#X obj 416 203 receive framesync/reset; -#X floatatom 239 223 5 0 0 0 - - -; -#X floatatom 275 123 5 0 0 0 - - -; -#X floatatom 431 123 5 0 0 0 - - -; -#X connect 0 0 19 0; -#X connect 1 0 30 0; -#X connect 2 0 20 0; +#X text 32 122 current frame #; +#X obj 80 21 inlet; +#X obj 80 96 purepd/symbol_argument \$1; +#X obj 195 65 trigger bang bang bang; +#X obj 431 203 receive framesync/reset; +#X obj 59 219 framesync/fps_ms; +#X obj 32 260 delay; +#X obj 59 198 loadbang; +#X obj 59 240 * 2; +#X connect 0 0 17 0; +#X connect 1 0 27 0; +#X connect 2 0 18 0; #X connect 4 0 3 0; #X connect 5 0 4 0; #X connect 6 0 7 0; @@ -103,31 +100,27 @@ #X connect 7 0 5 0; #X connect 8 0 9 0; #X connect 9 0 5 0; -#X connect 12 0 15 0; +#X connect 12 0 14 0; #X connect 13 0 12 0; -#X connect 15 0 14 0; -#X connect 16 0 13 1; -#X connect 16 0 33 0; -#X connect 17 0 18 0; -#X connect 18 0 5 0; -#X connect 19 0 6 1; -#X connect 19 0 16 0; -#X connect 19 0 34 0; -#X connect 20 0 8 1; -#X connect 20 0 16 1; -#X connect 20 0 35 0; -#X connect 22 0 23 0; -#X connect 23 0 5 0; -#X connect 24 0 18 0; -#X connect 25 0 24 0; -#X connect 26 0 6 0; -#X connect 26 0 8 0; -#X connect 26 0 17 0; -#X connect 26 0 25 0; -#X connect 26 0 31 0; -#X connect 28 0 29 0; -#X connect 29 0 4 1; -#X connect 30 0 29 0; -#X connect 30 1 19 0; -#X connect 30 2 20 0; -#X connect 32 0 22 0; +#X connect 15 0 13 1; +#X connect 16 0 5 0; +#X connect 17 0 6 1; +#X connect 17 0 15 0; +#X connect 18 0 8 1; +#X connect 18 0 15 1; +#X connect 20 0 21 0; +#X connect 21 0 5 0; +#X connect 22 0 30 0; +#X connect 23 0 6 0; +#X connect 23 0 8 0; +#X connect 23 0 22 0; +#X connect 25 0 26 0; +#X connect 26 0 4 1; +#X connect 27 0 26 0; +#X connect 27 1 17 0; +#X connect 27 2 18 0; +#X connect 28 0 20 0; +#X connect 29 0 32 0; +#X connect 30 0 16 0; +#X connect 31 0 29 0; +#X connect 32 0 30 1; -- cgit v1.2.1