Solved Connecting Multi-column Combobox to sampler
-
found this snippet for multi-column combo boxes here on the forum and have been working to get it into my current project to try to create a better more organized system for loading samplemaps into multiple samplers...Ive worked out how to organize everything...but how does one connect it to the sampler to load samplemaps?
HiseSnippet 1568.3oc4X80SabDD+NfKJ9ZZaRTdnuToUV8ASKhZCFHwUnXv.onDBVXRTkZqrVe2d1a3tcOs6dTnUH0uPUpeD5Go7Mnc18ty2YiSBAkDknxCVdlc9yuclYmYLcEbOhTxEV1tGedLwx9VN8NmoF0YDlxr1eGK6uzwiGMfOfeVeEQpr197XrTR7srsm+QZgrqrfk4uW9vswgXlGofkk0y4TOxSnQTUA2tseLMLbOrO4XZTIoa1deONqCOjm..Zdm5VwXuSvCIOEqEaNGqeDKGYY+sNOXs0Zf8C1HnwpMdv.+.OxpaTe8larBds6GDrQ8FMW0eifl.Huwt9TEWzSgAzaYuv1b+y6Mh+arTG7bpjNHjnIZX0C7bJ683g95qnlqUmQzP+t4QJokksS2h317ows64b.0mNleQ761lCPEZTN.ZO2jva9IfWixvqdI3MCHYWBRKjBo63zySPiUEmnwym4rOSQDAXHOUFJoxZM2CWvoCGjfoVNBeBYOAPLViZqWu9RH3iE+AWW2u+6QcDD.4HLJUczQj.hf.0.n.t.oFQP8vQwgDA5.teRHwERvRE5Tr.IQahL0ZKOjnxjpV0ruznp1CfCdDQYLSHETiGfvggYl7.brDNBqPXAAIwmR7QTVIeZDHVveAwSAvAxnhRt2XvMygWAF.sdBbTMs+KA1BKtI5mqhHQwpyqtT0GS8NQ1W+IpAZK.aMqtDpZmPPv95OQMzzcIBOY+dif3oPyo5tgjHHBK6m8kYybkYvb0Yvq4L3sVAubVqW8WGem7hFjdc02m77MDCfqPGdTLmosUspczO82lelIaDyiSBgrcNShzDjnrPJCx2ILOEkyPyRL2+vshaEcIQsHHn.ooh.5htUfSqDx8vgn.pPp5QFZt+ah.gWVlLPpDT1vZPomlAk4SN6vfZU6WcQz2gZ.fHWcIAtd9uJ8mkxolLjvFpFYLz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hqccUb8qqhabcU79uYE0qArUB7iaRaNZYcP2cSK.s2cbA37V+GvYfviC
-
-
@johnmike try this
inline function onComboBox1Control(component, value) { local itemText = component.getItemText(); local map = itemText.substring(itemText.indexOf("::")+2, itemText.length); Console.print(map); s.loadSampleMap(map); }; Content.getComponent("ComboBox1").setControlCallback(onComboBox1Control);
-
@ulrik where in the code did you insert the the inline function?
I tried it in a few different spots...didnt work -
@johnmike After the "populateComboBoxes" function
HiseSnippet 1671.3oc4X01aaaCDVJIpnVqqqsneXeY.DF6CNqAY1INIsdHnNwIoKnMMFwoECXaHfVhxlMRjBjTYIaH.6Oz.1Og8Sp+C1NRIYI+ReKnsnEyevv73c7dtm6zcTtqf6QjRtvx183KhIV12vo2EL0vNCwTl096XY+UNd7n9797yOQQjJqsuHFKkDeKa64ejVI6JKXY97xGtMNDy7HEhrrdNm5QdBMhpJj1s8iogg6g8IGSiJocy166wYc3g7D.Py6T2JF6cJd.4oXsZy4X8iX4PK6uy4AqsVCrevFAMVswC56G3QVci5q2biUvqc+ffMp2n4p9aDzD.4010mp3hdJLfdK6E1l6eQug7eik5fmSkz9gD8hFV8.OmJdOdnuND0Rs5LjF52MmojVV1NcK3s4S4s65b.0mNRdA+cKyFnBKJSf1yMN7leL30nL7pWBdy.R1kfzBoP51N87DzXUwNZ77EN6yTDQ.FxSkgRptVyMzwoCGzfoVNBeJYOArXjE0Vud8kPvWK9Cttte+2i5HH.xQXTp4niHADAApAPAbARMjf5gihCIBzAb+jPhKjfkJzYXARh1DYp0Vd.QkoUspY+nQUsG.G7HhxbLgTvLd.BGFlcjGfikvVXEBKHHI9LhOhxJ4SiBwB9KHdJ.NPFUTx8lCbyb3UfAvpm.aUS6+Rfs3D2D8yUQjnX0EUWp5iodmJOQ+MpAZK.aMqtDpZmPPwSzeiZnW2kH7jmzaHvmBsjp6FRh.FVdR1OlsvUlgvUmgrlyP1ZExxEsd0ecTL4E0OMb0wSd9F3.HD5vih4L8YUqZG8i9ayO2jMh4wIgP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9LCnsTJ3QsBI2s8QjPBVV5g0us8Sf6ThEi+H76DWz3c9sTmY95qcRgKR29B846zs4+eyzsWGEcyrYaHviB0mf4va3X5.izCL+XBui3IJX3W9.HGXJUOXxrGo7rp4zy+RWWWuVChdDluYw+Bex1rQ9fM8lMx2zxK+nf3I62lKuaOOgoG3XtDVHLxLrbIpDl+qgDLL5iBJivdB9IdouZhFqW2HAPIy7e+Uw4.8ZzzuMhUDLm4DOuwOpoLbkqpgqdUMr4U0v0tpFt9U0vMtpFd+2rg5qArUB7hNoMGsrNn6toEf16Np.bdq+Cvlar0f
-
@ulrik that's what I thought at first...not working on this side tho...
https://www.dropbox.com/scl/fi/rqbw9nc8c5pd8cyxkm9vm/Screen-Recording-2024-10-06-at-2.32.49-PM.mov?rlkey=de85vly2kxm61xexn54w3q21a&dl=0 -
@johnmike Hm, I made some fake sample maps with some of your sample map names, and it works here,
Where do you have your sample maps stored?
-
@johnmike they are all compiled as monoliths in my project folder...let me try renaming somethings and see if there's something there im doing wrong...BRB
-
@johnmike Can you take a screen shot of inside your "SampleMaps" folder in the project?
-
@johnmike if you Console.log your "list" in the code, what does it say?
Console.print(trace(list));
-
@ulrik I figured it out...I had my sample maps named like "Elements_Element 004" same way in the code smh...I thought I needed to do that...when I took the "Elements_" off the front of my sample map name it started working!
-