Where do Mac users like their presets and preferences files?

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

I need to setup a mac installer for Spiral Generator and PrettyScope. Currently they can't coexist very easily as they require the same space for their files for some Mac users.

What kind of structure and what drives / folders should I store this stuff in?

Post

My suggestion:

Factory Presets: ~/Library/Application Support/Vendor/Product OR /Library/Audio/Presets
Preferences: ~/Library/Preferences/com.vendor.product.plist (OR under Application Support if you don't use plist files)
User Presets; ~/Music/Vendor/Product OR ~/Library/Audio/Presets

Personally, I dislike when vendors put user presets and such under ~/Documents On Mac ~/Music is where music production stuff should go imho.

Hope this helps
Fotis

Post

Presets should always be /Library/Audio/Presets for factory and ~/Library/Audio/Presets for user - anywhere else just means people having to hunt around for them or add additional paths to get to them quickly

Post

On that note, is there a Windows specific folder too, or do most plugins just save wherever they feel like it?

Post

For factory presets, is this ok?

"/Library/Application Support/Soundemote/Spiral Generator/Presets"
"/Library/Application Support/Soundemote/PrettyScope/Presets"
Last edited by Architeuthis on Thu May 25, 2017 7:38 pm, edited 1 time in total.

Post

It'll work. Sylenth does that. But is there a reason why you don't want to use /Library/Audio/Presets/[Soundemote/etc]?

Post

As stated above, it seems that Library/Audio/Presets is better for user presets.

I actually don't separate user and factory presets at the moment (the gui is not setup for it) but would like to in the future.

Post

Weird. Looking back just through this thread, three people have said /Library/Audio/Presets is OK or preferred for factory.

User presets normally go into the user address space so that different users on the same machine can have their own areas. That's what the tilde symbolises in ~/Library/Audio/Presets.

As you're not separating the factory and user presets anyway, I don't really see why going for AppSupport is such a great idea. I set up symlinks from the Presets folder anyway for synths/effects that don't use that area, but it is generally easier if presets go in more or less the same place.

Post

oops, looks like I didn't read through the thread enough

I would have never known that ~ symbolises user address space, thanks for pointing that out. Didn't even catch there was a difference between ~/ and /

So then, this?

"/Library/Audio/Presets/Soundemote/PrettyScope/example_factory_preset.xml"
"~/Library/Audio/Presets/Soundemote/PrettyScope/example_user_preset.xml"

Wow, it's weird to put /Presets first for me as a Windows users.

Post

It would probably be clearer to write [User]/PathtoFoo/ but Mac users tend to use the tilde because that's how you can get to that space in things like Finder or the Terminal – it's not the most obvious convention but it's oh so easy to drop into without realising that the meaning isn't getting across.

Post

Architeuthis wrote:So then, this?

"/Library/Audio/Presets/Soundemote/PrettyScope/example_factory_preset.xml"
"~/Library/Audio/Presets/Soundemote/PrettyScope/example_user_preset.xml"
Yup.

Post

is ~/ an acceptable path if I was to write that in C++?

Post

Architeuthis wrote:is ~/ an acceptable path if I was to write that in C++?
Likely no, C++ may interpret this literally as Python does. In Python, there's a specific function to "expand tilde" to the user's home directory:

Code: Select all

In [1]: import os

In [2]: '~/Music'
Out[2]: '~/Music'

In [3]: os.path.expanduser('~/Music')
Out[3]: '/Users/fots/Music'
This is a Unix convention and likely the function would be replacing instances of ~ with the $HOME environment variable.

Code: Select all

fots ~ $ echo $HOME
/Users/fots
fots ~ $ 
I just checked the code of the expanduser function in Python and it indeed does something along the lines of what I mentioned:

Code: Select all

def expanduser(path):
    """Expand ~ and ~user constructions.  If user or $HOME is unknown,
    do nothing."""
    path = os.fspath(path)
    if isinstance(path, bytes):
        tilde = b'~'
    else:
        tilde = '~'
    if not path.startswith(tilde):
        return path
    sep = _get_sep(path)
    i = path.find(sep, 1)
    if i < 0:
        i = len(path)
    if i == 1:
        if 'HOME' not in os.environ:
            import pwd
            userhome = pwd.getpwuid(os.getuid()).pw_dir
        else:
            userhome = os.environ['HOME']
    else:
        import pwd
        name = path[1:i]
        if isinstance(name, bytes):
            name = str(name, 'ASCII')
        try:
            pwent = pwd.getpwnam(name)
        except KeyError:
            return path
        userhome = pwent.pw_dir
    if isinstance(path, bytes):
        userhome = os.fsencode(userhome)
        root = b'/'
    else:
        root = '/'
    userhome = userhome.rstrip(root)
    return (userhome + path[i:]) or root
FYI I'm not a C++ coder these days (did it back in the day) nor do I code plugins myself, but I do heaps of Python at work. So please take my reply with a grain of salt.

Post

ok JUCE has a user directory function: https://www.juce.com/doc/classFile#a3e1 ... 3a6e76313d

Post

what about the manual pdf? what about screenshots? PrettyScope has a screenshot button.

Post Reply

Return to “DSP and Plugin Development”