Custom IR Samples within the combo box
-
@ulrik I will try when I go to studio, thanks. Claude? Is it useful?
-
@ulrik said in Custom IR Samples within the combo box:
is it possible to get this fixed in the source code?
Got a minimal example?
-
@David-Healey said in Custom IR Samples within the combo box:
Got a minimal example?
Chose a directory, it will scan all there is inside that directory on all levels, for wav, aif, mp3 and m4a files, and set the valid files to the cmb.
Click through the items and compare what you selected with what the onCmbControl is printing.
For most of the times it will be correct selections but sometimes, when deeper than 2 levels down, it will fail.
I don't know if the level depth is causing it but it looks like that.HiseSnippet 1250.3ocsVstaaaCElJIZnxqanEXO.B9WxoAt1KNWVK1parS1LVSiQbVwJ1FJnnniXqDo.IURLFx61dS1qvdC1NjR1RN0coKX0+vR7b8iemiNjikBBUoDRjSiylkQQN22cxLtNdPLlwQiFBxcCyO2eJKghNXVFVonQHGm0+didGuMP1e+0yN.mf4DZkHD5UBFg9BVJSWIcb+ejkjbDNhdFKsl085OhH3CDIhb.Kq61AkgIuCeN8kXiYq4h9ArJF4roKIpGoGY2vdcw3o60MbWZ39c2qKcexNQeCgfI6DR5t81XjymcXDSKjSzXMUgb13.QzrIwhK4EI3ULEKD1UvhtnIPlKDejHIxrEMRQChYIQimSRJDDkwUT15ET1W4dLKhsPdE08.qB+JOpSfNqsL7VeI30sN75TCdq.RN0fzFEP5gtSHRVltRiAOet6HtlJmhIKWKKrEs1etg6.AXAW2NE+N5QRXwBOB50oyV9a2oSqm1nATqTZ+KvR+Aog9eq+b2NmpGHRyDbXQPSPWSvZ3QaEEVmqnCxUZQ5XQVdVys70xbZcCXZZpBj2z3VCI8b+Hl7o1WLMfJHS+xuAZX7DFm5OMmSzLA2WvSD3HakSZfhTjDPliis.bl.4owu2viM0OnbkGrz6HHpSlofz1NTJtTQORHGxjTBTXlETS6Pp5cZQ1VKxYfAPPTrgwFWif1LUk6sLpKz6A6C.7FSdpcsc6zljPwxfV0DAFUKqSY7HyRkM3.urY6KwWrk+lswrolGoYaaezCWwllXAr4HCWZ8SUH7Z3uqMudciqANb0krJdrYKSMojMGfSRBgOHCVASaJUuWE4F.vv8qtJ6kHH3DeqrxxqWCuoBIPn9Lteo+VZrvTfJMCE.ig2ZqESzRF+7ft1cYUzLzck1NsZKoYIl93k7pSqG07wKvhmEFsyxUwAko4QMexSZ9Hi7EAnvAPbqB1bEash37VAiGz7W4VCutwp5aAO+O0v93G6YrCKo95XlxWjqyx09Wxzw.mm.cdznhsOvc5XpOIMDbCxgR.smYvlVWkISw2TlNidkNn0s0aX+bd0MEUaCHH01duTnomvCraEfA7uopoSWotxXkPkqTs4nC4+liA77zPprNQZLDFOt7LW2O7L25GIPJniZFJ3i3L8IYT9G5fBTIGZlOWhJvTsc57CJmNCban3.wUHFLF10EHQjEvUGK9f9neZzPrFOOLPDgrjQkZlYC3LjdAbHawPeO2xoTv4kKJaHm6cqI8ppDNr+rpEeW+KYQ53EB9iv9wT14w55ljhA2ccLKVd9tQpUbMr3UfkurDKGjq0BtEI22sZvRM.0+s0Azy9X.jFZlMa2WbxyG5ObzoGN3rSN80HE9B5H9XIEZfKJqL0whT.VX4rxp36ePJbDtHJOAqW9bcyseJU.MdKcXp4.SthomU+1Q+ucX+GKDen6XllDuZLt1JvHzf8o.ikWQ5KbOb5TX3TE.2v8ne9Sy8gPmBCEgY6GigQ7ldyWlmNAtVIgBYmyoIlO7cVyzXVrty792ITdjcweC+JU1cdarQY24JQoXhT7FRwG1lKgcOqD.Sb6EV8bO1r1u6M+hFgRg6D9FBY4P8dN902UG29t5Xu6pi6bWcb26pi6cWcb+a2QyU1edNLDq3yFD53wGZm.63bHGCcf1tUz+.3YC8FL -
@ulrik I'm not seeing an issue, the code looks a little cumbersome though. I'll shuffle some stuff around and let me know if that improves the behaviour for you.
-
@David-Healey How deep did you go?
-
@ulrik
temp/brass/trumpet/piccoloTrumpet/ -
@David-Healey and you had other files on other levels as well?
-
@ulrik Yes, for example on this level
temp/brass/euphonium/ -
@ulrik Could you create a version that demonstrates the problem without relying on a folder/file structure, instead just use an array or object?
I can't find any fault with it:

