Unsolved Samplemap Loads; Samplemap Broadcaster Doesn't Fire
-
In my plugin, the Samplemap Receiver executes when I load a SampleMap in HISE's Sampler interface (as it should).
When I load a SampleMap with scripting, the SampleMap loads, but the broadcaster doesn't execute.
Any ideas on this? Been beating my head against the wall for five weeks on this one. Cheers.
-
@clevername27 got a minimal example?
-
@d-healey Thank you for your reply. Do you mean a self-contained snippet? Unfortunately, that's not possible. Here is the broadcaster code. It works up until a certain point of complexity in the other other code – and then it doesn't.
const var sampleMapBroadcaster = Engine.createBroadcaster({ id: "sampleMapListener", args: ["eventType", "samplerId", "data"] }); sampleMapBroadcaster.attachToSampleMap("Sampler", "SampleMapChanged", ""); sampleMapBroadcaster.addListener("SampleMap Name", "sampleMapListener", function(eventType, samplerId, data) {
-
@clevername27 do you load many samplemaps at once?
Does it help to enable the queue based messaging in broadcasters (s
Broadcaster.setEnableQueue)? -
@Christoph-Hart Thank you. As below…
-
Yes, I set that value to True.
-
I'm currently loading one Sample at a time (via the loadSampleMapFromBase64). There's nothing in the SampleMaps folder. (However, when I was loading them normally, and there about 17 in the folder, I experienced the same issue.)
-
-
Restoring the SampleMap folder does not make the receiver execute (but the SampleMap still loads). When I select the SampleMap in the HISE's Sampler GUI (which is possible, because I restored the folder), the Receiver fires.
This may be helpful: When I load my "real" code, and run HISE's cyclic reference tool, the tool reports no problems. If I then load a SampleMap (via my script), and run that tool, HISE crashes immediately. (Makes me wonder if a message is timing out?)
Update: When I moved where I placed SetEnableQueue in my test code (to the end of UI OnInit) , the Receiver began executing. Doing so in my "real" code produced no change.Now it's not working…I'm unaware of changing anything.@d-healey My "test code" is my snippet case, but it's still requires many data files. You're right of course that this is helpful. I just can't post anything.
This also may be relevant: When I load my project, HISE appears to compile it twice. (This doesn't happen when I choose "Compile All Scripts". )
-
@clevername27 said in Samplemap Loads; Samplemap Broadcaster Doesn't Fire:
Do you mean a self-contained snippet? Unfortunately, that's not possible
I mean make a new little project where I can press a button and it triggers the described behaviour. Isolating the issue like this will make it easier to find a solution.
-
@d-healey I understand and appreciate that (truly). I've been trying to do that for 5 weeks — all the data is dynamic – it can't be reduced like that, unfortunately.