MAC preset and locations changes NIGHTMARE!
-
first off....as hise saves file paths for user presets made within hise with a {PROJECT_FOLDER} wildcard for file loaction...nope that doesnt actually work in compiled VST or AU plugins. it does not load anything with that.
Did you build my test project?
Most of the problems you're describing seem to be unique to you and your project. I haven't experienced these issues and no-one else is reporting them. You need to provide individual minimal test projects of these problems so that we can verify they exist and then find solutions for them.
-
@mwplugs I can confirm : No problem here with presets/audio files loading either. I'm on Catalina with one of the latest commit.
-
@mwplugs actually Apple is the one that changed where plugins go because it now reads them from Users/Your Name/Library instead of Users/Library which seems like a global change. only my UAD plugins are still installed to Users/Library. i think this was changed for catalina or another version close to it. maybe high sierra
however i too face the same issue loading audio files because i cannot figure out a wildcard to use for the directory. no two people have the same Users/Your Name names. @d-healey @Matt_SF Is there a wildcard you use for this? If so, would you mind sharing?
-
@Adam_G There is an engine function that gives system info including the user name. I can't remember the name of the function thou
-
@d-healey ahh knew it had to be user error on my part. ill look around more, thanks
-
@Adam_G the ~/ path points to the current user
-
@mwplugs -- not really sure what all your problems are but it seems partly that you'd like a consistent place to put your wav files for use in your loop players and {AUDIO FILES} isnt getting it done for you.
Here's what we did....
We decide to use our custom installer to put the wav files (as many as we wanted) in the same (user selected) folder as the samples(ch1 files).
Okay so how do you load these (and how do presets load these)?
First we have a text label above each loop player showing the name (without the path and without the .wav extension) - this label is saved in the preset....
On init the plugin gets the contents of linkWindows(or LinkOSX) - so it knows the folder/directory to use...we store this in a var called linkFilePointer
Theres a callback on the loopnames widgets that takes the text value and appends it to this path and uses this to load the wav file so:
inline function onLoopFileName1Control(component, value) { theLoopPlayers[0].setFile(linkFilePointer + "\\"+ component.get("text") + ".wav"); }
presets call this, and in normal usage you let the user select the wav file they want and you set the text of the label and call changed on the label...
Seems to work OK so far...
-
@Lindon there‘s also a new wildcard {SAMPLE_FOLDER} that allows you to access the sample folder inside audio file slots.
-
@Christoph-Hart thank you, I have this in the preset file -
<Control type="ScriptAudioWaveform" id="ScriptAudioWaveform1" value="0.0"
data="~/Library/Application Support/My Company/MyPlugin/AudioFiles/Instruments/instrument (number).wav"but it doesn't work. it does work, however, with the full directory. isnt this where I should be putting ~/Library?
@Lindon that's genius, but it sounds awfully complicated when there is a simple line of text the preset files should be calling. Ive done it in other things I've developed before but can't recall what the line of text was.
-
@Christoph-Hart said in MAC preset and locations changes NIGHTMARE!:
@Lindon there‘s also a new wildcard {SAMPLE_FOLDER} that allows you to access the sample folder inside audio file slots.
what! all that effort gone to waste, and now I can just use:
theLoopPlayers[0].setFile({SAMPLE_FOLDER} + component.get("text") + ".wav");
?? !!
Great thanks.
I was thinking it might be useful to have a wild-card the we can programatically set
i.e. Engine.setLocalFolder("some file path here...");
and then use it like this:
theLoopPlayers[0].setFile({LOCAL_FOLDER} + component.get("text") + ".wav");
.. tho it is just syntactical sugar round the process I outline above.
-
i notice the user audio module opens the correct folder when you right click on it. whats the line of code that tells it what directory to open for that specific module? it might hold the key to my original question
edit: on Windows {AUDIO_FILES} works just fine. so i guess a better question is why it no work for mac? lol
another edit: well holy cheeseballs. im an idiot. problem solved. i was using the string that was generated by saving the preset in the compiled plugin manually and it contained the line data="filename". changing that to fileName="{AUDIO_FILES}didthetrick.wav"/> . thanks for the help @Christoph-Hart @d-healey @Lindon