HISE Logo Forum
    • Categories
    • Register
    • Login

    Previewing segments of the same sample

    Scheduled Pinned Locked Moved C++ Development
    3 Posts 1 Posters 270 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.
    • E
      eggnog
      last edited by eggnog

      Hi!

      I am currently implementing a sample slicer (aka sample chop) and I want to let the user preview each slice individually.

      What would be the most straightforward approach for this purpose:

      • Map a ModulatorSamplerSound referencing the same sample over a range of MIDI notes (1 per slice), each sound having a specific SampleStart / SampleEnd
      • Simply set the SampleStart and SampleEnd right before triggering the portion of the sample
      • Use SamplePreview from the SampleEditorHandler

      I believe all methods would work but some might have advantages over others.

      Thanks in advance for any help,
      E.

      E 1 Reply Last reply Reply Quote 0
      • E
        eggnog @eggnog
        last edited by eggnog

        Alright for those interested, the most straightforward solution (in my case) was to map one ModulatorSamplerSound per MIDI note and set the Sample start/end accordingly.

        It would be really cool to be able to synchronously set the sample start/end positions without killing the voices when the sample is loaded entirely in memory (no streaming).

        E.

        E 1 Reply Last reply Reply Quote 0
        • E
          eggnog @eggnog
          last edited by

          Note that I had to disable the pool "search mode" when loading the same sample over a range of MIDI notes, otherwise updating the start/end positions would be mirrored on every sample.

          auto pool = sampler->getSampleMap()->getCurrentSamplePool();
          jassert(pool);
          pool->setDeactivatePoolSearch(true);
          

          I believe this is why this pool mode exists, @Christoph-Hart, i.e.: to allow each duplicate sample entry to have its own properties?

          E.

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

          20

          Online

          1.7k

          Users

          11.8k

          Topics

          103.0k

          Posts