How to create a custom samplemap browser?
-
im sure this has been covered before...but If so I can't find a direct post on it...I know how to create a samplemap browser in a combobox...but it shows every samplemap in the folder...how would you go about creating a combo box that would only show a handful of curated sample maps? Like if I wanted to have one that shows only drums, and another that would show bass another for guitar...etc etc
-
@johnmike Start by establishing a naming convention for your sample maps. For example all the drum ones could start with
drums_
, all the guitar would haveguitars_
, etc.Then in your script you get all the sample maps in an array. Then you loop over the array and any that start with
drums_
you put into a dedicated drums sample map array, any that start withguitar_
you put into a guitar sample maps array, etc.Then you can use those arrays to populate your combo boxes or viewports or whatever UI elements you want to use.