HISE Logo Forum
    • Categories
    • Register
    • Login

    Load impulse responses from external folders

    Scheduled Pinned Locked Moved Scripting
    3 Posts 2 Posters 177 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.
    • B
      bourehim
      last edited by

      I found this snippet in this thread that populates items from a list with previous and next buttons.
      How to make it load impulse responses from a folder, either by multi-selecting files or selecting one file, and the files from the same folder follow, preferably in a viewport.

      This is the snippet:

      HiseSnippet 1620.3oc4XktaabCDdWauoQJQAIAo.8OEfPHEPF0QVJmEs0HxGxoB0GBRJNEnGIz6RIw3cIWvkqOZPdW5iPeDxiTeCZGxcWsTxxGwHNMnU9O6LbFNeyGOlgtsf6Rhh3BK6B8NJjXYecmtGwjCWcHlxrZslk8Mb1DGIIBThpUNJDGEQ7rrsm8YJE1ElyR+6ud5JXeLykjqxxZGN0krAMfJy01twOR88WG6Q5QCLr9gMZ4xYqx84w.dl0olUH1cO7.xVXkYy3XYekldTIWzUhkjHK64Vg6cT2g7CXI1uCMhtqOQIT2pKLQIpWm66oPrRq0pCo9dsyx6HKKam14rvrIrvcb1j5QGoOmMtod.TtGl7g8LmF7paBuZme3Ya.u4Rf2sb55Jngx7QTX6ZNsXvBUeLrDXBqDaslo8UbVkCVvjUCv6QVW.Bi7nxiqUaAzipUa9uqTwj+VbwEQcwAg9Dzl3vtDehKjbkJBKRQRz9XQ5nBzRH8llpCHxTUUJm9QY07k6QaAY+z4bITFZ.2VkGDxYfPkx4lLguaQNTdF9laR4j7H26nfv.bnBpI.KGrPxsAMRVY7nkL1J7COwfMxBHVnEWDFYWNHoB6ngpFQ.KoRRPT4ERfP0WyorJk+EV44mHhZFl3k37F3cI9mbrOtskMW4P6PIGfZyExREoLeJif5GybkTNCwYifmZxEb+JtYy7B.R7iIyWp3aJUDA+.Kh39jpgBJD2jAg3THiE84XuQzXkjL7m0l8qZVo2PA+.Ja.hHDbA56WB8hk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DZYoDNMlq4NM5.U5vQFmmuaiMfthwhwOk+dwE0O+bwosd8ENIvEotgC8eiZjy9+9ZjmF0cizJjHH5PCjeZuNecG8k5HUM3+sfZGdrDpslUeyAJB1EJ76RLKENip7ZhbMkr9sEDlmV3ugeoCVOqtoZv5YCZ4lMUPtk9s9oP1yRXpRG5V+7gJx9laoif1KTPBp08QAkAXWA+ktIOcTg0qp0.njo+G4VvYSkLptk94jfeN0pVyJ.pU8RWW0Ag6AL7z849W.edvEvmGdA74QW.ed7EvmmbA74aNUeTsIrbrjGjbIInncyjMV1MGswZVq+AfR66ZU
      

      from:
      Screenshot_2024-02-02_01_13_38.png

      to:

      Screenshot_2024-02-02_01_17_12.png

      CasmatC 1 Reply Last reply Reply Quote 0
      • CasmatC
        Casmat @bourehim
        last edited by Casmat

        @bourehim so if I’m understanding correctly, you want to be able to make a file browser of ir samples and once one is clicked the location of that sample is returned?

        If so, then you'd want to get the files using FileSystem api. Using the findFiles() method would work if you put in the directory of the samples. Then put that in an array and show that in the viewport. Then to load, you get the current value of the viewport with getValue() and then use that index in the viewport array to get the name of the entry. Then you can use the getChildFile() method to locate the IR file using the name from earlier. Managing folders is a bit tougher, but it can be done with the same processes but with some additions to show the inner contents of clicked folders (updating the viewport with new values).

        i make music

        B 1 Reply Last reply Reply Quote 0
        • B
          bourehim @Casmat
          last edited by

          @Casmat Thank you, I'll try that and post the result.

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

          48

          Online

          1.7k

          Users

          11.7k

          Topics

          101.8k

          Posts