It is possible ?
-
@Lindon if I understood correctly your system is to load samples before if you put their name in a label.
I want the next sample to come from the same folder as the first loaded sample, I don't provide any sample since this will be the user's folder and sample; the translations are not terrible if we don't understand each other ^^ -
@yall - one thing at a time - first you need an array of wavefile names - all from the same folder...
so first you need the folder returned to you as a directory... go look at the File.getChild and FileSytem.fromAbsolutePath documentation and see if you can work it out - I have to go out now so may not be back tonight...
-
@Lindon why should I put the name of the files? the goal is to quickly load samples from different folders. if the first sample A is in the XX folder I could load the A B C D samples.... and if I want to go to the XXXX folder I load the A B C D samples from the XXXX folder.
that's why I don't understand putting filename text. because that I know how to do if I give samples.
or else your explanation is a progression towards the ultimate solution :) -
@yall said in It is possible ?:
@Lindon why should I put the name of the files? the goal is to quickly load samples from different folders. if the first sample A is in the XX folder I could load the A B C D samples.... and if I want to go to the XXXX folder I load the A B C D samples from the XXXX folder.
that's why I don't understand putting filename text. because that I know how to do if I give samples.
or else your explanation is a progression towards the ultimate solution :)-- yes its a progression..... we are displaying the name of the file as a step along the way - once we have the name then we can load it into the Loop player. The loop player is a kind-of audioSampleProcessor - and to load files into it we have to call:
AudioSampleProcessor.setFile(String fileName)
so you are going to need the filename as a string....
-
Perhaps if I put in the AudioLoop Player - as an Audio processor - you will start to see..
open this and drag in any wav file you want..
HiseSnippet 1583.3oc6X0uaaTDDeu3bo0lVTKTD7mqr3ObTRb8UBkpFJ37gCxpIsl3P+PMUQatas8R1aWq61Ke.JR7vvCBOB7nva.L6dms2K0wjZZJBIt+Hx6r6Lyu4iclYSqHoOMNVFgbJt6o8oHma319Tgp258HLAp4FHma59jFuXWbqsV8kM1As1o8Iwwz.jiSguSeDmhyhLe+w2tFgSD9zQjPnmIY9zsXgL0Hpsp+XFmuIIftKKz5zKWuouTrtjKS.3TvsFpOw+PRW5SH5iMiKxYtFALkLpshnnwHmYWSFbZ6dxiEom+YrX1AbpdgGpMHnTxaJ4AZDqohVuGiGzZfYGiPNtsF4DJj5Dti61r.1P5ibF2xrAdDG19CmYxC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DAY8dTV2dJ64RS06MbGMMAZLV3aQVikE+RaKta89Ctazzf9rotiMYGlRPYyL9lCHBilJCR3DU94U0ComsAb2O2Ph5AAEwL0o1Cw+NaH1KKDusaKlxu23w3LiAiPF9UAFyF8+ltM5zg5qFAvYc27EWMy4aq9Odf5MoJaI0WcMpeXRvE+zqe+x9zq9W5mdAyv6CgDpcpgINA0w70CNaqJMZaHHfMGXSdGoToaeY+zuz5blBYf3ycZ5QP0w7RXPS3qfBpgZGXZkzPxICJhxAYjqJK2XZCKx5TXRu.0aJeA5rWUu.c1KWl4jg2+Ap0j6AyEGfw1LcJPCwQTNbaxfwOB570gjvUCn5kCkaKEx98jBle9LSUDqaWZjM1GqAspRA2NFQ4N02gxojXqq.ed8sfW.PhN+kq2Beg2a8+7fwFu9L2T3h00Bv+ShauWSylX+hBWp9Euyw6z263cCT1AdLHTSFduUDSWK6IIgsgR49T.IBA7.Ic8qYzS5ltt1fxasoh.yh+D9x1zSu1IaSuAa9dQGgD+H499oiiqykutgBX2BSWfhtaqWiGN2sqasp0fZ4Ar8880t6k7Pnwyy8lBd9hofmkmBd9xofm6OE77USAOOXh7naFsZhRFldUDHzpg4YHNNCmHvo.5u.Tww4jL
so you will see in the console we are printing the name of this file including its full path
-- so see if you can work out how to make a file object from this.
Hint: FileSystem.fromAbsolutePath(string)
once you have the currently loaded sound as a file object see if you can work out how to get its directory
hint: File.getParentDirectory
Once you have the parent directory you need to populate your array with all the wav files in that directory, see if you can work out how to get that.
Hint: FileSystem.findFiles(var directory, "*.wav", false)
-
@Lindon I think I understood the logic of the system thanks to you. so if I understood correctly I now have to find the way to load with the next button the file following the same primary folder. so i have to take FileSystem.fromAbsolutePath(string) to upload a new sample?
-
@yall said in It is possible ?:
@Lindon I think I understood the logic of the system thanks to you. so if I understood correctly I now have to find the way to load with the next button the file following the same primary folder. so i have to take FileSystem.fromAbsolutePath(string) to upload a new sample?
- you can only load the Loop Player with:
myAudioSampleProcessor.setFile(String fileName);
so you need to obtain all the names of all the wav files in the directory that the current audio wav file came from.
- Get where the audio wav file came from (I've pretty much shown you how to do that)
- Load all the wav files from that directory into an array (again shown ya.)
- Find where the currently loaded sound is in the array
- move forwards and backwards from there..
post a snippet doing steps 1 and 2.
-
This post is deleted! -
HiseSnippet 1601.3oc6X8tSabDDeOLGI1sTkzlJ0OtxpevHHN9RRSqBMs1.lVqBItXBjn.JZ4t01aYucstaMfaER8QqOB8QouAsyt2Y68HFGhaHRUp9CnamcmY9M+YmYVZFI8owwxHjS9cGzihb9X2VCDptq2kvDnFafbVz8o0ewt3laU6k02As1fdj3XZ.xwI2OnOhS94Qle+02uFgSD9zwjPn8jLe5VrPlZL0lU+IFmuIIftKKz5zOrZCeoXcIW1GfSN2JndD+iIcnOknO1btHmEpGvTxnVJhhFibleMYvfVckmJRN+drX1QbpdgGpEHnDxaJ4AZDqohVuKiGzbnYGiPNtMG6Dxk3Dti61r.1H5icF2xrAdLG19Cm4xBubYfmmM7pXAuI.IGKHMeBjtsaK+HVO03cz34ibaHTzn1DvsaCkjyhlauEbWWBmPnJGRNltYDrXDGkdTkJqfg+rzpE.OerBeBIJMPieB1jGTtCUYvmYUohI6VbBbTKtV+.lzlQCgVjvdb5HX+lhPzOrghFFCb9P7p3B0EcXBZYtjDXDvlLNMF.sroTxKArYo5Zb91CzGPminkvqJ1kx4xxmRNo3J3hwT3rAiVICoC+9TB+Xlnyvk+pTFNb4gqVPK6PifaHBnmABthsEuE4HJ2CnNz4p8RxvdRArnTwjs0VH7iI3f4fa2W3qXRAVJz2mzLFAli+PtVADLuOcoB+Vg7r1kRWjGVk+d2C2lIBvx9J7ocoQTrpKE62OJB3iO.q8Tz.L.c3bbJlEi8MVCtcjLrb4xfL.8EK4zx8hXZDtOEKn.OJItebh7ZqukDYXAqUxiKhWNanUakZWh.70kVRacZrwk9DNNh..7I3sIPjW+MDuJ4sx3X6xXOfg7ZSy1uBjwe2EhhkAMzQ08tdf4ar+7uQjHe9yo7X5E2b4kMaYfUVC15PF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jto2vM+fniPhej709ISpqykuogBX2BSKg7taqWiGMRtqakxUfZ4ArW66qc220CglLO2eF34Ay.OObF34qlAddzLvyWOC77MSkGcynZ8Uxvjqh.gl0MOJwwYz3AN4P+CbII.0M
I'm lost I think. moreover, baby is crying, it's not easy to concentrate ^^
I have the path but I'm completely blocked and I don't understand why -
@yall go sort the baby then,
-
@yall said in It is possible ?:
HiseSnippet 1601.3oc6X8tSabDDeOLGI1sTkzlJ0OtxpevHHN9RRSqBMs1.lVqBItXBjn.JZ4t01aYucstaMfaER8QqOB8QouAsyt2Y68HFGhaHRUp9CnamcmY9M+YmYVZFI8owwxHjS9cGzihb9X2VCDptq2kvDnFafbVz8o0ewt3laU6k02As1fdj3XZ.xwI2OnOhS94Qle+02uFgSD9zwjPn8jLe5VrPlZL0lU+IFmuIIftKKz5zOrZCeoXcIW1GfSN2JndD+iIcnOknO1btHmEpGvTxnVJhhFibleMYvfVckmJRN+drX1QbpdgGpEHnDxaJ4AZDqohVuKiGzbnYGiPNtMG6Dxk3Dti61r.1H5icF2xrAdLG19Cm4xBubYfmmM7pXAuI.IGKHMeBjtsaK+HVO03cz34ibaHTzn1DvsaCkjyhlauEbWWBmPnJGRNltYDrXDGkdTkJqfg+rzpE.OerBeBIJMPieB1jGTtCUYvmYUohI6VbBbTKtV+.lzlQCgVjvdb5HX+lhPzOrghFFCb9P7p3B0EcXBZYtjDXDvlLNMF.sroTxKArYo5Zb91CzGPminkvqJ1kx4xxmRNo3J3hwT3rAiVICoC+9TB+Xlnyvk+pTFNb4gqVPK6PifaHBnmABthsEuE4HJ2CnNz4p8RxvdRArnTwjs0VH7iI3f4fa2W3qXRAVJz2mzLFAli+PtVADLuOcoB+Vg7r1kRWjGVk+d2C2lIBvx9J7ocoQTrpKE62OJB3iO.q8Tz.L.c3bbJlEi8MVCtcjLrb4xfL.8EK4zx8hXZDtOEKn.OJItebh7ZqukDYXAqUxiKhWNanUakZWh.70kVRacZrwk9DNNh..7I3sIPjW+MDuJ4s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IuefxNv6DgBzvSwhX5ZYOseXKnttOEPhP.ucRW+ZN8PvIqqLr7VKpHvr3ugeoa5oW6jto2vM+fniPhej709ISpqykuogBX2BSKg7taqWiGMRtqakxUfZ4ArW66qc220CglLO2eF34Ay.OObF34qlAddzLvyWOC77MSkGcynZ8Uxvjqh.gl0MOJwwYz3AN4P+CbII.0M
I'm lost I think. moreover, baby is crying, it's not easy to concentrate ^^
I have the path but I'm completely blocked and I don't understand whyno you cant say this:
PLAYER.setFile(AllMyFileNames);
AllMyFileNames is an array, what does the documentation say is required for .setFile()??
-
@Lindon no, but I want to understand. I have the schematic in my head and I understood how it worked. At first I didn't think like that but your solution makes sense. I just can't apply it.
-
@yall what does the documentation say is required for .setFile()??
Look at lines 2 and 3 in my example - can you see why you cant use PLAYER ???
-
@Lindon the setFile is used to load in the loop player and with the folder {PROJECT_FOLDER} it is ok.
but I have to replace {PROJECT_FOLDER} with the currently loaded path is that right? -
@yall what does the documentation tell you uyou need to put in set.File(<HERE!>)
-
@Lindon
the path -
@yall no!!!! - it says ----- string
https://docs.hise.audio/scripting/scripting-api/audiosampleprocessor/index.html#setfile
AudioSampleProcessor.setFile(String fileName)
are you using a string here?
PLAYER.setFile(AllMyFileNames);
What is PLAYER???? (its on line 2...of the example)??
-
@Lindon it's my audio loop player that i called like this
-
@yall no!!! its not... read your code:
const var PLAYER = Synth.getChildSynth("PLAYER");
its a ChildSynth. - so a synth.
what is the very next line giving you?
const var PLAYERAsAudio = Synth.getAudioSampleProcessor("PLAYER");
-
HiseSnippet 1530.3oc0W01aaaCDlJNJs1qcncqCXejvXevAIw0ZqqaXYc04EmAikz5Em0WPQQAiDsMWnHMjnRh2P.1Os8SX+T1+fsiTR1ToNtodMsX9CFhG4c2y8Bu6XmHoOMNVFgbJevngTjyMb6NRnFr0.BSfZuMx4ltOp0yN.2Y2Mddq8QaNZHINlFfbbJ8i5i3TdQj42e+vMIbhvmNgDB8DIymtKKjolPsSyehw46PBnGvBsN88Z11WJ1Rxk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