Load impulse responses from external folders
-
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.hHDbA56WB8hk6h5t7NMWC0ZKT6NM61rG5Es58CnkQ6r7FOuIZ60Q0qUsVR7mRhlvoRXot7BnIhXohuUyBm4JlZRRy9Uw996B2zT43DSFkBDpZaIkGGYbjXZTa9t2ylao8QUxTojSUqSayMP6nroRtpAYplGszRnZnmlxBU8IrAxg2qN5aQS056gpqxniGD2gX1.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7gJx9laoif1KTPBp08QAkAXWA+ktIOcTg0qp0.njo+G4VvYSkLptk94jfeN0pVyJ.pU8RWW0Ag6AL7z849W.edvEvmGdA74QW.ed7EvmmbA74aNUeTsIrbrjGjbIInncyjMV1MGswZVq+AfR66ZU
from:
to:
-
@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 thefindFiles()
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 withgetValue()
and then use that index in the viewport array to get the name of the entry. Then you can use thegetChildFile()
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). -
@Casmat Thank you, I'll try that and post the result.