Dear list,
sorry for sending the first mail empty...
I need to use the output of [readanysf~] that shows me the approximate time of the soundfile in seconds--~3 seconds before the end of the end of the soundfile I want to trigger some different event.
So I compare int(output in seconds) with int (soundfilelength-3)
The problem is now that [readanysf~] is not always sending the same time in seconds allthough using the same soundfile--and it can happen the the value where it should equal int(soundfilelength-3) is not reached.
int(soundfilelength-3)=15
print: 13.4212 now: 0 print: 14.8608 now: 0 print: 16.3237 now: 0 print: 17.7866 if the output from [readanysf~] is like above the [==} never becomes true
How can I quickly solve that?
Thank you, Gerda
#N canvas 0 0 615 439 10; #X obj 220 162 readanysf~; #X obj 285 197 route float length; #X obj 285 300 ==; #X floatatom 345 293 5 0 0 0 - - -; #X obj 285 342 print now; #X floatatom 345 225 5 0 0 0 - - -; #X floatatom 285 255 5 0 0 0 - - -; #X obj 345 249 int; #X obj 285 278 int; #X obj 345 271 - 3; #X obj 300 323 s end; #X obj 440 235 loadbang; #X msg 439 256 18; #X msg 220 134 open /home/gerda/campioni_pd/earth41.wav; #X msg 164 100 start; #X obj 221 221 dac~ 1; #X floatatom 229 370 5 0 0 0 - - -; #X obj 225 288 print; #X connect 0 0 15 0; #X connect 0 2 1 0; #X connect 1 0 6 0; #X connect 1 1 5 0; #X connect 2 0 4 0; #X connect 2 0 10 0; #X connect 2 0 16 0; #X connect 5 0 7 0; #X connect 6 0 8 0; #X connect 6 0 17 0; #X connect 7 0 9 0; #X connect 8 0 2 0; #X connect 9 0 2 1; #X connect 9 0 3 0; #X connect 11 0 12 0; #X connect 12 0 2 1; #X connect 13 0 0 0; #X connect 14 0 0 0;