Preset Crashes DAW
-
@Dan-Korneff Ok so I think I figured this out on Windows with VS. I have Ableton connected to VS and launches upon building the debug. I love my plugin in Ableton and immediately get a "Ableton Live 10 Suite.exe has triggered a breakpoint" message.
jassert(filter != nullptr); //This line (112) is where it triggers the breakpoint. if (filter != nullptr) { switch (parameter) { case BandParameter::Gain: filter->setGain(Decibels::decibelsToGain(newValue)); break; case BandParameter::Freq: filter->setFrequency(newValue); break; case BandParameter::Q: filter->setQ(newValue); break; case BandParameter::Type: filter->setType((int)newValue); break; case BandParameter::Enabled:filter->setEnabled(newValue >= 0.5f); break; case numBandParameters: default: break; } } else { debugError(this, "Invalid attribute index: " + String(index));
In the Callstack, this is the only bit that has an arrow next to it
> Mesosphere Debug.vst3!hise::CurveEq::setInternalAttribute(int index, float newValue) Line 112 C++
How do I move forward with the debugging of what looks to be a Parametric EQ? I do have 2 of them and both are Draggable Filter Panels that can be saved in preset.
-
@trillbilly just taking a shot here but check your script in HISE, maybe you're addressing an eq parameter which doesn't exist...?
-
@Matt_SF That was my initial thought but I couldnt see anything.
The only EQs I have are for a Dry and Wet Filter. Both are also Draggable Filter Panels. Both the "FilterTile" and "WetFilterTile" have the correct ProcessorID called in the Property Settings. Both Draggable Filter Panels show and seem to work just fine.
I then use this code to add the to user preset.
//DRAGGABLE EQ SAVE IN PRESETS //Filter const var FilterEQ = Synth.getEffect("FilterEQ"); Engine.addModuleStateToUserPreset("FilterEQ"); //Wet Filter const var WetFilter = Synth.getEffect("WetFilter"); Engine.addModuleStateToUserPreset("WetFilter");
The only other code I can think of that calls for anything to do with an EQ is a "Blackout" img that appears over the effect if it is powered off. This also seems to be coded correctly and working fine.
Here is how I have this scripted
//POWER BLACKOUT //FILTER1 - DRY const var BlackoutImage3 = Content.getComponent("BlackoutImage3"); inline function onFilterPowerbtnControl(component, value) { BlackoutImage3.showControl(!value); Content.getComponent("FilterPowerbtn").setValue(value); FilterEQ.setAttribute(FilterEQ.setBypassed(!value), value); Content.getComponent("FilterPowerbtn").setValue(value); }; Content.getComponent("FilterPowerbtn").setControlCallback(onFilterPowerbtnControl);
-
-
@Lindon you were quicker than me
-
-
@Lindon What would be better way for me to script something like this? I've got this on every effect module lol.
-
@trillbilly what is the attribute you are trying to change?
-
@Lindon Just to cover the unused effect modules with a "Blackout" image so they have the appearance of being "Turned Off".
Power Off = Blackout Image ON, covers Effect Panel
Power On = Blackout Image OFF, revealing effect knobs/sliders. -
@trillbilly so what are these three lines for then?
Content.getComponent("FilterPowerbtn").setValue(value); FilterEQ.setAttribute(FilterEQ.setBypassed(!value), value); Content.getComponent("FilterPowerbtn").setValue(value);
especially as the first and third are the same...
if you just want to bypass an effect all you need say is:
FilterEQ.setBypassed(1 - value);
-
-
@trillbilly well fix your EQ code first - and then remove your sample loader...and try again.
-
Content.getComponent("FilterPowerbtn").setValue(value); //power button of the effect, how else would "Blackout" image know to be ON or OFF? FilterEQ.setAttribute(FilterEQ.setBypassed(!value), value); //this is to bypass the effect Content.getComponent("FilterPowerbtn").setValue(value); //this is a mistake, I was thinking incorrectly.
-
its a miracle that this works at all:
FilterEQ.setAttribute(FilterEQ.setBypassed(!value), value); //this is to bypass the effect
it should be this:
FilterEQ.setBypassed(1 - value);
so you call back should look like this:
inline function onFilterPowerbtnControl(component, value) { BlackoutImage3.showControl(1 - value); FilterEQ.setBypassed(1 - value); }; Content.getComponent("FilterPowerbtn").setControlCallback(onFilterPowerbtnControl);
https://docs.hise.audio/scripting/scripting-api/effect/index.html#setbypassed
-
@Lindon Awesome, thanks! That does look alot better in my script. My initial issue still persist of presets crashing within HISE.
When you say "Remove Sample Loader" do you mean the script + the panels? I have removed the sample loader settings via the .preset file and then the presets load. It's only when the preset calls for a sample to be loaded it seems.
-
@trillbilly well you need to post as snippet
-
@Lindon I tried to create minimal snippet of the problem but the issue only occurs in my project. If I create multiple samplers with the CustomSampleImport scripts and use it, it works just fine saving & recalling presets.
When I bring that same script into my project, all compiles fine but recalls presets incorrectly and crashes.
Do you have another suggestion on how to create a usable minimal snippet?
-
@Lindon Here is the SampleDropper from within a .preset file that crashes.
<Control type="ScriptPanel" id="SampleDropper" value="JSON{"isCustom": true, "value": "273.nT6K8CFb.zCB.HqSy3BfKM.ZQBjVX.F.uHylje+06kKaOKzizB5UBSXaqTqVzViHswRluFAXo2Fe4w6Cppt.LDI.HCJ5hFUH44jUiMAmoPzcnkc0dxUOrn1SBtKcQKwgv3s.VGgCoabEBJvgY.F+Aluu9Fpd6cUIaX9IlV1Ww2+NhJ5SK99ghypzYTureHnLvwIY0FxSZrGjGq96hvFpi.VkgPNRawT7uKczCbKq9Y9a9dmR0KZlo4vlnlKiHIoqa01xi5MdRm3vTCPe9ZNtGq9vfa0HCarHj+vEn.JIPPidPorn4hSQwHyPM3TPFvjg.LXyWdq7hAUcqUC8RwYv2JaWUpAQ6rmQe8kRnEF+5dKC"}"/>
If I remove everything and leave just the code below, all will load but with no WAV file (obviously).
<Control type="ScriptPanel" id="SampleDropper" value=""/>
-
So what @Lindon suggested for the EQ Scripting did help get by the first bug in debugging, thank you!
Now its coming down to the Sample Dropper. It seems it can't recall/pull the audio and pulls error after error (if you hit "Continue" in VS debug mode). Not sure what basically any of it means as it looks like it's the JUCE code rather than HISE (like that makes a difference). Ill keep at it and see what I can come up with!
-
@trillbilly are you sure your code for the custom import is correct? Sounds like the problem is in there somewhere