Impulse Response File switching?
-
@DanH What happens if you sort the list of IRs first?
-
-
@DanH I think so... I can't remember if that only works for numbers - I made a video about it a while back. There is also sortNatural. Test and see.
-
@d-healey .sort() = no joy. Will try natural.
-
@d.healey no joy there either. It's strange - this is a v2 of a project. v1 didn't have this issue yet the code is identical... Same version of Hise too...
I wonder if LAF changes to the combobox itself have made a difference?!
Is there a way to force the list settings? i.e create the list as I want it?
-
@DanH said in Impulse Response File switching?:
create the list as I want it?
You could add the items one by one with
myComboBox.addItem()
-
@d-healey thanks, I've renamed the actual file numerically so I'll see if that helps first!
-
@Christoph-Hart So I'm tentatively going to say that this could be a bug with the Default user Preset system and - in this case - Engine.loadAudioFilesIntoPool / ComboBox callback...
I've loaded some impulse responses into the convolution reverb module using Engine.loadAudioFilesIntoPool and used a combobox to select them. All is fine within HISE and Exported Plug-In.
However, when I set a specific preset as the Default User Preset in the project settings then whatever value that preset has saved in it for the combobox, it will reorder the array of impulse responses with that saved value at the top of the list. In HISE everything is ok - this only affects the exported plugin / standalone.
I tested the Default User Preset setting with different presets and changed the combobox value in those the presets and each time the combobox list would change to reflect this buggy order of putting the Default preset's value at the top of the combobox list.
So if the ComboBox list is A, B, C, and the Default User Preset has B saved in it, then when you export the plugin the list will now appear as B, A, C.
-
@DanH Are you populating the combobox with the list returned from
loadAudioSamplesIntoPool()
? Because then it might cause a switch in order because the item that's loaded in the default user preset is being loaded before this call.Try sorting the array before passing It to
ComboBox.set("items", list.join("\n"))
in your onInit. -
@Christoph-Hart Ah that would explain it! Ok will try, thanks!