Page 1 of 1

Why is supporting both IProgramListData and IUnitData prohibited?

Posted: Sun Sep 01, 2019 9:01 am
by hotwatermorning
Hi,

I found this sentence in the document of IProgramListData.
A component can either support program list data via this interface or unit preset data (IUnitData), but not both!
If I understand correctly, IProgramListData and IUnitData are respectively used for saving/loading a specific program state and a specific unit state by a host application instead of saving/loading the whole IComponent state of the plugin by IComponent::get/setState().

I wonder why supporting both IProgramListData and IUnitData by a plugin is prohibited.
Because I suppose that ordinary plugins can support both classes and work correctly.

Would anyone like to tell me why supporting both IProgramListData and IUnitData is prohibited?

Thanks.

Re: Why is supporting both IProgramListData and IUnitData prohibited?

Posted: Fri Sep 13, 2019 1:34 pm
by ygrabit
Yes you´re right it should be possible for a plugin to implement these 2 interfaces.
  • IProgramListData is a slot inside a ProgramList
  • IUnitData is for the whole state of a Unit (which could include global setting to a given unit and all state of each slot of the ProgramList)
we will update the documentation.

Re: Why is supporting both IProgramListData and IUnitData prohibited?

Posted: Tue Sep 17, 2019 2:48 am
by hotwatermorning
Thanks YVan.

I see.
However, I suppose that Steinberg::Vst::PresetFile class also may need to be updated if a plugin can implement these 2 interfaces.

It seems that PresetFile class doesn't have APIs to distinguish whether the stored data of ChunkType::kProgramData is from IUnitData or IProgramListData.
So if I read a .vstpreset file with PresetFile class that the file contains unit data or program list data of a plugin which implements these 2 interfaces, I can't determine which interfaces, IUnitData or IProgramListData, should restore the preset data.

Sincerely,
hotwatermorning

Re: Why is supporting both IProgramListData and IUnitData prohibited?

Posted: Tue Sep 24, 2019 6:02 am
by ygrabit
Yes. This is something we have to extend...
Thanks for pointing this.