Forum

    • Register
    • Login
    • Search
    • Categories

    Custom folder with audio samples

    General Questions
    2
    5
    152
    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.
    • A
      arminh last edited by arminh

      My idea is creating simply plugin where user can load samples from defined folder by combobox.
      I created custom folder (MySamples) in project folder where i store all audio samples which will be loaded into Loop Player.
      But after export i can't load samples from this folder.

      That's how plugin folder structure looks

      --PLUGIN FOLDER
      |--Expansion
      |--MySamples
      |--User Presets
      |--GeneralSettings.xml

      Here's code

      Content.makeFrontInterface(500, 500);
      Engine.loadAudioFilesIntoPool();
      
      const var ComboBox1 = Content.getComponent("ComboBox1");
      const var ScriptLabel1 = Content.getComponent("ScriptLabel1");
      
      
      
      
      var arr = [];
      const var folder = Engine.getSampleFilesFromDirectory("../MySamples", true);
      
      
      function getSamples(){
          for(i = 0; i < folder.length; i++) {
              arr.push(folder[i]);
          }
          ComboBox1.set("items", arr.join("\n"));
      }
      
      getSamples();
      
      ScriptLabel1.set("text", "Detected samples: " + arr.length);
      

      In HISE everything works fine, problem occurs in exported plugin.
      Is it possible to create it at all? Or did I go a little too far with my idea?

      1 Reply Last reply Reply Quote 0
      • A
        arminh last edited by

        BumpBumpBump 🙂

        1 Reply Last reply Reply Quote 0
        • Casey Kolb
          Casey Kolb last edited by

          @arminh said in Custom folder with audio samples:

          getSampleFilesFromDirectory

          I wonder if the exported plugin is looking in a different location than within HISE?

          Casey Kolb
          Founder & CEO of Lunacy Audio
          Composer | Producer | Software Developer

          1 Reply Last reply Reply Quote 0
          • A
            arminh last edited by arminh

            Unfortunately no. I tried also put samples like this and still not detecting any samples

            --My Company
            --PLUGIN FOLDER
            --Expansion
            --User Presets
            --GeneralSettings.xml
            --MySamples
            1 Reply Last reply Reply Quote 0
            • A
              arminh last edited by

              @Christoph-Hart is it possible to create?

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

              9
              Online

              986
              Users

              6.6k
              Topics

              60.8k
              Posts