Please see attached patch. I think there is a bug in the trigger object. "A" converts BANG to 0.
#N canvas 227 220 645 320 12; #X obj 130 72 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 136 109 t a b; #X obj 129 179 print a; #X obj 197 135 print b; #X text 196 179 <-- I consider this a bug , what do you think?; #X text 220 199 It should print BANG , not 0; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 1 1 3 0;
Tom
The trigger object doesn't take "a" as an argument- check the documentation. I think it's reading the 'a' as an 'f' for a float, if you replace 'a' with 'f' it produces the same results, but [t b b] gives a bang out of both outlets.
read the documentation, it'll help when your patching because sometimes there are good work arounds or lesser used objects.
-brendan
Thomas Ouellet Fredericks wrote:
Please see attached patch. I think there is a bug in the trigger object. "A" converts BANG to 0.
#N canvas 227 220 645 320 12; #X obj 130 72 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 136 109 t a b; #X obj 129 179 print a; #X obj 197 135 print b; #X text 196 179 <-- I consider this a bug , what do you think?; #X text 220 199 It should print BANG , not 0; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 1 1 3 0;
Tom
Trigger does take an "a" as an argument. It stands for "anything". Attached is the documentation distributed with Miller's PD since it seems you have a different source of information.
Tom
#N canvas 58 142 689 359 12; #X msg 28 149 2.5; #X msg 126 151 bang; #X msg 68 150 23 64; #X obj 28 242 print x1; #X obj 112 242 print x2; #X obj 196 240 print x3; #X obj 43 26 trigger; #X obj 286 241 print x4; #X text 114 27 - sequence messages in right-to-left order; #X text 417 331 updated for Pd version 0.33; #X text 81 290 the above can be abbreviated as:; #X msg 172 152 symbol dog; #X text 39 59 The trigger object outputs its input from right to left , converting to the types indicated by its creation arguments. There is also a "pointer" argument type (see the pointer object.); #X obj 381 293 t f b l s a; #X msg 466 167 dog my cats; #X obj 466 199 trigger bang anything; #X obj 374 242 print x5; #X obj 466 240 print y1; #X obj 552 242 print y2; #X obj 28 202 trigger float bang symbol list anything; #X text 464 122 "anythings" can only; #X text 461 142 be converted to bang:; #X connect 0 0 19 0; #X connect 1 0 19 0; #X connect 2 0 19 0; #X connect 11 0 19 0; #X connect 14 0 15 0; #X connect 15 0 17 0; #X connect 15 1 18 0; #X connect 19 0 3 0; #X connect 19 1 4 0; #X connect 19 2 5 0; #X connect 19 3 7 0; #X connect 19 4 16 0;
----- Original Message ----- From: "brendan asselstine" bstine@telus.net To: "Thomas Ouellet Fredericks" iamonthebeach@hotmail.com Cc: pd-list@iem.at Sent: Thursday, February 17, 2005 11:05 PM Subject: Re: [PD] Trigger bug?
The trigger object doesn't take "a" as an argument- check the documentation. I think it's reading the 'a' as an 'f' for a float, if you replace 'a' with 'f' it produces the same results, but [t b b] gives a bang out of both outlets.
read the documentation, it'll help when your patching because sometimes there are good work arounds or lesser used objects.
-brendan
Thomas Ouellet Fredericks wrote:
Please see attached patch. I think there is a bug in the trigger object. "A" converts BANG to 0.
#N canvas 227 220 645 320 12; #X obj 130 72 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 136 109 t a b; #X obj 129 179 print a; #X obj 197 135 print b; #X text 196 179 <-- I consider this a bug , what do you think?; #X text 220 199 It should print BANG , not 0; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 1 1 3 0;
Tom
from notes.txt:
MAX compatibilty: trigger 1 (on Pd, outputs 0; on Max?)
basically |bang( | |trigger|
is internally the same as: |bang( | |0| | |trigger|
that is awful, but it seems that miller did this intentionally:
static void trigger_bang(t_trigger *x) { trigger_list(x, 0, 0, 0); }
static void trigger_float(t_trigger *x, t_float f) { t_atom at; SETFLOAT(&at, f); trigger_list(x, 0, 1, &at); }
cheers ... tim
static void trigger_bang(t_trigger *x) { trigger_list(x, 0, 0, 0); }
static void trigger_float(t_trigger *x, t_float f) { t_atom at; SETFLOAT(&at, f); trigger_list(x, 0, 1, &at); }
well ... i should have added this:
static void trigger_list(t_trigger *x, t_symbol *s, int argc, t_atom *argv) { t_triggerout *u; int i; t_atom at; if (!argc) { argc = 1; SETFLOAT(&at, 0); argv = &at; } ...
t
hi Tim,
Tim Blechmann wrote:
from notes.txt:
MAX compatibilty: trigger 1 (on Pd, outputs 0; on Max?)
basically |bang( | |trigger|
is internally the same as: |bang( | |0| | |trigger|
that is awful, but it seems that miller did this intentionally:
the implicit conversion is simply incorrect for the [t a] case, while it works perfectly ok for all other cases. So, I am not so sure -- the [t a] feature was added on top of already existing implementation.
Besides, it is too late for making the default Pd trigger fully Max-compatible. For the record, in Max:
[t 1], for any input, outputs the integer 1, [t a], for any input, outputs the message 'a' ('a' is the selector) [t l] works pretty much like Pd's [t a] (horribly, it converts bang to 0 as well...)
Krzysztof
On Mon, 21 Feb 2005, Krzysztof Czaja wrote:
the implicit conversion is simply incorrect for the [t a] case, while it works perfectly ok for all other cases. So, I am not so sure -- the [t a] feature was added on top of already existing implementation. Besides, it is too late for making the default Pd trigger fully Max-compatible. For the record, in Max: [t 1], for any input, outputs the integer 1, [t a], for any input, outputs the message 'a' ('a' is the selector) [t l] works pretty much like Pd's [t a] (horribly, it converts bang to 0 as well...)
Yeah, I think that PureData should be made compatible with Max only when there is no reason to do otherwise... If there are annoyances in Max then there should be no urge to duplicate them. Unfortunately there are also annoyances in PureData that just stay there because of inertia and backwards-compatibility.
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
On Fri, 18 Feb 2005, Thomas Ouellet Fredericks wrote:
Please see attached patch. I think there is a bug in the trigger object. "A" converts BANG to 0.
This problem has been reported at least three times in three years but hasn't been fixed yet. This includes a long rant by myself the last time a few weeks ago.
Apparently the bug is reaching for its "feature" status.
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
OK, OK, I changed it. Now don't complain if your watch starts running backward...
cheers Miller
On Fri, Feb 18, 2005 at 11:11:07PM -0500, Mathieu Bouchard wrote:
On Fri, 18 Feb 2005, Thomas Ouellet Fredericks wrote:
Please see attached patch. I think there is a bug in the trigger object. "A" converts BANG to 0.
This problem has been reported at least three times in three years but hasn't been fixed yet. This includes a long rant by myself the last time a few weeks ago.
Apparently the bug is reaching for its "feature" status.
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://iem.at/cgi-bin/mailman/listinfo/pd-list