Sample End Time Detection
-
Hey HISE Gang,
I've got 4 samplers, each with the Sample/Loop Start & End Times scripted to the UI via knobs and AudioWavform Panel. All is working well (for the most part) except I cant figure out how to have HISE detect the length of the current loaded sample.
Right now, the script calls for me to enter a Sample Length. If I load a sample that is longer or shorter than that length, you are unable to edit the entirety of said sample.
In Loop Length, I was able to simply put "1" and it seems to be detecting just fine. The same did not work for Sample Length. Instead, it just made for a verrrry short sample.
Anybody have any ideas? Below is my current script for Sample End.
//Sampler 1 - Sample End Knob inline function onSampleEnd1Control(component, value) { for(s in Sampler1.createSelection(".*")) { local l = parseInt(s.get(Sampler.SampleEnd)); s.set(Sampler.SampleEnd, value * 610000); } }; Content.getComponent("SampleEnd1").setControlCallback(onSampleEnd1Control);