HISE Logo Forum
    • Categories
    • Register
    • Login

    MAC preset and locations changes NIGHTMARE!

    Scheduled Pinned Locked Moved Bug Reports
    maclibrarywildcardspaths
    12 Posts 6 Posters 753 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Matt_SFM
      Matt_SF @mwplugs
      last edited by Matt_SF

      @mwplugs I can confirm : No problem here with presets/audio files loading either. I'm on Catalina with one of the latest commit.

      Develop branch
      Win10 & VS17 / Ventura & Xcode 14. 3

      1 Reply Last reply Reply Quote 0
      • Adam_GA
        Adam_G
        last edited by Adam_G

        @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?

        d.healeyD 1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey @Adam_G
          last edited by

          @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

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

          Adam_GA 1 Reply Last reply Reply Quote 0
          • Adam_GA
            Adam_G @d.healey
            last edited by

            @d-healey ahh knew it had to be user error on my part. ill look around more, thanks

            Christoph HartC 1 Reply Last reply Reply Quote 0
            • Christoph HartC
              Christoph Hart @Adam_G
              last edited by

              @Adam_G the ~/ path points to the current user

              Adam_GA 1 Reply Last reply Reply Quote 1
              • LindonL
                Lindon @mwplugs
                last edited by Lindon

                @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...

                HISE Development for hire.
                www.channelrobot.com

                Christoph HartC 1 Reply Last reply Reply Quote 0
                • Christoph HartC
                  Christoph Hart @Lindon
                  last edited by

                  @Lindon there‘s also a new wildcard {SAMPLE_FOLDER} that allows you to access the sample folder inside audio file slots.

                  LindonL 1 Reply Last reply Reply Quote 1
                  • Adam_GA
                    Adam_G @Christoph Hart
                    last edited by Adam_G

                    @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.

                    1 Reply Last reply Reply Quote 0
                    • LindonL
                      Lindon @Christoph Hart
                      last edited by Lindon

                      @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.

                      HISE Development for hire.
                      www.channelrobot.com

                      1 Reply Last reply Reply Quote 0
                      • Adam_GA
                        Adam_G
                        last edited by Adam_G

                        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

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        19

                        Online

                        1.7k

                        Users

                        11.8k

                        Topics

                        102.6k

                        Posts