[PD] bang vs empty list

IOhannes m zmoelnig zmoelnig at iem.at
Thu Feb 28 10:20:39 CET 2013

Hash: SHA1

On 2013-02-26 02:17, Jonathan Wilkes wrote:
> Seems like for any object that doesn't have a bang method nor list
> method, an empty list silently gets discarded.
> Is there a way to fix this?

sure :-)

the default list method will try to do something clever with the empty
- - if there is a non-default bangmethod, it will call that (which is
not the case for [sin])
- - elif there is a non-default catchall method, it will call that
(which is not the case for [sin])
- - elif the object has inlets (which is the case for [sin]), it will
distribute the atoms over the inlets. since there are 0 atoms, no
inlet will receive any data.
- - else call the default catchall method.

so i think there are two things to fix:
1. Pd shouldn't try to fill an empty list to the objects inlets.
2. [t a] should not output an empty list if it receives a [bang(

attached are fixes for both problems (actually the 2nd patch makes [t
a] output the message as it came in, rather than converting it to a
list - so it also fixes the problem for numbers and symbols, not only
for bangs)
i rely on the community to test them thorougly :-)

there are still some weirdos though:

[float 42, list 666, list, foo(
[t s]

i wonder what the correct behaviour should actually be.
intuitively i would say that for non-symbols, [t s] should output the
selector as a symbol (if we don't want to introduce "%d" semantics
which i would rather not for performance reasons).
this would also make sense for anythings, where we currently get that
weird "only convert 's' to 'b' or 'a'" (it's weird insofar as it takes
some time to see what the 's' is referring to)

Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


More information about the Pd-list mailing list