Is there any way of querying PD to find out if a given array exists? I'm thinking of a dynamic patching command that says "if this array doesn't already exist, then create it". Unfortunately, the "multiple array defined" message prints to the console, not an individual object.
If you're going to do dynamic patching anyway, then if you actually create your arrays dynamically using a simple number system or something, you can put those array names in a list or something, and then check that list.
On Thursday, August 25, 2016, Liam Goodacre liamg_uw@hotmail.com wrote:
Is there any way of querying PD to find out if a given array exists? I'm thinking of a dynamic patching command that says "if this array doesn't already exist, then create it". Unfortunately, the "multiple array defined" message prints to the console, not an individual object.
On Thu, 2016-08-25 at 12:03 +0000, Liam Goodacre wrote:
Is there any way of querying PD to find out if a given array exists? I'm thinking of a dynamic patching command that says "if this array doesn't already exist, then create it". Unfortunately, the "multiple array defined" message prints to the console, not an individual object.
If you don't mind causing an error message to the Pd window, you can request something from the table and see whether you get something at all. For instance, you can set [array size] to the table you want to check its existence and send it a bang. When it outputs a number, the table exists, when it outputs nothing (and prints an error to Pd window), it does not exist.
Roman