HISE Logo Forum
    • Categories
    • Register
    • Login

    How to access the default music folder with filesystem?

    Scheduled Pinned Locked Moved Scripting
    9 Posts 4 Posters 157 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.
    • T
      tomekslesicki
      last edited by tomekslesicki

      What’s the proper way to do this? There is a Documents wildcard, which is great. How do I go to Music from there on each OS? It’s one folder back from the Documents.

      Also - what’s the best non system-locked location for samples on the internal drive? I would assume the Documents folder to be fine but for some people, it’s permanently synced to the cloud, which isn’t optimal.

      Also 2 - what if the username of the person using the samples contains dots or other bad characters?

      Thank you!

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

        @tomekslesicki I don't think you can rely on a Music folder existing. But I'd start at the user's home folder and call createDirectory to get to the Music folder.

        I always let the user select where they want to install the samples. For a default location though you could put them in a sub-folder inside documents or downloads.

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

        Christoph HartC 1 Reply Last reply Reply Quote 1
        • Christoph HartC
          Christoph Hart @d.healey
          last edited by

          @d-healey said in How to access the default music folder with filesystem?:

          I don't think you can rely on a Music folder existing

          Sure, in fact that's one of the only "sandbox-safe" locations for music apps on macOS (eg. GarageBand can only access the sample content from there).

          I'm using this as default location for all my sample-based plugins on macOS.

          d.healeyD 1 Reply Last reply Reply Quote 1
          • d.healeyD
            d.healey @Christoph Hart
            last edited by

            @Christoph-Hart Oh that's good to know, but what about on Windows, is it undeletable by the user?

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

            Christoph HartC 1 Reply Last reply Reply Quote 0
            • Christoph HartC
              Christoph Hart @d.healey
              last edited by

              @d-healey just tried to delete it. Didn't work.

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

                FIY, I added a FileSystem.Music constant which brings you directly to the folder.

                T dannytaurusD 2 Replies Last reply Reply Quote 6
                • T
                  tomekslesicki @Christoph Hart
                  last edited by

                  @Christoph-Hart fantastic, thank you!

                  1 Reply Last reply Reply Quote 0
                  • dannytaurusD
                    dannytaurus @Christoph Hart
                    last edited by

                    @Christoph-Hart So to be clear, this means we can use FileSystem.Music constant on both Mac and Windows to access the always-present Music folder for storing samples?

                    Meat Beats: https://meatbeats.com
                    Klippr Video: https://klippr.video

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

                      @dannytaurus yes.

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

                      34

                      Online

                      1.7k

                      Users

                      11.7k

                      Topics

                      102.1k

                      Posts