Thanks for further clarification, theanalogkid. I just looked into V2 Filter example and then read the AUPreset headers. Which said “If < 0, then preset is a user preset” and then I realised user can save presets in one host and the presets will be made available in another. I had no idea this was possible. Wish AUAudioUnitPreset docs had said the same thing.
Just to confirm that I understand this correctly, if I get a setCurrentPreset callback from the host passing AUAudioUnitPreset object with the `number` property that’s negative it means user is trying to save a custom preset. In this case AU has an opportunity to serialise the current parameter settings and save it as a preset. And then the AU can make it available in another host as a user preset (i.e. with a negative `number` property). e.g. User saves preset in GarageBand then it can be made available in say AUM? This is really cool if this is possible.
Another thing that I wanted to mention is the expansion of presets API. I filed a feature request radar, but thought I’d raise it here as well. I wish instead of having factory presets as an array it could be a tree structure. Or at least have one level of depth. So say if I have a synth which has a big library of presets I can group them in say Leads, Bass, Drums, Keys etc. In addition, would be great to provide each preset with tags, that can describe sound qualities of each preset e.g. bright, dark, thin, distorted, complex etc. A bit like Logic’s Alchemy synth. Basically, an AU would provide all these tags and directory/tree structure via API to the host. And then each host can choose how it wants to display this info to the users. I think this would be a great feature. Otherwise, every AU would have its own preset browser which I’m not a fan of. Would be a great feature for both iOS and OSX.