HISE Logo Forum
    • Categories
    • Register
    • Login

    How to change all samplers Preload Size with button?

    Scheduled Pinned Locked Moved Scripting
    5 Posts 2 Posters 307 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.
    • andrei sA
      andrei s
      last edited by

      Hello!

      I want to make custom button for changing PreloadSize of all samplers, instead of using built in Floating Tile.
      Is there API for this in HISE?

      Something like this:

      if (value)
      allSamplers.setPreloadSize(8192);
      else
      allSamplers.setPreloadSize(4096);

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @andrei s
        last edited by

        @problema Use a loop.

        Synth.getIdList("Sampler"); will give you the IDs of all the samplers. Use that to get a reference to every sampler.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        andrei sA 2 Replies Last reply Reply Quote 1
        • andrei sA
          andrei s @d.healey
          last edited by

          Thank you @d-healey , that would help a lot but firstly I want to know how to change the Preload Size of the samplers with scripting.

          I can't find "setPreloadSize" or something like this in HISE API

          1 Reply Last reply Reply Quote 0
          • andrei sA
            andrei s @d.healey
            last edited by

            I find it. Settings.setDiskMode() should work!

            d.healeyD 1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey @andrei s
              last edited by

              @problema If you're using the settings class then I think it affects all samplers equally so you won't need to do the looping thing I mentioned.

              Libre Wave - Freedom respecting instruments and effects
              My Patreon - HISE tutorials
              YouTube Channel - Public HISE tutorials

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

              10

              Online

              1.7k

              Users

              11.8k

              Topics

              102.3k

              Posts