Re: [PD] [msgfile] and [textfile] problems.
I think making a stack size startup option would be a Good Thing and will stick it on my list... but I agree with other messages that it would be wiser to write the patch iteratively, especially since I'm not dead sure [textfile] is totally safe for re-entrant use. (I know of a reentrancy but in the related qlist_next that Krzysztof Chaja reported years ago and so far have been afraid of touching the code...) cheers Miller On Tue, Mar 06, 2007 at 09:47:33AM -0500, David F. Place wrote: > Recently, I sent a message complaining about the behavior of > [textfile].I learned about [msgfile] in the zexy library and thought > it would solve my problems, but it has not. > > I have distilled my complaints in the attached patch. > > 1.) [textfile] blows the stack on too low a number. The stack should > be bigger. ...or maybe a startup option for Pd. > > 2.) [msgfile] doesn't seem to work at all when you barrage it with > consecutive bangs. > > Cheers, > David > > > #N canvas 414 295 704 568 10; > #X obj 15 13 zexy; > #X obj 219 527 print; > #X msg 246 391 print; > #X msg 347 340 rewind; > #X obj 266 458 msgfile; > #X obj 189 494 t b a; > #X obj 310 488 print done; > #X obj 434 340 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 > -1 -1; > #X obj 232 261 print; > #X msg 242 132 print; > #X msg 328 75 rewind; > #X obj 202 228 t b a; > #X obj 330 222 print done; > #X obj 407 76 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 > -1; > #X obj 279 192 textfile; > #X msg 135 338 clear \, read test4.txt; > #X msg 110 76 clear \, read test4.txt; > #X msg 150 360 clear \, read josquin.seq; > #X msg 130 101 clear \, read josquin.seq; > #X text 99 22 [textfile] succeeds with the file test4.txt \, but blows > the stack on josquin.seq; > #X text 103 290 [msgfile] blows the stack on both and just outputs > the first record over and over.; > #X text 113 57 1.); > #X text 328 54 2.); > #X text 405 52 3.); > #X text 136 322 1.); > #X text 351 319 2.); > #X text 428 317 3.); > #X connect 2 0 4 0; > #X connect 3 0 4 0; > #X connect 4 0 5 0; > #X connect 4 1 6 0; > #X connect 5 0 4 0; > #X connect 5 1 1 0; > #X connect 7 0 4 0; > #X connect 9 0 14 0; > #X connect 10 0 14 0; > #X connect 11 0 14 0; > #X connect 11 1 8 0; > #X connect 13 0 14 0; > #X connect 14 0 11 0; > #X connect 14 1 12 0; > #X connect 15 0 4 0; > #X connect 16 0 14 0; > #X connect 17 0 4 0; > #X connect 18 0 14 0; > control mark 0; > control beat set 0; > do 0 attack 100 0 7 1.0; > do 1 attack 100 0 7 1.0; > do 2 release; > do 3 release; > wait 0.25; > wait 0.25; > wait 0.25; > wait 0.25; > control beat set 1; > do 0 attack 100 1 10 1.0; > wait 0.25; > wait 0.25; > wait 0.25; > wait 0.25; > control beat set 2; > do 0 attack 100 0 9 1.0; > do 1 attack 100 1 5 1.0; > wait 0.25; > wait 0.25; > wait 0.25; > wait 0.25; > control beat set 3; > do 0 attack 100 0 7 1.0; > do 1 attack 100 0 7 1.0; > wait 0.25; > wait 0.25; > wait 0.25; > wait 0.25; > control beat set 4; > do 0 attack 100 0 2 2.0; > do 2 attack 100 0 7 0.5; > do 3 release; > wait 0.25; > wait 0.25; > do 1 attack 100 1 5 1.0; > wait 0.25; > wait 0.25; > control beat set 5; > do 1 attack 100 0 2 1.0; > do 2 attack 100 1 10 0.5; > wait 0.25; > wait 0.25; > do 0 attack 100 0 0 2.0; > wait 0.25; > do 0 attack 100 1 10 1.0; > wait 0.25; > control beat set 6; > do 0 attack 100 0 0 2.0; > do 1 attack 100 0 4 1.0; > do 2 attack 100 0 9 0.5; > wait 0.25; > wait 0.25; > do 1 attack 100 1 5 1.0; > wait 0.25; > wait 0.25; > control beat set 7; > do 0 attack 100 1 10 1.0; > do 1 attack 100 0 7 1.0; > do 2 attack 100 0 7 0.5; > wait 0.25; > wait 0.25; > wait 0.25; > wait 0.25; > control beat set 8; > do 0 release; > do 1 attack 100 1 5 1.0; > do 2 attack 100 0 2 1.0; > do 3 attack 100 0 2 0.5; > wait 0.25; > wait 0.25; > do 0 attack 100 0 9 1.0; > wait 0.25; > wait 0.25; > control beat set 9; > do 3 attack 100 1 5 0.5; > wait 0.25; > wait 0.25; > do 0 attack 100 0 7 1.0; > do 1 attack 100 -1 4 1.0; > wait 0.25; > do 0 attack 100 1 5 1.0; > do 1 attack 100 0 2 1.0; > wait 0.25; > control beat set 10; > do 0 attack 100 0 7 1.0; > do 1 attack 100 0 0 1.0; > do 2 release; > do 3 attack 100 -1 4 0.5; > wait 0.25; > wait 0.25; > wait 0.25; > wait 0.25; > control beat set 11; > do 0 attack 100 1 5 1.0; > do 1 attack 100 0 2 1.0; > do 3 attack 100 0 2 0.5; > wait 0.25; > wait 0.25; > wait 0.25; > wait 0.25; > control beat set 12; > do 0 release; > do 1 attack 100 0 4 1.0; > do 3 attack 100 0 9 0.5; > wait 0.25; > wait 0.25; > do 0 attack 100 0 0 2.0; > wait 0.25; > wait 0.25; > control beat set 13; > do 1 attack 100 1 5 1.0; > wait 0.25; > wait 0.25; > do 0 attack 100 1 10 1.0; > wait 0.25; > do 0 attack 100 0 9 1.0; > wait 0.25; > control beat set 14; > do 0 attack 100 1 10 1.0; > do 1 attack 100 1 10 0.5; > do 2 release; > do 3 attack 100 0 7 0.5; > wait 0.25; > wait 0.25; > do 0 attack 100 0 7 1.0; > wait 0.25; > do 1 attack 100 0 0 1.0; > wait 0.25; > control beat set 15; > do 1 attack 100 1 3
Re: [PD] [msgfile] and [textfile] problems.
hi, the delay object has one small difference, that is that the messages will be processed one dsp cycle later. or at least the first delay 0 has that effect, then is seems to be whithin the same dsp cycle... (see attached patch). otoh, I don't think this makes a difference to davids needs. marius. Frank Barknecht wrote: Hallo, David F. Place hat gesagt: // David F. Place wrote: Recently, I sent a message complaining about the behavior of [textfile].I learned about [msgfile] in the zexy library and thought it would solve my problems, but it has not. I have distilled my complaints in the attached patch. 1.) [textfile] blows the stack on too low a number. The stack should be bigger. ...or maybe a startup option for Pd. If you want to break out of the loop, you could use a [delay] object after the bang outlet of [t b a]. Ciao #N canvas 402 187 904 531 10; #X obj 220 447 print; #X obj 78 137 t b s; #X obj 78 218 + 1; #X obj 78 195 0; #X msg 94 172 0; #X obj 78 244 < 10; #X obj 78 271 sel 1; #X msg 43 354 bang; #X msg 78 49 start; #X obj 78 75 t b b b; #X obj 220 377 bang~; #X obj 220 404 spigot; #X msg 267 377 0; #X msg 299 377 1; #X msg 108 298 bang; #X msg 740 89 \; pd dsp 1; #X obj 740 65 loadbang; #X msg 78 102 symbol gugu; #X obj 610 447 print; #X obj 468 137 t b s; #X obj 468 218 + 1; #X obj 468 195 0; #X msg 484 172 0; #X obj 468 244 < 10; #X obj 468 271 sel 1; #X msg 433 354 bang; #X msg 468 49 start; #X obj 468 75 t b b b; #X obj 610 377 bang~; #X obj 610 404 spigot; #X msg 657 377 0; #X msg 689 377 1; #X msg 498 298 bang; #X msg 468 102 symbol gigi; #X obj 468 323 del 0; #X text 331 329 difference -->; #X text 331 314 here's the; #X connect 1 0 3 0; #X connect 1 1 0 0; #X connect 2 0 3 1; #X connect 2 0 5 0; #X connect 3 0 2 0; #X connect 4 0 3 1; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 6 1 14 0; #X connect 7 0 17 0; #X connect 8 0 9 0; #X connect 9 0 17 0; #X connect 9 1 13 0; #X connect 9 2 4 0; #X connect 10 0 11 0; #X connect 11 0 0 0; #X connect 12 0 11 1; #X connect 13 0 11 1; #X connect 14 0 12 0; #X connect 16 0 15 0; #X connect 17 0 1 0; #X connect 19 0 21 0; #X connect 19 1 18 0; #X connect 20 0 21 1; #X connect 20 0 23 0; #X connect 21 0 20 0; #X connect 22 0 21 1; #X connect 23 0 24 0; #X connect 24 0 34 0; #X connect 24 1 32 0; #X connect 25 0 33 0; #X connect 26 0 27 0; #X connect 27 0 33 0; #X connect 27 1 31 0; #X connect 27 2 22 0; #X connect 28 0 29 0; #X connect 29 0 18 0; #X connect 30 0 29 1; #X connect 31 0 29 1; #X connect 32 0 30 0; #X connect 33 0 19 0; #X connect 34 0 25 0; ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] [msgfile] and [textfile] problems.
Thanks. [Until] fixes all problems. On Mar 6, 2007, at 10:52 AM, marius schebella wrote: > hi david, > don't know why the error occurs, but maybe you could use the > [until] object to solve it. > > [bang( [r bang when msgfile printout is finished] > | / > [until] > | > [msgfile] > | \ > [print] [send bang to right inlet of until when finished] > > marius. > > > David F. Place wrote: >> Recently, I sent a message complaining about the behavior of >> [textfile].I learned about [msgfile] in the zexy library and >> thought it would solve my problems, but it has not. >> I have distilled my complaints in the attached patch. 1.) >> [textfile] blows the stack on too low a number. The stack should >> be bigger. ...or maybe a startup option for Pd. >> 2.) [msgfile] doesn't seem to work at all when you barrage it >> with consecutive bangs. >> Cheers, >> David > --o---o-o-o---o-o-o--- David F. Place mailto:[EMAIL PROTECTED] ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] [msgfile] and [textfile] problems.
David F. Place wrote: > Recently, I sent a message complaining about the behavior of > [textfile].I learned about [msgfile] in the zexy library and thought > it would solve my problems, but it has not. > > I have distilled my complaints in the attached patch. > 1.) [textfile] blows the stack on too low a number. The stack should > be bigger. ...or maybe a startup option for Pd. hmm, adding a bigger stack will just push the problem to LATER, it is not a solution. one solution would be, to not use the stack at all, if it is possible. in your case, this is fairly easy (see attached patch). hint: [until] > 2.) [msgfile] doesn't seem to work at all when you barrage it with > consecutive bangs. i'll try to fix that. in the meantime, there is a [flush( message, will output all messages in [msgfile] fm.asdr IOhannes #N canvas 414 295 704 568 10; #X obj 15 13 zexy; #X msg 246 391 print; #X msg 347 340 rewind; #X obj 266 458 msgfile; #X obj 310 488 print done; #X obj 279 246 print; #X msg 242 132 print; #X msg 328 75 rewind; #X obj 330 242 print done; #X obj 407 76 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 279 192 textfile; #X msg 135 338 clear \, read test4.txt; #X msg 110 76 clear \, read test4.txt; #X msg 150 360 clear \, read josquin.seq; #X msg 130 101 clear \, read josquin.seq; #X text 99 22 [textfile] succeeds with the file test4.txt \, but blows the stack on josquin.seq; #X text 103 290 [msgfile] blows the stack on both and just outputs the first record over and over.; #X text 113 57 1.); #X text 328 54 2.); #X text 405 52 3.); #X text 136 322 1.); #X text 351 319 2.); #X text 428 317 3.); #X obj 397 127 until; #X obj 327 216 t b b; #X msg 438 343 flush; #X obj 250 503 print; #X connect 1 0 3 0; #X connect 2 0 3 0; #X connect 3 0 26 0; #X connect 3 1 4 0; #X connect 6 0 10 0; #X connect 7 0 10 0; #X connect 9 0 23 0; #X connect 10 0 5 0; #X connect 10 1 24 0; #X connect 11 0 3 0; #X connect 12 0 10 0; #X connect 13 0 3 0; #X connect 14 0 10 0; #X connect 23 0 10 0; #X connect 24 0 8 0; #X connect 24 1 23 1; #X connect 25 0 3 0; ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] [msgfile] and [textfile] problems.
btw for your josquin sequence I got an MSGFILE_HEADROOM error: read error (headroom 1024 too small!) this seems to be a limitation of the line length, which I don't understand why it has to be there... marius. David F. Place wrote: > Recently, I sent a message complaining about the behavior of > [textfile].I learned about [msgfile] in the zexy library and thought > it would solve my problems, but it has not. > > I have distilled my complaints in the attached patch. > 1.) [textfile] blows the stack on too low a number. The stack should > be bigger. ...or maybe a startup option for Pd. > > 2.) [msgfile] doesn't seem to work at all when you barrage it with > consecutive bangs. > > Cheers, > David ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] [msgfile] and [textfile] problems.
hi david, don't know why the error occurs, but maybe you could use the [until] object to solve it. [bang( [r bang when msgfile printout is finished] | / [until] | [msgfile] | \ [print] [send bang to right inlet of until when finished] marius. David F. Place wrote: > Recently, I sent a message complaining about the behavior of > [textfile].I learned about [msgfile] in the zexy library and thought > it would solve my problems, but it has not. > > I have distilled my complaints in the attached patch. > 1.) [textfile] blows the stack on too low a number. The stack should > be bigger. ...or maybe a startup option for Pd. > > 2.) [msgfile] doesn't seem to work at all when you barrage it with > consecutive bangs. > > Cheers, > David ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] [msgfile] and [textfile] problems.
Hallo, David F. Place hat gesagt: // David F. Place wrote: > Recently, I sent a message complaining about the behavior of > [textfile].I learned about [msgfile] in the zexy library and thought > it would solve my problems, but it has not. > > I have distilled my complaints in the attached patch. > > 1.) [textfile] blows the stack on too low a number. The stack should > be bigger. ...or maybe a startup option for Pd. If you want to break out of the loop, you could use a [delay] object after the bang outlet of [t b a]. Ciao -- Frank Barknecht _ __footils.org_ __goto10.org__ ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] [msgfile] and [textfile] problems.
Whoops. Here are the versions: Pd 0.41 zexy 2.1 Fedore core 4 64-bits David F. Place wrote: > Recently, I sent a message complaining about the behavior of > [textfile].I learned about [msgfile] in the zexy library and > thought it would solve my problems, but it has not. > ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
[PD] [msgfile] and [textfile] problems.
Recently, I sent a message complaining about the behavior of [textfile].I learned about [msgfile] in the zexy library and thought it would solve my problems, but it has not. I have distilled my complaints in the attached patch. 1.) [textfile] blows the stack on too low a number. The stack should be bigger. ...or maybe a startup option for Pd. 2.) [msgfile] doesn't seem to work at all when you barrage it with consecutive bangs. Cheers, David #N canvas 414 295 704 568 10; #X obj 15 13 zexy; #X obj 219 527 print; #X msg 246 391 print; #X msg 347 340 rewind; #X obj 266 458 msgfile; #X obj 189 494 t b a; #X obj 310 488 print done; #X obj 434 340 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 232 261 print; #X msg 242 132 print; #X msg 328 75 rewind; #X obj 202 228 t b a; #X obj 330 222 print done; #X obj 407 76 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 279 192 textfile; #X msg 135 338 clear \, read test4.txt; #X msg 110 76 clear \, read test4.txt; #X msg 150 360 clear \, read josquin.seq; #X msg 130 101 clear \, read josquin.seq; #X text 99 22 [textfile] succeeds with the file test4.txt \, but blows the stack on josquin.seq; #X text 103 290 [msgfile] blows the stack on both and just outputs the first record over and over.; #X text 113 57 1.); #X text 328 54 2.); #X text 405 52 3.); #X text 136 322 1.); #X text 351 319 2.); #X text 428 317 3.); #X connect 2 0 4 0; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 4 1 6 0; #X connect 5 0 4 0; #X connect 5 1 1 0; #X connect 7 0 4 0; #X connect 9 0 14 0; #X connect 10 0 14 0; #X connect 11 0 14 0; #X connect 11 1 8 0; #X connect 13 0 14 0; #X connect 14 0 11 0; #X connect 14 1 12 0; #X connect 15 0 4 0; #X connect 16 0 14 0; #X connect 17 0 4 0; #X connect 18 0 14 0; control mark 0; control beat set 0; do 0 attack 100 0 7 1.0; do 1 attack 100 0 7 1.0; do 2 release; do 3 release; wait 0.25; wait 0.25; wait 0.25; wait 0.25; control beat set 1; do 0 attack 100 1 10 1.0; wait 0.25; wait 0.25; wait 0.25; wait 0.25; control beat set 2; do 0 attack 100 0 9 1.0; do 1 attack 100 1 5 1.0; wait 0.25; wait 0.25; wait 0.25; wait 0.25; control beat set 3; do 0 attack 100 0 7 1.0; do 1 attack 100 0 7 1.0; wait 0.25; wait 0.25; wait 0.25; wait 0.25; control beat set 4; do 0 attack 100 0 2 2.0; do 2 attack 100 0 7 0.5; do 3 release; wait 0.25; wait 0.25; do 1 attack 100 1 5 1.0; wait 0.25; wait 0.25; control beat set 5; do 1 attack 100 0 2 1.0; do 2 attack 100 1 10 0.5; wait 0.25; wait 0.25; do 0 attack 100 0 0 2.0; wait 0.25; do 0 attack 100 1 10 1.0; wait 0.25; control beat set 6; do 0 attack 100 0 0 2.0; do 1 attack 100 0 4 1.0; do 2 attack 100 0 9 0.5; wait 0.25; wait 0.25; do 1 attack 100 1 5 1.0; wait 0.25; wait 0.25; control beat set 7; do 0 attack 100 1 10 1.0; do 1 attack 100 0 7 1.0; do 2 attack 100 0 7 0.5; wait 0.25; wait 0.25; wait 0.25; wait 0.25; control beat set 8; do 0 release; do 1 attack 100 1 5 1.0; do 2 attack 100 0 2 1.0; do 3 attack 100 0 2 0.5; wait 0.25; wait 0.25; do 0 attack 100 0 9 1.0; wait 0.25; wait 0.25; control beat set 9; do 3 attack 100 1 5 0.5; wait 0.25; wait 0.25; do 0 attack 100 0 7 1.0; do 1 attack 100 -1 4 1.0; wait 0.25; do 0 attack 100 1 5 1.0; do 1 attack 100 0 2 1.0; wait 0.25; control beat set 10; do 0 attack 100 0 7 1.0; do 1 attack 100 0 0 1.0; do 2 release; do 3 attack 100 -1 4 0.5; wait 0.25; wait 0.25; wait 0.25; wait 0.25; control beat set 11; do 0 attack 100 1 5 1.0; do 1 attack 100 0 2 1.0; do 3 attack 100 0 2 0.5; wait 0.25; wait 0.25; wait 0.25; wait 0.25; control beat set 12; do 0 release; do 1 attack 100 0 4 1.0; do 3 attack 100 0 9 0.5; wait 0.25; wait 0.25; do 0 attack 100 0 0 2.0; wait 0.25; wait 0.25; control beat set 13; do 1 attack 100 1 5 1.0; wait 0.25; wait 0.25; do 0 attack 100 1 10 1.0; wait 0.25; do 0 attack 100 0 9 1.0; wait 0.25; control beat set 14; do 0 attack 100 1 10 1.0; do 1 attack 100 1 10 0.5; do 2 release; do 3 attack 100 0 7 0.5; wait 0.25; wait 0.25; do 0 attack 100 0 7 1.0; wait 0.25; do 1 attack 100 0 0 1.0; wait 0.25; control beat set 15; do 1 attack 100 1 3 1.0; wait 0.25; wait 0.25; do 0 attack 100 0 9 1.0; do 1 attack 100 0 2 1.0; do 3 attack 100 1 5 0.5; wait 0.25; wait 0.25; control beat set 16; do 3 attack 100 0 4 0.5; wait 0.25; do 1 attack 100 0 0 1.0; wait 0.25; do 0 attack 100 0 7 1.0; do 1 attack 100 0 0 1.0; wait 0.25; do 0 attack 100 0 9 1.0; wait 0.25; control beat set 17; do 0 attack 100 1 10 1.0; do 3 attack 100 0 2 0.5; wait 0.25; do 0 attack 100 0 9 1.0; wait 0.25; do 0 attack 100 0 7 1.0; do 1 attack 100 -1 11 0.5; wait 0.25; do 0 attack 100 1 5 1.0; wait 0.25; control mark 1; control beat set 18; do 0 attack 100 -1 4 1.0; do 1 attack 100 0 0 1.0; do 2 attack 100 0 0 1.0; do 3 attack 100 0 0 0.5; wait 0.25; wait 0.25; wait 0.25; do 1 attack 100 0 2 1.0; wait 0.25; control beat set 19; do 1 attack 100 -1 4 1.0; wait 0.25; do 1 attack 100 1 5 1.0; wait 0.25; do 1 attack 100 0 7 1.0; do 2 attack 100 1 10 0.5; wait 0