Login / Register  0 items | $0.00 NewWhat is KVR? Submit News Advertise
User avatar
Architeuthis
KVRAF
 
2873 posts since 27 Jan, 2006, from Phoenix, AZ

Postby Architeuthis; Sun May 21, 2017 7:35 pm Where do Mac users like their presets and preferences files?

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?
fgimian
KVRAF
 
2446 posts since 13 Jul, 2005, from Australia

Postby fgimian; Sun May 21, 2017 7:49 pm Re: Where do Mac users like their presets and preferences files?

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
User avatar
aMUSEd
KVRAF
 
28056 posts since 14 Sep, 2002, from In teh net

Postby aMUSEd; Sun May 21, 2017 8:53 pm Re: Where do Mac users like their presets and preferences files?

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
mibix
KVRer
 
2 posts since 19 Sep, 2016

Postby mibix; Mon May 22, 2017 8:10 am Re: Where do Mac users like their presets and preferences files?

On that note, is there a Windows specific folder too, or do most plugins just save wherever they feel like it?
User avatar
Architeuthis
KVRAF
 
2873 posts since 27 Jan, 2006, from Phoenix, AZ

Postby Architeuthis; Thu May 25, 2017 10:37 am Re: Where do Mac users like their presets and preferences files?

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 11:38 am, edited 1 time in total.
User avatar
Gamma-UT
KVRAF
 
3778 posts since 8 Jun, 2009, from UK

Postby Gamma-UT; Thu May 25, 2017 10:49 am Re: Where do Mac users like their presets and preferences files?

It'll work. Sylenth does that. But is there a reason why you don't want to use /Library/Audio/Presets/[Soundemote/etc]?
User avatar
Architeuthis
KVRAF
 
2873 posts since 27 Jan, 2006, from Phoenix, AZ

Postby Architeuthis; Thu May 25, 2017 11:09 am Re: Where do Mac users like their presets and preferences files?

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.
User avatar
Gamma-UT
KVRAF
 
3778 posts since 8 Jun, 2009, from UK

Postby Gamma-UT; Thu May 25, 2017 11:22 am Re: Where do Mac users like their presets and preferences files?

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.
User avatar
Architeuthis
KVRAF
 
2873 posts since 27 Jan, 2006, from Phoenix, AZ

Postby Architeuthis; Thu May 25, 2017 11:36 am Re: Where do Mac users like their presets and preferences files?

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.
User avatar
Gamma-UT
KVRAF
 
3778 posts since 8 Jun, 2009, from UK

Postby Gamma-UT; Thu May 25, 2017 11:41 am Re: Where do Mac users like their presets and preferences files?

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.
User avatar
Gamma-UT
KVRAF
 
3778 posts since 8 Jun, 2009, from UK

Postby Gamma-UT; Thu May 25, 2017 11:42 am Re: Where do Mac users like their presets and preferences files?

Architeuthis wrote:So then, this?

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


Yup.
User avatar
Architeuthis
KVRAF
 
2873 posts since 27 Jan, 2006, from Phoenix, AZ

Postby Architeuthis; Thu May 25, 2017 3:50 pm Re: Where do Mac users like their presets and preferences files?

is ~/ an acceptable path if I was to write that in C++?
fgimian
KVRAF
 
2446 posts since 13 Jul, 2005, from Australia

Postby fgimian; Thu May 25, 2017 9:31 pm Re: Where do Mac users like their presets and preferences files?

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.
User avatar
Architeuthis
KVRAF
 
2873 posts since 27 Jan, 2006, from Phoenix, AZ

Postby Architeuthis; Sat Jun 03, 2017 11:18 am Re: Where do Mac users like their presets and preferences files?

ok JUCE has a user directory function: https://www.juce.com/doc/classFile#a3e1 ... 3a6e76313d
User avatar
Architeuthis
KVRAF
 
2873 posts since 27 Jan, 2006, from Phoenix, AZ

Postby Architeuthis; Sat Jun 10, 2017 7:01 pm Re: Where do Mac users like their presets and preferences files?

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

Moderator: Moderators (Main)

Return to DSP and Plug-in Development