AAX Chunk ID

Hi, can anybody help me on where to set the chunk id for aax plugins. I am working on a plugin that has been rewritten in Juce. It cant load the state of sessions stored with the old plugin which was written only for aax. Turns out that the old one had one chunk with parameters while juce uses two chunks, one with parameters, the other with other information. Avid Support pointed out to me that both of the chunks have the same id which is a bug. Can anybody point me in the right direction where to change the ID? Thanks

That sounds odd. I just checked quickly with a JUCE demo built from the develop branch. GetNumberOfChunks returns 2, and GetChunkIDFromIndex returns ‘elck’ for index 0 and ‘juce’ for index 1. I’d be interested to know what ID is being used for each ID in your case.

Before changing the chunk identifier, it’d be good to work out why the JUCE plugin is using duplicate chunk IDs. Have you modified the JUCE sources, or set any preprocessor definitions? Are you using an up-to-date version of JUCE?

The ‘elck’ ID for the parameter (non-JUCE) state is part of the implementation of AAX_CEffectParameters. This chunk ID cannot be changed.
The ‘juce’ ID for the JUCE state can be controlled by setting the JucePlugin_AAX_Chunk_Identifier preprocessor definition.

Thanks for your answer! I do have troubles recreating the missing IDs. This is just a small part from what I got as feedback. they were kind enough to compare the old and new version. I was surprised that even the old version had chunkID 0. This plugin has been out for more than 12 years so this would be an old bug.

old plugin
chunk_id: 0
chunk_id_ostype: ???
chunk_manufacturer_id: 0
chunk_manufacturer_id_ostype: ???
chunk_name: Complete Controls State
chunk_plugin_id: 0
chunk_plugin_id_ostype: ???
chunk_product_id: 0
chunk_product_id_ostype: ???
chunk_size: 100
chunk_version: -1

new plugin
chunk_id: 0
chunk_id_ostype: ???
chunk_manufacturer_id: 0
chunk_manufacturer_id_ostype: ???
chunk_name: Complete Controls State
chunk_plugin_id: 0
chunk_plugin_id_ostype: ???
chunk_product_id: 0
chunk_product_id_ostype: ???
chunk_size: 96
chunk_version: -1

chunk_id: 0
chunk_id_ostype: ???
chunk_manufacturer_id: 0
chunk_manufacturer_id_ostype: ???
chunk_name: “”
chunk_plugin_id: 0
chunk_plugin_id_ostype: ???
chunk_product_id: 0
chunk_product_id_ostype: ???
chunk_size: 231
chunk_version: 0

I get elck and juice too as IDs when running proTools in debug mode. I haven’t set any preprocessor definitions and have only a function that overrides the getAAXPluginIDForMainBusConfig() from juce to match the old IDs.

My current problem is that the old version of the plugin used one chunk with host parameters. After matching the names with the elck chunk coming from the new plugin, it seems like the values haven’t been normalized in the old version. No matter what the values have been, it set the new values to plus or minus max. But I have troubles finding the right chunk cause it happens only if an old session is loaded once at the beginning.

Has anybody had experience with this and could give me some hints on how to do this properly?

Thanks

Could someone please explain to me what the two different chunks used by JUCE are supposed to do? I am not sure if I understand this correctly. It seems like chunks with elck IDs are processed by the AAX_CEffectParameters::SetChunk() function while chunks with juce ID get processed by setStateInformation in AudioProcessor. I am a bit confused on what chunk is supposed to do what? Can anybody help me out here? Thanks!