Anyone know how merge a dict into a dict array?

leafcutter's icon

I'm currently working on a polyphonic sequencer for max and I'm managing the data using a master dict object. It's the first time I've used dict and it is taking a while for me to get my head around.

In the patch below I think I'm creating an array in the master_data dict. I'm able to address the different patterns individually in a sub_data dict but when I alter a pattern I'm not sure how to get that back into the master_data dict? I could step through the data and replace it but I imagine there must be a simpler way of doing it that I'm missing.

Any help would be greatly appreciated!

Max Patch
Copy patch and select New From Clipboard in Max.
leafcutter's icon

Hah! Worked it out through trial and error - would love better dict documentation in Max 8!

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