HISE Logo Forum
    • Categories
    • Register
    • Login

    Sample End Time Detection

    Scheduled Pinned Locked Moved General Questions
    samplersample endaudiowavformsample length
    1 Posts 1 Posters 281 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.
    • trillbillyT
      trillbilly
      last edited by trillbilly

      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);
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      14

      Online

      1.7k

      Users

      11.9k

      Topics

      103.2k

      Posts