HISE Logo Forum
    • Categories
    • Register
    • Login

    Enabling/Disabling Samplers with a ComboBox?

    Scheduled Pinned Locked Moved Scripting
    5 Posts 3 Posters 198 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.
    • L
      LozPetts
      last edited by

      Hi all!

      I'm building a plugin that is effectively going to work as a platform for many different virtual instruments. I need to be able to use a combo box to navigate through these instruments, but as some of them require more than one sampler to be active at a time I can't just use the combobox to change sample map, I need to enable and disable samplers depending on what's selected.

      It will also need to enable and disable panels, as each instrument has a different interface and these are each on their own panel.

      My issue creating a list of samplers that I can join to the options in the combobox? When using a combobox to change sample map you would join the two, as below:

      //Get sample list
      const var samplemaps = Sampler.getSampleMapList();
      
      //Get and populate the combobox
      const var ComboBox1 = Content.getComponent("Presetbrowser");
      ComboBox1.set("items", samplemaps.join("\n"));
      
      //Load the samplemap
      inline function onComboBox1Control(component, value)
      {
      	slot.loadFile("{XYZ::SampleMap}" + component.getItemText());
      };
      

      How do I create a list of samplers and join that to the items in the combo box? Is it possible for more than one sampler to by nested into one item? For example, selecting one item from the combobox needs to enable 3 samplers?

      Hope this made sense,
      Thank you!

      d.healeyD LindonL 2 Replies Last reply Reply Quote 0
      • d.healeyD
        d.healey @LozPetts
        last edited by

        @LozPetts This sounds like a use case for expansions

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

        L 1 Reply Last reply Reply Quote 1
        • LindonL
          Lindon @LozPetts
          last edited by Lindon

          @LozPetts

          HiseSnippet 1420.3oc6Z0saaaCElJNpqVqqnsnWraJfPvtvAMyw+jlNfrg5l+JBVbhQbZwFBBJXjosIhDo.EUV8F50CXOM6QXOR8MX6PJIaIG0DWu1tep7EA7bN7P9wyg7b9Lb5H3Njf.t.YT93Q9DjwsL6NhIGt0PLkg1aajwsMaiCjDgcjpMG4iCBH8PFFkdlRgQ4EQ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ELgPQZCGxHPbWl9LtkfGDzGNN50JHsoNghApX0DMGQt.ZYkU2AgdPtmwHtApmpFfpmGPT4ZpSarTPeU5Yq2kZGi04aftlVt9TxMlRt4TxqMk7ilRd8oje7D4n.Zaru5lght3TUnu4rUgFVfNX3HmZlaRGLdwizjsDSpoNNlqwUJxoW8Udia7ghE5G0hY+8q8VZ1f60PZtbBF6RUoscXW.uWAMJLdOnQVebnqLQa1ZGs4Lt+PNi5j80Abaev.hHM1y8.8ToDdbNQy8acDvACGj548W0ZefqIVj8Q+6Tr3c+KPja95KMifqspfm8+O5YV5S9dlWUn61wcLsgcWH+Wdd9Vl5Z71pVx+SA0i3gRnUaR6NSnmXWfGfCIcmwETcaijqojU.pKg0SK7mvmXi0SZipLVOwHxIYofyV7XMsbiRDlpMhlJnKzf1M8U5.fsgBRPqt4fwTiL7LKXLUvXpfwTAioYiwTiBFSELlJXLUvX5SJFSMKXLUvXpfwTAio4fwTyBFSELlJXLUvX5+vLl9XfROrif+RmneXaEVuoVCfRl9+BnxlsUx1W52xFg7f9UuzwI6RcIGaLuN1bdcbs40wGMuNt9753imWG+lq2QEchmFJ4dQESQn1c1I5BnwNiu.VB8WHV1USB
          

          This should give you a clue - but you will likely need to set up some object data structure for each combobox option so you can turn on the correct samplers, load each with the correct sound and show the correct panel.

          HISE Development for hire.
          www.channelrobot.com

          L 1 Reply Last reply Reply Quote 1
          • L
            LozPetts @d.healey
            last edited by

            @d-healey I had no idea this existed, this is killer. I've got two expansions working so far! Thanks David!

            1 Reply Last reply Reply Quote 0
            • L
              LozPetts @Lindon
              last edited by

              @Lindon Thanks mate - I went the expansions route before I saw this or I'd have given it a go! Thanks so much for putting that together.

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

              5

              Online

              1.7k

              Users

              11.8k

              Topics

              102.3k

              Posts