From: Ivica Bukvic ico@vt.edu To: Jonathan Wilkes jancsika@yahoo.com Cc: pd-list pd-list@iem.at Sent: Friday, March 1, 2013 1:41 PM Subject: Re: [PD] bang vs empty list
On Mar 1, 2013 12:14 PM, "Jonathan Wilkes" jancsika@yahoo.com wrote:
From: Ivica Bukvic ico@vt.edu To: Jonathan Wilkes jancsika@yahoo.com Cc: pd-list pd-list@iem.at Sent: Friday, March 1, 2013 12:03 PM Subject: Re: [PD] bang vs empty list
This makes perfect sense. However, I have at least a couple of patches where I have a select connected to a networked stream of messages one which includes bang. So after I have to appied IOhannes' patch, this effectively resulted in a regression where bang messages were not recognized by the select object, throwing a large number of errors.
I don't understand. When did you change [select] to accept bang messages? Or are you saying that you were receiving the message "list" and it went unreported?
Yes they were being registered as list that before IOhannes' patch and now are being reported as errors. so I opted for the select patch I proposed above.
While one can argue that this is simply a poorly designed patch the other side of the coin is to say that this latest addition has caused a breakage in the existing patches as this problem was never reported by pd before and now is causing xruns. I also hear your call for consistency so I am open for going either way particularly because the example you gave did not use select. After all what follows from select is nothing more than a bang while symbol bang would be intercepted anyways.
There are probably very few cases where one would actually need to differentiate between "bang" and "symbol bang" using [select], but it seems like bad design to let two distinct messages trigger the same behavior in an object whose sole purpose is to differentiate messages from each other.
At the same time I think having to cover bang to symbol bang just to have it selectable by select does not seem very intuitive to me. How would you even do that in the first place if there's more than just a bang coming into that inlet, e.g. a bang and float values? You couldn't use [symbol] before it as that would trash float values.
Outputting the message from [textfile] (which has its own problems because it outputs anything instead of list), then something like [list-drip]. Splitting the message up in the list domain ensures that you won't lose data since everything is treated as a list. So if there is the word "bang" somewhere in the middle of the message it will come out of [list-drip] (or a home-brewed one using [list split]) as "list bang" which gets interpreted by [select] as a symbol message. That's the only way to parse a text file in Pd without running into errors (although you'll still lose data, for example, if consecutive whitespaces are needed, or special characters that Pd escapes, etc.).
-Jonathan