Forums > MaxMSP

how to create hierarchical dictionary structures?

April 29, 2013 | 4:33 am

Quick question:
I want to create a hierarchical dictionary but don’t know how. I’ve read the documentation and scoured the web but haven’t found anything applicable. If an explanation is out there, a link would be much appreciated.

Here’s probably the best way to illustrate my question: create a dict object, open the help file, click the hierarchy tab, and double-click dict bicycle.

It contains nested sub-dicts, which seems like a powerful and elegant way to manipulate hierarchical data.

What messages would I send an empty dict to create the contents of ‘dict bicycle’? Specifically creating sub-dicts

Does that make sense?

Any help greatly appreciated!


April 29, 2013 | 5:02 am

I think I’m on the track with the dict.pack object

April 29, 2013 | 5:29 am

I tried to explain in more depth, but the forum doesn’t copy my formatting, so I included the code to a comment box explaining:

— Pasted Max Patch, click to expand. —
May 1, 2013 | 7:52 pm

I had some issues with this as well. Last week I was pulling out my hair looking for this solution. There is only documentation on how to parse the hierarchy. I found some patch that had an instance of formatting. Please check out the attached example I made.

I am still working though some of the nuances of formatting these. Today is trying to make an array of objects with the same keys.

May 1, 2013 | 9:02 pm

I deleted the last attached file and reposted it.

January 10, 2014 | 5:14 pm

For whoever may be interested – Just wondered about the same topic and somewhere within the dict reference I found the beauty of the ‘replace’ message. Copy-paste the following to see how easy it is to make nested dictionaries:


— Pasted Max Patch, click to expand. —


October 30, 2014 | 5:02 am

Yes, agree. The documentation seems detailed for each dict object, but then seems that doesn’t explain (a tutorial or example) how to setup a more complex structure, where everything interacts together.

September 3, 2015 | 3:07 am

Hi, I have another problem I can’t solve, please for help… the patch is this, subDict2 has two items with id 1 and 2 (but they are not expressed if you open the dictionary editor):

— Pasted Max Patch, click to expand. —

Thanx for helping.

September 3, 2015 | 3:13 pm


— Pasted Max Patch, click to expand. —
Viewing 9 posts - 1 through 9 (of 9 total)

Forums > MaxMSP