HISE Logo Forum
    • Categories
    • Register
    • Login

    Opening Actual File Location

    Scheduled Pinned Locked Moved General Questions
    samplerfile locationpreview
    7 Posts 2 Posters 550 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.
    • trillbillyT
      trillbilly
      last edited by trillbilly

      Hey Gang,

      I've figured out how to open file locations via the Filesystem directory. Cool. My issue is, how do I open the actual file location via the users OS instead of opening the File location WITHIN Hise?

      I have a bunch of WAV samples i'd like the user to be able to preview before loading into the sampler (Custom Sample Import). My easiest solution was the Filesystem opens and user can simply double click a sound to play via their Audio Player on OS (Windows Media Player, Quicktime, etc). Opening a file within the Filestystem though does not do the trick as it acts like it wants to open the file in HISE rather than play the audio.

      Is there an easier way to do this? Is there a way I could list the files in a viewport and allow for preview there somehow directly in the plugin?

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

        @trillbilly said in Opening Actual File Location:

        My issue is, how do I open the actual file location via the users OS instead of opening the File location WITHIN Hise?

        File.show();

        Is there a way I could list the files in a viewport and allow for preview there somehow directly in the plugin?

        Yes. Use the File and FileSystem API to get a list of files from the selected folder and display that list in the viewport. In the viewport callback you can load the selected file into an audio loop player (or sampler) and trigger the playback.

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

        trillbillyT 1 Reply Last reply Reply Quote 0
        • trillbillyT
          trillbilly @d.healey
          last edited by

          @d-healey Thanks. I watched your video about toString but am confused on how to string the filenames via viewport vs. stringing the directory like you do in the video. I've tried once before as well with now luck.

          As for triggering the Audio Loop Player, this is a good idea. I'll test it out once I'm able to get the AudioFiles folder to display the WAVs in viewport.

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

            @trillbilly Both directories and files are represented as File objects in HISE. So to use .toString() is the same for both.

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

            trillbillyT 1 Reply Last reply Reply Quote 0
            • trillbillyT
              trillbilly @d.healey
              last edited by

              @d-healey I think I'm just slow then. I can't get them to list. I'll post my code when I get back to studio tonight.

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

                @trillbilly You might want to check out the HISE project here - https://e1.pcloud.link/publink/show?code=kZA6OLZO9JGj78xI5JHncJbuMrS4HugJ2x7

                For context - https://vi-control.net/community/threads/simple-sample-player.128248/

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

                trillbillyT 1 Reply Last reply Reply Quote 1
                • trillbillyT
                  trillbilly @d.healey
                  last edited by

                  @d-healey Hey, thanks! Thats super cool and useful!

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

                  20

                  Online

                  1.7k

                  Users

                  11.8k

                  Topics

                  103.0k

                  Posts