Combobox to PresetBrowser
-
I had backup from David's Video > https://www.youtube.com/watch?v=eQ7YvIeS5lY
The reason why i am stuck is because i couldnt find samplemap. Yes, i tried it to type it myself but if do this myself i will get this error :
Interface:! Found 'inline' when expecting ';' {SW50ZXJmYWNlfHwzMDN8MTR8MQ==}
: onInit() - Line 14, column 1 {SW50ZXJmYWNlfHwzMDN8MTR8MQ==}I created the callbacks and everything else but i am still stuck on this part.
This is what i used on my script editer :Content.makeFrontInterface(1000, 600);
//Sampler
const var Sampler1 = Synth.getChildSynth("Sampler1");//Samplemap array
const var SampleMaps = Sampler.getSampleMapList()//ComboBox
const var ComboBox1 = Content.getComponent("ComboBox1");
ComboBox1.set("items", SampleMaps.join("\n"))inline function onComboBox1Control(component, value)
{
Sampler1.asSampler().loadSampleMap(samplemaps[value-1]);
};Content.getComponent("ComboBox1").setControlCallback(onComboBox1Control);
I could use some help, Thanks already!
Kind regards,
Joe -
Interface:! Found 'inline' when expecting ';'
: onInit() - Line 14, column 1This tells you everything. You are missing a semi-colon on or around line 14
Actually by the looks of it you are missing two
On this line
const var SampleMaps = Sampler.getSampleMapList()
and this one
ComboBox1.set("items", SampleMaps.join("\n"))
-
but why does it work on your HISE project and it doesnt work on mine? i did the exact thing you did.
Yes, i'm a noob so i copied your homework. lol. This is what i get right now:
Interface:! function not found {SW50ZXJmYWNlfHw0MTV8MTZ8MzY=}
: oncmbSampleMapControl() - Line 16, column 36 {SW50ZXJmYWNlfHw0MTV8MTZ8MzY=}Interface: Compiled OK
Now it notified the sample library BUT if i change the preset in the combobox it will stay on the same sound.
I used your codes so i do not know whats wrong.
-
@BigBlackMuzik Post a snippet
-
HiseSnippet 2243.3oc6Z0saajaEdFayDKswINos.4lEXfaKpbaVuRN1w1sXgGaY4.03eDjbxVisEtzinj35YHElgicbCBvhEnn6EEnWu2UfVTzKCPeALPeD5M8xruA4MHkjyebjjimIHw6lswWDH9ygy246b3gGdXZ3RsPddTWM8B6cZejl90.sNkv5UsGDSzpugl9UA6Q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OgAA4GMzM7IMjjRQPzac7l38B6m42KjeCGaw6oj5L5yLWmeFKxMcuOyT9oVyg5SR8sBQdSTeDjscPABCGbRylMuuK0u+fR8hUkGPrmKz5HQxZJCrKAwssLUcrpK0yqCWcjqkm5PM7c6J3pjdZhNF45ktOw8ZTrpBC0C8PB+IrUjCPxrkekx6Ak9T+Tv7KLW5+NdW9+z4WH94JUksCDoR9EY97KxcyuHKjeQVL+hbu7KxR4Rj3K9I1wHqvu35bC85WWMaGpwWGdfHjsxLWG2M4xkxdTigD6EJAsxinOhiGuxaqWHe7rE66Bx+HDR+nv5y7oXVu3pyHwz4V4F073dikMQxiJd4kO7aFhrPDFCxaKpPtwoRLP4cUQ41TBseOJAakN5UjYPA6iTgBqMrxSSFU.ekppuElfftoCJmKtnR14hWk851gkx1Pbfjw2OtGy3+e48XxJ0c8vLZL3ecW12wsyWCHONxPjxz2myG0JZo35V3uCpE83wO.s9X17DnrUcoip3xXfKGT5.sboGXE7eU.AVmT1CGkD46uW.rsnsQ7+EADrqC+LzCrrDaC9HN+NZIlO2Rb2bKwB4VhEysD2K2RrTtkX4WgDhDVVymQcBBJx6nQs.GI8ZwNRiq8+.BaOKC
-
@BigBlackMuzik said in Combobox to PresetBrowser:
Interface:! function not found {SW50ZXJmYWNlfHw0MTV8MTZ8MzY=}
: oncmbSampleMapControl() - Line 16, column 36 {SW50ZXJmYWNlfHw0MTV8MTZ8MzY=}The error message is telling you exactly what the problem is.
This is line 16
Sampler1.asSampler().LoadSampleMap(sampleMaps[value-1]);
There are two functions called on that line.
asSampler()
andLoadSampleMap()
You can tell they are functions because they end with
()
To check which one is incorrect you can use the API browser. Like so.
-
@d-healey said in Combobox to PresetBrowser:
asSampler
as usual, i missed something, thank you so much!
-
what the heck is going on?
when i compile, this error shows up ''Property does not exist''
BUT you can see all the presets in the watchtable. What bothers me the most is that i'm back at the beginning.
Content.makeFrontInterface(1000, 600);
const var samplemaps = Sampler.getSampleMapList();
const var cmSampleMap = Content.getComponent("cmSampleMap");
cmSampleMap.set("item", samplemaps.join("\n"));It will compile but the presetnames do not show up in the combobox.
HiseSnippet 2419.3oc6Z07aaibEmzJiSj13Dmzs.6gV.B2VTm1TCIE+YKJBskjcUi+PUxIYMZAxRSNRZpI4vRNzNZCBPvBTzdn.cut2BP6sdI.8Xu3i8X+Sn8+f7eP5a3GhCkjiIScBR1t9fgl2adju262adu2LCa4R0wddTWI4h6OvAKIeUTmA1r905qQrkZVWR9xn8oOlnKsw.GMOOrgjrbgs3LkKdIof+d4c2PyTyVGmPRR5AThNdahEgkPsk58HllapYf2mXIL6EUapSsqQMo9fhT.UVxQS+Hsd3c03SaJjj7zMLHLpaGlFC6IIeoMnFC5zmdhc37e.wibnIlOnhTG3AERdSpoAWi4Tkp0mXZzJ1f8jjjQsRL+Bgl+Gi1gXPFROwMLa.CkDID8GxS85TuJhpW4rqdxBp2kBUuaf5n6RbXIb351GgZZyvtc0.HPTsBmqzTXYTMJLCa1BVZGg2zEFLTh4qTtb4aqrb4x25mMSoYJAHgGS4XMWEOMKGSrklimxOWoSv.2E5gYg+bGMmsIdr44RkHit0PtfPwuUPnZTKGpMLX94DlybQuyDJK3ggoPXXq4tsfFrvukRrmetei8b2hKRWeacFgZqPs2kxv6YO+sJ8jREK8zw3zs6jXwULWpIXPShKO5z80H1719VGhcuMXwl9334AfT5n.zYGEHFjpG5jDlH0toMgsmC19rhMjh7rPTRoHkBlJKHFYlnXjlVvJHIBDIbETvuqHEnuhqRkFU3qEIbGShA1MP5oQasdycGU14OMKxVD0tw1MVuSiQD+e9kpYQ7qfVe+8Wu18FQ5OqeljFgZs9t4vl2vmwn1Ah9QHKpMUwgZNXzGvKua1zbSbOMF8MykeYj2ID6duYBekPgqjAEe1HogEmGR2f93.4mAIrbbBOj62rtFSimeJJHDBLcvtLBOlWtN9XHweX1phn5XuiXTGnrxv0+.4yMN8wh17.wAcIlQUE9Nnmzp8d+xF01+Qat210az9oA0optfC33NgXv5OTN0+rZeLoW+jRQm9Ep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FI3MrrtOiZElTDHzpQXfjbigAREj9u.WEoP7A
-
@BigBlackMuzik Your snippet is empty...
-
@BigBlackMuzik said in Combobox to PresetBrowser:
''Property does not exist''
As always the information is there :) You are setting a property that doesn't exit.
cmSampleMap.set("item", samplemaps.join("\n"));
The property is
items
notitem
.