HISE Logo Forum
    • Categories
    • Register
    • Login

    Display User Filename for multiple AudioLoopPlayers

    Scheduled Pinned Locked Moved General Questions
    filenamedisplay nameaudioloopplayercombobox
    1 Posts 1 Posters 216 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

      Hey Gang,

      Ive got 4 AudioLoopPlayers, each have user drag-and-drop feature enabled. All is working well while displaying file names via Combobox of samples within the project folder. However, when I load my own sample (user sample) I cannot get the combobox to display the filename.

      Below is my current bit of code I think I need to edit for this. Any help is appreciated.

      allList.push("No Sample Loaded");
      allIds.push("");
      
      for(r in rootList)
      {
          allList.push(r.split("}")[1]);
          allIds.push(r);
          rootList.sortNatural();
      }
      
      
      for(e in expansionList)
      {
          for(af in e.getAudioFileList())
          {
              allList.push(af.split("}")[1]);
              allIds.push(af);
          }
      }
      
      for(s in SlotSelectors)
          s.set("items", allList.join("\n"));
      
      
      
      inline function onSlotSelectorControl(component, value)
      {
          local index = SlotSelectors.indexOf(component);
          
          if(value != 0)
          {
      	AudioLoopPlayers[index].setFile(allIds[value-1]);
          }
          
      };
      
      const var numbers = [64, 48];
      const var ids = [-1, -1];
      
      for(s in SlotSelectors)
          s.setControlCallback(onSlotSelectorControl);
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      10

      Online

      1.7k

      Users

      11.8k

      Topics

      102.8k

      Posts