-
@David-Healey did you check the combobox callback what's logged and compared to what' you selected?
Here's another example using a list
HiseSnippet 1136.3ocsVstaaaCElJIZXRaCnEXO.D9WJCAwQNWmGZWVbR1LVcpwbZw.5JJnnnrXCEofDURLFBvdN1qydg1av1gRx1xMNoCFq9Gx5bke7vC+NZXlhxxyUYHK2KmjxPVeo8nIRcbuXBWh5epQQPwXbDWvvcPmLIkjmyBQVVq+iFOrb1.U96u+9SHBhjxlqBgdshSYufmv0y0N73elKDmSBYWxSZ38dG2mpj8TBUAfl0s2AkRnWQFytfXbaMazOQxiQVeiMMbO5dzCB1ymPhNzO3.VvQ9G5yNhte32RoD59AT+c2kfr9ryB4ZU1HMQyxQVabhJbxnX0MxpE307bdffYD7QifUtR84JQnYKZzh5EyEgCmVlxQPVFNunsdUQ6qsGvC4yzOu38jRC34Qzr.Zs1hva8EfmeS3sSC3sDHY0.RaTAomZOhlwS0ysXvyWX2WpYYQD3bpITp7Es1ettcOE3gTucB4J14YfvrH75ryNaggGa9cttvYUtFeMIC2KI.+L7zvFyz8TIoJIH30Br0B7F9a6bFHWjy5UjqUICUoEos1BqyJXlzkwFiEbHiOy8MtNsdUNKqM3bleqsZJ1YtXUdZOREoamCO7eXSUQcNgBE6IseAiDlW9z+Azun+CMpGntlKGad2+wLtXjCJDZNnsk6agsnKWJ3RFNpPR0bkDCUj9ZVRtm4xU9lt+tqyrBE2X.pOsLkOGghRD3RcPo9MP1bbchTYXuHLWhqi2wozisSKxi8h1NikJLmZsZaxS2ts1zTnu+RTEz6UboWqeSV50ctty.m4TYykAe3xZRf4XOSI7nSOy2B5IDvYpY2vivd0RNfnS61NF+HYLrNlmiUE5zBM9FtNFJFBFUyBKgiYSoiYXZR.DFrF4JAa6zLNzSMakLsZFHdI6VsmA0N24dG.zGoSzrwqQbOhPD.DLdM2FPRZr8tPoYuT5UtUfRB9CMEEsTa04RvxVpYCqW1iEnmrHIfk0rPZbDtYuHcg8CSWzjMiVUNZ3nR1Wx0uLkIeHNNTcMzPsTiJvUcIwxSpIVfZaf5D0sHNvfXaCEQTIfaNR.8p9mRzjooAxHrJorLM2rArNkcMLenhuxw9TV9UZUZou0Gaf5O5hd67E74GOoovM7Pc7LE+A43XFebrtoKIDHbaKGPXQpIiVKPa4kCj0eYaHV51sjRxc96cpeuJxtcMTNc6VRG8fV53VyOzsaIkS0e9KUaCeGVprhpoTx+Qr0HtojPvj26Mj.FOoBKDD8hyrLS1qM.clKLnvLLPly0SZdL++1fr+qP7o1C4ZZ7xw3ZKAiPG3mBLVO9+qrOKJBXulCvMrO+W+zLqG8K.qIbLOfny3ll2KJRFAexDkAqtTxDFlAq0L2gqj2wHap.iXxvRg+A9UazeZetwn+TinDBMS8NZ0MeyGX74kZ.LIK+XLG6AFYr+GdkGgRfu24cT5ho5dA1YUCb2UMv8V0.2eUC7fUMvCW0.O5iGn4yQ+gBfQp5ZCBMX3YkTzVVmIIPGXY2J5eAPR.0UL -
@ulrik said in Custom IR Samples within the combo box:
@David-Healey did you check the combobox callback what's logged and compared to what' you selected?
No I didn't. I just tried it now and I see the mismatch. I don't think this is a bug in HISE though, I think this is related to how the items are being added to the menu and how they are indexed. I'll look into it further.
Edit: These Console.prints seem to confirm it's an index offset issue
inline function setItems(files) { Cmb.set("items", ""); local items = []; for (f in files) { items.push(f.replace("/", "::")); Console.print(items.length + " : " + items[items.length - 1]); } Cmb.set("items", items.join("\n")); } setItems(list); inline function onCmbControl(component, value) { if (value) { // compare this output with selected item in the cmb Console.print(value + " : " + component.getItemText()); } };I'm guessing each sub-directory affects the index, I'll see what I can find out.