No internet connection
  1. Home
  2. How to

open a new plugin

By Simon Kistler @Simon_Kistler
    2021-06-14 13:36:14.185Z

    I try to creat a plugin loader with no success. I don't know what I am doing wrong. I am on HDX

    • 5 replies
    1. @Kitch did you ever get the Teezio loader to work on HDX? Let me know if I need to take a look somewhere.

        1. Christian Scheuer @chrscheuer2021-06-14 15:43:44.452Z2021-06-14 15:59:13.369Z

          I would probably do it something like this (wholly untested):

          function getFirstFreeInsertIndex() {
              var btns = sf.ui.proTools.selectedTrack.invalidate().insertButtons;
              for (var i = 0; i < 10; i++)
                  if (btns[i].value.invalidate().value === "unassigned") return i;
              return -1;
          }
          
          function addPlugin({ categoryName, pluginName, }) {
          
              var index = getFirstFreeInsertIndex();
              if (index < 0)
                  throw `Couldn't find a free insert slot`;
          
              var preferredPaths = [
                  'DSP plug-in',
                  'multichannel DSP plug-in',
                  'multi-mono DSP plug-in',
          
                  'Native plug-in',
                  'multichannel Native plug-in',
                  'multi-mono Native plug-in',
          
                  'multichannel plug-in',
                  'multi-mono plug-in',
          
                  'plug-in',
              ];
          
              const menuSelector = (/** @type {FlatMenuItem[]} */ items) => {
                  for(let p0 of preferredPaths) {
                      var item = items.find(i => i.path.length === 3 && i.path[0] === p0 && i.path[1] === categoryName && i.path[2].startsWith(pluginName));
                      if (item) return item;
                  }
                  throw `Couldn't find plugin "${categoryName}" -> "${pluginName}"`;
              };
          
              var button = sf.ui.proTools.selectedTrack.insertButtons[index];
              button.popupMenuSelect({
                  menuSelector: menuSelector,
              });
          }
          
          addPlugin({
              categoryName: 'EQ',
              pluginName: 'EQ3 7-Band'
          });
          
        2. In reply tochrscheuer:
          Kitch Membery @Kitch2021-06-14 16:53:08.339Z

          Hi @Christian,

          Yes, It's working for HDX and HDX native. :-)

        3. In reply toSimon_Kistler:
          Kitch Membery @Kitch2021-06-14 16:56:38.138Z

          Hi @Simon_Kistler,

          Have you tried using "Teezio's Plugin Loader"?

          Here is a video on how to get it working.

          Let me know if you get stuck. :-)

          Rock on!