Re: Filing of User Presets
Re: Filing of User Presets
- Subject: Re: Filing of User Presets
- From: Brian Willoughby <email@hidden>
- Date: Wed, 23 Oct 2002 16:50:02 -0700
James Chandler Jr. <email@hidden> asks:
[ Does OSX have built-in "easy" file key indexing capabilities that
[ can be cajoled to behave similar to the Windows registry? If so,
[ perhaps something along those lines could be used to maintain a
[ big central "registry file" of plugin presets?
Chris Reed <email@hidden> suggests:
[ > An alternative would be to use the bundle identifier for the preset
[ > folder name.
Marc Poirier <email@hidden> adds:
[ Ooo yeah, that's better I think, as long as every AU is properly
[ defining a bundle identifier. Unfortunately, I fear that many
[ folks are not doing this (although I don't really know one way or
[ the other, just a hunch). If bundle identifiers wind up being
[ used as the basis of preset subfolder names, then I would just
[ say that Apple ought to strongly emphasize the importance of
[ defining a bundle identifier in the AU docs.
I highly recommend that the Cocoa NSUserDefaults class be used to store User
Presets. The standard behavior is for the application name to be used as the
Domain Name, but the bundle identifier could be used instead. It is important
not to store presets under the application name, since that would result in a
separate list for each AU host app. It is possible to provide a different
Domain Name, which is how default editing applications allow users to access
all their settings.
The reason I suggest NSUserDefaults is that all the decisions about where to
store the files are made for you. With user defaults, it would be possible for
a studio to locate presets in /Library/Preferences or
/Network/Library/Preferences to share among multiple login accounts, such that
everyone has access to a set of studio presets. All the code to search among
these directories is provided in the NSUserDefaults class.
The only trick is coming up with Domain Names reliably, and a scheme for
naming each preset so they can all be stored together. It might be overkill,
but I suggest a dictionary of dictionaries. At the top level would be a user
default named "UserPresets" which is a dictionary. This dictionary would have
each user preset filed under a unique key, sort of like a filename.
Although I am not aware of one that's available, we should see some tools for
Mac OS X for managing User Defaults. Under NEXTSTEP, there were a number of
free utilities which presented the defaults as a browsable hierarchy, and you
could drag and drop settings between domains, between applications and between
users. There was also the option to backup defaults to files that could be
shared and loaded elsewhere. With such a powerful generic solution possible,
you would not need to write anything specific to allow users to move their
AudioUnit User Presets around and share them.
Even though AU coding has a lot of Carbon programming by necessity, I wanted
to bring some Cocoa thinking into the picture :-)
Brian Willoughby
Sound Consulting
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.