Preset Crash
-
@bendurso I have an idea I want to play with
- but I've forgotten how you load an effect into a hardcoded fx using scripting... how?Got it.
-
If you set the convolution node to use an external slot then it should work.
In this snippet I'm connecting it to an AudioWaveform control on the UI, just so we can see what's happening, but you don't have to do that. Instead I think you can use
Engine.createAndRegisterAudioFile()
- you'll need one for each slot.HiseSnippet 1030.3ocyW90aaaCD.mxNrc16OsEn8cA+jyPWfUZhicGBpa7eVMVcpwbVW.1CEzRT1DQhzfhJIFCEXej5Gg9QZeC1NRIaI25zkYr0Y+PPHOd28iGu6H0PovkFEIjHqxmMeFEY8U3Qy4posmRXbT+NHq6gIwdLQOV.8LZjBcx7YjnHpGxxp3OnWjUocPle+wyNgDP3tzroPnWKXtzWxBYprYG15GYAA8HdzyXg4V8As56J3sEAhX.nh3ZnYD2KHSnmRzKq.F8BRzTj02hqcXyl0F23nl07q63PZzrQ8wjZNdG3Ra3P1uouyQ6OdrqKx5Nc8XJgbjhnnQHqcNQ3MezTwU7DG7ZVDab.UOvAMB7bxz8DAd5sndVT6or.ugKhTQHvJCyhaEShaODOf4wVNeV769FA1YZjO.ZUXU7JtBdN4wqVN7VCRV4PBmfzCvibkrYpLIZd9RbethJ8Iv4TdTNMN74KNnARvVVvIRhAPEdmEts.Tiq1KjbAsmDFrzLUqWq1isg+r62WtLb.ForujHs8u19XaSxzdSnpQABUuyqV4EDomq.BtCHQf98N2ohVMFOfwo19wbWESvsE7wJ9KEDOsakhfpthvYBN.viAiGDS2s7uUtj4+rO9XaG6mA9auHppquO0UUsBvwkhJ6Z+zUm+6b.u8VvgK1N.ZsWX5pURcZkc0pj551jffwPdX0OjIvR438Tgh9JdUCWkeaY6OTju+ZkkZq.pbsh0EHxOkhU4wgiox7QE8BgbzUyrv2blU9De2jvRtEJ384L0qlQ42T4.JMVpyBSoBp6TlbvGklCZRs9ExkTegLDw7z0EqLmCxrAx25vinHlpdIgOgBaDoRmWpEYloK2awXzO2uid0oD.v..NiJUL8d2pC8RnKTRUQIbGZzEJwLvzKO4Wx62jx6IwJkfa.sDN8XGccFc8aMOaPmVJ50ZafMKKB1R84CkTHGRWYgx4l69ONrbCN82+0VWw7TSyjNu0TJaxzr9ruW1Z1hio9d5VTebwGzLNquwNIQHnikvKNfnVsMltYep.HCbkdG5VA7HlZd9KC9Wq21sEwGfGxTtSWOiEVCiP5x+ELldivWiS54jA3N3dm+Yn8eZL5QYG21Im21f60br1DgUtKfptRHuvT7YU7Vynymlw6bKOGuGdni8VclFP39a8D9jsdBOXqmvC25Ir9+SD9ShXEiOY.QIYvUTX34iifms6RA53bZf4IjEzONHYbsEWUOhx8LC9S3WpPmku2DD5rP3mEeDRbkh23l7rEcWpuvLCru4lO5nDdfdr8ZdeRH7t92n+Fi7l5iTb+MUwmroJdvlp3gaph02TEOZSUrweuh5O654wJQXRsABMXXWyiDsr5xIPVtoLA8W.gl4IgB
-
@d-healey said in Preset Crash:
createAndRegisterAudioFile
So, instead of using getAudioSampleProcessor for loading the impulse responses, I can use Engine.createAndRegisterAudioFile(), and I should compile the convolution reverb with 36 different external slots?
-
@bendurso Yes, but test it first. Make a test project with maybe 4 slots.
-
@d-healey Ok, cool — I'll give it a try, thanks! But do you think removing the conditional for searching audio files in the source code, just to be able to declare the empty hardcoded master FXs on init, is a bad idea? I compiled it and it seems to work fine :) I'm not sure yet if it solves the crashes though.
-
@bendurso I defer to Christoph on that, I'm not sure. Maybe make a github issue so it doesn't get lost in the forum.
-
@d-healey Great, thanks. I changed that but it keep crashing for him. This time it crashed right after he pressed the next button; the plugin didnt load anything more (I can see from the debug log).
This is my script for next preset:
inline function onbtnNextPresetControl(component, value) { if (value) { Engine.loadNextUserPreset(0); LookAndFeel.presetDisplayName = Engine.getCurrentUserPresetName(); LookAndFeel.btnPresetSelect.sendRepaintMessage(); } }; Content.getComponent("btnNextPreset").setControlCallback(onbtnNextPresetControl);
presetDisplayName is a variable I have in the LookAndFeel namespace where I store the name of the current preset.
And btnPresetSelect is the button to display the preset name and to open the preset browser.Oh and the LookAndFeel namespace has 2600 lines. I'm not sure if this is relevant.
Is there something wrong here that could cause a crash?
-
@bendurso said in Preset Crash:
Is there something wrong here that could cause a crash?
I don't see any issue in that bit of code. Make a minimal project that just tests the effect loading stuff to rule out that being the issue.
-
@d-healey I will check. And is it bad to use Engine.createUserPresetHandler and PresetHandler.setPostCallback in two different namespaces?
-
@bendurso said in Preset Crash:
Engine.createUserPresetHandler and PresetHandler.setPostCallback in two different namespaces?
Yes. You can only have one of each so having two will lead to weirdness.