Dict.change: much needed needed object? + example

personal_username's icon

Hi guys,

I've been experimenting with dicts since a bit now, and seems like the ability fo filter out non-changing values is still troublesome unless javascript. I know I could brute force it in Max, but I'd like to avoid that, as it's probably not very efficient on large dicts.

While praying to such an object to exist in the future, I'd like to ask you guys if anybody came around a way to do that. Here's an example that:

1) reads a dict
2) sends all of its values to desired [receive]rs.

As you can see, it is sending ALL the data even if only one values changes.
Do you have ideas on how to improve efficiency? Maybe a javascript after dict out, that filters based on change?

Max Patch
Copy patch and select New From Clipboard in Max.

tyler mazaika's icon

This may be sort of tangential since it isn't explicitly dealing with change detection. But I think you could get rid of a lot of forward/send/receive if you implemented a more dictionary-style solution and that would probably help performance.

Basically, the trick is that in the places you want to view or edit sub keys (e.g. top::child::sub), rather than doing something with all these sends / receives, you just want to pass the reference (dictionary name) of the immediate parent dictionary of the 'sub' key to a dict.unpack object.

With dict.unpack you can use the @keys attribute to dynamically select what key you want to extract, e.g. A_BKG-IDENTITY, from that dictionary.

Have a look at this...

Max Patch
Copy patch and select New From Clipboard in Max.

personal_username's icon

Thanks Tyler,

that is something that might help indeed ;-)